diff --git a/.github/workflows/analysis-qodana.yml b/.github/workflows/analysis-qodana.yml new file mode 100644 index 00000000000..7e40d9ec1ee --- /dev/null +++ b/.github/workflows/analysis-qodana.yml @@ -0,0 +1,61 @@ +--- +name: Analysis - Qodana + +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + +jobs: + qodana: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + checks: write + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + + - name: Install Linux Dependencies + run: > + sudo apt-get update && sudo apt-get install ccache + linux-headers-$(uname -r) + - name: CCache + uses: hendrikmuhs/ccache-action@main + with: + max-size: "1G" + key: ccache-qodana + + - name: Restore artifacts and install vcpkg + id: vcpkg-step + run: | + vcpkgCommitId=$(grep '.builtin-baseline' vcpkg.json | awk -F: '{print $2}' | tr -d '," ') + echo "vcpkg commit ID: $vcpkgCommitId" + echo "VCPKG_GIT_COMMIT_ID=$vcpkgCommitId" >> $GITHUB_ENV + - name: Get vcpkg commit id from vcpkg.json + uses: lukka/run-vcpkg@main + with: + vcpkgGitURL: "https://github.com/microsoft/vcpkg.git" + vcpkgGitCommitId: ${{ env.VCPKG_GIT_COMMIT_ID }} + + - name: Get latest CMake and ninja + uses: lukka/get-cmake@main + + - name: Run CMake + uses: lukka/run-cmake@main + with: + configurePreset: linux-debug + + - name: Qodana Scan + run: | + docker run \ + -v $(pwd):/data/project/ \ + -v $(pwd):$(pwd) \ + -e QODANA_TOKEN="${{ secrets.QODANA_TOKEN }}" \ + jetbrains/qodana-clang:2024.1-eap \ + --compile-commands ./build/linux-debug/compile_commands.json diff --git a/CMakeLists.txt b/CMakeLists.txt index 07701451aad..d5853366d80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,9 @@ endif() set(VCPKG_FEATURE_FLAGS "versions") set(VCPKG_BUILD_TYPE "release") +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + + # ***************************************************************************** # Project canary diff --git a/CMakePresets.json b/CMakePresets.json index 49f631e1921..e548742e157 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -84,8 +84,19 @@ "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug", "DEBUG_LOG": "ON", - "SPEED_UP_BUILD_UNITY": "OFF", - "ASAN_ENABLED": "ON" + "SPEED_UP_BUILD_UNITY": "OFF" + } + }, + { + "name": "linux-debug-asan", + "inherits": "linux-release", + "displayName": "Linux - Debug Build", + "description": "Build Debug Mode With ASAN Enable", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "DEBUG_LOG": "ON", + "ASAN_ENABLED": "ON", + "SPEED_UP_BUILD_UNITY": "OFF" } }, { diff --git a/cmake/modules/BaseConfig.cmake b/cmake/modules/BaseConfig.cmake index a1980d0f604..f61ee9e809c 100644 --- a/cmake/modules/BaseConfig.cmake +++ b/cmake/modules/BaseConfig.cmake @@ -74,6 +74,29 @@ option(BUILD_STATIC_LIBRARY "Build using static libraries" OFF) option(SPEED_UP_BUILD_UNITY "Compile using build unity for speed up build" ON) option(USE_PRECOMPILED_HEADER "Compile using precompiled header" ON) +# === TOGGLE_BIN_FOLDER === +if(TOGGLE_BIN_FOLDER) + log_option_enabled("TOGGLE_BIN_FOLDER") +else() + log_option_disabled("TOGGLE_BIN_FOLDER") +endif(TOGGLE_BIN_FOLDER) + +# === TOGGLE_BIN_FOLDER === +if(OPTIONS_ENABLE_OPENMP) + log_option_enabled("OPTIONS_ENABLE_OPENMP") +else() + log_option_disabled("OPTIONS_ENABLE_OPENMP") +endif(OPTIONS_ENABLE_OPENMP) + +# === DEBUG LOG === +# cmake -DDEBUG_LOG=ON .. +if(DEBUG_LOG) + add_definitions(-DDEBUG_LOG=ON) + log_option_enabled("DEBUG LOG") +else() + log_option_disabled("DEBUG LOG") +endif(DEBUG_LOG) + # === ASAN === if(ASAN_ENABLED) log_option_enabled("asan") @@ -87,7 +110,7 @@ else() log_option_disabled("asan") endif() -# Build static libs +# === BUILD_STATIC_LIBRARY === if(BUILD_STATIC_LIBRARY) log_option_enabled("STATIC_LIBRARY") @@ -102,14 +125,19 @@ else() log_option_disabled("STATIC_LIBRARY") endif() -# === DEBUG LOG === -# cmake -DDEBUG_LOG=ON .. -if(DEBUG_LOG) - add_definitions(-DDEBUG_LOG=ON) - log_option_enabled("DEBUG LOG") +# === SPEED_UP_BUILD_UNITY === +if(SPEED_UP_BUILD_UNITY) + log_option_enabled("SPEED_UP_BUILD_UNITY") else() - log_option_disabled("DEBUG LOG") -endif(DEBUG_LOG) + log_option_disabled("SPEED_UP_BUILD_UNITY") +endif(SPEED_UP_BUILD_UNITY) + +# === USE_PRECOMPILED_HEADER === +if(USE_PRECOMPILED_HEADER) + log_option_enabled("USE_PRECOMPILED_HEADER") +else() + log_option_disabled("USE_PRECOMPILED_HEADER") +endif(USE_PRECOMPILED_HEADER) # ***************************************************************************** # Compiler Options diff --git a/data-otservbr-global/lib/core/quests.lua b/data-otservbr-global/lib/core/quests.lua index a35dcb15dea..2e1741beeba 100644 --- a/data-otservbr-global/lib/core/quests.lua +++ b/data-otservbr-global/lib/core/quests.lua @@ -608,12 +608,12 @@ if not Quests then }, [7] = { name = "Factions", - startStorageId = Storage.Factions, + startStorageId = Storage.Quest.U7_4.DjinnWar.Factions, startStorageValue = 1, missions = { [1] = { name = "The Marid and the Efreet - Djinn Greeting", - storageId = Storage.DjinnWar.Faction.Greeting, + storageId = Storage.Quest.U7_4.DjinnWar.Faction.Greeting, missionId = 1064, startValue = 1, endValue = 2, @@ -625,7 +625,7 @@ if not Quests then }, [2] = { name = "The Marid and the Efreet - Marid Faction", - storageId = Storage.DjinnWar.Faction.MaridDoor, + storageId = Storage.Quest.U7_4.DjinnWar.Faction.MaridDoor, missionId = 1065, startValue = 1, endValue = 2, @@ -637,7 +637,7 @@ if not Quests then }, [3] = { name = "The Efreet and the Efreet - Efreet Faction", - storageId = Storage.DjinnWar.Faction.EfreetDoor, + storageId = Storage.Quest.U7_4.DjinnWar.Faction.EfreetDoor, missionId = 1066, startValue = 1, endValue = 2, @@ -651,12 +651,12 @@ if not Quests then }, [8] = { name = "Friends and Traders", - startStorageId = Storage.FriendsandTraders.DefaultStart, + startStorageId = Storage.Quest.U7_8.FriendsAndTraders.DefaultStart, startStorageValue = 1, missions = { [1] = { name = "The Sweaty Cyclops", - storageId = Storage.FriendsandTraders.TheSweatyCyclops, + storageId = Storage.Quest.U7_8.FriendsAndTraders.TheSweatyCyclops, missionId = 1067, startValue = 1, endValue = 2, @@ -669,7 +669,7 @@ if not Quests then }, [2] = { name = "The Mermaid Marina", - storageId = Storage.FriendsandTraders.TheMermaidMarina, + storageId = Storage.Quest.U7_8.FriendsAndTraders.TheMermaidMarina, missionId = 1068, startValue = 1, endValue = 2, @@ -682,7 +682,7 @@ if not Quests then }, [3] = { name = "The Blessed Stake", - storageId = Storage.FriendsandTraders.TheBlessedStake, + storageId = Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, missionId = 1069, startValue = 1, endValue = 12, @@ -2125,7 +2125,7 @@ if not Quests then missions = { [1] = { name = "Assassin Addon: The Red Death", - storageId = Storage.OutfitQuest.AssassinSecondAddon, + storageId = Storage.Quest.U7_8.AssassinOutfits.AssassinBaseOutfit, missionId = 10168, startValue = 1, endValue = 2, @@ -2137,7 +2137,7 @@ if not Quests then }, [2] = { name = "Citizen Addon: Backpack", - storageId = Storage.OutfitQuest.Citizen.MissionBackpack, + storageId = Storage.Quest.U7_8.CitizenOutfits.MissionBackpack, missionId = 10169, startValue = 1, endValue = 2, @@ -2150,18 +2150,19 @@ if not Quests then }, [3] = { name = "Citizen Addon: Feather Hat", - storageId = Storage.OutfitQuest.Citizen.MissionHat, + storageId = Storage.Quest.U7_8.CitizenOutfits.MissionHat, missionId = 10170, startValue = 1, endValue = 2, states = { [1] = "Collect a legion helmet, 100 chicken feathers and 50 honeycombs and bring them to either \z Hanna or Norma to have them make a feather hat addon for you.", + [2] = "You got the Citizen Hat Addon!", }, }, [4] = { name = "Barbarian Outfit Quest", - storageId = Storage.OutfitQuest.BarbarianAddon, + storageId = Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, missionId = 10171, startValue = 1, endValue = 17, @@ -2193,10 +2194,10 @@ if not Quests then }, [5] = { name = "Beggar Outfit: The Newest Fashion", - storageId = Storage.OutfitQuest.BeggarOutfit, + storageId = Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, missionId = 10172, startValue = 1, - endValue = 6, + endValue = 8, states = { [1] = "Your current task is to bring Hugo 20 pieces of brown cloth, like the worn and ragged ghoul clothing.", [2] = "Your current task is to bring 50 pieces of minotaur leather to Hugo. \z @@ -2206,11 +2207,13 @@ if not Quests then [5] = "You brought all items required for the "poor man's look" to Hugo. \z He told you to come back to him after a whole day has passed, then the outfit should be finished.", [6] = "You got the outfit!", + [7] = "Now you need to go after the items to get the first addon.", + [8] = "Congratulations, you delivered the items for the first addon.", }, }, [6] = { name = "Druid Outfit Quest", - storageId = Storage.OutfitQuest.DruidHatAddon, + storageId = Storage.Quest.U7_8.DruidOutfits.DruidHatAddon, missionId = 10173, startValue = 1, endValue = 10, @@ -2231,7 +2234,7 @@ if not Quests then }, [7] = { name = "Hunter Outfit Quest", - storageId = Storage.OutfitQuest.HunterHatAddon, + storageId = Storage.Quest.U7_8.HunterOutfits.HunterHatAddon, missionId = 10174, startValue = 1, endValue = 5, @@ -2245,7 +2248,7 @@ if not Quests then }, [8] = { name = "Knight Addon: Helmet", - storageId = Storage.OutfitQuest.Knight.MissionHelmet, + storageId = Storage.Quest.U7_8.KnightOutfits.MissionHelmet, missionId = 10175, startValue = 1, endValue = 6, @@ -2264,7 +2267,7 @@ if not Quests then }, [9] = { name = "Mage & Summoner Outfit Quest (Wand)", - storageId = Storage.OutfitQuest.MageSummoner.AddonWand, + storageId = Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWand, missionId = 10176, startValue = 1, endValue = 7, @@ -2282,7 +2285,7 @@ if not Quests then }, [10] = { name = "Mage & Summoner Outfit Quest (Fluid Belt)", - storageId = Storage.OutfitQuest.MageSummoner.AddonBelt, + storageId = Storage.Quest.U7_8.MageAndSummonerOutfits.AddonBelt, missionId = 10177, startValue = 1, endValue = 2, @@ -2293,7 +2296,7 @@ if not Quests then }, [11] = { name = "Female Mage and Male Summoner Addon: Headgear", - storageId = Storage.OutfitQuest.MageSummoner.MissionHatCloak, + storageId = Storage.Quest.U7_8.MageAndSummonerOutfits.MissionHatCloak, missionId = 10178, startValue = 1, endValue = 11, @@ -2330,7 +2333,7 @@ if not Quests then }, [13] = { name = "Warrior Addon: Shoulder Spike", - storageId = Storage.OutfitQuest.WarriorShoulderAddon, + storageId = Storage.Quest.U7_8.WarriorOutfits.WarriorShoulderAddon, missionId = 10180, startValue = 1, endValue = 7, @@ -2353,7 +2356,7 @@ if not Quests then }, [14] = { name = "Wizard Outfits Quest", - storageId = Storage.OutfitQuest.WizardAddon, + storageId = Storage.Quest.U7_8.WizardOutfits, missionId = 10181, startValue = 1, endValue = 7, @@ -2369,7 +2372,7 @@ if not Quests then }, [15] = { name = "Pirate Outfit Quest (Sabre)", - storageId = Storage.OutfitQuest.PirateSabreAddon, + storageId = Storage.Quest.U7_8.PirateOutfits.PirateSabreAddon, missionId = 10182, startValue = 1, endValue = 5, @@ -2383,7 +2386,7 @@ if not Quests then }, [16] = { name = "Oriental Addon: Hipwear", - storageId = Storage.OutfitQuest.FirstOrientalAddon, + storageId = Storage.Quest.U7_8.OrientalOutfits.FirstOrientalAddon, missionId = 10183, startValue = 1, endValue = 2, @@ -2396,7 +2399,7 @@ if not Quests then }, [17] = { name = "Oriental Addon: Headgear", - storageId = Storage.OutfitQuest.SecondOrientalAddon, + storageId = Storage.Quest.U7_8.OrientalOutfits.SecondOrientalAddon, missionId = 10184, startValue = 1, endValue = 5, @@ -2413,7 +2416,7 @@ if not Quests then }, [18] = { name = "Shaman Addon: Staff", - storageId = Storage.OutfitQuest.Shaman.MissionStaff, + storageId = Storage.Quest.U7_8.ShamanOutfits.MissionStaff, missionId = 10185, startValue = 1, endValue = 2, @@ -2424,7 +2427,7 @@ if not Quests then }, [19] = { name = "Shaman Addon: Mask", - storageId = Storage.OutfitQuest.Shaman.MissionMask, + storageId = Storage.Quest.U7_8.ShamanOutfits.MissionMask, missionId = 10186, startValue = 1, endValue = 2, @@ -2437,12 +2440,12 @@ if not Quests then }, [13] = { name = "Sam's Old Backpack", - startStorageId = Storage.SamsOldBackpack, + startStorageId = Storage.Quest.U7_5.SamsOldBackpack.SamsOldBackpackNpc, startStorageValue = 1, missions = { [1] = { name = "Dwarven Armor Quest", - storageId = Storage.SamsOldBackpack, + storageId = Storage.Quest.U7_5.SamsOldBackpack.SamsOldBackpackNpc, missionId = 10187, startValue = 1, endValue = 3, @@ -2751,75 +2754,98 @@ if not Quests then }, [16] = { name = "The Ancient Tombs", - startStorageId = Storage.TheAncientTombs.DefaultStart, + startStorageId = Storage.Quest.U7_4.TheAncientTombs.DefaultStart, startStorageValue = 1, missions = { [1] = { name = "Omruc's Treasure", - storageId = Storage.TheAncientTombs.OmrucsTreasure, + storageId = Storage.Quest.U7_4.TheAncientTombs.OmrucsTreasure, missionId = 10210, startValue = 1, - endValue = 1, - description = "You defeated Omruc and received a helmet adornment", + endValue = 2, + states = { + [1] = "Now you can start the steps until you reach Omruc's room.", + [2] = "You defeated Omruc and received a helmet adornment.", + }, }, [2] = { name = "Thalas' Treasure", - storageId = Storage.TheAncientTombs.ThalasTreasure, + storageId = Storage.Quest.U7_4.TheAncientTombs.ThalasTreasure, missionId = 10211, startValue = 1, - endValue = 1, - description = "You defeated Thalas and received a Gem Holder", + endValue = 2, + states = { + [1] = "Congratulations, you have pulled all 8 levers and can now continue to the next step.", + [2] = "You defeated Thalas and received a Gem Holder", + }, }, [3] = { name = "Diphtrah's Treasure", - storageId = Storage.TheAncientTombs.DiphtrahsTreasure, + storageId = Storage.Quest.U7_4.TheAncientTombs.DiphtrahsTreasure, missionId = 10212, startValue = 1, - endValue = 1, - description = "You defeated Dipthrah and received a Damaged Helmet", + endValue = 3, + states = { + [1] = "Now you need to pull all 11 levers to be able to continue.", + [2] = "Now you need to use all the plaques before accessing Diphtrah's room.", + [3] = "Congratulations, this step has been completed.", + }, }, [4] = { name = "Mahrdis' Treasure", - storageId = Storage.TheAncientTombs.MahrdisTreasure, + storageId = Storage.Quest.U7_4.TheAncientTombs.MahrdisTreasure, missionId = 10213, startValue = 1, - endValue = 1, - description = "You defeated Mahrdis and received a Helmet Ornament", + endValue = 2, + states = { + [1] = "You need to defeat Mahrdis and receive a Helmet Ornament.", + [2] = "You defeated Mahrdis and received a Helmet Ornament.", + }, }, [5] = { name = "Vashresamun's Treasure", - storageId = Storage.TheAncientTombs.VashresamunsTreasure, + storageId = Storage.Quest.U7_4.TheAncientTombs.VashresamunsTreasure, missionId = 10214, startValue = 1, - endValue = 1, - description = "You solved the musical riddles of Vashresamun's Tomb and received a left horn.", + endValue = 3, + states = { + [1] = "Once you've started this quest, you'll need to play the musicals before teleporting.", + [2] = "Congratulations, you played the musical correctly, now you can continue.", + [3] = "You solved the musical riddles of Vashresamun's Tomb and received a left horn.", + }, }, [6] = { name = "Morguthis' Treasure", - storageId = Storage.TheAncientTombs.MorguthisTreasure, + storageId = Storage.Quest.U7_4.TheAncientTombs.MorguthisTreasure, missionId = 10215, startValue = 1, - endValue = 1, - description = "You defeated Morguthis and received a Right Horn", + endValue = 2, + states = { + [1] = "Now you need to go over the blue fireworks on the path.", + [2] = "You defeated Morguthis and received a Right Horn.", + }, }, [7] = { name = "Rahemos' Treasure", - storageId = Storage.TheAncientTombs.RahemosTreasure, + storageId = Storage.Quest.U7_4.TheAncientTombs.RahemosTreasure, missionId = 10216, startValue = 1, - endValue = 1, - description = "You defeated Rahemos and received a Helmet Piece", + endValue = 2, + states = { + [1] = "You have started the steps to access Rahemos' room, and you will need to pull some levers to get to Rahemos' room.", + [2] = "You defeated Rahemos and received a Helmet Piece.", + }, }, }, }, [17] = { name = "The Ape City", - startStorageId = Storage.TheApeCity.Started, + startStorageId = Storage.Quest.U7_6.TheApeCity.Started, startStorageValue = 1, missions = { [1] = { name = "Hairycles' Missions", - storageId = Storage.TheApeCity.Questline, + storageId = Storage.Quest.U7_6.TheApeCity.Questline, missionId = 10217, startValue = 1, endValue = 18, @@ -2947,12 +2973,12 @@ if not Quests then }, [19] = { name = "The Djinn War - Efreet Faction", - startStorageId = Storage.DjinnWar.EfreetFaction.Start, + startStorageId = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Start, startStorageValue = 1, missions = { [1] = { name = "Efreet Mission 1: The Supply Thief", - storageId = Storage.DjinnWar.EfreetFaction.Mission01, + storageId = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission01, missionId = 10221, startValue = 1, endValue = 3, @@ -2966,7 +2992,7 @@ if not Quests then }, [2] = { name = "Efreet Mission 2: The Tear of Daraman", - storageId = Storage.DjinnWar.EfreetFaction.Mission02, + storageId = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission02, missionId = 10222, startValue = 1, endValue = 3, @@ -2980,7 +3006,7 @@ if not Quests then }, [3] = { name = "Efreet Mission 3: The Sleeping Lamp", - storageId = Storage.DjinnWar.EfreetFaction.Mission03, + storageId = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission03, missionId = 10223, startValue = 1, endValue = 3, @@ -2995,12 +3021,12 @@ if not Quests then }, [20] = { name = "The Djinn War - Marid Faction", - startStorageId = Storage.DjinnWar.MaridFaction.Start, + startStorageId = Storage.Quest.U7_4.DjinnWar.MaridFaction.Start, startStorageValue = 1, missions = { [1] = { name = "Marid Mission 1: The Dwarven Kitchen", - storageId = Storage.DjinnWar.MaridFaction.Mission01, + storageId = Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission01, missionId = 10224, startValue = 1, endValue = 2, @@ -3012,7 +3038,7 @@ if not Quests then }, [2] = { name = "Marid Mission 2: The Spyreport", - storageId = Storage.DjinnWar.MaridFaction.Mission02, + storageId = Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission02, missionId = 10225, startValue = 1, endValue = 2, @@ -3025,7 +3051,7 @@ if not Quests then }, [3] = { name = "Rata'Mari and the Cheese", - storageId = Storage.DjinnWar.MaridFaction.RataMari, + storageId = Storage.Quest.U7_4.DjinnWar.MaridFaction.RataMari, missionId = 10226, startValue = 1, endValue = 2, @@ -3036,7 +3062,7 @@ if not Quests then }, [4] = { name = "Marid Mission 3: The Sleeping Lamp", - storageId = Storage.DjinnWar.MaridFaction.Mission03, + storageId = Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission03, missionId = 10227, startValue = 1, endValue = 3, @@ -3560,7 +3586,7 @@ if not Quests then storageId = Storage.Postman.Mission07, missionId = 10258, startValue = 1, - endValue = 8, + endValue = 9, states = { [1] = "Kevin wants you to bring him the measurements of Benjamin, Lokur, Dove, Liane, Chrystal and Olrik.", [2] = "You have received the measurements from 1 of 6 post officers.", @@ -3568,8 +3594,8 @@ if not Quests then [4] = "You have received the measurements from 3 of 6 post officers.", [5] = "You have received the measurements from 4 of 6 post officers.", [6] = "You have received the measurements from 5 of 6 post officers.", - [7] = "You have received all measurements, report back to Kevin!", - [8] = "You have reported back that you have completed the mission.", + [8] = "You have received all measurements, report back to Kevin!", + [9] = "You have reported back that you have completed the mission.", }, }, [8] = { @@ -3627,12 +3653,12 @@ if not Quests then }, [25] = { name = "The Shattered Isles", - startStorageId = Storage.TheShatteredIsles.DefaultStart, + startStorageId = Storage.Quest.U7_8.TheShatteredIsles.DefaultStart, startStorageValue = 1, missions = { [1] = { name = "A Djinn in Love", - storageId = Storage.TheShatteredIsles.ADjinnInLove, + storageId = Storage.Quest.U7_8.TheShatteredIsles.ADjinnInLove, missionId = 10263, startValue = 1, endValue = 5, @@ -3648,7 +3674,7 @@ if not Quests then }, [2] = { name = "A Poem for the Mermaid", - storageId = Storage.TheShatteredIsles.APoemForTheMermaid, + storageId = Storage.Quest.U7_8.TheShatteredIsles.APoemForTheMermaid, missionId = 10264, startValue = 1, endValue = 3, @@ -3663,7 +3689,7 @@ if not Quests then }, [3] = { name = "Access to Goroma", - storageId = Storage.TheShatteredIsles.AccessToGoroma, + storageId = Storage.Quest.U7_8.TheShatteredIsles.AccessToGoroma, missionId = 10265, startValue = 1, endValue = 1, @@ -3672,7 +3698,7 @@ if not Quests then }, [4] = { name = "Access to Laguna Island", - storageId = Storage.TheShatteredIsles.AccessToLagunaIsland, + storageId = Storage.Quest.U7_8.TheShatteredIsles.AccessToLagunaIsland, missionId = 10266, startValue = 1, endValue = 1, @@ -3681,7 +3707,7 @@ if not Quests then }, [5] = { name = "Access to Meriana", - storageId = Storage.TheShatteredIsles.AccessToMeriana, + storageId = Storage.Quest.U7_8.TheShatteredIsles.AccessToMeriana, missionId = 10267, startValue = 1, endValue = 1, @@ -3690,7 +3716,7 @@ if not Quests then }, [6] = { name = "Access to Nargor", - storageId = Storage.TheShatteredIsles.AccessToNargor, + storageId = Storage.Quest.U7_8.TheShatteredIsles.AccessToNargor, missionId = 10268, startValue = 1, endValue = 1, @@ -3699,7 +3725,7 @@ if not Quests then }, [7] = { name = "Ray's Mission 1: Fafnar's Fire", - storageId = Storage.TheShatteredIsles.RaysMission1, + storageId = Storage.Quest.U7_8.TheShatteredIsles.RaysMission1, missionId = 10269, startValue = 1, endValue = 3, @@ -3714,7 +3740,7 @@ if not Quests then }, [8] = { name = "Ray's Mission 2: Sabotage", - storageId = Storage.TheShatteredIsles.RaysMission2, + storageId = Storage.Quest.U7_8.TheShatteredIsles.RaysMission2, missionId = 10270, startValue = 1, endValue = 3, @@ -3729,7 +3755,7 @@ if not Quests then }, [9] = { name = "Ray's Mission 3: Spy Mission", - storageId = Storage.TheShatteredIsles.RaysMission3, + storageId = Storage.Quest.U7_8.TheShatteredIsles.RaysMission3, missionId = 10271, startValue = 1, endValue = 2, @@ -3742,7 +3768,7 @@ if not Quests then }, [10] = { name = "Ray's Mission 4: Proof of Death", - storageId = Storage.TheShatteredIsles.RaysMission4, + storageId = Storage.Quest.U7_8.TheShatteredIsles.RaysMission4, missionId = 10272, startValue = 1, endValue = 5, @@ -3761,7 +3787,7 @@ if not Quests then }, [11] = { name = "Reputation in Sabrehaven: Suspicious", - storageId = Storage.TheShatteredIsles.ReputationInSabrehaven, + storageId = Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, missionId = 10273, startValue = 2, endValue = 13, @@ -3790,7 +3816,7 @@ if not Quests then }, [12] = { name = "Reputation in Sabrehaven: Friendly", - storageId = Storage.TheShatteredIsles.ReputationInSabrehaven, + storageId = Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, missionId = 10274, startValue = 14, endValue = 17, @@ -3805,7 +3831,7 @@ if not Quests then }, [13] = { name = "Reputation in Sabrehaven: Cordial", - storageId = Storage.TheShatteredIsles.ReputationInSabrehaven, + storageId = Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, missionId = 10275, startValue = 18, endValue = 19, @@ -3814,7 +3840,7 @@ if not Quests then }, [14] = { name = "Reputation in Sabrehaven: Loyal", - storageId = Storage.TheShatteredIsles.ReputationInSabrehaven, + storageId = Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, missionId = 10276, startValue = 20, endValue = 22, @@ -3826,7 +3852,7 @@ if not Quests then }, [15] = { name = "The Counterspell", - storageId = Storage.TheShatteredIsles.TheCounterspell, + storageId = Storage.Quest.U7_8.TheShatteredIsles.TheCounterspell, missionId = 10277, startValue = 1, endValue = 4, @@ -3843,7 +3869,7 @@ if not Quests then }, [16] = { name = "The Errand", - storageId = Storage.TheShatteredIsles.TheErrand, + storageId = Storage.Quest.U7_8.TheShatteredIsles.TheErrand, missionId = 10278, startValue = 1, endValue = 2, @@ -3855,7 +3881,7 @@ if not Quests then }, [17] = { name = "The Governor's Daughter", - storageId = Storage.TheShatteredIsles.TheGovernorDaughter, + storageId = Storage.Quest.U7_8.TheShatteredIsles.TheGovernorDaughter, missionId = 10279, startValue = 1, endValue = 3, @@ -4076,12 +4102,12 @@ if not Quests then }, [28] = { name = "The Explorer Society", - startStorageId = Storage.ExplorerSociety.QuestLine, + startStorageId = Storage.Quest.U7_6.ExplorerSociety.QuestLine, startStorageValue = 1, missions = { [1] = { name = "Joining the Explorers", - storageId = Storage.ExplorerSociety.JoiningTheExplorers, + storageId = Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers, missionId = 10295, startValue = 1, endValue = 5, @@ -4096,7 +4122,7 @@ if not Quests then }, [2] = { name = "The Ice Delivery", - storageId = Storage.ExplorerSociety.TheIceDelivery, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheIceDelivery, missionId = 10296, startValue = 6, endValue = 8, @@ -4110,7 +4136,7 @@ if not Quests then }, [3] = { name = "The Butterfly Hunt", - storageId = Storage.ExplorerSociety.TheButterflyHunt, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt, missionId = 10297, startValue = 9, endValue = 17, @@ -4131,7 +4157,7 @@ if not Quests then }, [4] = { name = "The Plant Collection", - storageId = Storage.ExplorerSociety.ThePlantCollection, + storageId = Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection, missionId = 10298, startValue = 18, endValue = 26, @@ -4149,7 +4175,7 @@ if not Quests then }, [5] = { name = "The Lizard Urn", - storageId = Storage.ExplorerSociety.TheLizardUrn, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheLizardUrn, missionId = 10299, startValue = 27, endValue = 29, @@ -4163,7 +4189,7 @@ if not Quests then }, [6] = { name = "The Bonelord Secret", - storageId = Storage.ExplorerSociety.TheBonelordSecret, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheBonelordSecret, missionId = 10300, startValue = 30, endValue = 32, @@ -4176,7 +4202,7 @@ if not Quests then }, [7] = { name = "The Orc Powder", - storageId = Storage.ExplorerSociety.TheOrcPowder, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder, missionId = 10301, startValue = 33, endValue = 35, @@ -4190,7 +4216,7 @@ if not Quests then }, [8] = { name = "The Elven Poetry", - storageId = Storage.ExplorerSociety.TheElvenPoetry, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheElvenPoetry, missionId = 10302, startValue = 36, endValue = 38, @@ -4202,7 +4228,7 @@ if not Quests then }, [9] = { name = "The Memory Stone", - storageId = Storage.ExplorerSociety.TheMemoryStone, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheMemoryStone, missionId = 10303, startValue = 39, endValue = 41, @@ -4214,7 +4240,7 @@ if not Quests then }, [10] = { name = "The Rune Writings", - storageId = Storage.ExplorerSociety.TheRuneWritings, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheRuneWritings, missionId = 10304, startValue = 42, endValue = 44, @@ -4228,7 +4254,7 @@ if not Quests then }, [11] = { name = "The Ectoplasm", - storageId = Storage.ExplorerSociety.TheEctoplasm, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheEctoplasm, missionId = 10305, startValue = 45, endValue = 47, @@ -4239,7 +4265,7 @@ if not Quests then }, [12] = { name = "The Spectral Dress", - storageId = Storage.ExplorerSociety.TheSpectralDress, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheSpectralDress, missionId = 10306, startValue = 48, endValue = 50, @@ -4251,7 +4277,7 @@ if not Quests then }, [13] = { name = "The Spectral Stone", - storageId = Storage.ExplorerSociety.TheSpectralStone, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone, missionId = 10307, startValue = 51, endValue = 55, @@ -4266,7 +4292,7 @@ if not Quests then }, [14] = { name = "The Astral Portals", - storageId = Storage.ExplorerSociety.TheAstralPortals, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheAstralPortals, missionId = 10308, startValue = 56, endValue = 56, @@ -4277,7 +4303,7 @@ if not Quests then }, [15] = { name = "The Island of Dragons", - storageId = Storage.ExplorerSociety.TheIslandofDragons, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheIslandofDragons, missionId = 10309, startValue = 57, endValue = 59, @@ -4289,7 +4315,7 @@ if not Quests then }, [16] = { name = "The Ice Music", - storageId = Storage.ExplorerSociety.TheIceMusic, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheIceMusic, missionId = 10310, startValue = 60, endValue = 62, @@ -4303,14 +4329,14 @@ if not Quests then }, [17] = { name = "The Undersea Kingdom", - storageId = Storage.ExplorerSociety.CalassaQuest, + storageId = Storage.Quest.U7_6.ExplorerSociety.CalassaQuest, missionId = 10311, startValue = 1, endValue = 3, states = { - [1] = "Captain Max will bring you to Calassa whenever you are ready. \z - Please try to retrieve the missing logbook which must be in one of the sunken shipwrecks.", + [1] = "Captain Max will bring you to Calassa whenever you are ready. Please try to retrieve the missing logbook which must be in one of the sunken shipwrecks.", [2] = "Report about your Calassa mission to Berenice in Liberty Bay.", + [3] = "Congratulations, you completed the remaining part of this mission!", }, }, }, @@ -5641,9 +5667,9 @@ if not Quests then startValue = 1, endValue = 3, states = { - [1] = "Mr Morris tasked you to find an ancient amulet that was lost somewhare on Dawnport - probably next to a corpse somewhare.", - [2] = "Come back to Mr Morris", - [3] = "Mr Morris thanks for the help", + [1] = "Mr Morris tasked you to find an ancient amulet that was lost somewhere on Dawnport - probably next to a corpse somewhere.", + [2] = "Come back to Mr Morris.", + [3] = "Mr Morris thanks for you the help.", }, }, [3] = { @@ -5653,8 +5679,8 @@ if not Quests then startValue = 1, endValue = 2, states = { - [1] = "Mr Morris urged you fo find a log book that was stolen by trolls.", - [2] = "Mr Morris thanks for the help", + [1] = "Mr Morris urged you to find a log book that was stolen by trolls.", + [2] = "Mr Morris thanks you for the help.", }, }, [4] = { @@ -5664,9 +5690,9 @@ if not Quests then startValue = 1, endValue = 3, states = { - [1] = "Mr Morris needs the rae Dawnfire herb harvested and brought to hin. It grows on grey sand only, he said.", - [2] = "Come back to Mr Morris", - [3] = "Mr Morris thanks for the help", + [1] = "Mr Morris needs the rare Dawnfire herb harvested and brought to him. It grows on gray sand only, he said.", + [2] = "Come back to Mr Morris.", + [3] = "Mr Morris thanks you for the help.", }, }, [5] = { @@ -5677,40 +5703,40 @@ if not Quests then endValue = 5, states = { [1] = "The key to the adventurer's dormitory has disappeared. Maybe you can find it. Ask around to find out who was the last to have seen it.", - [2] = "use the fishing rod in the nearby lake to fish old nasty", + [2] = "Use the fishing rod in the nearby lake to fish Old Nasty.", [3] = "Come back to Woblin with Old Nasty", - [4] = "Come back to Mr Morris with key 0010", + [4] = "Come back to Mr Morris with Key 0010", [5] = "Mr Morris thanks for the help", }, }, [6] = { - name = "Task: Mountain Trolls", - storageId = 65062, + name = "Task: A Toll on Trolls", + storageId = Storage.Quest.U10_55.Dawnport.MorrisTrollCount, missionId = 10394, startValue = 0, endValue = 20, description = function(player) - return string.format("You already hunted %d/20 Mountain Trolls.", (math.max(player:getStorageValue(65062), 0))) + return string.format("You already hunted %d/20 Mountain Trolls.", (math.max(player:getStorageValue(Storage.Quest.U10_55.Dawnport.MorrisTrollCount), 0))) end, }, [7] = { - name = "Task: Muglex Clan Footman", - storageId = 65061, + name = "Task: The Goblin Slayer", + storageId = Storage.Quest.U10_55.Dawnport.MorrisGoblinCount, missionId = 10395, startValue = 0, endValue = 20, description = function(player) - return string.format("You already hunted %d/20 Muglex Clan Footman.", (math.max(player:getStorageValue(65061), 0))) + return string.format("You already hunted %d/20 Muglex Clan Footman.", (math.max(player:getStorageValue(Storage.Quest.U10_55.Dawnport.MorrisGoblinCount), 0))) end, }, [8] = { - name = "Task: Minotaur Bruisers", - storageId = 65060, + name = "Task: Plus Minos a Few", + storageId = Storage.Quest.U10_55.Dawnport.MorrisMinosCount, missionId = 10396, startValue = 0, endValue = 20, description = function(player) - return string.format("You already hunted %d/20 Minotaurs Bruisers.", (math.max(player:getStorageValue(65060), 0))) + return string.format("You already hunted %d/20 Minotaurs Bruisers.", (math.max(player:getStorageValue(Storage.Quest.U10_55.Dawnport.MorrisMinosCount), 0))) end, }, }, @@ -5746,16 +5772,17 @@ if not Quests then }, [3] = { name = "Mission 03: A Rational Request", - storageId = Storage.TheRookieGuard.Mission03, + storageId = Storage.TheRookieGuard.RatKills, missionId = 10399, - startValue = 1, - endValue = 2, - states = { - [1] = function(player) - return string.format("Vascalir sent you to the Rookgaard sewers to kill 5 rats. You have already killed %d/5. Return to Vascalir once you're done.", player:getStorageValue(Storage.TheRookieGuard.RatKills)) - end, - [2] = "Vascalir was pleased with your hunting efforts. You've proven that you are a skilled hunter, ready for the task at hand.", - }, + startValue = 0, + endValue = 5, + description = function(player) + return string.format( + "Vascalir sent you to the Rookgaard sewers to kill 5 rats. You have already killed %d/5. \z + Return to Vascalir once you're done.", + (math.max(player:getStorageValue(Storage.TheRookieGuard.RatKills), 0)) + ) + end, }, [4] = { name = "Mission 04: Home-Brewed", @@ -6510,5 +6537,20 @@ if not Quests then }, }, }, + [49] = { + name = "The Outlaw Camp", + startStorageId = Storage.QuestChests.OutlawCamp, + startStorageValue = 1, + missions = { + [1] = { + name = "Outlaw Treasure", + storageId = Storage.QuestChests.OutlawCamp, + missionId = 10451, + startValue = 1, + endValue = 1, + description = "You made your way through the Outlaw Camp and found the hidden treasure of the bandits.", + }, + }, + }, } end diff --git a/data-otservbr-global/lib/core/storages.lua b/data-otservbr-global/lib/core/storages.lua index 2b8d9a7783d..fa7537eeb3c 100644 --- a/data-otservbr-global/lib/core/storages.lua +++ b/data-otservbr-global/lib/core/storages.lua @@ -66,8 +66,6 @@ Reserved player action storage key ranges (const.h) [4502] = key 4502 [4503] = key 4503 [4600] = key 4600 - [4601] = key 4601 - [4603] = key 4603 [5000] = key 5000 [5002] = key 5002 [5010] = key 5010 @@ -81,34 +79,27 @@ Storage = { -- General storages Dragonfetish = 30003, EdronRopeQuest = 30004, - GhostShipQuest = 30005, OrcKingGreeting = 30006, MarkwinGreeting = 30007, -- EmoteSpells Storage cannot be changed, it is set in source code EmoteSpells = 30008, WagonTicket = 30009, - BloodHerbQuest = 30010, FirstMageWeapon = 30011, ToOutfoxAFoxQuest = 30012, KawillBlessing = 30014, RentedHorseTimer = 30015, FountainOfLife = 30016, - KnightwatchTowerDoor = 30017, -- Promotion Storage cannot be changed, it is set in source code Promotion = 30018, RookgaardHints = 30019, RookgaardDestiny = 30020, EruaranGreeting = 30021, MaryzaCookbook = 30022, - Factions = 30024, -- unused TrainerRoom = 30027, -- unused NpcSpawn = 30028, -- unused ExerciseDummyExhaust = 30029, - SamsOldBackpack = 30030, - SamsOldBackpackDoor = 30031, ChayenneReward = 30033, SwampDiggingTimeout = 30034, - HydraEggQuest = 30035, Atrad = 30036, ElementalistQuest1 = 30037, ElementalistQuest2 = 30038, @@ -128,7 +119,6 @@ Storage = { -- Reserved in Global.Storage.FamiliarSummonEvent60 = 30055 ChayenneKeyTime = 30056, FreeQuests = 30057, - BattleAxeQuest = 30059, ShrineEntrance = 30060, PlayerWeaponReward = 30061, --[[ @@ -526,41 +516,6 @@ Storage = { AmuletTimer = 50520, AmuletStatus = 50521, }, - ExplorerSociety = { - -- Reserved storage from 50530 - 50599 - QuestLine = 50530, - SpectralStone = 50531, - SkullOfRatha = 50532, - GiantSmithHammer = 50533, - JoiningTheExplorers = 505344, - TheIceDelivery = 50535, - TheButterflyHunt = 50536, - ThePlantCollection = 50537, - TheLizardUrn = 50538, - TheBonelordSecret = 50539, - TheOrcPowder = 50540, - CalassaQuest = 50541, - TheMemoryStone = 50542, - TheRuneWritings = 50543, - TheEctoplasm = 50544, - TheSpectralDress = 50545, - TheSpectralStone = 50546, - TheAstralPortals = 50547, - TheIslandofDragons = 50548, - TheIceMusic = 50549, - BansheeDoor = 50550, - BonelordsDoor = 50551, - CalassaDoor = 50552, - MemoryStoneDoor = 50553, - ElvenDoor = 50554, - OrcDoor = 50555, - ChorurnDoor = 50556, - DwacatraDoor = 50557, - FamilyBroochDoor = 50558, - TheElvenPoetry = 50559, - SpectralStoneDoor = 50560, - IceMusicDoor = 50561, - }, TravellingTrader = { -- Reserved storage from 50600 - 50619 Mission01 = 50600, @@ -572,34 +527,6 @@ Storage = { Mission07 = 50606, -- unused packageDoor = 50607 }, - DjinnWar = { - -- Reserved storage from 50620 - 50649 - Faction = { - Greeting = 50620, - MaridDoor = 50621, - EfreetDoor = 50622, - }, - RecievedLamp = 50625, - -- Blue djinn - MaridFaction = { - Start = 50630, - Mission01 = 50631, - Mission02 = 50632, - RataMari = 50633, - Mission03 = 50634, - DoorToLamp = 50635, - DoorToEfreetTerritory = 50636, - }, - -- Green djinn - EfreetFaction = { - Start = 50640, - Mission01 = 50641, - Mission02 = 50642, - Mission03 = 50643, - DoorToLamp = 50644, - DoorToMaridTerritory = 50645, - }, - }, VampireHunter = { -- Reserved storage from 50650 - 50659 Rank = 50650, @@ -814,123 +741,13 @@ Storage = { -- Until all outfit quests are completed DefaultStart = 50960, Ref = 50961, - Citizen = { - -- Mission storages for temporary questlog entries - MissionHat = 50966, - AddonHat = 50967, - MissionBackpack = 50968, - AddonBackpack = 50969, - AddonBackpackTimer = 50970, - }, - -- Begger Outfit Quest - BeggarFirstAddonDoor = 50975, -- Staff quest - BeggarSecondAddon = 50976, - -- Druid-outfit Quest - DruidHatAddon = 50977, - DruidBodyAddon = 50978, - DruidAmuletDoor = 50979, - -- Barbarian-outfit Quest - BarbarianAddon = 50980, - BarbarianAddonWaitTimer = 50981, - -- Beggar - BeggarOutfit = 50982, - BeggarOutfitTimer = 50983, - -- Hunter-outfit Quest - HunterMusicSheet01 = 50984, - HunterMusicSheet02 = 50985, - HunterMusicSheet03 = 50986, - HunterMusicSheet04 = 50987, - HunterBodyAddon = 50988, - HunterHatAddon = 50989, - Hunter = { - AddonGlove = 50990, - AddonHat = 50991, - }, - Knight = { - AddonSword = 50992, - MissionHelmet = 50993, - AddonHelmet = 50994, - AddonHelmetTimer = 50995, - RamsaysHelmetDoor = 50996, - }, - MageSummoner = { - AddonWand = 50997, - AddonBelt = 50998, - MissionHatCloak = 50999, - AddonHatCloak = 51000, - AddonWandTimer = 51001, - }, - -- Nobleman Outfit - NoblemanFirstAddon = 51002, - NoblemanSecondAddon = 51003, -- Norseman-outfit Quest NorsemanAddon = 51004, - -- Warrior-outfit Quest - WarriorShoulderAddon = 51005, - WarriorSwordAddon = 51006, - WarriorShoulderTimer = 51007, - -- Wizard-outfit Quest - WizardAddon = 51008, - -- Pirate-outfit Quest - PirateBaseOutfit = 51009, - PirateSabreAddon = 51010, - PirateHatAddon = 51011, - -- Assassin Outfit - AssassinBaseOutfit = 51012, - AssassinFirstAddon = 51013, - AssassinSecondAddon = 51014, -- Golden Outfit GoldenOutfit = 51015, - NightmareOutfit = 51016, - NightmareDoor = 51017, - BrotherhoodOutfit = 51018, - BrotherhoodDoor = 51019, - Shaman = { - AddonStaffMask = 51020, - MissionStaff = 51021, - MissionMask = 51022, - }, DeeplingAnchor = 51023, - FirstOrientalAddon = 51024, - SecondOrientalAddon = 51025, RoyalCostumeOutfit = 51026, }, - TheAncientTombs = { - -- Reserved storage from 50940 - 51059 - DefaultStart = 50940, - VashresamunInstruments = 50941, - VashresamunsDoor = 50942, - MorguthisBlueFlameStorage1 = 50943, - MorguthisBlueFlameStorage2 = 50944, - MorguthisBlueFlameStorage3 = 50945, - MorguthisBlueFlameStorage4 = 50946, - MorguthisBlueFlameStorage5 = 50947, - MorguthisBlueFlameStorage6 = 50948, - MorguthisBlueFlameStorage7 = 50949, - - OmrucsTreasure = 50950, - ThalasTreasure = 50951, - DiphtrahsTreasure = 50952, - MahrdisTreasure = 50953, - VashresamunsTreasure = 50954, - MorguthisTreasure = 50955, - RahemosTreasure = 50956, - }, - TheApeCity = { - -- Reserved storage from 51060 - 51079 - Started = 51060, - Questline = 51061, - DworcDoor = 51062, - ChorDoor = 51063, - ParchmentDecyphering = 51064, - FibulaDoor = 51065, - WitchesCapSpot = 51066, - CasksDoor = 51067, - Casks = 51068, - HolyApeHair = 51069, - SnakeDestroyer = 51070, - ShamanOufit = 51071, - }, TheInquisition = { -- Reserved storage from 51110 - 51139 Questline = 51110, @@ -1103,14 +920,6 @@ Storage = { BossRoom = 51332, }, }, - FriendsandTraders = { - -- Reserved storage from 51340 - 51359 - DefaultStart = 51340, - TheSweatyCyclops = 51341, - TheMermaidMarina = 51342, - TheBlessedStake = 51343, - TheBlessedStakeWaitTime = 51344, - }, Postman = { -- Reserved storage from 51360 - 51389 Mission01 = 51360, @@ -1248,32 +1057,6 @@ Storage = { Questline = 51532, }, }, - TheShatteredIsles = { - -- Reserved storage from 51540 - 51589 - DefaultStart = 51540, - TheGovernorDaughter = 51541, - TheErrand = 51542, - AccessToMeriana = 51543, - APoemForTheMermaid = 51544, - ADjinnInLove = 51545, - AccessToLagunaIsland = 51546, - AccessToGoroma = 51547, - Shipwrecked = 51548, - DragahsSpellbook = 51549, - TheCounterspell = 51550, - ReputationInSabrehaven = 51551, - RaysMission1 = 51552, - RaysMission2 = 51553, - RaysMission3 = 51554, - RaysMission4 = 51555, - AccessToNargor = 51556, - TortoiseEggNargorDoor = 51557, - TortoiseEggNargorTime = 51558, - YavernDoor = 51559, - TavernMap1 = 51560, - TavernMap2 = 51561, - TavernMap3 = 51562, - }, SearoutesAroundYalahar = { -- Reserved storage from 51590 - 51609 TownsCounter = 51590, @@ -1399,17 +1182,12 @@ Storage = { FormorgarMinesHoistSkeleton = 51737, FormorgarMinesHoistChest = 51738, -- Custom Quests, currently not using system.lua (aid 2000) - BlackKnightTreeCrownShield = 51739, - BlackKnightTreeCrownArmor = 51740, - BlackKnightTreeKey = 51741, KosheiAmulet1 = 51742, KosheiAmulet2 = 51743, - SilverBrooch = 51744, FamilyBrooch = 51745, DCQGhoul = 51746, FirewalkerBoots = 51747, DeeperFibulaKey = 51748, - SixRubiesQuest = 51749, ParchmentRoomQuest = 51750, WarzoneReward1 = 51751, WarzoneReward2 = 51752, @@ -1420,30 +1198,13 @@ Storage = { FathersBurdenCrystal = 51757, FathersBurdenSilk = 51758, FathersBurdenCloth = 51759, - OutlawCampKey1 = 51760, - OutlawCampKey2 = 51761, - OutlawCampKey3 = 51762, - DoubletQuest = 51763, - HoneyFlower = 51764, - BananaPalm = 51765, WhisperMoss = 51766, OldParchment = 51767, DragahsSpellbook = 51768, StealFromThieves = 51769, - }, - PitsOfInferno = { - -- Reserved storage from 52000 - 52019 - ShortcutHubDoor = 52000, - ShortcutLeverDoor = 52001, - Pumin = 52002, - WeaponReward = 52003, - ThroneInfernatil = 52004, - ThroneTafariel = 52005, - ThroneVerminor = 52006, - ThroneApocalypse = 52007, - ThroneBazir = 52008, - ThroneAshfalor = 52009, - ThronePumin = 52010, + OutlawCamp = 51770, -- quest log to The Outlaw Camp + WitchHouseQuest = 51771, + SimonTheBeggarsFavoriteStaff = 51772, }, HorestisTomb = { -- Reserved storage from 52020 - 52029 @@ -1573,17 +1334,6 @@ Storage = { QuestLine = 52148, TheLostBrother = 52149, }, - DreamersChallenge = { - -- Reserved storage from 52160 - 52199 - LeverNightmare1 = 52160, - LeverNightmare2 = 52161, - LeverNightmare3 = 52162, - LeverBrotherhood1 = 52163, - LeverBrotherhood2 = 52164, - LeverBrotherhood3 = 52165, - TicTac = 52166, - Reward = 52167, - }, HallsOfHope = { -- Reserved storage from 52200 - 52219 Questline = 52200, @@ -1711,9 +1461,18 @@ Storage = { ID3007 = 3007, ID3008 = 3008, ID3012 = 3012, + ID3142 = 3142, + ID3301 = 3301, + ID3302 = 3302, + ID3303 = 3303, + ID3304 = 3304, + ID3520 = 3520, ID3600 = 3600, + ID3610 = 3610, ID3620 = 3620, ID3666 = 3666, + ID3667 = 3667, + ID3700 = 3700, ID3702 = 3702, ID3800 = 3800, ID3801 = 3801, @@ -1723,6 +1482,8 @@ Storage = { ID3980 = 3980, ID4055 = 4055, ID4502 = 4502, + ID4601 = 4601, + ID4603 = 4603, ID5010 = 5010, ID6010 = 6010, }, @@ -1730,38 +1491,9 @@ Storage = { -- Use the reserved storage keys accordingly KeysUpdate = 40000, PreU6_0 = { -- update pre-6.0 - Reserved Storages 40001 - 40020 - DeeperFibula = { - Rewards = { - TowerShield = 40001, - WarriorHelmet = 40002, - DwarvenRing = 40003, - ElvenAmulet = 40004, - KnightAxe = 40005, - }, - }, OrnamentedShield = { Rewards = { OrnamentedShield = 40006, - TimeRing = 40007, - }, - }, - ShortSword = { - Rewards = { - Book = 40008, - }, - }, - ThaisLighthouse = { - Rewards = { - BattleHammer = 40009, - DarkShield = 40010, - }, - }, - }, - U6_0 = { -- update 6.0 - Reserved Storages 40021 - 40030 - StuddedShield = { - Rewards = { - BananaFree = 40021, - BananaPremium = 40022, }, }, }, @@ -1771,9 +1503,6 @@ Storage = { Cookies = 40031, }, }, - ExplorerBrooch = { - Brooch = 40032, - }, OrcFortress = { Rewards = { KnightAxe = 40033, @@ -1796,27 +1525,11 @@ Storage = { }, }, U6_4 = { -- update 6.4 - Reserved Storages 40071 - 40110 - AdornedUHRune = { - Rewards = { - SilverRuneEmblem = 40071, - }, - }, - BarbarianAxe = { - Rewards = { - BarbarianAxe = 40072, - Scimitar = 40073, - }, - }, BerserkerTreasure = { Rewards = { WhitePearls = 40074, }, }, - DarkArmor = { - Rewards = { - Armor = 40075, - }, - }, DemonHelmet = { Rewards = { SteelBoots = 40076, @@ -1824,88 +1537,14 @@ Storage = { DemonShield = 40078, }, }, - DoubleHero = { - Rewards = { - RedGem = 40079, - ClubRing = 40080, - }, - }, - EdronGoblin = { - Rewards = { - SilverAmulet = 40081, - SteelShield = 40082, - }, - }, - FireAxe = { - Rewards = { - Bag = 40083, - FireAxe = 40084, - }, - }, - PoisonDaggers = { - Rewards = { - BackpackReward = 40085, - }, - }, - ShamanTreasure = { - Rewards = { - BlankRunes = 40086, - }, - }, - TrollCave = { - Rewards = { - GarlicNecklace = 40087, - BrassLegs = 40088, - }, - }, - VampireShield = { - Rewards = { - StrangeSymbol = 40089, - DragonLance = 40090, - VampireShield = 40091, - }, - }, - WeddingRing = { - Rewards = { - DragonNecklace = 40092, - WeedingRing = 40093, - }, - }, - }, - U6_5 = { -- update 6.5 - Reserved Storages 40111 - 40120 - AlawarsVault = { - Rewards = { - WhitePearl = 40111, - Broadsword = 40112, - }, - }, }, U7_1 = { -- update 7.1 - Reserved Storages 40121 - 40140 - BlackKnight = { - Rewards = { - CrownArmor = 40121, - CrownShield = 40122, - }, - }, DragonTower = { Rewards = { Backpack1 = 40123, Backpack2 = 40124, }, }, - Ring = { - Rewards = { - TimeRing = 40125, - SwordRing = 40126, - }, - }, - TimeRing = { - Rewards = { - CrystallBall = 40127, - TimeRing = 40128, - ElvenAmulet = 40129, - }, - }, }, U7_2 = { -- update 7.2 - Reserved Storages 40141 - 40200 Behemoth = { @@ -1951,22 +1590,9 @@ Storage = { FamilyBrooch = { Brooch = 9000, }, - GiantSmithhammer = { - QuestLine = 10091, - Talon = 10092, - Hammer = 10093, - GoldCoin = 10094, - }, MadMageRoom = { QuestLine = 10095, APrisoner = 10096, - StarAmulet = 10097, - Hat = 10098, - StoneSkinAmulet = 10099, - }, - SkullOfRatha = { - Bag1 = 10100, - Bag2 = 10101, }, TheAnnihilator = { Reward = 10102, @@ -1989,54 +1615,322 @@ Storage = { VoodooDoll = {}, }, U7_3 = { -- update 7.3 - Reserved Storages 40351 - 40400 - MedusaShield = {}, - SerpentineTower = {}, - WhitePearl = {}, + TheMedusaQuest = 40351, + SerpentineTower = { + WhitePearl = 40352, + }, }, U7_4 = { -- update 7.4 - Reserved Storages 40401 - 40600 - TheAncientTombs = {}, - TheDjinnWarEfreetFaction = {}, - TheDjinnWarMaridFaction = {}, + TheAncientTombs = { + DefaultStart = 40401, + VashresamunInstruments = 40402, + VashresamunsDoor = 40403, + MorguthisBlueFlameStorage1 = 40404, + MorguthisBlueFlameStorage2 = 40405, + MorguthisBlueFlameStorage3 = 40406, + MorguthisBlueFlameStorage4 = 40407, + MorguthisBlueFlameStorage5 = 40408, + MorguthisBlueFlameStorage6 = 40409, + MorguthisBlueFlameStorage7 = 40410, + OmrucsTreasure = 40411, + ThalasTreasure = 40412, + DiphtrahsTreasure = 40413, + MahrdisTreasure = 40414, + VashresamunsTreasure = 40415, + MorguthisTreasure = 40416, + RahemosTreasure = 40417, + ThalasSwitchesGlobalStorage = 40418, + DiprathSwitchesGlobalStorage = 40419, + AshmunrahSwitchesGlobalStorage = 40420, + Diprath_sign1 = 40421, + Diprath_sign2 = 40422, + Diprath_sign3 = 40423, + Diprath_sign4 = 40424, + Diprath_sign5 = 40425, + Diprath_sign6 = 40426, + Diprath_sign7 = 40427, + Diprath_sign8 = 40428, + }, + DjinnWar = { + Factions = 40429, + -- Reserved storage from 50620 - 50649 + Faction = { + Greeting = 40430, + MaridDoor = 40431, + EfreetDoor = 40432, + }, + RecievedLamp = 40433, + -- Blue djinn + MaridFaction = { + Start = 40434, + Mission01 = 40435, + Mission02 = 40436, + RataMari = 40437, + Mission03 = 40438, + DoorToLamp = 40439, + DoorToEfreetTerritory = 40440, + }, + -- Green djinn + EfreetFaction = { + Start = 40441, + Mission01 = 40442, + Mission02 = 40443, + Mission03 = 40444, + DoorToLamp = 40445, + DoorToMaridTerritory = 40446, + }, + }, }, U7_5 = { -- update 7.5 - Reserved Storages 40601 - 40610 - ElephantTusk = {}, - SamsOldBackpack = {}, + ElephantTusk = 40601, + SamsOldBackpack = { + SamsOldBackpackNpc = 40602, + SamsOldBackpackDoor = 40603, + }, }, U7_6 = { -- update 7.6 - Reserved Storages 40611 - 40760 - HydraEgg = {}, - TheApeCity = {}, - TheExplorerSociety = {}, + HydraEggQuest = 40611, + TheApeCity = { + Started = 40612, + Questline = 40613, + DworcDoor = 40614, + ChorDoor = 40615, + ParchmentDecyphering = 40616, + FibulaDoor = 40617, + WitchesCapSpot = 40618, + CasksDoor = 40619, + Casks = 40620, + HolyApeHair = 40621, + SnakeDestroyer = 40622, + ShamanOufit = 40623, + TheLargeAmphoras1 = 40624, + TheLargeAmphoras2 = 40625, + TheLargeAmphoras3 = 40626, + TheLargeAmphoras4 = 40627, + TheLargeAmphorasCooldown = 40628, + }, + ExplorerSociety = { + QuestLine = 40629, + SpectralStone = 40630, + JoiningTheExplorers = 40631, + TheIceDelivery = 40632, + TheButterflyHunt = 40633, + ThePlantCollection = 40634, + TheLizardUrn = 40635, + TheBonelordSecret = 40636, + TheOrcPowder = 40637, + CalassaQuest = 40638, + TheMemoryStone = 40639, + TheRuneWritings = 40640, + TheEctoplasm = 40641, + TheSpectralDress = 40642, + TheSpectralStone = 40643, + TheAstralPortals = 40644, + TheIslandofDragons = 40645, + TheIceMusic = 40646, + BansheeDoor = 40647, + BonelordsDoor = 40648, + CalassaDoor = 40649, + MemoryStoneDoor = 40650, + ElvenDoor = 40651, + OrcDoor = 40652, + ChorurnDoor = 40653, + DwacatraDoor = 40654, + FamilyBroochDoor = 40655, + TheElvenPoetry = 40656, + SpectralStoneDoor = 40657, + IceMusicDoor = 40658, + ExplorerBrooch = 40659, + SkullOfRatha = { + Bag1 = 40660, + Bag2 = 40661, + }, + GiantSmithHammer = { + Talon = 40662, + Hammer = 40663, + GoldCoin = 40664, + }, + Books = { + Cyclops = 40665, + Hengis = 40666, + }, + }, }, U7_8 = { -- update 7.8 - Reserved Storages 40761 - 41000 - AssassinOutfits = {}, - BarbarianOutfits = {}, - BeggarOutfits = {}, - CitizenOutfits = {}, - CitizenOutfitsRook = {}, - DruidOutfits = {}, - DruidOutfitsRook = {}, - HunterOutfits = {}, - KnightOutfits = {}, - MageOutfits = {}, - MarlinTrophy = {}, - Meriana = {}, - NoblemanOutfits = {}, - ObsidianKnife = {}, - OrientalOutfits = {}, - PirateOutfits = {}, - ShamanOutfits = {}, - SummonerOutfits = {}, - TheBlessedStake = {}, - TheMermaidMarina = {}, - TheShatteredIsles = {}, - TheSweatyCyclops = {}, - TreasureIsland = {}, - WarriorOutfits = {}, - WizardOutfits = {}, + AssassinOutfits = { + AssassinBaseOutfit = 40761, + AssassinFirstAddon = 40762, + AssassinSecondAddon = 40763, + }, + BarbarianOutfits = { + BarbarianAddon = 40764, + BarbarianAddonWaitTimer = 40765, + }, + BeggarOutfits = { + BeggarOutfit = 40766, + BeggarOutfitTimer = 40767, + BeggarFirstAddonDoor = 40768, + BeggarSecondAddon = 40769, + BeggarOutfitTimerAddon = 40770, + }, + CitizenOutfitsRook = { + MissionHatRook = 40771, + AddonHatRook = 40772, + MissionBackpackRook = 40773, + AddonBackpackRook = 40774, + AddonBackpackRookTimer = 40775, + }, + CitizenOutfits = { + MissionHat = 40776, + AddonHat = 40777, + MissionBackpack = 40778, + AddonBackpack = 40779, + AddonBackpackTimer = 40780, + }, + DruidOutfitsRook = { + DruidBodyAddonRook = 40781, + }, + DruidOutfits = { + DruidHatAddon = 40782, + DruidBodyAddon = 40783, + DruidAmuletDoor = 40784, + GriffinclawFlower = 40785, + CeironsWaterskin = 40786, + WolfToothChain = 40787, + }, + HunterOutfits = { + HunterMusicSheet01 = 40788, + HunterMusicSheet02 = 40789, + HunterMusicSheet03 = 40790, + HunterMusicSheet04 = 40791, + HunterBodyAddon = 40792, + HunterHatAddon = 40793, + Hunter = { + AddonGlove = 40794, + AddonHat = 40795, + }, + ElaneCrossbow = 40796, + }, + KnightOutfits = { + AddonSword = 40797, + MissionHelmet = 40798, + AddonHelmet = 40799, + AddonHelmetTimer = 40800, + RamsaysHelmetDoor = 40801, + RamsaysHelmetChest = 40802, + }, + MageAndSummonerOutfits = { + AddonWand = 40803, + AddonBelt = 40804, + MissionHatCloak = 40805, + AddonHatCloak = 40806, + AddonWandTimer = 40807, + }, + MarlinTrophy = 40808, + NoblemanOutfits = { + NoblemanFirstAddon = 40809, + NoblemanSecondAddon = 40810, + }, + ObsidianKnife = 40811, + OrientalOutfits = { + FirstOrientalAddon = 40812, + SecondOrientalAddon = 40813, + OrientalDoor = 40814, + CoralComb = 40815, + }, + PirateOutfits = { + PirateBaseOutfit = 40816, + PirateSabreAddon = 40817, + PirateHatAddon = 40818, + }, + ShamanOutfits = { + AddonStaffMask = 40819, + MissionStaff = 40820, + MissionMask = 40821, + }, + FriendsAndTraders = { + DefaultStart = 40822, + TheSweatyCyclops = 40823, + TheMermaidMarina = 40824, + TheBlessedStake = 40825, + TheBlessedStakeWaitTime = 40826, + }, + TheShatteredIsles = { + DefaultStart = 40827, + TheGovernorDaughter = 40828, + TheErrand = 40829, + AccessToMeriana = 40830, + APoemForTheMermaid = 40831, + ADjinnInLove = 40832, + AccessToLagunaIsland = 40833, + AccessToGoroma = 40834, + Shipwrecked = 40835, + DragahsSpellbook = 40836, + TheCounterspell = 40837, + ReputationInSabrehaven = 40838, + RaysMission1 = 40839, + RaysMission2 = 40840, + RaysMission3 = 40841, + RaysMission4 = 40842, + AccessToNargor = 40843, + TortoiseEggNargorDoor = 40844, + TortoiseEggNargorTime = 40845, + YavernDoor = 40846, + TavernMap1 = 40847, + TavernMap2 = 40848, + TavernMap3 = 40849, + }, + WarriorOutfits = { + WarriorShoulderAddon = 40850, + WarriorSwordAddon = 40851, + WarriorShoulderTimer = 40852, + }, + WizardOutfits = 40853, }, U7_9 = { -- update 7.9 - Reserved Storages 41001 - 41150 - DreamersChallenge = {}, - ThePitsOfInferno = {}, + DreamersChallenge = { + LeverNightmare1 = 41001, + LeverNightmare2 = 41002, + LeverNightmare3 = 41003, + LeverBrotherhood1 = 41004, + LeverBrotherhood2 = 41005, + LeverBrotherhood3 = 41006, + TicTac = 41007, + BPLongSword = 41008, + ChestBook = 41009, + ChestsWine = 41010, + Chests3SmallDiamond = 41011, + }, + NightmareOutfits = { + Outfits = 41012, + Door = 41013, + KnightwatchTowerDoor = 41014, + }, + BrotherhoodOutfits = { + Outfits = 41015, + Door = 41016, + }, + ThePitsOfInferno = { + ShortcutHubDoor = 41017, + ShortcutLeverDoor = 41018, + Pumin = 41019, + ThroneInfernatil = 41020, + ThroneTafariel = 41021, + ThroneVerminor = 41022, + ThroneApocalypse = 41023, + ThroneBazir = 41024, + ThroneAshfalor = 41025, + ThronePumin = 41026, + ChestTible = 41027, + CorpseBook = 41028, + CorpsePirateBP = 41029, + RewardChestBP = 41030, + RewardChestPlatinumCoins = 41031, + RewardChestFrozenStarlight = 41032, + RewardChestStuffed = 41033, + RewardChestSoftBoots = 41034, + RewardChestStaffAvengerArbalest = 41035, + }, }, U8_0 = { -- update 8.0 - Reserved Storages 41151 - 41350 BarbarianArena = {}, @@ -2058,12 +1952,10 @@ Storage = { U8_1 = { -- update 8.1 - Reserved Storages 41351 - 41650 AgainstTheSpiderCult = {}, AritosTask = {}, - BrotherhoodOutfits = {}, OutfitBrotherhoodMaleAddon = {}, IntoTheBonePit = {}, KissingAPig = {}, KosheiTheDeathless = {}, - NightmareOutfits = {}, OutfitNightmareMaleAddon = {}, NomadsLand = {}, RestInHallowedGround = {}, @@ -2509,10 +2401,6 @@ Storage = { MorrisMinos = 20014, MorrisMinosCount = 20015, }, - SanctuaryOfTheLizardGod = { - LizardGodTeleport = 20020, - LegionHelmet = 20021, - }, }, U10_70 = { -- update 10.70 - Reserved Storages 44801 - 44950 HeroOfRathleton = {}, @@ -2829,91 +2717,6 @@ Storage = { TibiorasBox = 63977, }, - -- Reserved storage from 64000 - 64099 - TibiaDrome = { - -- General Upgrades - BestiaryBetterment = { - TimeLeft = 64000, - LastActivatedAt = 64001, - }, - CharmUpgrade = { - TimeLeft = 64002, - LastActivatedAt = 64003, - }, - KooldownAid = { - LastActivatedAt = 64005, - }, - StaminaExtension = { - LastActivatedAt = 64007, - }, - StrikeEnhancement = { - TimeLeft = 64008, - LastActivatedAt = 64009, - }, - WealthDuplex = { - TimeLeft = 64010, - LastActivatedAt = 64011, - }, - -- Resilience - FireResilience = { - TimeLeft = 64012, - LastActivatedAt = 64013, - }, - IceResilience = { - TimeLeft = 64014, - LastActivatedAt = 64015, - }, - EarthResilience = { - TimeLeft = 64016, - LastActivatedAt = 64017, - }, - EnergyResilience = { - TimeLeft = 64018, - LastActivatedAt = 64019, - }, - HolyResilience = { - TimeLeft = 64020, - LastActivatedAt = 64021, - }, - DeathResilience = { - TimeLeft = 64022, - LastActivatedAt = 64023, - }, - PhysicalResilience = { - TimeLeft = 64024, - LastActivatedAt = 64025, - }, - -- Amplifications - FireAmplification = { - TimeLeft = 64026, - LastActivatedAt = 64027, - }, - IceAmplification = { - TimeLeft = 64028, - LastActivatedAt = 64029, - }, - EarthAmplification = { - TimeLeft = 64030, - LastActivatedAt = 64031, - }, - EnergyAmplification = { - TimeLeft = 64032, - LastActivatedAt = 64033, - }, - HolyAmplification = { - TimeLeft = 64034, - LastActivatedAt = 64035, - }, - DeathAmplification = { - TimeLeft = 64036, - LastActivatedAt = 64037, - }, - PhysicalAmplification = { - TimeLeft = 64038, - LastActivatedAt = 64039, - }, - }, - VipSystem = { OnlineCoinsGain = 150002, OnlineTokensGain = 150003, @@ -3044,12 +2847,6 @@ GlobalStorage = { Machine3 = 60147, Machine4 = 60148, }, - TheAncientTombs = { - -- Reserved storage from 60160 - 60169 - ThalasSwitchesGlobalStorage = 60160, - DiprathSwitchesGlobalStorage = 60161, - AshmunrahSwitchesGlobalStorage = 60162, - }, TheOrderOfTheLion = { -- Reserved storage from 60170 - 60171 Drume = { @@ -3108,9 +2905,9 @@ GlobalStorage = { } startupGlobalStorages = { - GlobalStorage.TheAncientTombs.AshmunrahSwitchesGlobalStorage, - GlobalStorage.TheAncientTombs.DiprathSwitchesGlobalStorage, - GlobalStorage.TheAncientTombs.ThalasSwitchesGlobalStorage, + Storage.Quest.U7_4.TheAncientTombs.AshmunrahSwitchesGlobalStorage, + Storage.Quest.U7_4.TheAncientTombs.DiprathSwitchesGlobalStorage, + Storage.Quest.U7_4.TheAncientTombs.ThalasSwitchesGlobalStorage, GlobalStorage.HeroRathleton.FirstMachines, GlobalStorage.HeroRathleton.SecondMachines, GlobalStorage.HeroRathleton.ThirdMachines, diff --git a/data-otservbr-global/lib/quests/killing_in_the_name_of.lua b/data-otservbr-global/lib/quests/killing_in_the_name_of.lua index 154bf6d428d..1e051f20668 100644 --- a/data-otservbr-global/lib/quests/killing_in_the_name_of.lua +++ b/data-otservbr-global/lib/quests/killing_in_the_name_of.lua @@ -28,13 +28,13 @@ tasks = { Extra = { [1] = { killsRequired = 20, - raceName = "Mountain Trolls", + raceName = "Mountain Troll", level = { 1, 9999 }, storage = { 12701, 1 }, norepeatable = true, premium = false, creatures = { - "mountain trolls", + "mountain troll", }, rewards = { { type = "storage", value = { 17524, 1 } }, diff --git a/data-otservbr-global/monster/mammals/husky.lua b/data-otservbr-global/monster/mammals/husky.lua index dae58bcc664..cb4398fc9e0 100644 --- a/data-otservbr-global/monster/mammals/husky.lua +++ b/data-otservbr-global/monster/mammals/husky.lua @@ -26,7 +26,7 @@ monster.Bestiary = { SecondUnlock = 10, CharmsPoints = 1, Stars = 0, - Occurence = 1, + Occurrence = 1, Locations = "Svargrond and Nibelor.", } diff --git a/data-otservbr-global/npc/a_dead_bureaucrat1.lua b/data-otservbr-global/npc/a_dead_bureaucrat1.lua index 4ab5b370d55..7fc5f8dbefc 100644 --- a/data-otservbr-global/npc/a_dead_bureaucrat1.lua +++ b/data-otservbr-global/npc/a_dead_bureaucrat1.lua @@ -78,11 +78,11 @@ local function creatureSayCallback(npc, creature, type, message) local vocationBaseId = vocation:getBaseId() if MsgContains(message, "pumin") then - if npcHandler:getTopic(playerId) == 0 and player:getStorageValue(Storage.PitsOfInferno.ThronePumin) < 1 then + if npcHandler:getTopic(playerId) == 0 and player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) < 1 then npcHandler:say("Sure, where else. Everyone likes to meet my master, he is a great demon, isn't he? Your name is ...?", npc, creature) npcHandler:setTopic(playerId, 1) elseif npcHandler:getTopic(playerId) == 3 then - player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 1) + player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 1) npcHandler:say("How very interesting. I need to tell that to my master immediately. Please go to my colleagues and ask for Form 356. You will need it in order to proceed.", npc, creature) npcHandler:setTopic(playerId, 0) end @@ -97,26 +97,26 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 3) end elseif MsgContains(message, "411") then - if player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 3 then + if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 3 then npcHandler:say("Form 411? You need Form 287 to get that! Do you have it?", npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 5 then + elseif player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 5 then npcHandler:say("Form 411? You need Form 287 to get that! Do you have it?", npc, creature) npcHandler:setTopic(playerId, 5) end elseif MsgContains(message, "no") then if npcHandler:getTopic(playerId) == 4 then - player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 4) + player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 4) npcHandler:say("Oh, what a pity. Go see one of my colleagues. I give you the permission to get Form 287. Bye!", npc, creature) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 5 then - player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 6) + player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 6) npcHandler:say("Great. Here you are. Form 411. Come back anytime you want to talk. Bye.", npc, creature) end elseif MsgContains(message, "356") then - if player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 8 then - player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 9) + if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 8 then + player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 9) npcHandler:say("INCREDIBLE, you did it!! Have fun at Pumin's Domain!", npc, creature) end end diff --git a/data-otservbr-global/npc/a_dead_bureaucrat2.lua b/data-otservbr-global/npc/a_dead_bureaucrat2.lua index faef1786f21..80c57486b27 100644 --- a/data-otservbr-global/npc/a_dead_bureaucrat2.lua +++ b/data-otservbr-global/npc/a_dead_bureaucrat2.lua @@ -68,8 +68,8 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "287") then local player = Player(creature) - if player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 4 then - player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 5) + if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 4 then + player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 5) npcHandler:say("Sure, you can get it from me. Here you are. Bye", npc, creature) end end diff --git a/data-otservbr-global/npc/a_dead_bureaucrat3.lua b/data-otservbr-global/npc/a_dead_bureaucrat3.lua index d9d990b4e37..7518468bad3 100644 --- a/data-otservbr-global/npc/a_dead_bureaucrat3.lua +++ b/data-otservbr-global/npc/a_dead_bureaucrat3.lua @@ -69,7 +69,7 @@ local function creatureSayCallback(npc, creature, type, message) local vocation = Vocation(player:getVocation():getBase():getId()) if MsgContains(message, "pumin") then - if player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 2 then + if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 2 then npcHandler:say("Tell me if you liked it when you come back. What is your name?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -85,11 +85,11 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "145") then if npcHandler:getTopic(playerId) == 3 then - player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 3) + player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 3) npcHandler:say("That's right, you can get Form 145 from me. However, I need Form 411 first. Come back when you have it.", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 6 then - player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 7) + elseif player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 6 then + player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 7) npcHandler:say("Well done! You have form 411!! Here is Form 145. Have fun with it.", npc, creature) end end diff --git a/data-otservbr-global/npc/a_dead_bureaucrat4.lua b/data-otservbr-global/npc/a_dead_bureaucrat4.lua index 666d1beb90b..cb75e5f9d23 100644 --- a/data-otservbr-global/npc/a_dead_bureaucrat4.lua +++ b/data-otservbr-global/npc/a_dead_bureaucrat4.lua @@ -78,7 +78,7 @@ local function creatureSayCallback(npc, creature, type, message) local vocationBaseId = vocation:getBaseId() if MsgContains(message, "pumin") then - if player:getStorageValue(Storage.PitsOfInferno.ThronePumin) < 1 then + if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 1 then npcHandler:say("I'm not sure if you know what you are doing but anyway. Your name is?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -94,11 +94,11 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "356") then if npcHandler:getTopic(playerId) == 3 then - player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 2) + player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 2) npcHandler:say("Sorry, you need Form 145 to get Form 356. Come back when you have it", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 7 then - player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 8) + elseif player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 7 then + player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 8) npcHandler:say("You are better than I thought! Congratulations, here you are: Form 356!", npc, creature) end end diff --git a/data-otservbr-global/npc/a_ghostly_sage.lua b/data-otservbr-global/npc/a_ghostly_sage.lua index 4cd9e242a4f..029bd67e93f 100644 --- a/data-otservbr-global/npc/a_ghostly_sage.lua +++ b/data-otservbr-global/npc/a_ghostly_sage.lua @@ -50,7 +50,7 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end -local travelNode = keywordHandler:addKeyword({ "teleport" }, StdModule.say, { npcHandler = npcHandler, text = "You will now be travelled out of here. Are you sure that you want to face that teleport?" }) +local travelNode = keywordHandler:addKeyword({ "help" }, StdModule.say, { npcHandler = npcHandler, text = "You will now be travelled out of here. Are you sure that you want to face that teleport?" }) travelNode:addChildKeyword({ "yes" }, StdModule.travel, { npcHandler = npcHandler, premium = false, destination = Position(32834, 32275, 9) }) travelNode:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, reset = true, text = "Then stay here in these ghostly halls." }) diff --git a/data-otservbr-global/npc/a_majestic_warwolf.lua b/data-otservbr-global/npc/a_majestic_warwolf.lua index fecc9ecefdc..a8b422a3ba9 100644 --- a/data-otservbr-global/npc/a_majestic_warwolf.lua +++ b/data-otservbr-global/npc/a_majestic_warwolf.lua @@ -47,7 +47,7 @@ end local function greetCallback(npc, creature) local playerId = creature:getId() - if Player(creature):getStorageValue(Storage.OutfitQuest.DruidHatAddon) < 9 then + if Player(creature):getStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon) < 9 then npcHandler:say("GRRRRRRRRRRRRR", npc, creature) return false end @@ -63,12 +63,12 @@ local function creatureSayCallback(npc, creature, type, message) end if table.contains({ "addon", "outfit" }, message) then - if player:getStorageValue(Storage.OutfitQuest.DruidHatAddon) == 9 then + if player:getStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon) == 9 then npcHandler:say("I can see in your eyes that you are a honest and friendly person, |PLAYERNAME|. You were patient enough to learn our language and I will grant you a special gift. Will you accept it?", npc, creature) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.OutfitQuest.DruidHatAddon, 10) + player:setStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon, 10) player:addOutfitAddon(148, 2) player:addOutfitAddon(144, 2) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) diff --git a/data-otservbr-global/npc/a_sweaty_cyclops.lua b/data-otservbr-global/npc/a_sweaty_cyclops.lua index 927e10924db..b045b2ad1b4 100644 --- a/data-otservbr-global/npc/a_sweaty_cyclops.lua +++ b/data-otservbr-global/npc/a_sweaty_cyclops.lua @@ -60,181 +60,139 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "melt") then - npcHandler:say("Can melt gold ingot for lil' one. You want?", npc, creature) - npcHandler:setTopic(playerId, 10) - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 10 then - if player:removeItem(9058, 1) then - npcHandler:say("whoooosh There!", npc, creature) - player:addItem(12804, 1) - else - npcHandler:say("There is no gold ingot with you.", npc, creature) - end - npcHandler:setTopic(playerId, 0) - end - - if MsgContains(message, "amulet") then - if player:getStorageValue(Storage.SweetyCyclops.AmuletStatus) < 1 then - npcHandler:say("Me can do unbroken but Big Ben want gold 5000 and Big Ben need a lil' time to make it unbroken. Yes or no??", npc, creature) - npcHandler:setTopic(playerId, 9) - elseif player:getStorageValue(Storage.SweetyCyclops.AmuletStatus) == 1 then - npcHandler:say("Ahh, lil' one wants amulet. Here! Have it! Mighty, mighty amulet lil' one has. Don't know what but mighty, mighty it is!!!", npc, creature) - player:addItem(7532, 1) - player:setStorageValue(Storage.SweetyCyclops.AmuletStatus, 2) - npcHandler:setTopic(playerId, 0) - end + -- uth'lokr (Bast Skirts) + if MsgContains(message, "uth'lokr") and player:getStorageValue(Storage.Quest.U7_8.FriendsandTraders.TheSweatyCyclops) < 1 then + npcHandler:say("Firy steel it is. Need green ones' breath to melt. Or red even better. Me can make from shield. Lil' one want to trade?", npc, creature) + npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Wait. Me work no cheap is. Do favour for me first, yes?", npc, creature) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Me need gift for woman. We dance, so me want to give her bast skirt. But she big is. So I need many to make big one. Bring three okay? Me wait.", npc, creature) - npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.FriendsandTraders.DefaultStart, 1) - player:setStorageValue(Storage.FriendsandTraders.TheSweatyCyclops, 1) - elseif npcHandler:getTopic(playerId) == 3 then - if player:removeItem(3560, 3) then - npcHandler:say("Good good! Woman happy will be. Now me happy too and help you.", npc, creature) - npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.FriendsandTraders.TheSweatyCyclops, 2) + if player:getStorageValue(Storage.OutfitQuest.FriendsandTraders.DefaultStart) ~= 1 then + player:setStorageValue(Storage.OutfitQuest.FriendsandTraders.DefaultStart, 1) end - -- Crown Armor + player:setStorageValue(Storage.Quest.U7_8.FriendsandTraders.TheSweatyCyclops, 1) + npcHandler:setTopic(playerId, 3) elseif npcHandler:getTopic(playerId) == 4 then - if player:removeItem(3381, 1) then - npcHandler:say("Cling clang!", npc, creature) - npcHandler:setTopic(playerId, 0) - player:addItem(5887, 1) - end - -- Dragon Shield - elseif npcHandler:getTopic(playerId) == 5 then - if player:removeItem(3416, 1) then - npcHandler:say("Cling clang!", npc, creature) - npcHandler:setTopic(playerId, 0) - player:addItem(5889, 1) - end - -- Devil Helmet - elseif npcHandler:getTopic(playerId) == 6 then - if player:removeItem(3356, 1) then - npcHandler:say("Cling clang!", npc, creature) - npcHandler:setTopic(playerId, 0) - player:addItem(5888, 1) - end - -- Giant Sword - elseif npcHandler:getTopic(playerId) == 7 then - if player:removeItem(3281, 1) then - npcHandler:say("Cling clang!", npc, creature) - npcHandler:setTopic(playerId, 0) - player:addItem(5892, 1) - end - -- Soul Orb - elseif npcHandler:getTopic(playerId) == 8 then - if player:getItemCount(5944) > 0 then - local count = player:getItemCount(5944) - for i = 1, count do - if math.random(100) <= 1 then - player:addItem(6528, 6) - player:removeItem(5944, 1) - else - player:addItem(6528, 3) - player:removeItem(5944, 1) - end - end - npcHandler:say("Cling clang!", npc, creature) + if player:removeItem(3560, 3) then + npcHandler:say("Good good! Woman happy will be. Now me happy too and help you.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.FriendsandTraders.TheSweatyCyclops, 2) npcHandler:setTopic(playerId, 0) else - npcHandler:say("You dont have soul orbs!", npc, creature) - npcHandler:setTopic(playerId, 0) + npcHandler:say("Lil' one bring three bast skirts.", npc, creature) + npcHandler:setTopic(playerId, 3) end - elseif npcHandler:getTopic(playerId) == 9 then - if player:getItemCount(7528) > 0 and player:getItemCount(7529) > 0 and player:getItemCount(7530) > 0 and player:getItemCount(7531) > 0 and player:getMoney() + player:getBankBalance() >= 5000 then - player:removeItem(7528, 1) - player:removeItem(7529, 1) - player:removeItem(7530, 1) - player:removeItem(7531, 1) - player:removeMoneyBank(5000) - player:setStorageValue(Storage.SweetyCyclops.AmuletTimer, os.time()) - player:setStorageValue(Storage.SweetyCyclops.AmuletStatus, 1) - npcHandler:say("Well, well, I do that! Big Ben makes lil' amulet unbroken with big hammer in big hands! No worry! Come back after sun hits the horizon 24 times and ask me for amulet.", npc, creature) - npcHandler:setTopic(playerId, 0) + end + elseif MsgContains(message, "bast skirt") and player:getStorageValue(Storage.Quest.U7_8.FriendsandTraders.TheSweatyCyclops) == 1 then + if npcHandler:getTopic(playerId) == 3 then + npcHandler:say("Lil' one bring three bast skirts?", npc, creature) + npcHandler:setTopic(playerId, 4) + end + end + -- uth'lokr (Bast Skirts) + if MsgContains(message, "uth'lokr") and player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheSweatyCyclops) < 1 then + npcHandler:say("Firy steel it is. Need green ones' breath to melt. Or red even better. Me can make from shield. Lil' one want to trade?", npc, creature) + npcHandler:setTopic(playerId, 1) + elseif MsgContains(message, "yes") then + if npcHandler:getTopic(playerId) == 1 then + npcHandler:say("Wait. Me work no cheap is. Do favour for me first, yes?", npc, creature) + npcHandler:setTopic(playerId, 2) + elseif npcHandler:getTopic(playerId) == 2 then + npcHandler:say("Me need gift for woman. We dance, so me want to give her bast skirt. But she big is. So I need many to make big one. Bring three okay? Me wait.", npc, creature) + if player:getStorageValue(Storage.OutfitQuest.FriendsandTraders.DefaultStart) ~= 1 then + player:setStorageValue(Storage.OutfitQuest.FriendsandTraders.DefaultStart, 1) end - elseif npcHandler:getTopic(playerId) == 11 then - if player:removeItem(5880, 1) then - player:setStorageValue(Storage.HiddenCityOfBeregar.GearWheel, player:getStorageValue(Storage.HiddenCityOfBeregar.GearWheel) + 1) - player:addItem(8775, 1) - npcHandler:say("Cling clang!", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheSweatyCyclops, 1) + npcHandler:setTopic(playerId, 3) + elseif npcHandler:getTopic(playerId) == 4 then + if player:removeItem(3560, 3) then + npcHandler:say("Good good! Woman happy will be. Now me happy too and help you.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheSweatyCyclops, 2) npcHandler:setTopic(playerId, 0) else - npcHandler:say("Lil' one does not have any iron ores.", npc, creature) + npcHandler:say("Lil' one bring three bast skirts.", npc, creature) + npcHandler:setTopic(playerId, 3) end - npcHandler:setTopic(playerId, 0) end - - -- Crown Armor - elseif MsgContains(message, "uth'kean") then - if player:getStorageValue(Storage.FriendsandTraders.TheSweatyCyclops) < 1 then - npcHandler:say("Very noble. Shiny. Me like. But breaks so fast. Me can make from shiny armour. Lil' one want to trade?", npc, creature) - npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.FriendsandTraders.TheSweatyCyclops) == 1 then + elseif MsgContains(message, "bast skirt") and player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheSweatyCyclops) == 1 then + if npcHandler:getTopic(playerId) == 3 then npcHandler:say("Lil' one bring three bast skirts?", npc, creature) - npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.FriendsandTraders.TheSweatyCyclops) == 2 then - npcHandler:say("Very noble. Shiny. Me like. But breaks so fast. Me can make from shiny armour. Lil' one want to trade?", npc, creature) npcHandler:setTopic(playerId, 4) end - -- Dragon Shield - elseif MsgContains(message, "uth'lokr") then - if player:getStorageValue(Storage.FriendsandTraders.TheSweatyCyclops) < 1 then - npcHandler:say("Firy steel it is. Need green ones' breath to melt. Or red even better. Me can make from shield. Lil' one want to trade?", npc, creature) - npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.FriendsandTraders.TheSweatyCyclops) == 1 then - npcHandler:say("Lil' one bring three bast skirts?", npc, creature) - npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.FriendsandTraders.TheSweatyCyclops) == 2 then - npcHandler:say("Firy steel it is. Need green ones' breath to melt. Or red even better. Me can make from shield. Lil' one want to trade?", npc, creature) - npcHandler:setTopic(playerId, 5) + end + + -- Uth'kean (Crown Armor - Piece of Royal Steel) + if MsgContains(message, "uth'kean") and player:getStorageValue(Storage.Quest.U7_8.FriendsandTraders.TheSweatyCyclops) == 2 then + npcHandler:say("Very noble. Shiny. Me like. But breaks so fast. Me can make from shiny armour. Lil' one want to trade?", npc, creature) + npcHandler:setTopic(playerId, 5) + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 5 then + if player:removeItem(3381, 1) then + npcHandler:say("Cling clang!", npc, creature) + player:addItem(5887, 1) + npcHandler:setTopic(playerId, 0) end - -- Devil Helmet - elseif MsgContains(message, "za'ralator") then - if player:getStorageValue(Storage.FriendsandTraders.TheSweatyCyclops) < 1 then - npcHandler:say("Hellsteel is. Cursed and evil. Dangerous to work with. Me can make from evil helmet. Lil' one want to trade?", npc, creature) - npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.FriendsandTraders.TheSweatyCyclops) == 1 then - npcHandler:say("Lil' one bring three bast skirts?", npc, creature) - npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.FriendsandTraders.TheSweatyCyclops) == 2 then - npcHandler:say("Hellsteel is. Cursed and evil. Dangerous to work with. Me can make from evil helmet. Lil' one want to trade?", npc, creature) - npcHandler:setTopic(playerId, 6) + end + + -- uth'lokr (Dragon Shield - Piece of Draconian Steel) + if MsgContains(message, "uth'lokr") and player:getStorageValue(Storage.Quest.U7_8.FriendsandTraders.TheSweatyCyclops) == 2 then + npcHandler:say("Firy steel it is. Need green ones' breath to melt. Or red even better. Me can make from shield. Lil' one want to trade?", npc, creature) + npcHandler:setTopic(playerId, 6) + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 6 then + if player:removeItem(3416, 1) then + npcHandler:say("Cling clang!", npc, creature) + player:addItem(5889, 1) + npcHandler:setTopic(playerId, 0) end - -- Giant Sword - elseif MsgContains(message, "uth'prta") then - if player:getStorageValue(Storage.FriendsandTraders.TheSweatyCyclops) < 1 then - npcHandler:say("Good iron is. Me friends use it much for fight. Me can make from weapon. Lil' one want to trade?", npc, creature) - npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.FriendsandTraders.TheSweatyCyclops) == 1 then - npcHandler:say("Lil' one bring three bast skirts?", npc, creature) - npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.FriendsandTraders.TheSweatyCyclops) == 2 then - npcHandler:say("Good iron is. Me friends use it much for fight. Me can make from weapon. Lil' one want to trade?", npc, creature) - npcHandler:setTopic(playerId, 7) + end + + -- za'ralator (Devil Helmet - Piece of Hell Steel) + if MsgContains(message, "za'ralator") and player:getStorageValue(Storage.Quest.U7_8.FriendsandTraders.TheSweatyCyclops) == 2 then + npcHandler:say("Hellsteel is. Cursed and evil. Dangerous to work with. Me can make from evil helmet. Lil' one want to trade?", npc, creature) + npcHandler:setTopic(playerId, 7) + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 7 then + if player:removeItem(3356, 1) then + npcHandler:say("Cling clang!", npc, creature) + player:addItem(5888, 1) + npcHandler:setTopic(playerId, 0) end - -- Soul Orb - elseif MsgContains(message, "soul orb") then - if player:getStorageValue(Storage.FriendsandTraders.TheSweatyCyclops) < 1 then - npcHandler:say("Uh. Me can make some nasty lil' bolt from soul orbs. Lil' one want to trade all?", npc, creature) - npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.FriendsandTraders.TheSweatyCyclops) == 1 then - npcHandler:say("Lil' one bring three bast skirts?", npc, creature) - npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.FriendsandTraders.TheSweatyCyclops) == 2 then - npcHandler:say("Uh. Me can make some nasty lil' bolt from soul orbs. Lil' one want to trade all?", npc, creature) - npcHandler:setTopic(playerId, 8) + end + + -- uth'prta (Giant Sword - Huge Chunk of Crude Iron) + if MsgContains(message, "uth'prta") and player:getStorageValue(Storage.Quest.U7_8.FriendsandTraders.TheSweatyCyclops) == 2 then + npcHandler:say("Good iron is. Me friends use it much for fight. Me can make from weapon. Lil' one want to trade?", npc, creature) + npcHandler:setTopic(playerId, 8) + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 8 then + if player:removeItem(3281, 1) then + npcHandler:say("Cling clang!", npc, creature) + player:addItem(5892, 1) + npcHandler:setTopic(playerId, 0) end - elseif MsgContains(message, "gear wheel") then - if player:getStorageValue(Storage.HiddenCityOfBeregar.GoingDown) > 0 and player:getStorageValue(Storage.HiddenCityOfBeregar.GearWheel) > 3 then - npcHandler:say("Uh. Me can make some gear wheel from iron ores. Lil' one want to trade?", npc, creature) - npcHandler:setTopic(playerId, 11) + end + + -- soul orb (soul orb - Infernal Bolts) + if MsgContains(message, "soul orb") and player:getStorageValue(Storage.Quest.U7_8.FriendsandTraders.TheSweatyCyclops) == 2 then + npcHandler:say("Uh. Me can make some nasty lil' bolt from soul orbs. Lil' one want to trade all?", npc, creature) + npcHandler:setTopic(playerId, 9) + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 9 then + if player:getItemCount(5944) > 0 then + local count = player:getItemCount(5944) + for i = 1, count do + if math.random(100) <= 1 then + player:addItem(6528, 6) + player:removeItem(5944, 1) + npcHandler:say("Cling clang! Me done good work today! Li'l one gets double bolts!", npc, creature) + else + player:addItem(6528, 3) + player:removeItem(5944, 1) + npcHandler:say("Cling clang!", npc, creature) + end + end + npcHandler:setTopic(playerId, 0) end end + return true end diff --git a/data-otservbr-global/npc/ajax.lua b/data-otservbr-global/npc/ajax.lua index b834b35fd24..209d75d2447 100644 --- a/data-otservbr-global/npc/ajax.lua +++ b/data-otservbr-global/npc/ajax.lua @@ -54,12 +54,13 @@ local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 1 or player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) > 3 then - npcHandler:setMessage(MESSAGE_GREET, "Whatcha do in my place?") - elseif player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 2 and player:getStorageValue(Storage.OutfitQuest.BarbarianAddonWaitTimer) < os.time() then + if player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) == 2 and player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddonWaitTimer) < os.time() then npcHandler:setMessage(MESSAGE_GREET, "You back. You know, you right. Brother is right. Fist not always good. Tell him that!") - player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 3) + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, 3) + else + npcHandler:setMessage(MESSAGE_GREET, "Whatcha do in my place?") end + return true end @@ -73,7 +74,7 @@ local function creatureSayCallback(npc, creature, type, message) -- PREQUEST if MsgContains(message, "mine") then - if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) == 1 then npcHandler:say("YOURS? WHAT IS YOURS! NOTHING IS YOURS! IS MINE! GO AWAY, YES?!", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -88,55 +89,55 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("I GIVE YOU NO!", npc, creature) npcHandler:setTopic(playerId, 4) end - elseif MsgContains(message, "please") then + elseif MsgContains(message, "say please") then if npcHandler:getTopic(playerId) == 4 then npcHandler:say("Please? What you mean please? Like I say please you say bye? Please?", npc, creature) npcHandler:setTopic(playerId, 5) end -- OUTFIT elseif MsgContains(message, "gelagos") then - if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 4 then + if player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) == 4 then npcHandler:say("Annoying kid. Bro hates him, but talking no help. Bro needs {fighting spirit}!", npc, creature) npcHandler:setTopic(playerId, 6) end elseif MsgContains(message, "fighting spirit") then if npcHandler:getTopic(playerId) == 6 then npcHandler:say("If you want to help bro, bring him fighting spirit. Magic fighting spirit. Ask Djinn.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 5) + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, 5) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "present") then - if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 11 then + if player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) == 11 then npcHandler:say("Bron gave me present. Ugly, but nice from him. Me want to give present too. You help me?", npc, creature) npcHandler:setTopic(playerId, 6) end - elseif MsgContains(message, "ore") then - if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 12 then + elseif MsgContains(message, "iron ore") then + if player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) == 12 then npcHandler:say("You bring 100 iron ore?", npc, creature) npcHandler:setTopic(playerId, 8) end - elseif MsgContains(message, "iron") then - if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 13 then + elseif MsgContains(message, "crude iron") then + if player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) == 13 then npcHandler:say("You bring crude iron?", npc, creature) npcHandler:setTopic(playerId, 9) end - elseif MsgContains(message, "fangs") then - if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 14 then + elseif MsgContains(message, "behemoth fangs") then + if player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) == 14 then npcHandler:say("You bring 50 behemoth fangs?", npc, creature) npcHandler:setTopic(playerId, 10) end - elseif MsgContains(message, "leather") then - if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 15 then + elseif MsgContains(message, "lizard leather") then + if player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) == 15 then npcHandler:say("You bring 50 lizard leather?", npc, creature) npcHandler:setTopic(playerId, 11) end elseif MsgContains(message, "axe") then if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 16 and player:getStorageValue(Storage.OutfitQuest.BarbarianAddonWaitTimer) < os.time() then npcHandler:say("Axe is done! For you. Take. Wear like me.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 17) player:addOutfitAddon(147, 1) player:addOutfitAddon(143, 1) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 17) player:addAchievement("Brutal Politeness") else npcHandler:say("Axe is not done yet!", npc, creature) @@ -149,8 +150,8 @@ local function creatureSayCallback(npc, creature, type, message) condition:setParameter(CONDITION_PARAM_DELAYED, 1) condition:addDamage(10, 2000, -10) player:addCondition(condition) - player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 2) - player:setStorageValue(Storage.OutfitQuest.BarbarianAddonWaitTimer, os.time() + 60 * 60) -- 1 hour + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, 2) + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddonWaitTimer, os.time() + 60 * 60) -- 1 hour npcHandler:removeInteraction(npc, creature) npcHandler:resetNpc(creature) elseif npcHandler:getTopic(playerId) == 6 then @@ -163,30 +164,30 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 7 then npcHandler:say("Good. You get 100 iron ore first. Come back.", npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 12) + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, 12) elseif npcHandler:getTopic(playerId) == 8 then if player:removeItem(5880, 100) then npcHandler:say("Good! Now bring crude iron.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 13) + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, 13) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 9 then if player:removeItem(5892, 1) then npcHandler:say("Good! Now bring 50 behemoth fangs.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 14) + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, 14) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 10 then if player:removeItem(5893, 50) then npcHandler:say("Good! Now bring 50 lizard leather.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 15) + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, 15) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 11 then if player:removeItem(5876, 50) then npcHandler:say("Ah! All stuff there. I will start making axes now. Come later and ask me for axe.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 16) - player:setStorageValue(Storage.OutfitQuest.BarbarianAddonWaitTimer, os.time() + 2 * 60 * 60) -- 2 hours + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, 16) + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddonWaitTimer, os.time() + 2 * 60 * 60) -- 2 hours npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/alesar.lua b/data-otservbr-global/npc/alesar.lua index ca38fe37ac1..cd677466c21 100644 --- a/data-otservbr-global/npc/alesar.lua +++ b/data-otservbr-global/npc/alesar.lua @@ -85,6 +85,37 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function endConversationWithDelay(npcHandler, npc, creature) + addEvent(function() + npcHandler:unGreet(npc, creature) + end, 1000) +end + +local function greetCallback(npc, creature, message) + local player = Player(creature) + local playerId = player:getId() + + if not MsgContains(message, "djanni'hah") then + npcHandler:say("Shove off, little one! Humans are not welcome here, |PLAYERNAME|!", npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Start) == 1 then + npcHandler:say({ + "Hahahaha! ...", + "|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!", + }, npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + npcHandler:say("What do you want from me, |PLAYERNAME|?", npc, creature) + npcHandler:setInteraction(npc, creature) + + return true +end + local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -93,7 +124,65 @@ local function creatureSayCallback(npc, creature, type, message) return false end - ParseAlesarSay(npc, creature, message, npcHandler) + local missionProgress = player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission02) + if MsgContains(message, "mission") then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission01) == 3 then + if missionProgress < 1 then + npcHandler:say({ + "So Baa'leal thinks you are up to do a mission for us? ...", + "I think he is getting old, entrusting human scum such as you are with an important mission like that. ...", + "Personally, I don't understand why you haven't been slaughtered right at the gates. ...", + "Anyway. Are you prepared to embark on a dangerous mission for us?", + }, npc, creature) + npcHandler:setTopic(playerId, 1) + elseif isInArray({ 1, 2 }, missionProgress) then + npcHandler:say("Did you find the tear of Daraman?", npc, creature) + npcHandler:setTopic(playerId, 2) + else + npcHandler:say("Don't forget to talk to Malor concerning your next mission.", npc, creature) + end + end + elseif npcHandler:getTopic(playerId) == 1 then + if MsgContains(message, "yes") then + npcHandler:say({ + "All right then, human. Have you ever heard of the {'Tears of Daraman'}? ...", + "They are precious gemstones made of some unknown blue mineral and possess enormous magical power. ...", + "If you want to learn more about these gemstones don't forget to visit our library. ...", + "Anyway, one of them is enough to create thousands of our mighty djinn blades. ...", + "Unfortunately my last gemstone broke and therefore I'm not able to create new blades anymore. ...", + "To my knowledge there is only one place where you can find these gemstones - I know for a fact that the Marid have at least one of them. ...", + "Well... to cut a long story short, your mission is to sneak into Ashta'daramai and to steal it. ...", + "Needless to say, the Marid won't be too eager to part with it. Try not to get killed until you have delivered the stone to me.", + }, npc, creature) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission02, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.DoorToMaridTerritory, 1) + elseif MsgContains(message, "no") then + npcHandler:say("Then not.", npc, creature) + end + npcHandler:setTopic(playerId, 0) + elseif npcHandler:getTopic(playerId) == 2 then + if MsgContains(message, "yes") then + if player:getItemCount(3233) == 0 or missionProgress ~= 2 then + npcHandler:say("As I expected. You haven't got the stone. Shall I explain your mission again?", npc, creature) + npcHandler:setTopic(playerId, 1) + else + npcHandler:say({ + "So you have made it? You have really managed to steal a Tear of Daraman? ...", + "Amazing how you humans are just impossible to get rid of. Incidentally, you have this character trait in common with many insects and with other vermin. ...", + "Nevermind. I hate to say it, but it you have done us a favour, human. That gemstone will serve us well. ...", + "Baa'leal, wants you to talk to Malor concerning some new mission. ...", + "Looks like you have managed to extended your life expectancy - for just a bit longer.", + }, npc, creature) + player:removeItem(3233, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission02, 3) + npcHandler:setTopic(playerId, 0) + end + elseif MsgContains(message, "no") then + npcHandler:say("As I expected. You haven't got the stone. Shall I explain your mission again?", npc, creature) + npcHandler:setTopic(playerId, 1) + end + end + return true end @@ -101,7 +190,7 @@ local function onTradeRequest(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.DjinnWar.EfreetFaction.Mission03) ~= 3 then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission03) ~= 3 then npcHandler:say("I'm sorry, but you don't have Malor's permission to trade with me.", npc, creature) return false end @@ -109,11 +198,13 @@ local function onTradeRequest(npc, creature) return true end -npcHandler:setMessage(MESSAGE_GREET, "What do you want from me, |PLAYERNAME|?") +keywordHandler:addCustomGreetKeyword({ "djanni'hah" }, greetCallback, { npcHandler = npcHandler }) + npcHandler:setMessage(MESSAGE_FAREWELL, "Finally.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Finally.") npcHandler:setMessage(MESSAGE_SENDTRADE, "At your service, just browse through my wares.") +npcHandler:setCallback(CALLBACK_GREET, greetCallback) npcHandler:setCallback(CALLBACK_ON_TRADE_REQUEST, onTradeRequest) npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) diff --git a/data-otservbr-global/npc/alesar_functions.lua b/data-otservbr-global/npc/alesar_functions.lua index da25d5e8c62..d610a07d1f9 100644 --- a/data-otservbr-global/npc/alesar_functions.lua +++ b/data-otservbr-global/npc/alesar_functions.lua @@ -2,9 +2,9 @@ function ParseAlesarSay(npc, creature, message, npcHandler) local player = Player(creature) local playerId = player:getId() - local missionProgress = player:getStorageValue(Storage.DjinnWar.EfreetFaction.Mission02) + local missionProgress = player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission02) if MsgContains(message, "mission") then - if player:getStorageValue(Storage.DjinnWar.EfreetFaction.Mission01) == 3 then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission01) == 3 then if missionProgress < 1 then npcHandler:say({ "So Baa'leal thinks you are up to do a mission for us? ...", @@ -32,8 +32,8 @@ function ParseAlesarSay(npc, creature, message, npcHandler) "Well... to cut a long story short, your mission is to sneak into Ashta'daramai and to steal it. ...", "Needless to say, the Marid won't be too eager to part with it. Try not to get killed until you have delivered the stone to me.", }, npc, creature) - player:setStorageValue(Storage.DjinnWar.EfreetFaction.Mission02, 1) - player:setStorageValue(Storage.DjinnWar.EfreetFaction.DoorToMaridTerritory, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission02, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.DoorToMaridTerritory, 1) elseif MsgContains(message, "no") then npcHandler:say("Then not.", npc, creature) end @@ -52,7 +52,7 @@ function ParseAlesarSay(npc, creature, message, npcHandler) "Looks like you have managed to extended your life expectancy - for just a bit longer.", }, npc, creature) player:removeItem(3233, 1) - player:setStorageValue(Storage.DjinnWar.EfreetFaction.Mission02, 3) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission02, 3) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "no") then diff --git a/data-otservbr-global/npc/alexander.lua b/data-otservbr-global/npc/alexander.lua index fda2799bf4d..52b98a9760e 100644 --- a/data-otservbr-global/npc/alexander.lua +++ b/data-otservbr-global/npc/alexander.lua @@ -40,7 +40,7 @@ local itemsTable = { }, ["creature products"] = { { itemName = "crystal ball", clientId = 3076, buy = 530, sell = 190 }, - { itemName = "life crystal", clientId = 3061, sell = 83 }, + { itemName = "life crystal", clientId = 3061, sell = 85 }, { itemName = "mind stone", clientId = 3062, sell = 170 }, }, ["shields"] = { diff --git a/data-otservbr-global/npc/amanda.lua b/data-otservbr-global/npc/amanda.lua index 64cc34f79dc..12c011481c0 100644 --- a/data-otservbr-global/npc/amanda.lua +++ b/data-otservbr-global/npc/amanda.lua @@ -119,23 +119,23 @@ stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, t -- Wooden Stake keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "I think you have forgotten to bring your stake, my child." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 6 and player:getItemCount(5941) == 0 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 6 and player:getItemCount(5941) == 0 end) local stakeKeyword = keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "Yes, I was informed what to do. Are you prepared to receive my line of the prayer?" }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 6 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 6 end) stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "So receive my prayer: 'Wicked curses shall be broken'. Now, bring your stake to Kasmir in Darashia for the next line of the prayer. I will inform him what to do.", reset = true }, nil, function(player) - player:setStorageValue(Storage.FriendsandTraders.TheBlessedStake, 7) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, 7) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) end) stakeKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "I'll wait for you.", reset = true }) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You should visit Kasmir in Darashia now, my child." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 7 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 7 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You already received my line of the prayer." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) > 7 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) > 7 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "A blessed stake? That's a strange request. Maybe Quentin knows more, he is one of the oldest monks after all." }) diff --git a/data-otservbr-global/npc/amber.lua b/data-otservbr-global/npc/amber.lua index 335f5dea332..fedb84e56e7 100644 --- a/data-otservbr-global/npc/amber.lua +++ b/data-otservbr-global/npc/amber.lua @@ -68,70 +68,43 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local addonProgress = player:getStorageValue(Storage.OutfitQuest.Citizen.AddonBackpack) + local addonProgress = player:getStorageValue(Storage.Quest.U7_8.CitizenOutfitsRook.AddonBackpackRook) if MsgContains(message, "addon") or MsgContains(message, "outfit") or (addonProgress == 1 and MsgContains(message, "leather")) or ((addonProgress == 1 or addonProgress == 2) and MsgContains(message, "backpack")) then if addonProgress < 1 then - npcHandler:say("Sorry, the backpack I wear is not for sale. It's handmade from rare minotaur leather.", npc, creature) + npcHandler:say("Ah, you noticed my new accessory? Sorry, this one is not for sale. It's handmade from rare minotaur leather.", npc, creature) npcHandler:setTopic(playerId, 1) elseif addonProgress == 1 then - npcHandler:say( - "Ah, right, almost forgot about the backpack! \z - Have you brought me 100 pieces of minotaur leather as requested?", - npc, - creature - ) + npcHandler:say("Ah, right, almost forgot about the backpack! Have you brought me 100 pieces of minotaur leather as requested?", npc, creature) npcHandler:setTopic(playerId, 3) elseif addonProgress == 2 then - if player:getStorageValue(Storage.OutfitQuest.Citizen.AddonBackpackTimer) < os.time() then + if player:getStorageValue(Storage.Quest.U7_8.CitizenOutfitsRook.AddonBackpackRookTimer) < os.time() then npcHandler:say("Just in time! Your backpack is finished. Here you go, I hope you like it.", npc, creature) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) player:setStorageValue(Storage.OutfitQuest.Ref, math.min(0, player:getStorageValue(Storage.OutfitQuest.Ref) - 1)) - player:setStorageValue(Storage.OutfitQuest.Citizen.MissionBackpack, 0) - player:setStorageValue(Storage.OutfitQuest.Citizen.AddonBackpack, 3) - + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfitsRook.MissionBackpackRook, 4) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfitsRook.AddonBackpackRook, 3) player:addOutfitAddon(136, 1) player:addOutfitAddon(128, 1) else - npcHandler:say( - "Uh... I didn't expect you to return that early. \z - Sorry, but I'm not finished yet with your backpack. \z - I'm doing the best I can, promised.", - npc, - creature - ) + npcHandler:say("Uh... I didn't expect you to return that early. Sorry, but I'm not finished yet with your backpack. I'm doing the best I can, promised.", npc, creature) end elseif addonProgress == 3 then - npcHandler:say( - "Sorry, but I can only make one backpack per person, \z - else I'd have to close my shop and open a leather manufactory.", - npc, - creature - ) + npcHandler:say("Sorry, but I can only make one backpack per person, else I'd have to close my shop and open a leather manufactory.", npc, creature) end return true end if npcHandler:getTopic(playerId) == 1 then if MsgContains(message, "backpack") or MsgContains(message, "minotaur") or MsgContains(message, "leather") then - npcHandler:say( - "Well, if you really like this backpack, I could make one for you, \z - but minotaur leather is hard to come by these days. Are you willing to put some work into this?", - npc, - creature - ) + npcHandler:say("Well, if you really like this backpack, I could make one for you, but minotaur leather is hard to come by these days. Are you willing to put some work into this?", npc, creature) npcHandler:setTopic(playerId, 2) end elseif npcHandler:getTopic(playerId) == 2 then if MsgContains(message, "yes") then player:setStorageValue(Storage.OutfitQuest.Ref, math.max(0, player:getStorageValue(Storage.OutfitQuest.Ref)) + 1) - player:setStorageValue(Storage.OutfitQuest.Citizen.AddonBackpack, 1) - player:setStorageValue(Storage.OutfitQuest.Citizen.MissionBackpack, 1) - npcHandler:say( - "Alright then, if you bring me 100 pieces of fine minotaur leather I will \z - see what I can do for you. You probably have to kill really many minotaurs though... so good luck!", - npc, - creature - ) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfitsRook.AddonBackpackRook, 1) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfitsRook.MissionBackpackRook, 1) + npcHandler:say("Alright then, if you bring me 100 pieces of fine minotaur leather I will see what I can do for you. You probably have to kill really many minotaurs though... so good luck!", npc, creature) npcHandler:removeInteraction(npc, creature) else npcHandler:say("Sorry, but I don't run a welfare office, you know... no pain, no gain.", npc, creature) @@ -140,29 +113,16 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 3 then if MsgContains(message, "yes") then if player:getItemCount(5878) < 100 then - npcHandler:say( - "Sorry, but that's not enough leather yet to make one of these backpacks. \z - Would you rather like to buy a normal backpack for 10 gold?", - npc, - creature - ) + npcHandler:say("Sorry, but that's not enough leather yet to make one of these backpacks. Would you rather like to buy a normal backpack for 10 gold?", npc, creature) else npcHandler:say("Great! Alright, I need a while to finish this backpack for you. Come ask me later, okay?", npc, creature) - player:removeItem(5878, 100) - - player:setStorageValue(Storage.OutfitQuest.Citizen.MissionBackpack, 2) - player:setStorageValue(Storage.OutfitQuest.Citizen.AddonBackpack, 2) - player:setStorageValue(Storage.OutfitQuest.Citizen.AddonBackpackTimer, os.time() + 2 * 60 * 60) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfitsRook.MissionBackpackRook, 2) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfitsRook.AddonBackpackRook, 2) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfitsRook.AddonBackpackRookTimer, os.time() + 2 * 60 * 60) --2 hours end else - npcHandler:say( - "I know, it's quite some work... don't lose heart, \z - just keep killing minotaurs and you'll eventually get lucky. \z - Would you rather like to buy a normal backpack for 10 gold?", - npc, - creature - ) + npcHandler:say("I know, it's quite some work... don't lose heart, just keep killing minotaurs and you'll eventually get lucky. Would you rather like to buy a normal backpack for 10 gold?", npc, creature) end npcHandler:setTopic(playerId, 0) end @@ -184,14 +144,11 @@ keywordHandler:addKeyword({ "explore" }, StdModule.say, { }) keywordHandler:addKeyword({ "adventure" }, StdModule.say, { npcHandler = npcHandler, - text = "I fought fierce {monsters}, climbed the highest mountains, explored the deepest {dungeons} \z - and crossed the {sea} on a {raft}.", + text = "I fought fierce {monsters}, climbed the highest mountains, explored the deepest {dungeons} and crossed the {sea} on a {raft}.", }) keywordHandler:addKeyword({ "sea" }, StdModule.say, { npcHandler = npcHandler, - text = "My voyage on the sea was exhausting. \z - The weather was bad, the waves high and my raft quite simple. \z - There's a certain excitement to it, though.", + text = "My voyage on the sea was exhausting. The weather was bad, the waves high and my raft quite simple. There's a certain excitement to it, though.", }) keywordHandler:addKeyword({ "time" }, StdModule.say, { npcHandler = npcHandler, @@ -199,24 +156,19 @@ keywordHandler:addKeyword({ "time" }, StdModule.say, { }) keywordHandler:addKeyword({ "help" }, StdModule.say, { npcHandler = npcHandler, - text = "Well, I can give you general {hints} or tell you about my {adventures} and many other topics. \z - Oh, and if you are bored, I might have a small {quest} for you.", + text = "Well, I can give you general {hints} or tell you about my {adventures} and many other topics. Oh, and if you are bored, I might have a small {quest} for you.", }) keywordHandler:addKeyword({ "information" }, StdModule.say, { npcHandler = npcHandler, - text = "Well, I can give you general {hints} or tell you about my {adventures} and many other topics. \z - Oh, and if you are bored, I might have a small {quest} for you.", + text = "Well, I can give you general {hints} or tell you about my {adventures} and many other topics. Oh, and if you are bored, I might have a small {quest} for you.", }) keywordHandler:addKeyword({ "dungeon" }, StdModule.say, { npcHandler = npcHandler, - text = "I had no time to explore the dungeons of this isle yet, \z - but I've seen two big caves in the East, and there is a ruined tower to the north-west. \z - Oh, and there're the {sewers}.", + text = "I had no time to explore the dungeons of this isle yet, but I've seen two big caves in the East, and there is a ruined tower to the north-west. Oh, and there're the {sewers}.", }) keywordHandler:addKeyword({ "sewer" }, StdModule.say, { npcHandler = npcHandler, - text = "I like sewers. I made my very first battle experience in the sewers below {Thais}. \z - The small sewer system of {Rookgaard} has some nasty rats to fight.", + text = "I like sewers. I made my very first battle experience in the sewers below {Thais}. The small sewer system of {Rookgaard} has some nasty rats to fight.", }) keywordHandler:addKeyword({ "monster" }, StdModule.say, { npcHandler = npcHandler, @@ -226,30 +178,21 @@ keywordHandler:addKeyword({ "cyclops" }, StdModule.say, { npcHandler = npcHandler, text = "I don't like the way they look at you. Their eye seems to pierce right through you. Creepy!", }) -keywordHandler:addKeyword({ "minotaur" }, StdModule.say, { - npcHandler = npcHandler, - text = "They are nasty monsters, particularly as they have distance fighters and mages in their clans. \z - My {backpack} is handmade from minotaur leather.", -}) keywordHandler:addKeyword({ "dragon" }, StdModule.say, { npcHandler = npcHandler, - text = "Their breath is so hot! I had to cut my hair after my last encounter with \z - a dragon because the ends were all burnt. That's what you gotta deal with as a female adventurer!", + text = "Their breath is so hot! I had to cut my hair after my last encounter with a dragon because the ends were all burnt. That's what you gotta deal with as a female adventurer!", }) keywordHandler:addKeyword({ "raft" }, StdModule.say, { npcHandler = npcHandler, - text = "I left my raft at the south-eastern shore. I forgot my private {notebook} on it. \z - If you could return it to me, I would be very grateful.", + text = "I left my raft at the south-eastern shore. I forgot my private {notebook} on it. If you could return it to me, I would be very grateful.", }) keywordHandler:addKeyword({ "quest" }, StdModule.say, { npcHandler = npcHandler, - text = "I left my raft at the south-eastern shore. I forgot my private {notebook} on it. \z - If you could return it to me, I would be very grateful.", + text = "I left my raft at the south-eastern shore. I forgot my private {notebook} on it. If you could return it to me, I would be very grateful.", }) keywordHandler:addKeyword({ "mission" }, StdModule.say, { npcHandler = npcHandler, - text = "I left my raft at the south-eastern shore. I forgot my private {notebook} on it. \z - If you could return it to me, I would be very grateful.", + text = "I left my raft at the south-eastern shore. I forgot my private {notebook} on it. If you could return it to me, I would be very grateful.", }) keywordHandler:addKeyword({ "seymour" }, StdModule.say, { npcHandler = npcHandler, @@ -269,8 +212,7 @@ keywordHandler:addKeyword({ "thais" }, StdModule.say, { }) keywordHandler:addKeyword({ "weapon" }, StdModule.say, { npcHandler = npcHandler, - text = "The best weapons on this isle are just toothpicks \z - compared with the weapons warriors wield on the {mainland}.", + text = "The best weapons on this isle are just toothpicks compared with the weapons warriors wield on the {mainland}.", }) keywordHandler:addKeyword({ "magic" }, StdModule.say, { npcHandler = npcHandler, @@ -294,8 +236,7 @@ keywordHandler:addKeyword({ "tools" }, StdModule.say, { }) keywordHandler:addKeyword({ "rope" }, StdModule.say, { npcHandler = npcHandler, - text = "One day I fell into a hole without having a rope. I was yelling for help for three whole days! \z - Eventually a fisherman passed by and pulled me out with his own rope, lucky me.", + text = "One day I fell into a hole without having a rope. I was yelling for help for three whole days! Eventually a fisherman passed by and pulled me out with his own rope, lucky me.", }) keywordHandler:addKeyword({ "shovel" }, StdModule.say, { npcHandler = npcHandler, @@ -303,8 +244,7 @@ keywordHandler:addKeyword({ "shovel" }, StdModule.say, { }) keywordHandler:addKeyword({ "torch" }, StdModule.say, { npcHandler = npcHandler, - text = "You know, on mainland you will be able to cast magic spells which provide you with light. \z - You won't really need torches anymore.", + text = "You know, on mainland you will be able to cast magic spells which provide you with light. You won't really need torches anymore.", }) keywordHandler:addKeyword({ "bank" }, StdModule.say, { npcHandler = npcHandler, @@ -374,8 +314,7 @@ keywordHandler:addKeyword({ "lily" }, StdModule.say, { }) keywordHandler:addKeyword({ "billy" }, StdModule.say, { npcHandler = npcHandler, - text = "He brought me some of his famous rat stew. I really didn't want to insult him, \z - but I simply can't eat something like that. So I told him I'm a vegetarian and I only eat fish. ", + text = "He brought me some of his famous rat stew. I really didn't want to insult him, but I simply can't eat something like that. So I told him I'm a vegetarian and I only eat fish. ", }) keywordHandler:addKeyword({ "willie" }, StdModule.say, { npcHandler = npcHandler, @@ -410,8 +349,7 @@ keywordHandler:addAliasKeyword({ "dallheim" }) -- Orc language keywordHandler:addKeyword({ "orc" }, StdModule.say, { npcHandler = npcHandler, - text = "Not the nicest guys you can encounter. \z - I had some clashes with them and finally ended up being their {prisoner} for a few months.", + text = "Not the nicest guys you can encounter. I had some clashes with them and finally ended up being their {prisoner} for a few months.", }) local prisonerKeyword = keywordHandler:addKeyword({ "prisoner" }, StdModule.say, { npcHandler = npcHandler, @@ -487,11 +425,7 @@ keywordHandler:addAliasKeyword({ "notebook" }) npcHandler:setMessage(MESSAGE_WALKAWAY, "Yeah, see you later.") npcHandler:setMessage(MESSAGE_FAREWELL, "See you later, |PLAYERNAME|.") -npcHandler:setMessage( - MESSAGE_GREET, - "Oh hello, nice to see you |PLAYERNAME|. \z - Are you here to hear some stories of my {adventures} or do you need {help}?" -) +npcHandler:setMessage(MESSAGE_GREET, "Oh hello, nice to see you |PLAYERNAME|. Are you here to hear some stories of my {adventures} or do you need {help}?") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) diff --git a/data-otservbr-global/npc/angelina.lua b/data-otservbr-global/npc/angelina.lua index 0599d3ac243..eb63c4a63ae 100644 --- a/data-otservbr-global/npc/angelina.lua +++ b/data-otservbr-global/npc/angelina.lua @@ -54,9 +54,9 @@ local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonWand) < 1 then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWand) < 1 then npcHandler:setMessage(MESSAGE_GREET, "The gods must be praised that I am finally saved. I do not have many worldly possessions, but please accept a small reward, do you?") - elseif player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonWand) >= 1 then + elseif player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWand) >= 1 then npcHandler:setMessage(MESSAGE_GREET, "Thanks for saving my life! Should I teleport you out of the Dark Cathedral?") end return true @@ -70,19 +70,20 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "Yes") then - if player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonWand) < 1 then + if MsgContains(message, "yes") then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWand) < 1 then npcHandler:say("I will tell you a small secret now. My friend Lynda in Thais can create a blessed wand. Greet her from me, maybe she will aid you.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.MageSummoner.AddonWand, 1) - player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) --this for default start of Outfit and Addon Quests - elseif player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonWand) >= 1 then - player:teleportTo(Position(32659, 32340, 7)) - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWand, 1) + player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) end end + return true end +npcHandler:setMessage(MESSAGE_FAREWELL, "May the gods bless you.") +npcHandler:setMessage(MESSAGE_WALKAWAY, "May the gods bless you.") + npcHandler:setCallback(CALLBACK_GREET, greetCallback) npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/angus.lua b/data-otservbr-global/npc/angus.lua index 3f8d80f6b4c..46579692d26 100644 --- a/data-otservbr-global/npc/angus.lua +++ b/data-otservbr-global/npc/angus.lua @@ -61,7 +61,7 @@ local function creatureSayCallback(npc, creature, type, message) -- Joining if MsgContains(message, "join") then - if player:getStorageValue(Storage.ExplorerSociety.JoiningTheExplorers) < 1 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) < 1 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers) < 1 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) < 1 then npcHandler:say("Do you want to join the explorer society?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -97,205 +97,212 @@ local function creatureSayCallback(npc, creature, type, message) -- Mission Check elseif MsgContains(message, "mission") then if - player:getStorageValue(Storage.ExplorerSociety.JoiningTheExplorers) > 4 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) > 4 and player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) < 26 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) < 26 - or player:getStorageValue(Storage.ExplorerSociety.TheIceDelivery) == 8 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 8 - or player:getStorageValue(Storage.ExplorerSociety.TheButterflyHunt) == 17 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 17 - or player:getStorageValue(Storage.ExplorerSociety.JoiningTheExplorers) == 5 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 5 + player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers) > 4 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) > 4 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) < 26 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) < 26 + or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceDelivery) == 8 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 8 + or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt) == 17 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 17 + or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers) == 5 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 5 then npcHandler:say("The missions available for your rank are the {butterfly hunt}, {plant collection} and {ice delivery}.", npc, creature) npcHandler:setTopic(playerId, 0) elseif - player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) > 25 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) > 35 and player:getStorageValue(Storage.ExplorerSociety.TheOrcPowder) < 35 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) < 35 - or player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) == 26 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 26 - or player:getStorageValue(Storage.ExplorerSociety.TheLizardUrn) == 29 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 29 - or player:getStorageValue(Storage.ExplorerSociety.TheBonelordSecret) == 32 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 32 + player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) > 25 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) > 35 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder) < 35 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) < 35 + or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) == 26 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 26 + or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheLizardUrn) == 29 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 29 + or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheBonelordSecret) == 32 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 32 then npcHandler:say("The missions available for your rank are {lizard urn}, {bonelord secrets} and {orc powder}.", npc, creature) npcHandler:setTopic(playerId, 0) elseif - player:getStorageValue(Storage.ExplorerSociety.TheOrcPowder) > 34 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) > 34 and player:getStorageValue(Storage.ExplorerSociety.TheRuneWritings) < 44 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) < 44 - or player:getStorageValue(Storage.ExplorerSociety.TheOrcPowder) == 35 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 35 - or player:getStorageValue(Storage.ExplorerSociety.TheElvenPoetry) == 38 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 38 - or player:getStorageValue(Storage.ExplorerSociety.TheMemoryStone) == 41 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 41 + player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder) > 34 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) > 34 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheRuneWritings) < 44 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) < 44 + or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder) == 35 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 35 + or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheElvenPoetry) == 38 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 38 + or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheMemoryStone) == 41 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 41 then npcHandler:say("The missions available for your rank are {elven poetry}, {memory stone} and {rune writings}.", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.ExplorerSociety.TheRuneWritings) == 44 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 44 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheRuneWritings) == 44 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 44 then npcHandler:say("The explorer society needs a great deal of help in the research of astral travel. Are you willing to help?", npc, creature) npcHandler:setTopic(playerId, 27) - elseif player:getStorageValue(Storage.ExplorerSociety.TheEctoplasm) == 46 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 46 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheEctoplasm) == 46 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 46 then npcHandler:say("Do you have some collected ectoplasm with you?", npc, creature) npcHandler:setTopic(playerId, 29) - elseif player:getStorageValue(Storage.ExplorerSociety.TheEctoplasm) == 47 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 47 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheEctoplasm) == 47 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 47 then npcHandler:say({ "The research on ectoplasm makes good progress. Now we need some spectral article. Our scientists think a spectral dress would be a perfect object for their studies ...", "The bad news is that the only source to got such a dress is the queen of the banshees. Do you dare to seek her out?" }, npc, creature) npcHandler:setTopic(playerId, 30) - elseif player:getStorageValue(Storage.ExplorerSociety.TheSpectralDress) == 49 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 48 then - npcHandler:say("Did you bring the dress?", npc, creature) + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralDress) == 49 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 48 then + npcHandler:say("Have you acquired the spectral dress we need?", npc, creature) npcHandler:setTopic(playerId, 31) -- Spectral stone - elseif player:getStorageValue(Storage.ExplorerSociety.TheSpectralDress) == 50 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 50 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralDress) == 50 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 50 then npcHandler:say({ "With the objects you've provided our researchers will make steady progress. Still we are missing some test results from fellow explorers ...", "Please travel to our base in Northport and ask them to mail us their latest research reports. Then return here and ask about new missions." }, npc, creature) - player:setStorageValue(Storage.ExplorerSociety.TheSpectralStone, 51) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 51) - player:setStorageValue(Storage.ExplorerSociety.SpectralStone, 1) - elseif player:getStorageValue(Storage.ExplorerSociety.TheSpectralStone) == 51 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 51 and player:getStorageValue(Storage.ExplorerSociety.SpectralStone) == 2 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone, 51) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 51) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.SpectralStone, 1) + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone) == 51 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 51 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.SpectralStone) == 2 then npcHandler:say("Oh, yes! Tell our fellow explorer that the papers are in the mail already.", npc, creature) - player:setStorageValue(Storage.ExplorerSociety.TheSpectralStone, 52) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 52) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone, 52) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 52) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.ExplorerSociety.TheSpectralStone) == 52 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 52 and player:getStorageValue(Storage.ExplorerSociety.SpectralStone) == 1 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone) == 52 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 52 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.SpectralStone) == 1 then npcHandler:say("The reports from Northport have already arrived here and our progress is astonishing. We think it is possible to create an astral bridge between our bases. Are you interested to assist us with this?", npc, creature) npcHandler:setTopic(playerId, 32) -- Spectral stone -- Astral portals - elseif player:getStorageValue(Storage.ExplorerSociety.TheSpectralStone) == 55 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 55 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone) == 55 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 55 then npcHandler:say({ "Both carvings are now charged and harmonised. In theory you should be able to travel in zero time from one base to the other ...", "However, you will need to have an orichalcum pearl in your possession to use it as power source. It will be destroyed during the process. I will give you 6 of such pearls and you can buy new ones in our bases ...", "In addition, you need to be a premium explorer to use the astral travel. ...", "And remember: it's a small teleport for you, but a big teleport for all Tibians! Here is a small present for your efforts!", }, npc, creature) - player:setStorageValue(Storage.ExplorerSociety.TheAstralPortals, 56) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 56) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheAstralPortals, 56) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 56) player:addItem(5021, 6) -- Orichalcum pearl player:addItem(9605, 1) -- Crown backpack + player:addItem(3035, 50) -- 50 Platinum coins -- Astral portals end -- Mission check -- Pickaxe mission elseif MsgContains(message, "pickaxe") then - if player:getStorageValue(Storage.ExplorerSociety.JoiningTheExplorers) < 5 or player:getStorageValue(Storage.ExplorerSociety.JoiningTheExplorers) > 1 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) < 1 or player:getStorageValue(Storage.ExplorerSociety.QuestLine) > 1 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers) < 5 or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers) > 1 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) < 1 or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) > 1 then npcHandler:say("Did you get the requested pickaxe from Uzgod in Kazordoon?", npc, creature) npcHandler:setTopic(playerId, 3) end -- Pickaxe mission -- Ice delivery elseif MsgContains(message, "ice delivery") then - if player:getStorageValue(Storage.ExplorerSociety.JoiningTheExplorers) == 5 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 5 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers) == 5 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 5 then npcHandler:say({ "Our finest minds came up with the theory that deep beneath the ice island of Folda ice can be found that is ancient. To prove this theory we would need a sample of the aforesaid ice ...", "Of course the ice melts away quickly so you would need to hurry to bring it here ...", "Would you like to accept this mission?" }, npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.ExplorerSociety.TheIceDelivery) == 7 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 7 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceDelivery) == 7 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 7 then npcHandler:say("Did you get the ice we are looking for?", npc, creature) npcHandler:setTopic(playerId, 5) end -- Ice delivery -- Butterfly hunt elseif MsgContains(message, "butterfly hunt") then - if player:getStorageValue(Storage.ExplorerSociety.TheIceDelivery) == 8 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 8 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceDelivery) == 8 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 8 then npcHandler:say("The mission asks you to collect some species of butterflies, are you interested?", npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.ExplorerSociety.TheButterflyHunt) == 10 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 10 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt) == 10 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 10 then npcHandler:say("Did you acquire the purple butterfly we are looking for?", npc, creature) npcHandler:setTopic(playerId, 8) - elseif player:getStorageValue(Storage.ExplorerSociety.TheButterflyHunt) == 11 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 11 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt) == 11 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 11 then npcHandler:say({ "This preparation kit will allow you to collect a blue butterfly you have killed ...", "Just use it on the fresh corpse of a blue butterfly, return the prepared butterfly to me and give me a report of your butterfly hunt." }, npc, creature) npcHandler:setTopic(playerId, 0) player:addItem(4863, 1) - player:setStorageValue(Storage.ExplorerSociety.TheButterflyHunt, 12) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 12) - elseif player:getStorageValue(Storage.ExplorerSociety.TheButterflyHunt) == 13 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 13 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt, 12) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 12) + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt) == 13 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 13 then npcHandler:say("Did you acquire the blue butterfly we are looking for?", npc, creature) npcHandler:setTopic(playerId, 9) - elseif player:getStorageValue(Storage.ExplorerSociety.TheButterflyHunt) == 14 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 14 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt) == 14 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 14 then npcHandler:say({ "This preparation kit will allow you to collect a red butterfly you have killed ...", "Just use it on the fresh corpse of a red butterfly, return the prepared butterfly to me and give me a report of your butterfly hunt." }, npc, creature) npcHandler:setTopic(playerId, 0) player:addItem(4863, 1) - player:setStorageValue(Storage.ExplorerSociety.TheButterflyHunt, 15) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 15) - elseif player:getStorageValue(Storage.ExplorerSociety.TheButterflyHunt) == 16 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 16 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt, 15) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 15) + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt) == 16 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 16 then npcHandler:say("Did you acquire the red butterfly we are looking for?", npc, creature) npcHandler:setTopic(playerId, 10) end -- Butterfly Hunt -- Plant Collection elseif MsgContains(message, "plant collection") then - if player:getStorageValue(Storage.ExplorerSociety.TheButterflyHunt) == 17 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 17 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt) == 17 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 17 then npcHandler:say("In this mission we require you to get us some plant samples from Tiquandan plants. Would you like to fulfil this mission?", npc, creature) npcHandler:setTopic(playerId, 11) - elseif player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) == 19 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 19 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) == 19 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 19 then npcHandler:say("Did you acquire the sample of the jungle bells plant we are looking for?", npc, creature) npcHandler:setTopic(playerId, 12) - elseif player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) == 20 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 20 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) == 20 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 20 then npcHandler:say("Use this botanist's container on a witches cauldron to collect a sample for us. Bring it here and report about your plant collection.", npc, creature) npcHandler:setTopic(playerId, 0) player:addItem(4867, 1) - player:setStorageValue(Storage.ExplorerSociety.ThePlantCollection, 21) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 21) - elseif player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) == 22 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 22 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection, 21) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 21) + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) == 22 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 22 then npcHandler:say("Did you acquire the sample of the witches cauldron we are looking for?", npc, creature) npcHandler:setTopic(playerId, 13) - elseif player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) == 23 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 23 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) == 23 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 23 then npcHandler:say("Use this botanist's container on a giant jungle rose to obtain a sample for us. Bring it here and report about your plant collection.", npc, creature) npcHandler:setTopic(playerId, 0) player:addItem(4867, 1) - player:setStorageValue(Storage.ExplorerSociety.ThePlantCollection, 24) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 24) - elseif player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) == 25 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 25 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection, 24) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 24) + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) == 25 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 25 then npcHandler:say("Did you acquire the sample of the giant jungle rose we are looking for?", npc, creature) npcHandler:setTopic(playerId, 14) end -- Plant Collection -- Lizard Urn elseif MsgContains(message, "lizard urn") then - if player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) == 26 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 26 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) == 26 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 26 then npcHandler:say("The explorer society would like to acquire an ancient urn which is some sort of relic to the lizard people of Tiquanda. Would you like to accept this mission?", npc, creature) npcHandler:setTopic(playerId, 15) - elseif player:getStorageValue(Storage.ExplorerSociety.TheLizardUrn) == 28 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 27 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheLizardUrn) == 28 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 27 then npcHandler:say("Did you manage to get the ancient urn?", npc, creature) npcHandler:setTopic(playerId, 16) end -- Lizard Urn -- Bonelords elseif MsgContains(message, "bonelord secrets") then - if player:getStorageValue(Storage.ExplorerSociety.TheLizardUrn) == 29 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 29 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheLizardUrn) == 29 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 29 then npcHandler:say({ "We want to learn more about the ancient race of bonelords. We believe the black pyramid north east of Darashia was originally built by them ...", "We ask you to explore the ruins of the black pyramid and look for any signs that prove our theory. You might probably find some document with the numeric bonelord language ...", "That would be sufficient proof. Would you like to accept this mission?", }, npc, creature) npcHandler:setTopic(playerId, 17) - elseif player:getStorageValue(Storage.ExplorerSociety.TheBonelordSecret) == 31 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 30 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheBonelordSecret) == 31 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 30 then npcHandler:say("Have you found any proof that the pyramid was built by bonelords?", npc, creature) npcHandler:setTopic(playerId, 18) end -- Bonelords -- Orc Powder elseif MsgContains(message, "orc powder") then - if player:getStorageValue(Storage.ExplorerSociety.TheBonelordSecret) == 32 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 32 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheBonelordSecret) == 32 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 32 then npcHandler:say({ "It is commonly known that orcs of Uldereks Rock use some sort of powder to increase the fierceness of their war wolves and berserkers ...", "What we do not know are the ingredients of this powder and its effect on humans ...", "So we would like you to get a sample of the aforesaid powder. Do you want to accept this mission?" }, npc, creature) npcHandler:setTopic(playerId, 19) - elseif player:getStorageValue(Storage.ExplorerSociety.TheOrcPowder) == 34 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 33 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder) == 34 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 33 then npcHandler:say("Did you acquire some of the orcish powder?", npc, creature) npcHandler:setTopic(playerId, 20) end -- Orc Powder -- Elven Poetry elseif MsgContains(message, "elven poetry") then - if player:getStorageValue(Storage.ExplorerSociety.TheOrcPowder) == 35 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 35 then - npcHandler:say({ "Some high ranking members would like to study elven poetry. They want the rare book 'Songs of the Forest' ...", "For sure someone in Ab'Dendriel will own a copy. So you would just have to ask around there. Are you willing to accept this mission?" }, npc, creature) - npcHandler:setTopic(playerId, 21) - elseif player:getStorageValue(Storage.ExplorerSociety.TheElvenPoetry) == 37 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 36 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder) == 35 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 35 then + npcHandler:say({ + "Some high ranking members would like to study elven poetry. They want the rare book 'Songs of the Forest' ...", + "For sure someone in Ab'Dendriel will own a copy. So you would just have to ask around there. Are you willing to accept this mission?", + }, npc, creature) + npcHandler:setTopic(player:getId(), 21) + end + elseif MsgContains(message, "elven book") then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheElvenPoetry) == 37 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 36 then npcHandler:say("Did you acquire a copy of 'Songs of the Forest' for us?", npc, creature) - npcHandler:setTopic(playerId, 22) + npcHandler:setTopic(player:getId(), 22) end + -- Elven Poetry -- Memory Stone elseif MsgContains(message, "memory stone") then - if player:getStorageValue(Storage.ExplorerSociety.TheElvenPoetry) == 38 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 38 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheElvenPoetry) == 38 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 38 then npcHandler:say({ "We acquired some knowledge about special magic stones. Some lost civilisations used it to store knowledge and lore, just like we use books ...", "The wisdom in such stones must be immense, but so are the dangers faced by every person who tries to obtain one...", "As far as we know the ruins found in the north-west of Edron were once inhabited by beings who used such stones. Do you have the heart to go there and to get us such a stone?", }, npc, creature) npcHandler:setTopic(playerId, 23) - elseif player:getStorageValue(Storage.ExplorerSociety.TheMemoryStone) == 40 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 39 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheMemoryStone) == 40 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 39 then npcHandler:say("Were you able to acquire a memory stone for our society?", npc, creature) npcHandler:setTopic(playerId, 24) end -- Memory Stone -- Rune Writings elseif MsgContains(message, "rune writings") then - if player:getStorageValue(Storage.ExplorerSociety.TheMemoryStone) == 41 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 41 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheMemoryStone) == 41 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 41 then npcHandler:say({ "We would like to study some ancient runes that were used by the lizard race. We suspect some relation of the lizards to the founders of Ankrahmun ...", "Somewhere under the ape infested city of Banuta, one can find dungeons that were once inhabited by lizards...", @@ -303,7 +310,7 @@ local function creatureSayCallback(npc, creature, type, message) "Are you up to that challenge?", }, npc, creature) npcHandler:setTopic(playerId, 25) - elseif player:getStorageValue(Storage.ExplorerSociety.TheRuneWritings) == 43 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 43 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheRuneWritings) == 43 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 43 then npcHandler:say("Did you create a copy of the ancient runes as requested?", npc, creature) npcHandler:setTopic(playerId, 26) end @@ -320,238 +327,235 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("We will see if you can handle this simple task. Get the pickaxe from Uzgod in Kazordoon and bring it to one of our bases. Report there about the pickaxe.", npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.ExplorerSociety.JoiningTheExplorers, 1) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 1) elseif npcHandler:getTopic(playerId) == 3 then if player:removeItem(4845, 1) then - player:setStorageValue(Storage.ExplorerSociety.JoiningTheExplorers, 5) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 5) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers, 5) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 5) npcHandler:say({ "Excellent, you brought just the tool we need! Of course it was only a simple task. However ...", "I officially welcome you to the explorer society. From now on you can ask for missions to improve your rank." }, npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 4 then - player:setStorageValue(Storage.ExplorerSociety.TheIceDelivery, 6) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 6) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceDelivery, 6) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 6) npcHandler:say({ "So listen please: Take this ice pick and use it on a block of ice in the caves beneath Folda. Get some ice and bring it here as fast as you can ...", "Should the ice melt away, report on your ice delivery mission anyway. I will then tell you if the time is right to start another mission." }, npc, creature) npcHandler:setTopic(playerId, 0) player:addItem(4872, 1) elseif npcHandler:getTopic(playerId) == 5 then if player:removeItem(4837, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheIceDelivery, 8) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 8) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceDelivery, 8) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 8) npcHandler:say("Just in time. Sadly not much ice is left over but it will do. Thank you again.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 6 then - player:setStorageValue(Storage.ExplorerSociety.TheIceDelivery, 6) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 6) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceDelivery, 6) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 6) npcHandler:say("*Sigh* I think the time is right to grant you another chance to get that ice. Hurry up this time.", npc, creature) npcHandler:setTopic(playerId, 0) -- Butterfly Hunt elseif npcHandler:getTopic(playerId) == 7 then - player:setStorageValue(Storage.ExplorerSociety.TheButterflyHunt, 9) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 9) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt, 9) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 9) npcHandler:say({ "This preparation kit will allow you to collect a purple butterfly you have killed ...", "Just use it on the fresh corpse of a purple butterfly, return the prepared butterfly to me and give me a report of your butterfly hunt." }, npc, creature) npcHandler:setTopic(playerId, 0) player:addItem(4863, 1) elseif npcHandler:getTopic(playerId) == 8 then if player:removeItem(4864, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheButterflyHunt, 11) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 11) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt, 11) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 11) npcHandler:say("A little bit battered but it will do. Thank you! If you think you are ready, ask for another butterfly hunt.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 9 then if player:removeItem(4865, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheButterflyHunt, 14) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 14) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt, 14) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 14) npcHandler:say("A little bit battered but it will do. Thank you! If you think you are ready, ask for another butterfly hunt.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 10 then if player:removeItem(4866, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheButterflyHunt, 17) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 17) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt, 17) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 17) npcHandler:say("That is an extraordinary species you have brought. Thank you! That was the last butterfly we needed.", npc, creature) npcHandler:setTopic(playerId, 0) end -- Butterfly Hunt -- Plant Collection elseif npcHandler:getTopic(playerId) == 11 then - player:setStorageValue(Storage.ExplorerSociety.ThePlantCollection, 18) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 18) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection, 18) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 18) npcHandler:say("Fine! Here take this botanist's container. Use it on a jungle bells plant to collect a sample for us. Report about your plant collection when you have been successful.", npc, creature) npcHandler:setTopic(playerId, 0) player:addItem(4867, 1) elseif npcHandler:getTopic(playerId) == 12 then if player:removeItem(4868, 1) then - player:setStorageValue(Storage.ExplorerSociety.ThePlantCollection, 20) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 20) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection, 20) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 20) npcHandler:say("I see. It seems you've got some quite useful sample by sheer luck. Thank you! Just tell me when you are ready to continue with the plant collection.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 13 then if player:removeItem(4869, 1) then - player:setStorageValue(Storage.ExplorerSociety.ThePlantCollection, 23) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 23) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection, 23) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 23) npcHandler:say("Ah, finally. I started to wonder what took you so long. But thank you! Another fine sample, indeed. Just tell me when you are ready to continue with the plant collection.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 14 then if player:removeItem(4870, 1) then - player:setStorageValue(Storage.ExplorerSociety.ThePlantCollection, 26) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 26) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection, 26) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 26) npcHandler:say("What a lovely sample! With that you have finished your plant collection missions.", npc, creature) npcHandler:setTopic(playerId, 0) end -- Plant Collection -- Lizard Urn elseif npcHandler:getTopic(playerId) == 15 then - player:setStorageValue(Storage.ExplorerSociety.TheLizardUrn, 27) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 27) - player:setStorageValue(Storage.ExplorerSociety.ChorurnDoor, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheLizardUrn, 27) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 27) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ChorurnDoor, 1) npcHandler:say({ "You have indeed the spirit of an adventurer! In the south-east of Tiquanda is a small settlement of the lizard people ...", "Beneath the newly constructed temple there, the lizards hide the said urn. Our attempts to acquire this item were without success ...", "Perhaps you are more successful." }, npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 16 then if player:removeItem(4847, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheLizardUrn, 29) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 29) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheLizardUrn, 29) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 29) npcHandler:say("Yes, that is the prized relic we have been looking for so long. You did a great job, thank you.", npc, creature) npcHandler:setTopic(playerId, 0) end -- Lizard Urn -- Bonelords elseif npcHandler:getTopic(playerId) == 17 then - player:setStorageValue(Storage.ExplorerSociety.TheBonelordSecret, 30) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 30) - player:setStorageValue(Storage.ExplorerSociety.BonelordsDoor, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheBonelordSecret, 30) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 30) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.BonelordsDoor, 1) npcHandler:say({ "Excellent! So travel to the city of Darashia and then head north-east for the pyramid ...", "If any documents are left, you probably find them in the catacombs beneath. Good luck!" }, npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 18 then if player:removeItem(173, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheBonelordSecret, 32) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 32) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheBonelordSecret, 32) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 32) npcHandler:say("You did it! Excellent! The scientific world will be shaken by this discovery!", npc, creature) npcHandler:setTopic(playerId, 0) end -- Bonelords -- Orc Powder elseif npcHandler:getTopic(playerId) == 19 then - player:setStorageValue(Storage.ExplorerSociety.TheOrcPowder, 33) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 33) - player:setStorageValue(Storage.ExplorerSociety.OrcDoor, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder, 33) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 33) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.OrcDoor, 1) npcHandler:say({ "You are a brave soul. As far as we can tell, the orcs maintain some sort of training facility in some hill in the north-east of their city ...", "There you should find lots of their war wolves and hopefully also some of the orcish powder. Good luck!" }, npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 20 then if player:removeItem(13974, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheOrcPowder, 35) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 35) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder, 35) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 35) npcHandler:say("You really got it? Amazing! Thank you for your efforts.", npc, creature) npcHandler:setTopic(playerId, 0) end -- Orc Powder -- Elven Poetry elseif npcHandler:getTopic(playerId) == 21 then - player:setStorageValue(Storage.ExplorerSociety.TheElvenPoetry, 36) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 36) - player:setStorageValue(Storage.ExplorerSociety.ElvenDoor, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheElvenPoetry, 36) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 36) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ElvenDoor, 1) npcHandler:say("Excellent. This mission is easy but nonetheless vital. Travel to Ab'Dendriel and get the book.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 22 then if player:removeItem(4844, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheElvenPoetry, 38) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 38) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheElvenPoetry, 38) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 38) npcHandler:say("Let me have a look! Yes, that's what we wanted. A copy of 'Songs of the Forest'. I won't ask any questions about those bloodstains.", npc, creature) npcHandler:setTopic(playerId, 0) end -- Elven Poetry -- Memory Stone elseif npcHandler:getTopic(playerId) == 23 then - player:setStorageValue(Storage.ExplorerSociety.TheMemoryStone, 39) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 39) - player:setStorageValue(Storage.ExplorerSociety.MemoryStoneDoor, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheMemoryStone, 39) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 39) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.MemoryStoneDoor, 1) npcHandler:say("In the ruins of north-western Edron you should be able to find a memory stone. Good luck.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 24 then if player:removeItem(4841, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheMemoryStone, 41) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 41) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheMemoryStone, 41) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 41) npcHandler:say("A flawless memory stone! Incredible! It will take years even to figure out how it works but what an opportunity for science, thank you!", npc, creature) npcHandler:setTopic(playerId, 0) end -- Memory Stone -- Rune Writings elseif npcHandler:getTopic(playerId) == 25 then - player:setStorageValue(Storage.ExplorerSociety.TheRuneWritings, 42) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 42) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheRuneWritings, 42) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 42) npcHandler:say("Excellent! Here, take this tracing paper and use it on the object you will find there to create a copy of the ancient runes.", npc, creature) npcHandler:setTopic(playerId, 0) player:addItem(4842, 1) elseif npcHandler:getTopic(playerId) == 26 then if player:removeItem(4843, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheRuneWritings, 44) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 44) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheRuneWritings, 44) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 44) npcHandler:say("It's a bit wrinkled but it will do. Thanks again.", npc, creature) npcHandler:setTopic(playerId, 0) end -- Rune Writings -- Ectoplasm elseif npcHandler:getTopic(playerId) == 27 then - npcHandler:say( - { "Fine. The society is looking for new means to travel. Some of our most brilliant minds have some theories about astral travel that they want to research further ...", "Therefore we need you to collect some ectoplasm from the corpse of a ghost. We will supply you with a collector that you can use on the body of a slain ghost ...", "Do you think you are ready for that mission?" }, - npc, - creature - ) + npcHandler:say({ + "Fine. The society is looking for new means to travel. Some of our most brilliant minds have some theories about astral travel that they want to research further ...", + "Therefore we need you to collect some ectoplasm from the corpse of a ghost. We will supply you with a collector that you can use on the body of a slain ghost ...", + "Do you think you are ready for that mission?", + }, npc, creature) npcHandler:setTopic(playerId, 28) elseif npcHandler:getTopic(playerId) == 28 then npcHandler:say("Good! Take this container and use it on a ghost that was recently slain. Return with the collected ectoplasm and hand me that container ...", npc, creature) npcHandler:say("Don't lose the container. They are expensive!", npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.ExplorerSociety.TheEctoplasm, 45) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 45) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheEctoplasm, 45) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 45) player:addItem(4852, 1) elseif npcHandler:getTopic(playerId) == 29 then if player:removeItem(4853, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheEctoplasm, 47) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 47) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheEctoplasm, 47) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 47) npcHandler:say("Phew, I had no idea that ectoplasm would smell that ... oh, it's you, well, sorry. Thank you for the ectoplasm.", npc, creature) npcHandler:setTopic(playerId, 0) end -- Ectoplasm -- Spectral Dress elseif npcHandler:getTopic(playerId) == 30 then - npcHandler:say( - { "That is quite courageous. We know, it's much we are asking for. The queen of the banshees lives in the so called Ghostlands, south west of Carlin. It is rumoured that her lair is located in the deepest dungeons beneath that cursed place ...", "Any violence will probably be futile, you will have to negotiate with her. Try to get a spectral dress from her. Good luck." }, - npc, - creature - ) + npcHandler:say({ + "That is quite courageous. We know, it's much we are asking for. The queen of the banshees lives in the so called Ghostlands, south west of Carlin. It is rumoured that her lair is located in the deepest dungeons beneath that cursed place ...", + "Any violence will probably be futile, you will have to negotiate with her. Try to get a spectral dress from her. Good luck.", + }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.ExplorerSociety.TheSpectralDress, 48) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 48) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralDress, 48) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 48) elseif npcHandler:getTopic(playerId) == 31 then if player:removeItem(4836, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheSpectralDress, 50) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 50) - npcHandler:say("Good! Ask me for another mission.", npc, creature) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralDress, 50) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 50) + npcHandler:say("Just in time! With this spectral article we can start the final phase of our research.", npc, creature) npcHandler:setTopic(playerId, 0) end -- Spectral Dress -- Spectral Stone elseif npcHandler:getTopic(playerId) == 32 then - npcHandler:say({ "Good, just take this spectral essence and use it on the strange carving in this building as well as on the corresponding tile in our base at Northport ...", "As soon as you have charged the portal tiles that way, report about the spectral portals." }, npc, creature) + npcHandler:say("Good, just take this spectral essence and use it on the strange carving in this building as well as on the corresponding tile in our base at Northport ...", "As soon as you have charged the portal tiles that way, report about the spectral portals.", npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.ExplorerSociety.TheSpectralStone, 53) - player:setStorageValue(Storage.ExplorerSociety.SpectralStoneDoor, 1) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 53) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone, 53) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.SpectralStoneDoor, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 53) player:addItem(4840, 1) -- Spectral stone -- Spectral Stone -- Skull Of Ratha / Giant Smithhammer elseif npcHandler:getTopic(playerId) == 33 then if player:removeItem(3207, 1) then npcHandler:say("Poor Ratha. Thank you for returning this skull to the society. We will see to a honourable burial of Ratha.", npc, creature) - player:setStorageValue(Storage.ExplorerSociety.SkullOfRatha, 1) - player:addItem(3035, 2) - player:addItem(3031, 50) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.SkullOfRatha.Bag1, 2) npcHandler:setTopic(playerId, 0) else npcHandler:say("Come back when you find any information.", npc, creature) @@ -560,9 +564,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 34 then if player:removeItem(12510, 1) then npcHandler:say("Marvellous! You brought a giant smith hammer for the explorer society!", npc, creature) - player:setStorageValue(Storage.ExplorerSociety.GiantSmithHammer, 1) - player:addItem(3035, 2) - player:addItem(3031, 50) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.GiantSmithHammer.Hamer, 2) npcHandler:setTopic(playerId, 0) else npcHandler:say("No you don't.", npc, creature) @@ -575,6 +577,13 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(TheNewFrontier.Mission05.Angus, 1) npcHandler:setTopic(playerId, 2) end + -- Explorer Brooch + elseif npcHandler:getTopic(playerId) == 36 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ExplorerBrooch) == 1 and player:removeItem(4871, 1) then + npcHandler:say("It's always a sad day when we learn about the death of a member. But at least we learnt about his fate. Thank you, here is your reward.", npc, creature) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ExplorerBrooch, 2) + npcHandler:setTopic(playerId, 0) + end end -- Answer Yes -- Answer No @@ -591,13 +600,23 @@ local function creatureSayCallback(npc, creature, type, message) end -- Answer No -- Skull Of Ratha / Giant Smithhammer - elseif MsgContains(message, "skull of ratha") and player:getStorageValue(Storage.ExplorerSociety.SkullOfRatha) < 1 then - npcHandler:say({ "Ratha was a great explorer and even greater ladies' man. Sadly he never returned from a visit to the amazons. Probably he is dead ...", "The society offers a substantial reward for the retrieval of Ratha or his remains. Do you have any news about Ratha?" }, npc, creature) + elseif MsgContains(message, "skull of ratha") and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.SkullOfRatha.Bag1) == 1 then + npcHandler:say({ + "Ratha was a great explorer and even greater ladies' man. Sadly he never returned from a visit to the amazons. Probably he is dead ...", + "The society offers a substantial reward for the retrieval of Ratha or his remains. Do you have any news about Ratha?", + }, npc, creature) npcHandler:setTopic(playerId, 33) - elseif MsgContains(message, "giant smith hammer") and player:getStorageValue(Storage.ExplorerSociety.GiantSmithHammer) < 1 then + elseif MsgContains(message, "giant smith hammer") and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.GiantSmithHammer.Hammer) == 1 then npcHandler:say("The explorer society is looking for a genuine giant smith hammer for our collection. It is rumoured the cyclopses of the Plains of Havoc might be using one. Did you by chance obtain such a hammer?", npc, creature) npcHandler:setTopic(playerId, 34) - -- Skull Of Ratha / Giant Smithhammer + -- Explorer Brooch + elseif MsgContains(message, "brooch") and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ExplorerBrooch) == 1 then + npcHandler:say({ + "Our members travel to far away places and cross dangerous areas, many fall prey to enemies or the land ...", + "Sometimes the personal explorer brooches can be recovered. That way we learn about the fate of our members ...", + "We offer a reward for each brooch returned to us. Have you found an explorer brooch?", + }, npc, creature) + npcHandler:setTopic(playerId, 36) else -- The New Frontier if player:getStorageValue(TheNewFrontier.Questline) == 14 and player:getStorageValue(TheNewFrontier.Mission05.Angus) == 1 then @@ -633,7 +652,7 @@ npcConfig.shop = { itemName = "crown backpack", clientId = 9605, buy = 800, - storageKey = Storage.ExplorerSociety.TheAstralPortals, + storageKey = Storage.Quest.U7_6.ExplorerSociety.TheAstralPortals, storageValue = 56, }, { diff --git a/data-otservbr-global/npc/ariella.lua b/data-otservbr-global/npc/ariella.lua index 35ff38f6621..b9565a9b28f 100644 --- a/data-otservbr-global/npc/ariella.lua +++ b/data-otservbr-global/npc/ariella.lua @@ -69,35 +69,26 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("So you brought a cookie to a pirate?", npc, creature) npcHandler:setTopic(playerId, 1) end - elseif MsgContains(message, "addon") and player:getStorageValue(Storage.OutfitQuest.PirateBaseOutfit) == 1 then - npcHandler:say( - "To get pirate hat you need give me Brutus Bloodbeard's Hat, \ - Lethal Lissy's Shirt, Ron the Ripper's Sabre and Deadeye Devious' Eye Patch. Do you have them with you?", - npc, - creature - ) + elseif MsgContains(message, "addon") and player:getStorageValue(Storage.Quest.U7_8.PirateOutfits.PirateBaseOutfit) == 1 then + npcHandler:say("You mean my hat? Well, I might have another one just like that, but I won't simply give it away, even if you earned our trust. You'd have to fulfil a task first.", npc, creature) npcHandler:setTopic(playerId, 2) + elseif npcHandler:getTopic(playerId) == 2 and MsgContains(message, "task") then + npcHandler:say("Your task is to bring me the shirt of the Lethal Lissy, the sabre of Ron the Ripper, the hat of Brutus Bloodbeard and the eye patch of Deadeye Devious. Did you succeed?", npc, creature) + npcHandler:setTopic(playerId, 5) elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 1 then - npcHandler:say( - "You know, we have plenty of rum here but we lack some basic food. \ - Especially food that easily becomes mouldy is a problem. Bring me 100 breads and you will help me a lot.", - npc, - creature - ) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 2) - elseif player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 2 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 1 then + npcHandler:say("You know, we have plenty of rum here but we lack some basic food. Especially food that easily becomes mouldy is a problem. Bring me 100 breads and you will help me a lot.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 2) + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 2 then npcHandler:say("Are you here to bring me the 100 pieces of bread that I requested?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 10 then + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 3 then npcHandler:say({ - "The sailors always tell tales about the famous beer of Carlin. \z - You must know, alcohol is forbidden in that city. ...", - "The beer is served in a secret whisper bar anyway. \z - Bring me a sample of the whisper beer, NOT the usual beer but whisper beer. I hope you are listening.", + "The sailors always tell tales about the famous beer of Carlin. You must know, alcohol is forbidden in that city. ...", + "The beer is served in a secret whisper bar anyway. Bring me a sample of the whisper beer, NOT the usual beer but whisper beer. I hope you are listening.", }, npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 11) - elseif player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 12 or player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 11 then + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 4) + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 5 then npcHandler:say("Did you get a sample of the whisper beer from Carlin?", npc, creature) npcHandler:setTopic(playerId, 4) end @@ -118,29 +109,11 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("How sweet of you ... Uhh ... OH NO ... Bozo did it again. Tell this prankster I'll pay him back.", npc, creature) npcHandler:removeInteraction(npc, creature) npcHandler:resetNpc(creature) - elseif npcHandler:getTopic(playerId) == 2 then - if player:getStorageValue(Storage.OutfitQuest.PirateHatAddon) == -1 then - if player:getItemCount(6101) > 0 and player:getItemCount(6102) > 0 and player:getItemCount(6100) > 0 and player:getItemCount(6099) > 0 then - if player:removeItem(6101, 1) and player:removeItem(6102, 1) and player:removeItem(6100, 1) and player:removeItem(6099, 1) then - npcHandler:say("Ah, right! The pirate hat! Here you go.", npc, creature) - player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) - player:setStorageValue(Storage.OutfitQuest.PirateHatAddon, 1) - player:addOutfitAddon(155, 2) - player:addOutfitAddon(151, 2) - end - else - npcHandler:say("You do not have all the required items.", npc, creature) - npcHandler:setTopic(playerId, 0) - end - else - npcHandler:say("It seems you already have this addon, don't you try to mock me son!", npc, creature) - npcHandler:setTopic(playerId, 0) - end elseif npcHandler:getTopic(playerId) == 3 then - if player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 2 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 2 then if player:removeItem(3600, 100) then npcHandler:say("What a joy. At least for a few days adequate supply is ensured.", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 3) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 3) npcHandler:setTopic(playerId, 0) else npcHandler:say("Come back when you got all neccessary items.", npc, creature) @@ -148,16 +121,29 @@ local function creatureSayCallback(npc, creature, type, message) end end elseif npcHandler:getTopic(playerId) == 4 then - if player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 12 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 5 then if player:removeItem(6106, 1) then npcHandler:say("Thank you very much. I will test this beauty in privacy.", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 14) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 6) npcHandler:setTopic(playerId, 0) else npcHandler:say("Come back when you got the neccessary item.", npc, creature) npcHandler:setTopic(playerId, 0) end end + elseif npcHandler:getTopic(playerId) == 5 and player:getStorageValue(Storage.Quest.U7_8.PirateOutfits.PirateHatAddon) == -1 then + if player:getItemCount(6101) > 0 and player:getItemCount(6102) > 0 and player:getItemCount(6100) > 0 and player:getItemCount(6099) > 0 then + if player:removeItem(6101, 1) and player:removeItem(6102, 1) and player:removeItem(6100, 1) and player:removeItem(6099, 1) then + npcHandler:say("INCREDIBLE! You have found all four of them! |PLAYERNAME|, you have my respect. You more than deserve this hat. There you go.", npc, creature) + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) + player:addOutfitAddon(155, 2) + player:addOutfitAddon(151, 2) + player:setStorageValue(Storage.Quest.U7_8.PirateOutfits.PirateHatAddon, 1) + end + else + npcHandler:say("You do not have all the required items.", npc, creature) + npcHandler:setTopic(playerId, 0) + end end elseif MsgContains(message, "no") then if npcHandler:getTopic(playerId) == 1 then @@ -168,9 +154,11 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) end end + return true end +npcHandler:setMessage(MESSAGE_GREET, "Hi there.") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/atrad.lua b/data-otservbr-global/npc/atrad.lua index 2c07cf9725a..61c09fb4b19 100644 --- a/data-otservbr-global/npc/atrad.lua +++ b/data-otservbr-global/npc/atrad.lua @@ -50,6 +50,12 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function endConversationWithDelay(npcHandler, npc, creature) + addEvent(function() + npcHandler:unGreet(npc, creature) + end, 1000) +end + local function greetCallback(npc, creature) local player = Player(creature) local fire = player:getCondition(CONDITION_FIRE) @@ -57,6 +63,8 @@ local function greetCallback(npc, creature) if fire and (player:hasOutfit(156) or player:hasOutfit(152)) then return true end + + endConversationWithDelay(npcHandler, npc, creature) return false end @@ -76,7 +84,8 @@ local function creatureSayCallback(npc, creature, type, message) doPlayerRemoveItem(creature, 5804, 1) doPlayerRemoveItem(creature, 5930, 1) doPlayerAddOutfit(creature, getPlayerSex(creature) == 0 and 156 or 152, 2) - setPlayerStorageValue(creature, Storage.Atrad, 2) -- exaust + setPlayerStorageValue(creature, Storage.Atrad, 2) + setPlayerStorageValue(creature, Storage.Quest.U7_8.AssassinOutfits.AssassinSecondAddon, 2) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have it...", npc, creature) @@ -90,6 +99,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 3 then npcHandler:say("Good. Come back then you have BOTH. Should be clear where to get a behemoth claw from. There's a horned fox who wears a nose ring. Good luck.", npc, creature) setPlayerStorageValue(creature, Storage.Atrad, 1) + setPlayerStorageValue(creature, Storage.Quest.U7_8.AssassinOutfits.AssassinSecondAddon, 1) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/baa_leal.lua b/data-otservbr-global/npc/baa_leal.lua index 5a1cc2a96b5..2f2fd3d5de9 100644 --- a/data-otservbr-global/npc/baa_leal.lua +++ b/data-otservbr-global/npc/baa_leal.lua @@ -45,6 +45,12 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function endConversationWithDelay(npcHandler, npc, creature) + addEvent(function() + npcHandler:unGreet(npc, creature) + end, 1000) +end + local condition = Condition(CONDITION_FIRE) condition:setParameter(CONDITION_PARAM_DELAYED, 1) condition:addDamage(150, 2000, -10) @@ -53,18 +59,29 @@ local function greetCallback(npc, creature, message) local player = Player(creature) local playerId = player:getId() - if not player:getCondition(CONDITION_FIRE) and not MsgContains(message, "djanni'hah") then - player:getPosition():sendMagicEffect(CONST_ME_EXPLOSIONAREA) - player:addCondition(condition) - npcHandler:say("Take this!", npc, creature) + if not MsgContains(message, "djanni'hah") then + npcHandler:say("Shove off, little one! Humans are not welcome here, |PLAYERNAME|!", npc, creature) + endConversationWithDelay(npcHandler, npc, creature) return false end - if player:getStorageValue(Storage.DjinnWar.EfreetFaction.Mission01) < 1 then - npcHandler:setMessage(MESSAGE_GREET, "You know the code human! Very well then... What do you want, |PLAYERNAME|?") + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Start) == 1 then + npcHandler:say({ + "Hahahaha! ...", + "|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!", + }, npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission01) < 1 then + npcHandler:say("You know the code human! Very well then... What do you want, |PLAYERNAME|?", npc, creature) else - npcHandler:setMessage(MESSAGE_GREET, "You are still alive, |PLAYERNAME|? Well, what do you want?") + npcHandler:say("You are still alive, |PLAYERNAME|? Well, what do you want?", npc, creature) end + + npcHandler:setInteraction(npc, creature) + return true end @@ -76,7 +93,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local missionProgress = player:getStorageValue(Storage.DjinnWar.EfreetFaction.Mission01) + local missionProgress = player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission01) if MsgContains(message, "mission") then if missionProgress < 1 then npcHandler:say({ @@ -101,8 +118,8 @@ local function creatureSayCallback(npc, creature, type, message) "His identity is still unknown but we have been told that the thief fled to the human settlement called Carlin. I want you to find him and report back to me. Nobody messes with the Efreet and lives to tell the tale! ...", "Now go! Travel to the northern city Carlin! Keep your eyes open and look around for something that might give you a clue!", }, npc, creature) - player:setStorageValue(Storage.DjinnWar.EfreetFaction.Start, 1) - player:setStorageValue(Storage.DjinnWar.EfreetFaction.Mission01, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Start, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission01, 1) elseif MsgContains(message, "no") then npcHandler:say("After all, you're just a human.", npc, creature) end @@ -126,7 +143,7 @@ local function creatureSayCallback(npc, creature, type, message) "If you are interested go to Alesar and ask him about it.", }, npc, creature) player:addMoney(600) - player:setStorageValue(Storage.DjinnWar.EfreetFaction.Mission01, 3) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission01, 3) end else npcHandler:say("Hmmm... I don't think so. Return to Thais and continue your search!", npc, creature) @@ -136,8 +153,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end --- Greeting message -keywordHandler:addGreetKeyword({ "djanni'hah" }, { npcHandler = npcHandler, text = "What do you want from me, |PLAYERNAME|?" }) +keywordHandler:addCustomGreetKeyword({ "djanni'hah" }, greetCallback, { npcHandler = npcHandler }) npcHandler:setMessage(MESSAGE_FAREWELL, "Stand down, soldier!") diff --git a/data-otservbr-global/npc/berenice.lua b/data-otservbr-global/npc/berenice.lua index d1889c032cd..6bbd55dd3e4 100644 --- a/data-otservbr-global/npc/berenice.lua +++ b/data-otservbr-global/npc/berenice.lua @@ -59,23 +59,21 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.ExplorerSociety.CalassaQuest) == 2 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.CalassaQuest) == 2 then npcHandler:say("OH! So you have safely returned from Calassa! Congratulations, were you able to retrieve the logbook?", npc, creature) npcHandler:setTopic(playerId, 5) - elseif player:getStorageValue(Storage.ExplorerSociety.TheOrcPowder) > 34 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) > 34 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder) > 34 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) > 44 then npcHandler:say("The most important mission we currently have is an expedition to {Calassa}.", npc, creature) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "calassa") then - if npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.ExplorerSociety.CalassaQuest) < 1 then + if npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.CalassaQuest) < 1 then npcHandler:say("Ah! So you have heard about our special mission to investigate the Quara race in their natural surrounding! Would you like to know more about it?", npc, creature) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 4 then npcHandler:say("Captain Max will bring you to Calassa whenever you are ready. Please try to retrieve the missing logbook which must be in one of the sunken shipwrecks.", npc, creature) - player:setStorageValue(Storage.ExplorerSociety.CalassaDoor, 1) - player:setStorageValue(Storage.ExplorerSociety.CalassaQuest, 1) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.ExplorerSociety.CalassaQuest) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.CalassaQuest) == 2 then npcHandler:say("OH! So you have safely returned from Calassa! Congratulations, were you able to retrieve the logbook?", npc, creature) npcHandler:setTopic(playerId, 5) end @@ -94,10 +92,12 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 3) elseif npcHandler:getTopic(playerId) == 3 then npcHandler:say("Excellent! I will immediately inform Captain Max to bring you to {Calassa} whenever you are ready. Don't forget to make thorough preparations!", npc, creature) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.CalassaQuest, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.CalassaDoor, 1) npcHandler:setTopic(playerId, 4) elseif npcHandler:getTopic(playerId) == 5 then if player:removeItem(21378, 1) then - player:setStorageValue(Storage.ExplorerSociety.CalassaQuest, 3) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.CalassaQuest, 3) npcHandler:say("Yes! That's the logbook! However... it seems that the water has already destroyed many of the pages. This is not your fault though, you did your best. Thank you!", npc, creature) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/bo_ques.lua b/data-otservbr-global/npc/bo_ques.lua index 3b279836dcc..7ceb854a77c 100644 --- a/data-otservbr-global/npc/bo_ques.lua +++ b/data-otservbr-global/npc/bo_ques.lua @@ -51,6 +51,52 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function endConversationWithDelay(npcHandler, npc, creature) + addEvent(function() + npcHandler:unGreet(npc, creature) + end, 1000) +end + +local function greetCallback(npc, creature, message) + local player = Player(creature) + local playerId = player:getId() + + if not MsgContains(message, "djanni'hah") then + npcHandler:say("Whoa! A human! This is no place for you, |PLAYERNAME|. Go and play somewhere else.", npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Start) == 1 then + npcHandler:say({ + "Hahahaha! ...", + "|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!", + }, npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.Greeting) == -1 then + npcHandler:say({ + "Hahahaha! ...", + "|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!", + }, npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.MaridDoor) == 1 then + npcHandler:say("Hey! A human! What are you doing in my kitchen, |PLAYERNAME|?", npc, creature) + else + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + npcHandler:setInteraction(npc, creature) + + return true +end + local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -59,7 +105,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local missionProgress = player:getStorageValue(Storage.DjinnWar.MaridFaction.Mission01) + local missionProgress = player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission01) if MsgContains(message, "recipe") or MsgContains(message, "mission") then if missionProgress < 1 then npcHandler:say({ @@ -88,8 +134,8 @@ local function creatureSayCallback(npc, creature, type, message) "Fine! Even though I know so many recipes, I'm looking for the description of some dwarven meals. ...", "So, if you could bring me a cookbook of the dwarven kitchen, I'll reward you well.", }, npc, creature) - player:setStorageValue(Storage.DjinnWar.MaridFaction.Start, 1) - player:setStorageValue(Storage.DjinnWar.MaridFaction.Mission01, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Start, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission01, 1) elseif MsgContains(message, "no") then npcHandler:say("Well, too bad.", npc, creature) end @@ -106,7 +152,7 @@ local function creatureSayCallback(npc, creature, type, message) "Dragon Egg Omelette, Dwarven beer sauce... it's all there. This is great! Here is your well-deserved reward. ...", "Incidentally, I have talked to Fa'hradin about you during dinner. I think he might have some work for you. Why don't you talk to him about it?", }, npc, creature) - player:setStorageValue(Storage.DjinnWar.MaridFaction.Mission01, 2) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission01, 2) player:addItem(3029, 3) elseif MsgContains(message, "no") then npcHandler:say("Too bad. I must have this book.", npc, creature) @@ -117,7 +163,7 @@ local function creatureSayCallback(npc, creature, type, message) end -- Greeting -keywordHandler:addGreetKeyword({ "djanni'hah" }, { npcHandler = npcHandler, text = "Hey! A human! What are you doing in my kitchen, |PLAYERNAME|?" }) +keywordHandler:addCustomGreetKeyword({ "djanni'hah" }, greetCallback, { npcHandler = npcHandler }) npcHandler:setMessage(MESSAGE_FAREWELL, "Goodbye. I am sure you will come back for more. They all do.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Goodbye. I am sure you will come back for more. They all do.") diff --git a/data-otservbr-global/npc/brewster.lua b/data-otservbr-global/npc/brewster.lua index a59118bc953..3314d49c2d2 100644 --- a/data-otservbr-global/npc/brewster.lua +++ b/data-otservbr-global/npc/brewster.lua @@ -50,6 +50,21 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + if MsgContains(message, "cough syrup") then + npcHandler:say("The only person who might have some cough syrup is this druid Ustan. You find him in the tavern. Hmmm the tavern ... ", npc, creature) + end + + return true +end + -- Twist of Fate local blessKeyword = keywordHandler:addKeyword({ "twist of fate" }, StdModule.say, { npcHandler = npcHandler, @@ -90,23 +105,23 @@ stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, t -- Wooden Stake keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "I think you have forgotten to bring your stake, pilgrim." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 9 and player:getItemCount(5941) == 0 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 9 and player:getItemCount(5941) == 0 end) local stakeKeyword = keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "Yes, I have been informed and haven't yet drunk enough to forget, so you can count yourself lucky. Are you prepared to receive my line of the prayer?" }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 9 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 9 end) stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "So receive my prayer: 'Your hand shall be guided - your feet shall walk in harmony'. Now, take your stake to Tyrias in Liberty Bay for the next line of the prayer. I shall let him know what he is to do.", reset = true }, nil, function(player) - player:setStorageValue(Storage.FriendsandTraders.TheBlessedStake, 10) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, 10) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) end) stakeKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "I'll wait for you.", reset = true }) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You should visit Tyrias in Liberty Bay now." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 10 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 10 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You have already received my line of the prayer. Don't make me do more work than necessary!" }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) > 10 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) > 10 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "A blessed stake? That's a strange request. Maybe Quentin knows more, he is one of the oldest monks after all." }) @@ -171,6 +186,8 @@ npcHandler:setMessage(MESSAGE_GREET, "Welcome, young |PLAYERNAME|! If you are he npcHandler:setMessage(MESSAGE_WALKAWAY, "Remember: If you are heavily wounded or poisoned, I can heal you for free.") npcHandler:setMessage(MESSAGE_FAREWELL, "May the gods bless you, |PLAYERNAME|!") +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) + npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- npcType registering the npcConfig table diff --git a/data-otservbr-global/npc/briasol.lua b/data-otservbr-global/npc/briasol.lua index 38dcd074159..999e09482f5 100644 --- a/data-otservbr-global/npc/briasol.lua +++ b/data-otservbr-global/npc/briasol.lua @@ -161,7 +161,7 @@ npcConfig.shop = { { itemName = "unicorn figurine", clientId = 30054, sell = 50000 }, { itemName = "violet crystal shard", clientId = 16120, sell = 1500 }, { itemName = "wedding ring", clientId = 3004, buy = 990 }, - { itemName = "white pearl", clientId = 3026, buy = 320 }, + { itemName = "white pearl", clientId = 3026, buy = 320, sell = 160 }, { itemName = "white silk flower", clientId = 34008, sell = 9000 }, } diff --git a/data-otservbr-global/npc/bron.lua b/data-otservbr-global/npc/bron.lua index 014be84e6b6..804e60c8284 100644 --- a/data-otservbr-global/npc/bron.lua +++ b/data-otservbr-global/npc/bron.lua @@ -54,9 +54,10 @@ local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 6 then + if player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) == 6 then npcHandler:setMessage(MESSAGE_GREET, "Oh no! Was that really me? This is so embarassing, I have no idea what has gotten into me. Was that the fighting spirit you gave me?") end + return true end @@ -71,15 +72,15 @@ local function creatureSayCallback(npc, creature, type, message) end if table.contains({ "recruitment", "violence", "outfit", "addon" }, message) then - if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) < 1 then + if player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) < 1 then npcHandler:say({ "Convincing Ajax that it is not always necessary to use brute force... this would be such an achievement. Definitely a hard task though. ...", "Listen, I simply have to ask, maybe a stranger can influence him better than I can. Would you help me with my brother?", }, npc, creature) npcHandler:setTopic(playerId, 1) end - elseif MsgContains(message, "fist") then - if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 3 then + elseif MsgContains(message, "brother is right. fist not always good.") then + if player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) == 3 then npcHandler:say("Oh! He really said that? I am so proud of you, |PLAYERNAME|. These are really good news. Everything would be great... if only there wasn't this {person} near my house.", npc, creature) npcHandler:setTopic(playerId, 3) end @@ -92,25 +93,25 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 4) end elseif MsgContains(message, "fighting spirit") then - if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 5 then + if player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) == 5 then if player:removeItem(5884, 1) then - player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 6) npcHandler:say("Fighting spirit? What am I supposed to do with this fi... - oh! I feel strange... ME MIGHTY! ME WILL CHASE OFF ANNOYING KIDS!GROOOAARR!! RRRRRRRRRRRRAAAAAAAGE!!", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, 6) npcHandler:setTopic(playerId, 0) end end - elseif MsgContains(message, "cloth") then - if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 7 then - npcHandler:say("Have you really managed to fulfil the task and brought me 25 pieces of red cloth and 25 pieces of green cloth?", npc, creature) + elseif MsgContains(message, "red piece of cloth") then + if player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) == 7 then + npcHandler:say("Have you really managed to fulfil the task and brought me 50 pieces of red cloth and 50 pieces of green cloth?", npc, creature) npcHandler:setTopic(playerId, 8) end - elseif MsgContains(message, "silk") then - if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 8 then - npcHandler:say("Oh, did you bring 5 rolls of spider silk yarn for me?", npc, creature) + elseif MsgContains(message, "rolls of spider silk") then + if player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) == 8 then + npcHandler:say("Oh, did you bring 10 rolls of spool of yarn for me?", npc, creature) npcHandler:setTopic(playerId, 9) end - elseif MsgContains(message, "sweat") then - if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 9 then + elseif MsgContains(message, "warriors sweat") then + if player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) == 9 then npcHandler:say("Were you able to get hold of a flask with pure warrior's sweat?", npc, creature) npcHandler:setTopic(playerId, 10) end @@ -127,14 +128,13 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("You are indeed not only well educated, but also very courageous. I wish you good luck, you are my last hope.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 1) - player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) --this for default start of Outfit and Addon Quests + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 4 then npcHandler:say("Again, I have to thank you for your selfless offer to help me. I hope that Ajax can come up with something, now that he has experienced the power of words.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 4) + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, 4) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 6 and npcHandler:getTopic(playerId) == 0 then + elseif player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) == 6 and npcHandler:getTopic(playerId) == 0 then npcHandler:say({ "I'm impressed... I am sure this was Ajax' idea. I would love to give him a present, but if I leave my hut to gather ingredients, hewill surely notice. ...", "Would you maybe help me again, one last time, my friend? I assure you that your efforts will not be in vain.", @@ -143,48 +143,50 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 6 then npcHandler:say({ "Great! You see, I really would love to sew a nice shirt for him. I just need a few things for that, so please listen closely: ...", - "He loves green and red, so I will need about 25 pieces of red cloth - like the material heroes make their capes of - and 25 pieces of the green cloth Djinns like. ...", - "Secondly, I need about 5 rolls of spider silk yarn. I think mermaids can yarn silk of large spiders to create a smooth thread. ...", + "He loves green and red, so I will need about 50 pieces of red cloth - like the material heroes make their capes of - and 50 pieces of the green cloth Djinns like. ...", + "Secondly, I need about 10 rolls of spider silk yarn. I think mermaids can yarn silk of large spiders to create a smooth thread. ...", "The only remaining thing needed would be a bottle of warrior's sweat to spray it over the shirt... he just loves this smell. ...", "Have you understood everything I told you and are willing to handle this task?", }, npc, creature) npcHandler:setTopic(playerId, 7) elseif npcHandler:getTopic(playerId) == 7 then - npcHandler:say("Thank you, my friend! Come back to me once you have collected 25 pieces of red cloth and 25 pieces of green cloth.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 7) + npcHandler:say("Thank you, my friend! Come back to me once you have collected 50 pieces of red cloth and 50 pieces of green cloth.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, 7) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 8 then - if player:getItemCount(5910) >= 25 and player:getItemCount(5911) >= 25 then - npcHandler:say("Terrific! I will start to trim it while you gather 5 rolls of spider silk. I'm sure that Ajax will love it.", npc, creature) - player:removeItem(5910, 25) - player:removeItem(5911, 25) - player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 8) + if player:getItemCount(5910) >= 50 and player:getItemCount(5911) >= 50 then + npcHandler:say("Terrific! I will start to trim it while you gather 10 rolls of spider silk. I'm sure that Ajax will love it.", npc, creature) + player:removeItem(5910, 50) + player:removeItem(5911, 50) + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, 8) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 9 then - if player:removeItem(5886, 5) then - npcHandler:say("I'm impressed! You really managed to get spider silk yarn for me! I will immediately start to work on this shirt. Please don't forget to bring me warrior's sweat!", npc, creature) - player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 9) + if player:removeItem(5886, 10) then + npcHandler:say("I'm impressed! You really managed to get spool of yarn for me! I will immediately start to work on this shirt. Please don't forget to bring me warrior's sweat!", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, 9) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 10 then if player:removeItem(5885, 1) then npcHandler:say("Good work, |PLAYERNAME|! Now I can finally finish this present for Ajax. Because you were such a great help, I have also a present for you. Will you accept it?", npc, creature) - player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 10) + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, 10) npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 10 then + elseif player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) == 10 then npcHandler:say("I have kept this traditional barbarian wig safe for many years now. It is now yours! I hope you will wear it proudly, friend.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 11) player:addOutfitAddon(147, 2) player:addOutfitAddon(143, 2) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, 11) npcHandler:setTopic(playerId, 0) end end return true end +npcHandler:setMessage(MESSAGE_GREET, "Welcome to my humble hut, |PLAYERNAME|.") + npcHandler:setCallback(CALLBACK_GREET, greetCallback) npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_FAREWELL, "Take care, |PLAYERNAME|!") diff --git a/data-otservbr-global/npc/captain_max.lua b/data-otservbr-global/npc/captain_max.lua index 34eb7693cc2..e72008fd526 100644 --- a/data-otservbr-global/npc/captain_max.lua +++ b/data-otservbr-global/npc/captain_max.lua @@ -59,7 +59,7 @@ end local function addTravelKeyword(keyword, text, cost, destination) if keyword == "calassa" then keywordHandler:addKeyword({ keyword }, StdModule.say, { npcHandler = npcHandler, text = "I'm sorry but we don't serve this route." }, function(player) - return player:getStorageValue(Storage.ExplorerSociety.CalassaQuest) < 1 + return player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.CalassaQuest) < 1 end) end diff --git a/data-otservbr-global/npc/captain_waverider.lua b/data-otservbr-global/npc/captain_waverider.lua index d69108b7a02..52d0a3005b8 100644 --- a/data-otservbr-global/npc/captain_waverider.lua +++ b/data-otservbr-global/npc/captain_waverider.lua @@ -55,7 +55,7 @@ local function creatureSayCallback(npc, creature, type, message) local playerId = player:getId() if MsgContains(message, "peg leg") then - if player:getStorageValue(Storage.TheShatteredIsles.AccessToMeriana) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.AccessToMeriana) == 1 then npcHandler:say("Ohhhh. So... you know who sent you so I sail you to you know where. It will cost 50 gold to cover my expenses. Is it that what you wish?", npc, creature) npcHandler:setTopic(playerId, 1) else diff --git a/data-otservbr-global/npc/ceiron.lua b/data-otservbr-global/npc/ceiron.lua index 9a52c506291..efbd172fe7d 100644 --- a/data-otservbr-global/npc/ceiron.lua +++ b/data-otservbr-global/npc/ceiron.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if table.contains({ "addon", "outfit" }, message) then - if player:getStorageValue(Storage.OutfitQuest.DruidHatAddon) < 1 then + if player:getStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon) < 1 then npcHandler:say("What are you thinking! I would never allow you to slay my beloved friends for the sake of your narcism. Only {Faolan} can grant you a fur like this one.", npc, creature) npcHandler:setTopic(playerId, 2) end @@ -67,18 +67,18 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 2 then npcHandler:say("I know where the great wolf mother lives, but I will not tell that to just anyone. You have to earn my respect first. Are you willing to help me?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.OutfitQuest.DruidHatAddon) == 8 then + elseif player:getStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon) == 8 then npcHandler:say("Right, I will keep my promise. Faolan roams Tibia freely, but her favourite sleeping cave is on Cormaya. I will now enchant you so you will be able to speak the wolf language.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.DruidHatAddon, 9) + player:setStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon, 9) npcHandler:setTopic(playerId, 0) end elseif table.contains({ "griffinclaw", "container" }, message) then - if player:getStorageValue(Storage.OutfitQuest.DruidHatAddon) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon) == 1 then npcHandler:say("Were you able to obtain a sample of the Griffinclaw?", npc, creature) npcHandler:setTopic(playerId, 5) end elseif MsgContains(message, "task") then - if player:getStorageValue(Storage.OutfitQuest.DruidHatAddon) == 2 then + if player:getStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon) == 2 then npcHandler:say({ "Listen, my next task for you is not exactly easy either. ...", "In the mountains between Ankrahmun and Tiquanda are two hydra lairs. The nothern one has many waterfalls whereas the southern one has just tiny water trickles. ...", @@ -88,7 +88,7 @@ local function creatureSayCallback(npc, creature, type, message) "Have you understood everything I told you and will fulfil this task for me?", }, npc, creature) npcHandler:setTopic(playerId, 6) - elseif player:getStorageValue(Storage.OutfitQuest.DruidHatAddon) == 4 then + elseif player:getStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon) == 4 then npcHandler:say({ "I'm glad that you are still with me, |PLAYERNAME|. Especially because my next task might require even more patience from your side than the ones before. ...", "Demons... these unholy creatures should have never been able to walk the earth. They are a brood fueled only by hatred and malice. ...", @@ -99,7 +99,7 @@ local function creatureSayCallback(npc, creature, type, message) "Have you understood everything I told you and will fulfil this task for me?", }, npc, creature) npcHandler:setTopic(playerId, 8) - elseif player:getStorageValue(Storage.OutfitQuest.DruidHatAddon) == 6 then + elseif player:getStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon) == 6 then npcHandler:say({ "I have one final task for you, |PLAYERNAME|. Many months ago, I was trying to free the war wolves which are imprisoned inside the orc fortress.", "Unfortunately, my intrusion was discovered and I had to run for my life. During my escape, I lost my favourite wolf tooth chain.", @@ -110,22 +110,22 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 10) end elseif MsgContains(message, "waterskin") or MsgContains(message, "water skin") then - if player:getStorageValue(Storage.OutfitQuest.DruidHatAddon) == 3 then + if player:getStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon) == 3 then npcHandler:say("Did you bring me a sample of water from the hydra cave?", npc, creature) npcHandler:setTopic(playerId, 7) end elseif MsgContains(message, "dust") or MsgContains(message, "demon dust") then - if player:getStorageValue(Storage.OutfitQuest.DruidHatAddon) == 5 then + if player:getStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon) == 5 then npcHandler:say("Were you really able to collect 100 ounces of demon dust?", npc, creature) npcHandler:setTopic(playerId, 9) end elseif MsgContains(message, "chain") or MsgContains(message, "wolf tooth chain") then - if player:getStorageValue(Storage.OutfitQuest.DruidHatAddon) == 7 then + if player:getStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon) == 7 then npcHandler:say("Have you really found my wolf tooth chain??", npc, creature) npcHandler:setTopic(playerId, 11) end elseif MsgContains(message, "ceiron's waterskin") then - if player:getStorageValue(Storage.OutfitQuest.DruidHatAddon) == 3 then + if player:getStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon) == 3 then npcHandler:say("Have you lost my waterskin?", npc, creature) npcHandler:setTopic(playerId, 12) end @@ -141,46 +141,46 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 4) elseif npcHandler:getTopic(playerId) == 4 then npcHandler:say("Alright then. Take this botanist's container and return to me once you were able to retrieve a sample. Don't lose patience!", npc, creature) - player:setStorageValue(Storage.OutfitQuest.DruidHatAddon, 1) - player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) --this for default start of Outfit and Addon Quests + player:setStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon, 1) + player:setStorageValue(Storage.Quest.U7_8.DruidOutfits.DefaultStart, 1) --this for default start of Outfit and Addon Quests player:addItem(4867, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 5 then if player:removeItem(5937, 1) then npcHandler:say("Crunor be praised! The Griffinclaw really exists! Now, I will make sure that it will not become extinct. If you are ready to help me again, just ask me for a {task}.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.DruidHatAddon, 2) + player:setStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon, 2) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 6 then npcHandler:say("Great! Here, take my waterskin and try to fill it with water from this special trickle. Don't lose my waterskin, I will not accept some random dirty waterskin.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.DruidHatAddon, 3) + player:setStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon, 3) player:addItem(5938, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 7 then if player:removeItem(5939, 1) then npcHandler:say("Good work, |PLAYERNAME|! This water looks indeed extremely clear. I will examine it right away. If you are ready to help me again, just ask me for a {task}.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.DruidHatAddon, 4) + player:setStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon, 4) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 8 then - npcHandler:say("Good! I will eagerly await your return.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.DruidHatAddon, 5) + npcHandler:say("I'm very impressed, |PLAYERNAME|. With this task you have proven that you are on the right side and are powerful as well. If you are ready to help me again, just ask me for a {task}.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon, 5) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 9 then if player:removeItem(5906, 100) then npcHandler:say("I'm very impressed, |PLAYERNAME|. With this task you have proven that you are on the right side and are powerful as well. If you are ready to help me again, just ask me for a {task}.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.DruidHatAddon, 6) + player:setStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon, 6) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 10 then npcHandler:say("Thank you so much. I can't wait to wear it around my neck again, it was a special present from Faolan.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.DruidHatAddon, 7) - player:setStorageValue(Storage.OutfitQuest.DruidAmuletDoor, 1) + player:setStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon, 7) + player:setStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidAmuletDoor, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 11 then if player:removeItem(5940, 1) then npcHandler:say("Crunor be praised! You found my beloved chain! |PLAYERNAME|, you really earned my respect and I consider you as a friend from now on. Remind me to tell you about {Faolan} sometime.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.DruidHatAddon, 8) + player:setStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon, 8) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 12 then diff --git a/data-otservbr-global/npc/chantalle.lua b/data-otservbr-global/npc/chantalle.lua index 3ed42984f5c..dceb2ac2736 100644 --- a/data-otservbr-global/npc/chantalle.lua +++ b/data-otservbr-global/npc/chantalle.lua @@ -152,7 +152,7 @@ npcConfig.shop = { { itemName = "violet crystal shard", clientId = 16120, sell = 1500 }, { itemName = "watermelon tourmaline", clientId = 33780, sell = 230000 }, { itemName = "wedding ring", clientId = 3004, buy = 990 }, - { itemName = "white pearl", clientId = 3026, buy = 320 }, + { itemName = "white pearl", clientId = 3026, buy = 320, sell = 160 }, { itemName = "white silk flower", clientId = 34008, sell = 9000 }, } diff --git a/data-otservbr-global/npc/charlotta.lua b/data-otservbr-global/npc/charlotta.lua index a5d0311f1e1..41b5e65d84d 100644 --- a/data-otservbr-global/npc/charlotta.lua +++ b/data-otservbr-global/npc/charlotta.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "errand") or MsgContains(message, "gold") then - if player:getStorageValue(Storage.TheShatteredIsles.TheErrand) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheErrand) == 1 then npcHandler:say("Oh, so you brought some gold from Eleonore to me?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -67,7 +67,7 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then if player:removeMoneyBank(200) then npcHandler:say("Hmm, it seems that Eleonore does trust you. Perhaps she is even right. However. Since we need some help right now I guess we can't be too picky. Return to Eleonore and tell her the secret password: 'peg leg'. She will tell you more about her problem.", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.TheErrand, 2) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheErrand, 2) npcHandler:setTopic(playerId, 2) else npcHandler:say("You don't have enough...", npc, creature) diff --git a/data-otservbr-global/npc/chondur.lua b/data-otservbr-global/npc/chondur.lua index c0a1a000d22..25849667d43 100644 --- a/data-otservbr-global/npc/chondur.lua +++ b/data-otservbr-global/npc/chondur.lua @@ -50,50 +50,129 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end -local function creatureSayCallback(npc, creature, type, message) +local function handleAddonMessages(npcHandler, npc, creature, message, playerId) local player = Player(creature) - local playerId = player:getId() - if not npcHandler:checkInteraction(npc, creature) then - return false + if MsgContains(message, "addon") then + if player:hasOutfit(player:getSex() == PLAYERSEX_FEMALE and 158 or 154) then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheCounterspell) >= 4 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ADjinnInLove) >= 5 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) >= 10 and player:getStorageValue(Storage.Quest.U7_8.ShamanOutfits.AddonStaffMask) < 1 then + npcHandler:say("The time has come, my child. I sense great spiritual wisdom in you and I shall grant you a sign of your progress, if you can fulfil my task.", npc, creature) + npcHandler:setTopic(playerId, 1) + elseif player:hasOutfit(158, 2) or player:hasOutfit(154, 2) and not (player:hasOutfit(158, 1) or player:hasOutfit(154, 1)) then + npcHandler:say("You have successfully passed the first task. If you can fulfil my second task, I will grant you a mask like the one I wear. Will you listen to the requirements?", npc, creature) + npcHandler:setTopic(playerId, 3) + end + else + npcHandler:say("You must have the Shaman Outfit to proceed with this task.", npc, creature) + end + return true + elseif MsgContains(message, "task") and npcHandler:getTopic(playerId) == 1 then + npcHandler:say({ + "Deep in the Tiquandian jungle a monster lurks which is seldom seen. It is the revenge of the jungle against humankind. ...", + "This monster, if slain, carries a rare root called Mandrake. If you find it, bring it to me. Also, gather 5 of the voodoo dolls used by the mysterious dworc voodoomasters. ...", + "If you manage to fulfil this task, I will grant you your own staff. Have you understood everything and are ready for this test?", + }, npc, creature) + npcHandler:setTopic(playerId, 2) + return true + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 2 then + npcHandler:say("Good! Come back once you found a mandrake and collected 5 dworcish voodoo dolls.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.ShamanOutfits.AddonStaffMask, 1) + player:setStorageValue(Storage.Quest.U7_8.ShamanOutfits.MissionStaff, 1) + npcHandler:setTopic(playerId, 0) + return true + elseif MsgContains(message, "dworc voodoo doll") or MsgContains(message, "mandrake") then + npcHandler:say("Have you gathered the mandrake and the 5 voodoo dolls from the dworcs?", npc, creature) + npcHandler:setTopic(playerId, 5) + return true + elseif MsgContains(message, "tribal masks") or MsgContains(message, "banana staff") then + npcHandler:say("Have you gathered the 5 tribal masks and the 5 banana staves?", npc, creature) + npcHandler:setTopic(playerId, 6) + return true + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 5 then + if player:getItemCount(3002) >= 5 and player:getItemCount(5014) >= 1 then + player:removeItem(3002, 5) + player:removeItem(5014, 1) + player:addOutfitAddon(158, 2) + player:addOutfitAddon(154, 2) + player:setStorageValue(Storage.Quest.U7_8.ShamanOutfits.AddonStaffMask, 2) + player:setStorageValue(Storage.Quest.U7_8.ShamanOutfits.MissionStaff, 2) + player:addAchievement("Way of the Shaman") + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) + npcHandler:say("I am proud of you, my child, excellent work. This staff shall be yours from now on!", npc, creature) + else + npcHandler:say("You don't have the necessary items.", npc, creature) + end + npcHandler:setTopic(playerId, 0) + return true + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 6 then + if player:getItemCount(3348) >= 5 and player:getItemCount(3403) >= 5 then + player:removeItem(3348, 5) + player:removeItem(3403, 5) + player:addOutfitAddon(158, 1) + player:addOutfitAddon(154, 1) + player:setStorageValue(Storage.Quest.U7_8.ShamanOutfits.AddonStaffMask, 4) + player:setStorageValue(Storage.Quest.U7_8.ShamanOutfits.MissionMask, 2) + player:addAchievement("Way of the Shaman") + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) + npcHandler:say("Well done, my child! I hereby grant you the right to wear a shamanic mask. Do it proudly.", npc, creature) + else + npcHandler:say("You don't have the necessary items.", npc, creature) + end + npcHandler:setTopic(playerId, 0) + return true + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 3 then + npcHandler:say({ + "The dworcs of Tiquanda like to wear certain tribal masks which I would like to take a look at. Please bring me 5 of these masks. ...", + "Secondly, the high ape magicians of Banuta use banana staves. I would love to learn more about these staves, so please bring me 5 of them also. ...", + "If you manage to fulfil this task, I will grant you your own mask. Have you understood everything and are ready for this test?", + }, npc, creature) + npcHandler:setTopic(playerId, 4) + return true + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 4 then + npcHandler:say({ + "Good! Come back once you have collected 5 tribal masks and 5 banana staves.", + "I shall grant you a sign of your progress as shaman if you can fulfil my task.", + }, npc, creature) + player:setStorageValue(Storage.Quest.U7_8.ShamanOutfits.AddonStaffMask, 3) + player:setStorageValue(Storage.Quest.U7_8.ShamanOutfits.MissionMask, 1) + npcHandler:setTopic(playerId, 0) + return true + elseif MsgContains(message, "no") and npcHandler:getTopic(playerId) > 2 then + npcHandler:say("Maybe next time.", npc, creature) + npcHandler:setTopic(playerId, 0) end + return false +end + +local function handleOtherMessages(npcHandler, npc, creature, message, playerId) + local player = Player(creature) + if MsgContains(message, "stampor") or MsgContains(message, "mount") then if not player:hasMount(11) then - npcHandler:say( - "You did bring all the items I requqested, cuild. Good. \ - Shall I travel to the spirit realm and try finding a stampor compasion for you?", - npc, - creature - ) - npcHandler:setTopic(playerId, 1) + npcHandler:say("You did bring all the items I requested, child. Good. Shall I travel to the spirit realm and try finding a stampor companion for you?", npc, creature) + npcHandler:setTopic(playerId, 7) else npcHandler:say("You already have stampor mount.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 8 then - npcHandler:say( - "The evil cult has placed a curse on one of the captains here. \ - I need at least five of their pirate voodoo dolls to lift that curse.", - npc, - creature - ) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 9) + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 11 then + npcHandler:say("The evil cult has placed a curse on one of the captains here. I need at least five of their pirate voodoo dolls to lift that curse.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 12) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 9 then + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 12 then npcHandler:say("Did you bring five pirate voodoo dolls?", npc, creature) - npcHandler:setTopic(playerId, 2) + npcHandler:setTopic(playerId, 8) end elseif MsgContains(message, "yes") then - if npcHandler:getTopic(playerId) == 1 then + if npcHandler:getTopic(playerId) == 7 then if player:removeItem(12312, 50) and player:removeItem(12314, 30) and player:removeItem(12313, 100) then npcHandler:say({ "Ohhhhh Mmmmmmmmmmmm Ammmmmgggggggaaaaaaa ...", "Aaaaaaaaaahhmmmm Mmmaaaaaaaaaa Kaaaaaamaaaa ...", - "Brrt! I think it worked! It's a male stampor. \ - I linked this spirit to yours. You can probably already summon him to you ...", - "So, since me are done here... I need to prepare another ritual, so please let me work, cuild.", + "Brrt! I think it worked! It's a male stampor. I linked this spirit to yours. You can probably already summon him to you ...", + "So, since we are done here... I need to prepare another ritual, so please let me work, child.", }, npc, creature) player:addMount(11) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) @@ -101,291 +180,144 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Sorry you don't have the necessary items.", npc, creature) end npcHandler:setTopic(playerId, 0) - elseif npcHandler:getTopic(playerId) == 2 then - if player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 9 then + elseif npcHandler:getTopic(playerId) == 8 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 12 then if player:removeItem(5810, 5) then npcHandler:say("Finally I can put an end to that curse. I thank you so much.", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 10) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 13) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have it...", npc, creature) npcHandler:setTopic(playerId, 0) end end + elseif npcHandler:getTopic(playerId) == 9 then + npcHandler:say("This is really not advisable. Behind this barrier, strong forces are raging violently. Are you sure that you want to go there?", npc, creature) + npcHandler:setTopic(playerId, 10) + elseif npcHandler:getTopic(playerId) == 10 then + npcHandler:say({ + "I guess I cannot stop you then. Since you told me about my apprentice, it is my turn to help you. I will perform a ritual for you, but I need a few ingredients. ...", + "Bring me one fresh dead chicken, one fresh dead rat and one fresh dead black sheep, in that order.", + }, npc, creature) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheCounterspell, 1) + npcHandler:setTopic(playerId, 0) + elseif npcHandler:getTopic(playerId) == 11 then + if player:getItemCount(4330) > 0 then + player:removeItem(4330, 1) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheCounterspell, 2) + npcHandler:say("Very good! 'Your soul shall be protected!' Now, I need a fresh dead rat.", npc, creature) + return true + else + npcHandler:say("You don't have the necessary items.", npc, creature) + return true + end + npcHandler:setTopic(playerId, 0) + elseif npcHandler:getTopic(playerId) == 12 then + if player:getItemCount(3994) > 0 then + player:removeItem(3994, 1) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheCounterspell, 3) + npcHandler:say("Very good! 'You shall face black magic without fear!' Now, I need a fresh dead black sheep.", npc, creature) + return true + else + npcHandler:say("You don't have the necessary items.", npc, creature) + return true + end + npcHandler:setTopic(playerId, 0) + elseif npcHandler:getTopic(playerId) == 13 then + if player:getItemCount(4095) > 0 then + player:removeItem(4095, 1) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheCounterspell, 4) + npcHandler:say("Very good! 'EVIL POWERS SHALL NOT KEEP YOU ANYMORE! SO BE IT!'", npc, creature) + return true + else + npcHandler:say("You don't have the necessary items.", npc, creature) + return true + end + npcHandler:setTopic(playerId, 0) end - elseif MsgContains(message, "no") and npcHandler:getTopic(playerId) > 2 then - npcHandler:say("Maybe next time.", npc, creature) - npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "stake") then + if player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 11 then + npcHandler:say("Ten prayers for a blessed stake? Don't tell me they made you travel whole Tibia for it! Listen, child, if you bring me a wooden stake, I'll bless it for you. ", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, 12) + player:addAchievement("Blessed!") + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + elseif player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 12 then + if player:getItemCount(5941) == 0 then + npcHandler:say("You don't have a wooden stake.", npc, creature) + return true + elseif player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStakeWaitTime) >= os.time() then + npcHandler:say("Sorry, but I'm still exhausted from the last ritual. Please come back later.", npc, creature) + return true + else + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStakeWaitTime, os.time() + 7 * 86400) + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + player:removeItem(5941, 1) + player:addItem(5942, 1) + npcHandler:say(" Sha Kesh Mar!", npc, creature) + return true + end + end + elseif MsgContains(message, "counterspell") then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.DragahsSpellbook) == -1 then + npcHandler:say("You should not talk about things you don't know anything about.", npc, creature) + return true + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheCounterspell) == -1 then + npcHandler:say("You mean, you are interested in a counterspell to cross the energy barrier on Goroma?", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheCounterspell, 0) + npcHandler:setTopic(playerId, 9) + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheCounterspell) == 1 then + npcHandler:say("Did you bring the fresh dead chicken?", npc, creature) + npcHandler:setTopic(playerId, 11) + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheCounterspell) == 2 then + npcHandler:say("Did you bring the fresh dead rat?", npc, creature) + npcHandler:setTopic(playerId, 12) + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheCounterspell) == 3 then + npcHandler:say("Did you bring the fresh dead black sheep?", npc, creature) + npcHandler:setTopic(playerId, 13) + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheCounterspell) == 4 then + npcHandler:say("Hm. I don't think you need another one of my counterspells to cross the barrier on Goroma.", npc, creature) + return true + end + elseif MsgContains(message, "spellbook") then + if player:getItemCount(6120) > 0 then + npcHandler:say("Ah, thank you very much! I'll honour his memory.", npc, creature) + player:removeItem(6120, 1) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.DragahsSpellbook, 1) + return true + else + npcHandler:say("You don't have the necessary items.", npc, creature) + return true + end + elseif MsgContains(message, "energy field") then + npcHandler:say("Ah, the energy barrier set up by the cult is maintained by lousy magic, but it's still effective. Without a proper counterspell, you won't be able to pass it.", npc, creature) + return true end - return true -end - --- Shaman Addons --- If the player can't wear shaman outfit -local function notReadyKeyword(keyword, text) - keywordHandler:addKeyword({ keyword }, StdModule.say, { npcHandler = npcHandler, text = text }, function(player) - return not player:hasOutfit(player:getSex() == PLAYERSEX_FEMALE and 158 or 154) - end) -end - -notReadyKeyword("outfit", { - "Hum? Sorry, but I don't sense enough spiritual wisdom in you to even allow \z - you to touch the mask and staff I'm wearing... yet. ...", - "I know of a really wise ape healer, though, who might be able to bless you with shamanic energy. \z - You should become his apprentice first if you desire to become mine.", -}) -notReadyKeyword("addon", { - "Hum? Sorry, but I don't sense enough spiritual wisdom in you to even allow \z - you to touch the mask and staff I'm wearing... yet. ...", - "I know of a really wise ape healer, though, who might be able to bless you with shamanic energy. \z - You should become his apprentice first if you desire to become mine.", -}) -notReadyKeyword("task", "The time hasn't come yet, my child. Believe and learn.") --- Start task -local function addTaskKeyword(text, value, missionStorage) - local taskKeyword = keywordHandler:addKeyword({ "task" }, StdModule.say, { npcHandler = npcHandler, text = text[1] }, function(player) - return player:getStorageValue(Storage.OutfitQuest.Shaman.AddonStaffMask) == value - end) - local yesKeyword = taskKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = text[2] }) - - yesKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = text[3], reset = true }, nil, function(player) - player:setStorageValue(Storage.OutfitQuest.Shaman.AddonStaffMask, math.max(0, player:getStorageValue(Storage.OutfitQuest.Shaman.AddonStaffMask)) + 1) - player:setStorageValue(missionStorage, 1) - player:setStorageValue(Storage.OutfitQuest.Ref, math.max(0, player:getStorageValue(Storage.OutfitQuest.Ref)) + 1) - end) - yesKeyword:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Would you like me to repeat the task requirements then?", moveup = 2 }) - - taskKeyword:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Well, it seems you aren't ready yet.", reset = true }) - keywordHandler:addAliasKeyword({ "addon" }) - keywordHandler:addAliasKeyword({ "outfit" }) -end - --- Staff -addTaskKeyword({ - "If you fulfil a task for me, I'll grant you a staff like the one I'm wearing. \z - Do you want to hear the requirements?", - { - "Deep in the Tiquandian jungle a monster lurks which is seldom seen. \z - It is the revenge of the jungle against humankind. ...", - "This monster, if slain, carries a rare root called Mandrake. If you find it, bring it to me. \z - Also, gather 5 of the voodoo dolls used by the mysterious dworc voodoomasters. ...", - "If you manage to fulfil this task, I will grant you your own staff. \z - Have you understood everything and are ready for this test?", - }, - "Good! Come back once you've found a mandrake and collected 5 dworcish voodoo dolls.", -}, -1, Storage.OutfitQuest.Shaman.MissionStaff) - --- Mask -addTaskKeyword({ - "You have successfully passed the first task. \z - If you can fulfil my second task, I'll grant you a mask like the one I'm wearing. \z - Do you want to hear the requirements?", - { - "The dworcs of Tiquanda like to wear certain tribal masks which I'd like to take a look at. \z - Please bring me 5 of these masks. ...", - "Secondly, the high ape magicians of Banuta use banana staffs. \z - I'd love to learn more about theses staffs, so please bring me 5 of them, too. ...", - "If you manage to fulfil this task, I'll grant you your own mask. \z - Have you understood everything and are you ready for this test?", - }, - "Good! Come back once you have collected 5 tribal masks and 5 banana staffs.", -}, 2, Storage.OutfitQuest.Shaman.MissionMask) - --- Hand in task items -local function addItemKeyword(keyword, aliasKeyword, text, value, item, addonId, missionStorage, achievement) - local itemKeyword = keywordHandler:addKeyword({ keyword }, StdModule.say, { npcHandler = npcHandler, text = text[1] }, function(player) - return player:getStorageValue(Storage.OutfitQuest.Shaman.AddonStaffMask) == value - end) - itemKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = text[2], reset = true }, function(player) - return player:getItemCount(item[1].itemId) < item[1].count or player:getItemCount(item[2].itemId) < item[2].count - end) - - itemKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = text[3], reset = true }, function(player) - return player:getItemCount(item[1].itemId) >= item[1].count and player:getItemCount(item[2].itemId) >= item[2].count - end, function(player) - player:removeItem(item[1].itemId, item[1].count) - player:removeItem(item[2].itemId, item[2].count) - player:addOutfitAddon(158, addonId) - player:addOutfitAddon(154, addonId) - player:setStorageValue(Storage.OutfitQuest.Shaman.AddonStaffMask, player:getStorageValue(Storage.OutfitQuest.Shaman.AddonStaffMask) + 1) - player:setStorageValue(Storage.OutfitQuest.Ref, math.min(0, player:getStorageValue(Storage.OutfitQuest.Ref) - 1)) - player:setStorageValue(missionStorage, 0) - if achievement then - player:addAchievement("Way of the Shaman") - end - player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) - end) - itemKeyword:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Well, it seems you aren't ready yet.", reset = true }) - keywordHandler:addAliasKeyword({ aliasKeyword }) - keywordHandler:addKeyword({ keyword }, StdModule.say, { npcHandler = npcHandler, text = aliasKeyword and text[4] or text[3] }) + return false end -addItemKeyword("mandrake", "voodoo doll", { - "Have you gathered the mandrake and the 5 voodoo dolls from the dworcs?", - "I'm proud of you my child, excellent work. This staff shall be yours from now on!", - "A rare root with mysterious powers.", - { - "Together with the spirits of the ancestors, I seek for wisdom. \ - Together we can change the flow of magic to do things that are beyond the limits of ordinary magic. ...", - "In conversations with the spirits, I gain insight into secrets that would have been lost otherwise.", - }, -}, 1, { { itemId = 5014, count = 1 }, { itemId = 3002, count = 5 } }, 2, Storage.OutfitQuest.Shaman.MissionStaff) -addItemKeyword("tribal mask", "banana staff", { - "Have you gathered the 5 tribal masks and the 5 banana staffs?", - "Well done, my child! I hereby grant you the right to wear a shamanic mask. Do it proudly.", - "Sometimes dworcs are seen with these masks.", - "A banana staff is the sign of a high ape magician.", -}, 3, { { itemId = 3348, count = 5 }, { itemId = 3403, count = 5 } }, 1, Storage.OutfitQuest.Shaman.MissionMask, true) +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() --- Task status -local function addTaskStatusKeyword(keyword, text, value) - keywordHandler:addKeyword({ keyword }, StdModule.say, { npcHandler = npcHandler, text = text }, function(player) - return player:getStorageValue(Storage.OutfitQuest.Shaman.AddonStaffMask) == value - end) - if keyword == "addon" then - keywordHandler:addAliasKeyword({ "outfit" }) + if not npcHandler:checkInteraction(npc, creature) then + return false end -end - -addTaskStatusKeyword("task", "Your task is to retrieve a mandrake from the Tiquandan jungle and 5 dworcish voodoo dolls.", 1) -addTaskStatusKeyword("task", "Your task is to retrieve 5 tribal masks from the dworcs and 5 banana staffs from the apes.", 3) -addTaskStatusKeyword("task", "You have successfully passed all of my tasks. There are no further things I can teach you right now.", 4) - -addTaskStatusKeyword( - "addon", - "The time has come, my child. I sense great spiritual wisdom in you and I shall grant you a \ - sign of your progress if you can fulfil my task.", - 1 -) -addTaskStatusKeyword("addon", "I shall grant you a sign of your progress as a shaman if you can fulfil my task.", 3) -addTaskStatusKeyword("addon", "You have successfully passed all of my tasks. There are no further things I can teach you right now.", 4) --- End Shaman Addons - --- Wooden Stake -keywordHandler:addKeyword({ "stake" }, StdModule.say, { - npcHandler = npcHandler, - text = "Ten prayers for a blessed stake? Don't tell me they made you travel whole Tibia for it! \ - Listen, child, if you bring me a wooden stake, I'll bless it for you. ", -}, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 11 -end, function(player) - player:setStorageValue(Storage.FriendsandTraders.TheBlessedStake, 12) - player:addAchievement("Blessed!") - player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) -end) -local stakeKeyword = keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "Would you like to receive a spiritual prayer to bless your stake?" }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 12 -end) - -stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "You don't have a wooden stake.", reset = true }, function(player) - return player:getItemCount(5941) == 0 -end) - -stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { - npcHandler = npcHandler, - text = "Sorry, but I'm still exhausted from the last ritual. Please come back later.", - reset = true, -}, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStakeWaitTime) >= os.time() -end) - -stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = " Sha Kesh Mar!", reset = true }, function(player) - return player:getItemCount(5941) > 0 -end, function(player) - player:setStorageValue(Storage.FriendsandTraders.TheBlessedStakeWaitTime, os.time() + 7 * 86400) - player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:removeItem(5941, 1) - player:addItem(5942, 1) -end) -stakeKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "Maybe another time.", reset = true }) - --- Counterspell -keywordHandler:addKeyword({ "counterspell" }, StdModule.say, { npcHandler = npcHandler, text = "You should not talk about things you don't know anything about." }, function(player) - return player:getStorageValue(Storage.TheShatteredIsles.DragahsSpellbook) == -1 -end) -keywordHandler:addAliasKeyword({ "energy field" }) - --- Start mission -local startcounterspellKeyword = keywordHandler:addKeyword({ "counterspell" }, StdModule.say, { - npcHandler = npcHandler, - text = "You mean, you are interested in a counterspell to cross the energy barrier on Goroma?", -}, function(player) - return player:getStorageValue(Storage.TheShatteredIsles.TheCounterspell) == -1 -end) -local acceptKeyword = startcounterspellKeyword:addChildKeyword({ "yes" }, StdModule.say, { - npcHandler = npcHandler, - text = "This is really not advisable. Behind this barrier, strong forces are raging violently. \ - Are you sure that you want to go there?", -}) -acceptKeyword:addChildKeyword( - { "yes" }, - StdModule.say, - { - npcHandler = npcHandler, - text = { - "I guess I cannot stop you then. Since you told me about my apprentice, it's my turn to help you. \ - I'll perform a ritual for you, but I need a few ingredients. ...", - "Bring me one fresh dead chicken, one fresh dead rat and one fresh dead black sheep, in that order.", - }, - reset = true, - }, - nil, - function(player) - player:setStorageValue(Storage.TheShatteredIsles.TheCounterspell, 1) + if handleAddonMessages(npcHandler, npc, creature, message, playerId) then + return true end -) -acceptKeyword:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "It's much safer for you to stay here anyway, trust me.", reset = true }) -startcounterspellKeyword:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "It's much safer for you to stay here anyway, trust me.", reset = true }) + if handleOtherMessages(npcHandler, npc, creature, message, playerId) then + return true + end --- Deliver in corpses -local function addCounterspellKeyword(text, value, itemId) - local counterspellKeyword = keywordHandler:addKeyword({ "counterspell" }, StdModule.say, { npcHandler = npcHandler, text = text[1] }, function(player) - return player:getStorageValue(Storage.TheShatteredIsles.TheCounterspell) == value - end) - counterspellKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = text[2], reset = true }, function(player) - return player:getItemCount(itemId) > 0 - end, function(player) - player:removeItem(itemId, 1) - player:setStorageValue(Storage.TheShatteredIsles.TheCounterspell, value + 1) - end) + return false end -addCounterspellKeyword({ - "Did you bring the fresh dead chicken?", - "Very good! 'Your soul shall be protected!' Now, I need a fresh dead rat.", -}, 1, 4330) -addCounterspellKeyword({ - "Did you bring the fresh dead rat?", - "Very good! 'You shall face black magic without fear!' Now, I need a fresh dead black sheep.", -}, 2, 3994) -addCounterspellKeyword({ - "Did you bring the fresh dead black sheep?", - "Very good! 'EVIL POWERS SHALL NOT KEEP YOU ANYMORE! SO BE IT!'", -}, 3, 4095) - --- Completed the Counterspell -keywordHandler:addKeyword({ "counterspell" }, StdModule.say, { - npcHandler = npcHandler, - text = "Hm. I don't think you need another one of my counterspells to cross the barrier on Goroma.", -}) - --- Spellbook -keywordHandler:addKeyword({ "spellbook" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, thank you very much! I'll honour his memory." }, function(player) - return player:getItemCount(6120) > 0 -end, function(player) - player:removeItem(6120, 1) - player:setStorageValue(Storage.TheShatteredIsles.DragahsSpellbook, 1) -end) - --- Energy Field -keywordHandler:addKeyword({ "energy field" }, StdModule.say, { - npcHandler = npcHandler, - text = "Ah, the energy barrier set up by the cult is maintained by lousy magic, but it's still effective. \ - Without a proper counterspell, you won't be able to pass it.", -}) +npcHandler:setMessage(MESSAGE_GREET, "Be greeted, child.") +npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye.") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/cobra.lua b/data-otservbr-global/npc/cobra.lua index 37a39c19b34..e80e14f3235 100644 --- a/data-otservbr-global/npc/cobra.lua +++ b/data-otservbr-global/npc/cobra.lua @@ -54,6 +54,10 @@ local function greetCallback(npc, creature) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(Position(33396, 32836, 14)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.ThalasTreasure) <= 1 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.ThalasTreasure, 2) + end + return false else npcHandler:say("Begone! Hissssss! You bear not the mark of the cobra!", npc, creature) diff --git a/data-otservbr-global/npc/cornelia.lua b/data-otservbr-global/npc/cornelia.lua index c78b3482e78..2066b98cd18 100644 --- a/data-otservbr-global/npc/cornelia.lua +++ b/data-otservbr-global/npc/cornelia.lua @@ -66,19 +66,19 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if table.contains({ "addon", "armor" }, message) then - if player:getStorageValue(Storage.OutfitQuest.WarriorShoulderAddon) == 5 then - player:setStorageValue(Storage.OutfitQuest.WarriorShoulderAddon, 6) - player:setStorageValue(Storage.OutfitQuest.WarriorShoulderTimer, os.time() + (player:getSex() == PLAYERSEX_FEMALE and 1768 or 7200)) + if table.contains({ "addon", "armour" }, message) then + if player:getStorageValue(Storage.Quest.U7_8.WarriorOutfits.WarriorShoulderAddon) == 5 then + player:setStorageValue(Storage.Quest.U7_8.WarriorOutfits.WarriorShoulderAddon, 6) + player:setStorageValue(Storage.Quest.U7_8.WarriorOutfits.WarriorShoulderTimer, os.time() + (player:getSex() == PLAYERSEX_FEMALE and 3600 or 7200)) -- 1 hours female/2 hours male npcHandler:say("Ah, you must be the hero Trisha talked about. I'll prepare the shoulder spikes for you. Please give me some time to finish.", npc, creature) - elseif player:getStorageValue(Storage.OutfitQuest.WarriorShoulderAddon) == 6 then - if player:getStorageValue(Storage.OutfitQuest.WarriorShoulderTimer) > os.time() then + elseif player:getStorageValue(Storage.Quest.U7_8.WarriorOutfits.WarriorShoulderAddon) == 6 then + if player:getStorageValue(Storage.Quest.U7_8.WarriorOutfits.WarriorShoulderTimer) > os.time() then npcHandler:say("I'm not done yet. Please be as patient as you are courageous.", npc, creature) - elseif player:getStorageValue(Storage.OutfitQuest.WarriorShoulderTimer) > 0 and player:getStorageValue(Storage.OutfitQuest.WarriorShoulderTimer) < os.time() then + elseif player:getStorageValue(Storage.Quest.U7_8.WarriorOutfits.WarriorShoulderTimer) > 0 and player:getStorageValue(Storage.Quest.U7_8.WarriorOutfits.WarriorShoulderTimer) < os.time() then player:addOutfitAddon(142, 1) player:addOutfitAddon(134, 1) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:setStorageValue(Storage.OutfitQuest.WarriorShoulderAddon, 7) + player:setStorageValue(Storage.Quest.U7_8.WarriorOutfits.WarriorShoulderAddon, 7) player:addAchievementProgress("Wild Warrior", 2) npcHandler:say("Finished! Since you are a man, I thought you probably wanted two. Men always want that little extra status symbol. ", npc, creature) else diff --git a/data-otservbr-global/npc/duncan.lua b/data-otservbr-global/npc/duncan.lua index 2bc4df38712..0e5e8cdc6e5 100644 --- a/data-otservbr-global/npc/duncan.lua +++ b/data-otservbr-global/npc/duncan.lua @@ -58,39 +58,22 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local storage = Storage.OutfitQuest.PirateSabreAddon - - if table.contains({ "outfit", "addon" }, message) and player:getStorageValue(Storage.OutfitQuest.PirateBaseOutfit) == 1 then - npcHandler:say( - "You're talking about my sabre? Well, even though you earned our trust, \z - you'd have to fulfill a task first before you are granted to wear such a sabre.", - npc, - creature - ) + local storage = Storage.Quest.U7_8.PirateOutfits.PirateSabreAddon + + if table.contains({ "outfit", "addon" }, message) and player:getStorageValue(Storage.Quest.U7_8.PirateOutfits.PirateBaseOutfit) == 1 then + npcHandler:say("You're talking about my sabre? Well, even though you earned our trust, you'd have to fulfill a task first before you are granted to wear such a sabre.", npc, creature) elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 6 then - npcHandler:say( - "I need a new quality atlas for our captains. Only one of the best will do it. \z - I heard the explorers society sells the best, but only to members of a certain rank. \z - You will have to get this rank or ask a high ranking member to buy it for you.", - npc, - creature - ) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 7) + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 9 then + npcHandler:say("I need a new quality atlas for our captains. Only one of the best will do it. I heard the explorers society sells the best, but only to members of a certain rank. You will have to get this rank or ask a high ranking member to buy it for you.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 10) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 7 then + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 10 then npcHandler:say("Did you get an atlas of the explorers society as I requested?", npc, creature) npcHandler:setTopic(playerId, 6) - elseif player:getStorageValue(Storage.TheShatteredIsles.RaysMission2) > 0 and player:getStorageValue(Storage.TheShatteredIsles.TortoiseEggNargorDoor) < 0 then - npcHandler:say( - "You did some impressive things. I think people here start considering you as one of us. \z - But these are dire times and everyone of us is expected to give his best and even exceed himself. \z - Do you think you can handle that?", - npc, - creature - ) + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission2) > 0 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TortoiseEggNargorDoor) < 0 then + npcHandler:say("You did some impressive things. I think people here start considering you as one of us. But these are dire times and everyone of us is expected to give his best and even exceed himself. Do you think you can handle that?", npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.TheShatteredIsles.TortoiseEggNargorDoor) == 1 then + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TortoiseEggNargorDoor) == 1 then npcHandler:say("Did you rescue one of those poor soon-to-be baby tortoises from Nargor?", npc, creature) npcHandler:setTopic(playerId, 8) end @@ -117,8 +100,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say({ - "Listen, the task is not that hard. Simply prove that you are with us and not with the \z - pirates from Nargor by bringingme some of their belongings. ...", + "Listen, the task is not that hard. Simply prove that you are with us and not with the pirates from Nargor by bringingme some of their belongings. ...", "Bring me 100 of their eye patches, 100 of their peg legs and 100 of their hooks, in that order. ...", "Have you understood everything I told you and are willing to handle this task?", }, npc, creature) @@ -153,10 +135,10 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("You don't have it...", npc, creature) end elseif npcHandler:getTopic(playerId) == 6 then - if player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 7 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 10 then if player:removeItem(6108, 1) then npcHandler:say("Indeed, what a fine work... the book I mean. Your work was acceptable all in all.", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 8) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 11) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have it...", npc, creature) @@ -164,31 +146,22 @@ local function creatureSayCallback(npc, creature, type, message) end end elseif npcHandler:getTopic(playerId) == 7 then - if player:getStorageValue(Storage.TheShatteredIsles.TortoiseEggNargorDoor) < 0 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TortoiseEggNargorDoor) < 0 then npcHandler:say({ - "I am glad to hear this. Please listen. The pirates on Nargor are breeding tortoises. \ - They think eating tortoises makes a hard man even harder. ...", - "However I am quite fond of tortoises and can't stand the thought of them being eaten. \ - So I convinced Captain Striker that I can train them to help us. As a substitute for rafts and such ...", - "All I need is one tortoise egg from Nargor. \ - This is the opportunity to save a tortoise from a gruesome fate! ...", - "I will ask Sebastian to bring you there. \ - Travel to Nargor, find their tortoise eggs and bring me at least one of them.", + "I am glad to hear this. Please listen. The pirates on Nargor are breeding tortoises. They think eating tortoises makes a hard man even harder. ...", + "However I am quite fond of tortoises and can't stand the thought of them being eaten. So I convinced Captain Striker that I can train them to help us. As a substitute for rafts and such ...", + "All I need is one tortoise egg from Nargor. This is the opportunity to save a tortoise from a gruesome fate! ...", + "I will ask Sebastian to bring you there. Travel to Nargor, find their tortoise eggs and bring me at least one of them.", }, npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.TortoiseEggNargorDoor, 1) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TortoiseEggNargorDoor, 1) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 8 then - if player:getStorageValue(Storage.TheShatteredIsles.TortoiseEggNargorDoor) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TortoiseEggNargorDoor) == 1 then if player:removeItem(6125, 1) then - npcHandler:say( - "A real tortoise egg ... I guess you are more accustomed to rescue some \z - noblewoman in distress but you did something goodtoday.", - npc, - creature - ) - player:setStorageValue(Storage.TheShatteredIsles.TortoiseEggNargorDoor, 2) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 16) + npcHandler:say("A real tortoise egg ... I guess you are more accustomed to rescue some noblewoman in distress but you did something goodtoday.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TortoiseEggNargorDoor, 2) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 16) if player:getStorageValue(Storage.TheIceIslands.Questline) >= 9 then player:addAchievement("Animal Activist") end @@ -208,6 +181,9 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Hi, come closer. Have a look at my wares.") +npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/edmund.lua b/data-otservbr-global/npc/edmund.lua index c61a95bcd72..1533a20810d 100644 --- a/data-otservbr-global/npc/edmund.lua +++ b/data-otservbr-global/npc/edmund.lua @@ -116,7 +116,7 @@ npcConfig.shop = { { itemName = "unicorn figurine", clientId = 30054, sell = 50000 }, { itemName = "violet crystal shard", clientId = 16120, sell = 1500 }, { itemName = "wedding ring", clientId = 3004, buy = 990 }, - { itemName = "white pearl", clientId = 3026, buy = 320 }, + { itemName = "white pearl", clientId = 3026, buy = 320, sell = 160 }, { itemName = "white silk flower", clientId = 34008, sell = 9000 }, } diff --git a/data-otservbr-global/npc/elane.lua b/data-otservbr-global/npc/elane.lua index e84f211fe2c..d7abb30dbdb 100644 --- a/data-otservbr-global/npc/elane.lua +++ b/data-otservbr-global/npc/elane.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "addon") or MsgContains(message, "outfit") then - if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) < 1 then + if player:getStorageValue(Storage.Quest.U7_8.HunterOutfits.HunterHatAddon) < 1 then npcHandler:say("Oh, my winged tiara? Those are traditionally awarded after having completed a difficult {task} for our guild, only to female aspirants though. Male warriors will receive a hooded cloak.", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -69,22 +69,22 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 2) end elseif MsgContains(message, "crossbow") then - if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.HunterOutfits.HunterHatAddon) == 1 then npcHandler:say("I'm so excited! Have you really found my crossbow?", npc, creature) npcHandler:setTopic(playerId, 4) end elseif MsgContains(message, "leather") then - if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) == 2 then + if player:getStorageValue(Storage.Quest.U7_8.HunterOutfits.HunterHatAddon) == 2 then npcHandler:say("Did you bring me 100 pieces of lizard leather and 100 pieces of red dragon leather?", npc, creature) npcHandler:setTopic(playerId, 5) end elseif MsgContains(message, "chicken wing") then - if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) == 3 then + if player:getStorageValue(Storage.Quest.U7_8.HunterOutfits.HunterHatAddon) == 3 then npcHandler:say("Were you able to get hold of 5 enchanted chicken wings?", npc, creature) npcHandler:setTopic(playerId, 6) end elseif MsgContains(message, "steel") then - if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) == 4 then + if player:getStorageValue(Storage.Quest.U7_8.HunterOutfits.HunterHatAddon) == 4 then npcHandler:say("Ah, have you brought one piece of royal steel, draconian steel and hell steel each?", npc, creature) npcHandler:setTopic(playerId, 7) end @@ -102,13 +102,13 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 3) elseif npcHandler:getTopic(playerId) == 3 then npcHandler:say("That's the spirit! I hope you will find my crossbow, |PLAYERNAME|!", npc, creature) - player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 1) + player:setStorageValue(Storage.Quest.U7_8.HunterOutfits.HunterHatAddon, 1) player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) --this for default start of Outfit and Addon Quests npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 4 then if player:removeItem(5947, 1) then npcHandler:say("Yeah! I could kiss you right here and there! Besides, you're a handsome one. Please bring me 100 pieces of lizard leather and 100 pieces of red dragon leather now!", npc, creature) - player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 2) + player:setStorageValue(Storage.Quest.U7_8.HunterOutfits.HunterHatAddon, 2) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have it...", npc, creature) @@ -118,7 +118,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Good work, |PLAYERNAME|! That is enough leather for a lot of sturdy quivers. Now, please bring me 5 enchanted chicken wings.", npc, creature) player:removeItem(5876, 100) player:removeItem(5948, 100) - player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 3) + player:setStorageValue(Storage.Quest.U7_8.HunterOutfits.HunterHatAddon, 3) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have it...", npc, creature) @@ -126,7 +126,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 6 then if player:removeItem(5891, 5) then npcHandler:say("Great! Now we can create a few more Tiaras. If only they weren't that expensive... Well anyway, please obtain one piece of royal steel, draconian steel and hell steel each.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 4) + player:setStorageValue(Storage.Quest.U7_8.HunterOutfits.HunterHatAddon, 4) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have it...", npc, creature) @@ -137,7 +137,7 @@ local function creatureSayCallback(npc, creature, type, message) player:removeItem(5887, 1) player:removeItem(5888, 1) player:removeItem(5889, 1) - player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 5) + player:setStorageValue(Storage.Quest.U7_8.HunterOutfits.HunterHatAddon, 5) player:addOutfitAddon(129, 1) player:addOutfitAddon(137, 2) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) @@ -187,7 +187,7 @@ addGloveKeyword({ "Maybe another time.", "Alright! Here is your money, thank you very much.", }, function(player) - return player:getStorageValue(Storage.OutfitQuest.Hunter.AddonGlove) == 1 + return player:getStorageValue(Storage.Quest.U7_8.HunterOutfits.Hunter.AddonGlove) == 1 end, function(player) player:removeItem(5875, 1) player:addMoney(2000) @@ -199,10 +199,10 @@ addGloveKeyword({ "No problem, maybe another time.", "Great! I hereby grant you the right to wear the sniper gloves as an accessory. Congratulations!", }, function(player) - return player:getStorageValue(Storage.OutfitQuest.Hunter.AddonGlove) == -1 + return player:getStorageValue(Storage.Quest.U7_8.HunterOutfits.Hunter.AddonGlove) == -1 end, function(player) player:removeItem(5875, 1) - player:setStorageValue(Storage.OutfitQuest.Hunter.AddonGlove, 1) + player:setStorageValue(Storage.Quest.U7_8.HunterOutfits.Hunter.AddonGlove, 1) player:addOutfitAddon(129, 2) player:addOutfitAddon(137, 1) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) diff --git a/data-otservbr-global/npc/eleonore.lua b/data-otservbr-global/npc/eleonore.lua index e152235d2a9..67e26a45029 100644 --- a/data-otservbr-global/npc/eleonore.lua +++ b/data-otservbr-global/npc/eleonore.lua @@ -59,40 +59,40 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "ring") or MsgContains(message, "mission") then - if player:getStorageValue(Storage.TheShatteredIsles.TheGovernorDaughter) < 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheGovernorDaughter) < 1 then npcHandler:say({ "My ring was stolen by a parrot, directly from my dressing table near the window. It flew to the nearby mountains and I fear my ring will be lost forever. Whoever returns it to me will be rewarded generously. ...", "I guess that evil parrot hid the ring somewhere on a high tree or a rock so that you might need a rake to get it.", }, npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.DefaultStart, 1) - player:setStorageValue(Storage.TheShatteredIsles.TheGovernorDaughter, 1) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheGovernorDaughter, 1) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheShatteredIsles.TheGovernorDaughter) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheGovernorDaughter) == 2 then npcHandler:say("Oh, my beloved ring! Have you found it and want to return it to me?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.TheShatteredIsles.TheGovernorDaughter) == 3 and player:getStorageValue(Storage.TheShatteredIsles.TheErrand) < 1 then + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheGovernorDaughter) == 3 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheErrand) < 1 then npcHandler:say("I would need some help in another matter. It is only a small errand. Are you interested?", npc, creature) npcHandler:setTopic(playerId, 2) end elseif MsgContains(message, "errand") then - if player:getStorageValue(Storage.TheShatteredIsles.TheErrand) == 2 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheErrand) == 2 then npcHandler:say("Great, thank you! As promised, here are your 5 gold pieces. Is there ... anything left that you might want to discuss with me?", npc, creature) player:addMoney(5) - player:setStorageValue(Storage.TheShatteredIsles.TheErrand, 3) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheErrand, 3) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "peg leg") then - if player:getStorageValue(Storage.TheShatteredIsles.TheErrand) == 3 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheErrand) == 3 then npcHandler:say("You have returned my ring and proven yourself as trustworthy. There is something I have to discuss with you. Are you willing to listen?", npc, creature) npcHandler:setTopic(playerId, 4) end elseif MsgContains(message, "raymond striker") then - if player:getStorageValue(Storage.TheShatteredIsles.AccessToLagunaIsland) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.AccessToLagunaIsland) == 1 then npcHandler:say(" Oh, he is so wonderful. A very special man with a special place in my heart.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "mermaid") then - if player:getStorageValue(Storage.TheShatteredIsles.AccessToLagunaIsland) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.AccessToLagunaIsland) == 1 then npcHandler:say("I can't thank you enough for freeing my beloved Ray from that evil spell. I am still shocked that a mermaid could steal his love that easily.", npc, creature) npcHandler:setTopic(playerId, 0) end @@ -101,7 +101,7 @@ local function creatureSayCallback(npc, creature, type, message) if player:removeItem(6093, 1) then player:addMoney(150) npcHandler:say("Oh, thank you so much! Take this gold as a reward. ... which reminds me, I would need some help in another matter. It is only a small errand. Are you interested?", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.TheGovernorDaughter, 3) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheGovernorDaughter, 3) npcHandler:setTopic(playerId, 2) else player:addMoney(150) @@ -109,7 +109,7 @@ local function creatureSayCallback(npc, creature, type, message) "Ahh, now I understand... One of my suitors - a real chicken-heart - just brought back my ring. I was really surprised. Suddenly he shows brave attitude. But... It seems you lost it and he tries to take advantage. ...", "Thanks a lot anyways and take this gold as a reward. By the way, I would need some help in another matter. It is only a small errand. Are you interested?", }, npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.TheGovernorDaughter, 3) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheGovernorDaughter, 3) npcHandler:setTopic(playerId, 2) end elseif npcHandler:getTopic(playerId) == 2 then @@ -118,7 +118,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 3 then player:addMoney(200) npcHandler:say("I was hoping that you'd agree. Please deliver these 200 gold pieces to the herbalist Charlotta in the south-western part of the town. If you return from this errand, I will grant you 5 gold pieces as reward for your efforts.", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.TheErrand, 1) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheErrand, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 4 then npcHandler:say({ @@ -129,8 +129,8 @@ local function creatureSayCallback(npc, creature, type, message) "Contact Captain Waverider, the old fisherman, and tell him the secret word 'peg leg'. He will make sure that you arrive safely ...", "Please look for Ray and find out what happened to him and why he was not able to answer. Return to me as soon as you have found something out. I wish you a good journey.", }, npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.TheErrand, 4) - player:setStorageValue(Storage.TheShatteredIsles.AccessToMeriana, 1) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheErrand, 4) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.AccessToMeriana, 1) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "no") then diff --git a/data-otservbr-global/npc/eliyas.lua b/data-otservbr-global/npc/eliyas.lua index b25823acf0c..51ae0c46e9e 100644 --- a/data-otservbr-global/npc/eliyas.lua +++ b/data-otservbr-global/npc/eliyas.lua @@ -58,57 +58,6 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "outfit") then - if player:getSex() == PLAYERSEX_MALE then - npcHandler:say("My jewelled belt? That's not very manly. Maybe you'd prefer a scimitar like Habdel has.", npc, creature) - return true - end - - if player:getStorageValue(Storage.OutfitQuest.firstOrientalAddon) < 1 then - npcHandler:say("My jewelled belt? Of course I could make one for you, but I have a small request. Would you fulfil a task for me?", npc, creature) - npcHandler:setTopic(playerId, 1) - end - elseif MsgContains(message, "comb") then - if player:getSex() == PLAYERSEX_MALE then - npcHandler:say("Comb? This is a jewellery shop.", npc, creature) - return true - end - - if player:getStorageValue(Storage.OutfitQuest.firstOrientalAddon) == 1 then - npcHandler:say("Have you brought me a mermaid's comb?", npc, creature) - npcHandler:setTopic(playerId, 3) - end - elseif MsgContains(message, "yes") then - if npcHandler:getTopic(playerId) == 1 then - npcHandler:say({ - "Listen, um... I have been wanting a comb for a long time... not just any comb, but a mermaid's comb. Having a mermaid's comb means never having split ends again! ...", - "You know what that means to a girl! Could you please bring me such a comb? I really would appreciate it.", - }, npc, creature) - npcHandler:setTopic(playerId, 2) - elseif npcHandler:getTopic(playerId) == 2 then - player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) - player:setStorageValue(Storage.OutfitQuest.firstOrientalAddon, 1) - npcHandler:say("Yay! I will wait for you to return with a mermaid's comb then.", npc, creature) - npcHandler:setTopic(playerId, 0) - elseif npcHandler:getTopic(playerId) == 3 then - if not player:removeItem(5945, 1) then - npcHandler:say("No... that's not it.", npc, creature) - npcHandler:setTopic(playerId, 0) - return true - end - - player:setStorageValue(Storage.OutfitQuest.firstOrientalAddon, 2) - player:addOutfitAddon(150, 1) - player:addOutfitAddon(146, 1) - player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - npcHandler:say("Yeah! That's it! I can't wait to comb my hair! Oh - but first, I'll fulfil my promise: Here is your jewelled belt! Thanks again!", npc, creature) - npcHandler:setTopic(playerId, 0) - end - elseif MsgContains(message, "no") and npcHandler:getTopic(playerId) ~= 0 then - npcHandler:say("Oh... okay.", npc, creature) - npcHandler:setTopic(playerId, 0) - end - return true end diff --git a/data-otservbr-global/npc/elvith.lua b/data-otservbr-global/npc/elvith.lua index ea704df1b20..67637ebe1b2 100644 --- a/data-otservbr-global/npc/elvith.lua +++ b/data-otservbr-global/npc/elvith.lua @@ -114,7 +114,6 @@ npcConfig.shop = { { itemName = "drum", clientId = 14253, buy = 140 }, { itemName = "lute", clientId = 2950, buy = 195 }, { itemName = "lyre", clientId = 2949, buy = 120 }, - { itemName = "poem scroll", clientId = 6119, buy = 200 }, { itemName = "simple fanfare", clientId = 2954, buy = 150 }, } -- On buy npc shop message diff --git a/data-otservbr-global/npc/erayo.lua b/data-otservbr-global/npc/erayo.lua index 96bb87cb5d3..40b05205992 100644 --- a/data-otservbr-global/npc/erayo.lua +++ b/data-otservbr-global/npc/erayo.lua @@ -53,14 +53,14 @@ end local topic = {} local config = { - ["blue cloth"] = { storageValue = 1, text = { "Brought the 50 pieces of blue cloth?", "Good. Get me 50 pieces of green cloth now." }, itemId = 5912, count = 50 }, - ["green cloth"] = { storageValue = 2, text = { "Brought the 50 pieces of green cloth?", "Good. Get me 50 pieces of red cloth now." }, itemId = 5910, count = 50 }, - ["red cloth"] = { storageValue = 3, text = { "Brought the 50 pieces of red cloth?", "Good. Get me 50 pieces of brown cloth now." }, itemId = 5911, count = 50 }, - ["brown cloth"] = { storageValue = 4, text = { "Brought the 50 pieces of brown cloth?", "Good. Get me 50 pieces of yellow cloth now." }, itemId = 5913, count = 50 }, - ["yellow cloth"] = { storageValue = 5, text = { "Brought the 50 pieces of yellow cloth?", "Good. Get me 50 pieces of white cloth now." }, itemId = 5914, count = 50 }, - ["white cloth"] = { storageValue = 6, text = { "Brought the 50 pieces of white cloth?", "Good. Get me 10 spools of yarn now." }, itemId = 5909, count = 50 }, - ["spools of yarn"] = { storageValue = 7, text = { "Brought the 10 spools of yarn?", "Thanks. That's it, you're done. Good job, |PLAYERNAME|. I keep my promise. Here's my old assassin head piece." }, itemId = 5886, count = 10 }, - ["yarn"] = { storageValue = 7, text = { "Brought the 10 spools of yarn?", "Thanks. That's it, you're done. Good job, |PLAYERNAME|. I keep my promise. Here's my old assassin head piece." }, itemId = 5886, count = 10 }, + ["50 blue cloth"] = { storageValue = 1, text = { "Brought the 50 pieces of blue cloth?", "Good. Get me 50 pieces of green cloth now." }, itemId = 5912, count = 50 }, + ["50 green cloth"] = { storageValue = 2, text = { "Brought the 50 pieces of green cloth?", "Good. Get me 50 pieces of red cloth now." }, itemId = 5910, count = 50 }, + ["50 red cloth"] = { storageValue = 3, text = { "Brought the 50 pieces of red cloth?", "Good. Get me 50 pieces of brown cloth now." }, itemId = 5911, count = 50 }, + ["50 brown cloth"] = { storageValue = 4, text = { "Brought the 50 pieces of brown cloth?", "Good. Get me 50 pieces of yellow cloth now." }, itemId = 5913, count = 50 }, + ["50 yellow cloth"] = { storageValue = 5, text = { "Brought the 50 pieces of yellow cloth?", "Good. Get me 50 pieces of white cloth now." }, itemId = 5914, count = 50 }, + ["50 white cloth"] = { storageValue = 6, text = { "Brought the 50 pieces of white cloth?", "Good. Get me 10 spools of yarn now." }, itemId = 5909, count = 50 }, + ["10 spools of yarn"] = { storageValue = 7, text = { "Brought the 10 spools of yarn?", "Thanks. That's it, you're done. Good job, |PLAYERNAME|. I keep my promise. Here's my old assassin head piece." }, itemId = 5886, count = 10 }, + ["10 yarn"] = { storageValue = 7, text = { "Brought the 10 spools of yarn?", "Thanks. That's it, you're done. Good job, |PLAYERNAME|. I keep my promise. Here's my old assassin head piece." }, itemId = 5886, count = 10 }, } local function creatureSayCallback(npc, creature, type, message) @@ -72,12 +72,12 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "addon") then - if player:hasOutfit(player:getSex() == PLAYERSEX_FEMALE and 156 or 152) and player:getStorageValue(Storage.OutfitQuest.AssassinFirstAddon) < 1 then + if player:hasOutfit(player:getSex() == PLAYERSEX_FEMALE and 156 or 152) and player:getStorageValue(Storage.OutfitQuest.AssassinFirstAddon) < 1 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.Shipwrecked) == 2 then npcHandler:say("Vescu gave you an assassin outfit? Haha. Noticed it lacks the head piece? You look a bit silly. Want my old head piece?", npc, creature) npcHandler:setTopic(playerId, 1) end elseif config[message] and npcHandler:getTopic(playerId) == 0 then - if player:getStorageValue(Storage.OutfitQuest.AssassinFirstAddon) == config[message].storageValue then + if player:getStorageValue(Storage.Quest.U7_8.AssassinOutfits.AssassinFirstAddon) == config[message].storageValue then npcHandler:say(config[message].text[1], npc, creature) npcHandler:setTopic(playerId, 3) topic[playerId] = message @@ -95,7 +95,7 @@ local function creatureSayCallback(npc, creature, type, message) if player:getStorageValue(Storage.OutfitQuest.DefaultStart) ~= 1 then player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) end - player:setStorageValue(Storage.OutfitQuest.AssassinFirstAddon, 1) + player:setStorageValue(Storage.Quest.U7_8.AssassinOutfits.AssassinFirstAddon, 1) npcHandler:say("Good. Start with the blue cloth. I'll wait.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then @@ -106,8 +106,8 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.OutfitQuest.AssassinFirstAddon, player:getStorageValue(Storage.OutfitQuest.AssassinFirstAddon) + 1) - if player:getStorageValue(Storage.OutfitQuest.AssassinFirstAddon) == 8 then + player:setStorageValue(Storage.Quest.U7_8.AssassinOutfits.AssassinFirstAddon, player:getStorageValue(Storage.Quest.U7_8.AssassinOutfits.AssassinFirstAddon) + 1) + if player:getStorageValue(Storage.Quest.U7_8.AssassinOutfits.AssassinFirstAddon) == 8 then player:addOutfitAddon(156, 1) player:addOutfitAddon(152, 1) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) diff --git a/data-otservbr-global/npc/eremo.lua b/data-otservbr-global/npc/eremo.lua index c61996e5318..c558148ccee 100644 --- a/data-otservbr-global/npc/eremo.lua +++ b/data-otservbr-global/npc/eremo.lua @@ -59,16 +59,11 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "letter") then - if player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 4 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 7 then if player:getItemCount(3506) > 0 then if player:removeItem(3506, 1) then - npcHandler:say( - "A letter from that youngster Morgan? I believed him dead since years. \z - These news are good news indeed. Thank you very much, my friend.", - npc, - creature - ) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 5) + npcHandler:say("A letter from that youngster Morgan? I believed him dead since years. These news are good news indeed. Thank you very much, my friend.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 8) end end end diff --git a/data-otservbr-global/npc/fa_hradin.lua b/data-otservbr-global/npc/fa_hradin.lua index 28e05610a81..3b4a2754717 100644 --- a/data-otservbr-global/npc/fa_hradin.lua +++ b/data-otservbr-global/npc/fa_hradin.lua @@ -45,6 +45,37 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function endConversationWithDelay(npcHandler, npc, creature) + addEvent(function() + npcHandler:unGreet(npc, creature) + end, 1000) +end + +local function greetCallback(npc, creature, message) + local player = Player(creature) + local playerId = player:getId() + + if not MsgContains(message, "djanni'hah") then + npcHandler:say("Whoa! A human! This is no place for you, |PLAYERNAME|. Go and play somewhere else.", npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Start) == 1 then + npcHandler:say({ + "Hahahaha! ...", + "|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!", + }, npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + npcHandler:say("Aaaah... what have we here. A human - interesting. And such an ugly specimen, too... All right, human |PLAYERNAME|. How can I help you?", npc, creature) + npcHandler:setInteraction(npc, creature) + + return true +end + local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -53,9 +84,9 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local missionProgress = player:getStorageValue(Storage.DjinnWar.MaridFaction.Mission02) + local missionProgress = player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission02) if MsgContains(message, "spy report") or MsgContains(message, "mission") then - if player:getStorageValue(Storage.DjinnWar.MaridFaction.Mission01) ~= 2 then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission01) ~= 2 then npcHandler:say("Looking for work, are you? Well, it's very tempting, you know, but I'm afraid we do not really employ beginners. Perhaps our cook could need a helping hand in the kitchen.", npc, creature) elseif missionProgress < 1 then npcHandler:say({ @@ -68,8 +99,8 @@ local function creatureSayCallback(npc, creature, type, message) "I need you to infiltrate Mal'ouqhah, contact our man there and get his latest spyreport. The password is {PIEDPIPER}. Remember it well! ...", "I do not have to add that this is a dangerous mission, do I? If you are discovered expect to be attacked! So goodluck, human!", }, npc, creature) - player:setStorageValue(Storage.DjinnWar.MaridFaction.Mission02, 1) - player:setStorageValue(Storage.DjinnWar.MaridFaction.DoorToEfreetTerritory, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission02, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.DoorToEfreetTerritory, 1) elseif missionProgress == 1 then npcHandler:say("Did you already retrieve the spyreport?", npc, creature) npcHandler:setTopic(playerId, 1) @@ -78,7 +109,7 @@ local function creatureSayCallback(npc, creature, type, message) end elseif npcHandler:getTopic(playerId) == 1 then if MsgContains(message, "yes") then - if player:getStorageValue(Storage.DjinnWar.MaridFaction.RataMari) ~= 2 or not player:removeItem(3232, 1) then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.RataMari) ~= 2 or not player:removeItem(3232, 1) then npcHandler:say({ "Don't waste any more time. We need the spyreport of our man in Mal'ouquah as soon as possible! ...", "Also don't forget the password to contact our man: PIEDPIPER!", @@ -89,7 +120,7 @@ local function creatureSayCallback(npc, creature, type, message) "Well, let's see. ...", "I think I need to talk to Gabel about this. I am sure he will know what to do. Perhaps you should have a word with him, too.", }, npc, creature) - player:setStorageValue(Storage.DjinnWar.MaridFaction.Mission02, 2) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission02, 2) end elseif MsgContains(message, "no") then npcHandler:say({ @@ -102,7 +133,7 @@ local function creatureSayCallback(npc, creature, type, message) end -- Greeting -keywordHandler:addGreetKeyword({ "djanni'hah" }, { npcHandler = npcHandler, text = "Aaaah... what have we here. A human - interesting. And such an ugly specimen, too... All right, human |PLAYERNAME|. How can I help you?" }) +keywordHandler:addCustomGreetKeyword({ "djanni'hah" }, greetCallback, { npcHandler = npcHandler }) npcHandler:setMessage(MESSAGE_FAREWELL, "Farewell, human. I will always remember you. Unless I forget you, of course.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Farewell, human. I will always remember you. Unless I forget you, of course.") diff --git a/data-otservbr-global/npc/gabel.lua b/data-otservbr-global/npc/gabel.lua index 0ff9c104a03..85eabcc2882 100644 --- a/data-otservbr-global/npc/gabel.lua +++ b/data-otservbr-global/npc/gabel.lua @@ -45,6 +45,37 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function endConversationWithDelay(npcHandler, npc, creature) + addEvent(function() + npcHandler:unGreet(npc, creature) + end, 1000) +end + +local function greetCallback(npc, creature, message) + local player = Player(creature) + local playerId = player:getId() + + if not MsgContains(message, "djanni'hah") then + npcHandler:say("Whoa! A human! This is no place for you, |PLAYERNAME|. Go and play somewhere else.", npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Start) == 1 then + npcHandler:say({ + "Hahahaha! ...", + "|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!", + }, npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + npcHandler:say("Welcome, human |PLAYERNAME|, to our humble abode.", npc, creature) + npcHandler:setInteraction(npc, creature) + + return true +end + local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -53,9 +84,9 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local missionProgress = player:getStorageValue(Storage.DjinnWar.MaridFaction.Mission03) + local missionProgress = player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission03) if MsgContains(message, "mission") then - if player:getStorageValue(Storage.DjinnWar.MaridFaction.Mission02) ~= 2 then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission02) ~= 2 then npcHandler:say({ "So you would like to fight for us, would you. Hmm. ...", "That is a noble resolution you have made there, human, but I'm afraid I cannot accept your generous offer at this point of time. ...", @@ -88,7 +119,7 @@ local function creatureSayCallback(npc, creature, type, message) "Once you have acquired the lamp you must enter Mal'ouquah again. Sneak into Malor's personal chambersand exchange his sleeping lamp with Fa'hradin's lamp! ...", "If you succeed, the war could be over one night later! I and all djinn will be in your debt forever! May Daraman watch over you!", }, npc, creature) - player:setStorageValue(Storage.DjinnWar.MaridFaction.Mission03, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission03, 1) elseif MsgContains(message, "no") then npcHandler:say("As you wish.", npc, creature) end @@ -98,15 +129,16 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say({ "Daraman shall bless you and all humans! You have done us all a huge service! Soon, this awful war will be over! ...", "Know, that from now on you are considered one of us and are welcome to trade with Haroun and Nah'bob whenever you want to!", + "Farewell, stranger. May Uman open your minds and your hearts to Daraman's wisdom!", }, npc, creature) - player:setStorageValue(Storage.DjinnWar.MaridFaction.Mission03, 3) - player:setStorageValue(Storage.DjinnWar.MaridFaction.DoorToEfreetTerritory, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission03, 3) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.DoorToEfreetTerritory, 1) player:addAchievement("Marid Ally") elseif MsgContains(message, "no") then npcHandler:say("Don't give up! May Daraman watch over you!", npc, creature) end npcHandler:setTopic(playerId, 0) - elseif MsgContains(message, "task") and player:getStorageValue(Storage.DjinnWar.MaridFaction.Mission03) == 3 then + elseif MsgContains(message, "task") and player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission03) == 3 then if player:getStorageValue(Storage.KillingInTheNameOf.GreenDjinnTask) < 0 or player:getStorageValue(Storage.KillingInTheNameOf.GreenDjinnTask) == 3 then npcHandler:say({ "You've proven to be an experienced soldier, human. Though I still hope the war to be over soon, the Efreet are still threatening our tower. ...", @@ -145,7 +177,7 @@ local function creatureSayCallback(npc, creature, type, message) end -- Greeting -keywordHandler:addGreetKeyword({ "djanni'hah" }, { npcHandler = npcHandler, text = "Welcome, human |PLAYERNAME|, to our humble abode." }) +keywordHandler:addCustomGreetKeyword({ "djanni'hah" }, greetCallback, { npcHandler = npcHandler }) npcHandler:setMessage(MESSAGE_FAREWELL, "Farewell, stranger. May Uman open your minds and your hearts to Daraman's wisdom!") npcHandler:setMessage(MESSAGE_WALKAWAY, "Farewell, stranger. May Uman open your minds and your hearts to Daraman's wisdom!") diff --git a/data-otservbr-global/npc/gail.lua b/data-otservbr-global/npc/gail.lua index de2a52dc7f4..1c61a2cbc6d 100644 --- a/data-otservbr-global/npc/gail.lua +++ b/data-otservbr-global/npc/gail.lua @@ -157,7 +157,7 @@ npcConfig.shop = { { itemName = "unicorn figurine", clientId = 30054, sell = 50000 }, { itemName = "violet crystal shard", clientId = 16120, sell = 1500 }, { itemName = "wedding ring", clientId = 3004, buy = 990 }, - { itemName = "white pearl", clientId = 3026, buy = 320 }, + { itemName = "white pearl", clientId = 3026, buy = 320, sell = 160 }, { itemName = "white silk flower", clientId = 34008, sell = 9000 }, } diff --git a/data-otservbr-global/npc/gamon.lua b/data-otservbr-global/npc/gamon.lua index e858f43eb30..1b7e6ad0ce2 100644 --- a/data-otservbr-global/npc/gamon.lua +++ b/data-otservbr-global/npc/gamon.lua @@ -58,7 +58,7 @@ end -- Wooden Stake local stakeKeyword = keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "Making a stake from a chair? Are you insane??! I won't waste my chairs on you for free! You will have to pay for it, but since I consider your plan a blasphemy, it will cost 5000 gold pieces. Okay?" }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) ~= -1 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) ~= -1 end) stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Argh... my heart aches! Alright... a promise is a promise. Here - take this wooden stake, and now get lost.", ungreet = true }, function(player) diff --git a/data-otservbr-global/npc/gregor.lua b/data-otservbr-global/npc/gregor.lua index 1c8686d76a8..fbb6bdc1025 100644 --- a/data-otservbr-global/npc/gregor.lua +++ b/data-otservbr-global/npc/gregor.lua @@ -64,7 +64,12 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local addonProgress = player:getStorageValue(Storage.OutfitQuest.Knight.AddonHelmet) + if player:getStorageValue(Storage.Quest.U7_6.TheApeCity.Questline) <= 15 then + npcHandler:say("Sorry but I don't have anything for you at the moment.", npc, creature) + return true + end + + local addonProgress = player:getStorageValue(Storage.Quest.U7_8.KnightOutfits.AddonHelmet) if MsgContains(message, "task") then if not player:isPremium() then npcHandler:say("Sorry, but our tasks are only for premium warriors.", npc, creature) @@ -83,12 +88,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif addonProgress == 4 then npcHandler:say("Your current task is to bring me royal steel, |PLAYERNAME|.", npc, creature) elseif addonProgress == 5 then - npcHandler:say( - "Please talk to Sam and tell him I sent you. \z - I'm sure he will be glad to refine your helmet, |PLAYERNAME|.", - npc, - creature - ) + npcHandler:say("Please talk to Sam and tell him I sent you. I'm sure he will be glad to refine your helmet, |PLAYERNAME|.", npc, creature) else npcHandler:say("You've already completed the task and can consider yourself a mighty warrior, |PLAYERNAME|.", npc, creature) end @@ -97,14 +97,9 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Have you really managed to fulfil the task and brought me 100 perfect behemoth fangs?", npc, creature) npcHandler:setTopic(playerId, 3) else - npcHandler:say( - "You're not serious asking that, are you? They come from behemoths, of course. \z - Unless there are behemoth rabbits. Duh.", - npc, - creature - ) + npcHandler:say("You're not serious asking that, are you? They come from behemoths, of course. Unless there are behemoth rabbits. Duh.", npc, creature) end - elseif MsgContains(message, "ramsay") then + elseif MsgContains(message, "ramsay the reckless helmet") then if addonProgress == 2 then npcHandler:say("Did you recover the helmet of Ramsay the Reckless?", npc, creature) npcHandler:setTopic(playerId, 4) @@ -116,12 +111,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Were you able to get hold of a flask with pure warrior's sweat?", npc, creature) npcHandler:setTopic(playerId, 5) else - npcHandler:say( - "Warrior's sweat can be magically extracted from headgear worn by a true warrior, \z - but only in small amounts. Djinns are said to be good at magical extractions.", - npc, - creature - ) + npcHandler:say("Warrior's sweat can be magically extracted from headgear worn by a true warrior, but only in small amounts. Djinns are said to be good at magical extractions.", npc, creature) end elseif MsgContains(message, "royal steel") then if addonProgress == 4 then @@ -133,30 +123,22 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 1 then if MsgContains(message, "yes") then npcHandler:say({ - "Well then, listen closely. First, you will have to prove that you are a fierce and \z - restless warrior by bringing me 100 perfect behemoth fangs. ...", - "Secondly, please retrieve a helmet for us which has been lost a long time ago. \z - The famous Ramsay the Reckless wore it when exploring an ape settlement. ...", - "Third, we need a new flask of warrior's sweat. We've run out of it recently, \z - but we need a small amount for the show battles in our arena. ...", + "Well then, listen closely. First, you will have to prove that you are a fierce and restless warrior by bringing me 100 perfect behemoth fangs. ...", + "Secondly, please retrieve a helmet for us which has been lost a long time ago. The famous Ramsay the Reckless wore it when exploring an ape settlement. ...", + "Third, we need a new flask of warrior's sweat. We've run out of it recently, but we need a small amount for the show battles in our arena. ...", "Lastly, I will have our smith refine your helmet if you bring me royal steel, an especially noble metal. ...", "Did you understand everything I told you and are willing to handle this task?", }, npc, creature, 100) npcHandler:setTopic(playerId, 2) elseif MsgContains(message, "no") then - npcHandler:say( - "Bah. Then you will have to wait for the day these helmets are sold in shops, \z - but that will not happen before hell freezes over.", - npc, - creature - ) + npcHandler:say("Bah. Then you will have to wait for the day these helmets are sold in shops, but that will not happen before hell freezes over.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 2 then if MsgContains(message, "yes") then player:setStorageValue(Storage.OutfitQuest.Ref, math.max(0, player:getStorageValue(Storage.OutfitQuest.Ref)) + 1) - player:setStorageValue(Storage.OutfitQuest.Knight.AddonHelmet, 1) - player:setStorageValue(Storage.OutfitQuest.Knight.MissionHelmet, 1) + player:setStorageValue(Storage.Quest.U7_8.KnightOutfits.AddonHelmet, 1) + player:setStorageValue(Storage.Quest.U7_8.KnightOutfits.MissionHelmet, 1) npcHandler:say("Alright then. Come back to me once you have collected 100 perfect behemoth fangs.", npc, creature) npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "no") then @@ -170,15 +152,10 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.OutfitQuest.Knight.AddonHelmet, 2) - player:setStorageValue(Storage.OutfitQuest.Knight.MissionHelmet, 2) - player:setStorageValue(Storage.OutfitQuest.Knight.RamsaysHelmetDoor, 1) - npcHandler:say( - "I'm deeply impressed, brave Knight |PLAYERNAME|. I expected nothing less from you. \z - Now, please retrieve Ramsay's helmet.", - npc, - creature - ) + player:setStorageValue(Storage.Quest.U7_8.KnightOutfits.AddonHelmet, 2) + player:setStorageValue(Storage.Quest.U7_8.KnightOutfits.MissionHelmet, 2) + player:setStorageValue(Storage.Quest.U7_8.KnightOutfits.RamsaysHelmetDoor, 1) + npcHandler:say("I'm deeply impressed, brave Knight |PLAYERNAME|. I expected nothing less from you. Now, please retrieve Ramsay's helmet.", npc, creature) elseif MsgContains(message, "no") then npcHandler:say("There is no need to rush anyway.", npc, creature) end @@ -190,14 +167,9 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.OutfitQuest.Knight.AddonHelmet, 3) - player:setStorageValue(Storage.OutfitQuest.Knight.MissionHelmet, 3) - npcHandler:say( - "Good work, brave Knight |PLAYERNAME|! Even though it is damaged, \z - it has a lot of sentimental value. Now, please bring me warrior's sweat.", - npc, - creature - ) + player:setStorageValue(Storage.Quest.U7_8.KnightOutfits.AddonHelmet, 3) + player:setStorageValue(Storage.Quest.U7_8.KnightOutfits.MissionHelmet, 3) + npcHandler:say("Good work, brave Knight |PLAYERNAME|! Even though it is damaged, it has a lot of sentimental value. Now, please bring me warrior's sweat.", npc, creature) elseif MsgContains(message, "no") then npcHandler:say("There is no need to rush anyway.", npc, creature) end @@ -209,14 +181,9 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.OutfitQuest.Knight.AddonHelmet, 4) - player:setStorageValue(Storage.OutfitQuest.Knight.MissionHelmet, 4) - npcHandler:say( - "Now that is a pleasant surprise, brave Knight |PLAYERNAME|! \z - There is only one task left now: Obtain royal steel to have your helmet refined.", - npc, - creature - ) + player:setStorageValue(Storage.Quest.U7_8.KnightOutfits.AddonHelmet, 4) + player:setStorageValue(Storage.Quest.U7_8.KnightOutfits.MissionHelmet, 4) + npcHandler:say("Now that is a pleasant surprise, brave Knight |PLAYERNAME|! There is only one task left now: Obtain royal steel to have your helmet refined.", npc, creature) elseif MsgContains(message, "no") then npcHandler:say("There is no need to rush anyway.", npc, creature) end @@ -228,14 +195,9 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.OutfitQuest.Knight.AddonHelmet, 5) - player:setStorageValue(Storage.OutfitQuest.Knight.MissionHelmet, 5) - npcHandler:say( - "You truly deserve to wear an adorned helmet, brave Knight |PLAYERNAME|. \z - Please talk to Sam and tell him I sent you. I'm sure he will be glad to refine your helmet.", - npc, - creature - ) + player:setStorageValue(Storage.Quest.U7_8.KnightOutfits.AddonHelmet, 5) + player:setStorageValue(Storage.Quest.U7_8.KnightOutfits.MissionHelmet, 5) + npcHandler:say("You truly deserve to wear an adorned helmet, brave Knight |PLAYERNAME|. Please talk to Sam and tell him I sent you. I'm sure he will be glad to refine your helmet.", npc, creature) elseif MsgContains(message, "no") then npcHandler:say("There is no need to rush anyway.", npc, creature) end @@ -290,9 +252,7 @@ keywordHandler:addKeyword({ "support", "spells" }, StdModule.say, { }) keywordHandler:addKeyword({ "spells" }, StdModule.say, { npcHandler = npcHandler, - text = "I can teach you {healing spells} and {support spells}. \z - What kind of spell do you wish to learn? You can also tell me for which level \z - you would like to learn a spell, if you prefer that.", + text = "I can teach you {healing spells} and {support spells}. What kind of spell do you wish to learn? You can also tell me for which level you would like to learn a spell, if you prefer that.", }) keywordHandler:addKeyword({ "job" }, StdModule.say, { @@ -325,8 +285,7 @@ keywordHandler:addKeyword({ "time" }, StdModule.say, { }) keywordHandler:addKeyword({ "knights" }, StdModule.say, { npcHandler = npcHandler, - text = "Knights are the warriors of Tibia. Without us, no one would be safe. \z - Every brave and strong man or woman can join us.", + text = "Knights are the warriors of Tibia. Without us, no one would be safe. Every brave and strong man or woman can join us.", }) keywordHandler:addKeyword({ "bozo" }, StdModule.say, { npcHandler = npcHandler, @@ -382,13 +341,7 @@ keywordHandler:addKeyword({ "tibianus" }, StdModule.say, { }) keywordHandler:addKeyword({ "outfit" }, StdModule.say, { npcHandler = npcHandler, - text = "Only the bravest warriors may wear adorned helmets. \z - They are traditionally awarded after having completed a difficult task for our guild.", -}) -keywordHandler:addKeyword({ "helmet" }, StdModule.say, { - npcHandler = npcHandler, - text = "Only the bravest warriors may wear adorned helmets. \z - They are traditionally awarded after having completed a difficult task for our guild.", + text = "Only the bravest warriors may wear adorned helmets. They are traditionally awarded after having completed a difficult task for our guild.", }) npcHandler:setMessage(MESSAGE_GREET, "Greetings, |PLAYERNAME|. What do you want?") diff --git a/data-otservbr-global/npc/habdel.lua b/data-otservbr-global/npc/habdel.lua index d9371bb7c6a..1a060e95fa6 100644 --- a/data-otservbr-global/npc/habdel.lua +++ b/data-otservbr-global/npc/habdel.lua @@ -58,21 +58,13 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "outfit") then - if player:getSex() == PLAYERSEX_FEMALE then - npcHandler:say("My scimitar? Well, mylady, I do not want to sound rude, but I don't think a scimitar would fit to your beautiful outfit. If you are looking for an accessory, why don't you talk to Ishina?", npc, creature) - return true - end - if player:getStorageValue(Storage.OutfitQuest.firstOrientalAddon) < 1 then + if player:getSex() == PLAYERSEX_MALE and MsgContains(message, "outfit") and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder) >= 34 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) >= 44 then + if player:getStorageValue(Storage.Quest.U7_8.OrientalOutfits.FirstOrientalAddon) < 1 then npcHandler:say("My scimitar? Yes, that is a true masterpiece. Of course I could make one for you, but I have a small request. Would you fulfil a task for me?", npc, creature) npcHandler:setTopic(playerId, 1) end - elseif MsgContains(message, "comb") then - if player:getSex() == PLAYERSEX_FEMALE then - npcHandler:say("Comb? This is a weapon shop.", npc, creature) - return true - end - if player:getStorageValue(Storage.OutfitQuest.firstOrientalAddon) == 1 then + elseif player:getSex() == PLAYERSEX_MALE and MsgContains(message, "comb") then + if player:getStorageValue(Storage.Quest.U7_8.OrientalOutfits.FirstOrientalAddon) == 1 then npcHandler:say("Have you brought a mermaid's comb for Ishina?", npc, creature) npcHandler:setTopic(playerId, 3) end @@ -84,8 +76,11 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then - player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) - player:setStorageValue(Storage.OutfitQuest.firstOrientalAddon, 1) + if player:getStorageValue(Storage.OutfitQuest.DefaultStart) ~= 1 then + player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) + end + player:setStorageValue(Storage.Quest.U7_8.OrientalOutfits.FirstOrientalAddon, 1) + player:setStorageValue(Storage.Quest.U7_8.OrientalOutfits.OrientalDoor, 1) npcHandler:say("Brilliant! I will wait for you to return with a mermaid's comb then.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then @@ -94,9 +89,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) return true end - player:setStorageValue(Storage.OutfitQuest.firstOrientalAddon, 2) - player:addOutfitAddon(150, 1) - player:addOutfitAddon(146, 1) + player:setStorageValue(Storage.Quest.U7_8.OrientalOutfits.FirstOrientalAddon, 2) + player:addOutfitAddon(146, 1) --male addon player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) npcHandler:say("Yeah! That's it! I can't wait to give it to her! Oh - but first, I'll fulfil my promise: Here is your scimitar! Thanks again!", npc, creature) npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/hairycles.lua b/data-otservbr-global/npc/hairycles.lua index 7ffcb21433d..9af42751219 100644 --- a/data-otservbr-global/npc/hairycles.lua +++ b/data-otservbr-global/npc/hairycles.lua @@ -52,8 +52,8 @@ end local function greetCallback(npc, creature) local playerId = creature:getId() - if Player(creature):getStorageValue(Storage.TheApeCity.Questline) < 12 then - npcHandler:setMessage(MESSAGE_GREET, "Oh! Hello! Hello! Did not notice! So {busy}.") + if Player(creature):getStorageValue(Storage.Quest.U7_6.TheApeCity.Questline) < 12 then + npcHandler:setMessage(MESSAGE_GREET, "Oh! Hello! Hello! Did not notice!") else npcHandler:setMessage(MESSAGE_GREET, "Be greeted, friend of the ape people. If you want to {trade}, just ask for my offers. If you are injured, ask for healing.") end @@ -77,7 +77,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local questProgress = player:getStorageValue(Storage.TheApeCity.Questline) + local questProgress = player:getStorageValue(Storage.Quest.U7_6.TheApeCity.Questline) if MsgContains(message, "mission") then if questProgress < 1 then npcHandler:say("These are dire times for our people. Problems plenty are in this times. But me people not grant trust easy. Are you willing to prove you friend of ape people?", npc, creature) @@ -94,7 +94,7 @@ local function creatureSayCallback(npc, creature, type, message) "Whisper moss strong is, but me need liquid that humans have to make it work ...", "Our raiders brought it from human settlement, it's called cough syrup. Go ask healer there for it.", }, npc, creature) - player:setStorageValue(Storage.TheApeCity.Questline, 3) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Questline, 3) elseif questProgress == 3 then npcHandler:say("You brought me that cough syrup from human healer me asked for?", npc, creature) npcHandler:setTopic(playerId, 4) @@ -114,7 +114,7 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature) npcHandler:setTopic(playerId, 8) elseif questProgress == 7 then - if player:getStorageValue(Storage.TheApeCity.ParchmentDecyphering) == 1 then + if player:getStorageValue(Storage.Quest.U7_6.TheApeCity.ParchmentDecyphering) == 1 then npcHandler:say("Ah yes, you read the signs in tomb? Good! May me look into your mind to see what you saw?", npc, creature) npcHandler:setTopic(playerId, 9) else @@ -147,9 +147,9 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature) npcHandler:setTopic(playerId, 14) elseif questProgress == 13 then - if player:getStorageValue(Storage.TheApeCity.Casks) == 3 then + if player:getStorageValue(Storage.Quest.U7_6.TheApeCity.Casks) == 3 then npcHandler:say("You do please Hairycles again, friend. Me hope madness will not spread further now. Perhaps you are ready for other mission.", npc, creature) - player:setStorageValue(Storage.TheApeCity.Questline, 14) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Questline, 14) else npcHandler:say("Please destroy three casks in the complex beneath Banuta, so my people will come to senses again.", npc, creature) end @@ -165,7 +165,7 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature) npcHandler:setTopic(playerId, 15) elseif questProgress == 15 then - if player:getStorageValue(Storage.TheApeCity.HolyApeHair) == 1 then + if player:getStorageValue(Storage.Quest.U7_6.TheApeCity.HolyApeHair) == 1 then npcHandler:say("You brought hair of holy ape?", npc, creature) npcHandler:setTopic(playerId, 16) else @@ -180,13 +180,13 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature) npcHandler:setTopic(playerId, 17) elseif questProgress == 17 then - if player:getStorageValue(Storage.TheApeCity.SnakeDestroyer) == 1 then + if player:getStorageValue(Storage.Quest.U7_6.TheApeCity.SnakeDestroyer) == 1 then npcHandler:say({ "Finally my people are safe! You have done incredible good for ape people and one day even me brethren will recognise that. ...", "I wish I could speak for all when me call you true friend but my people need time to get accustomed to change. ...", "Let us hope one day whole Banuta will greet you as a friend. Perhaps you want to check me offers for special friends... or shamanic powers.", }, npc, creature) - player:setStorageValue(Storage.TheApeCity.Questline, 18) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Questline, 18) player:addAchievement("Friend of the Apes") else npcHandler:say("Me know its much me asked for but go into the deepest catacombs under Banuta and destroy the monument of the serpent god.", npc, creature) @@ -206,7 +206,7 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "outfit") or MsgContains(message, "shamanic") then if questProgress == 18 then - if player:getStorageValue(Storage.TheApeCity.ShamanOutfit) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_6.TheApeCity.ShamanOutfit) ~= 1 then npcHandler:say("Me truly proud of you, friend. You learn many about plants, charms and ape people. Me want grant you shamanic power now. You ready?", npc, creature) npcHandler:setTopic(playerId, 18) else @@ -249,9 +249,9 @@ local function creatureSayCallback(npc, creature, type, message) "Me know they hoard some in their underground lair. My people raided dworcs often before humans came. So we know the moss is hidden in east of upper level of dworc lair ...", "You go there and take good moss from evil dworcs. Talk with me about mission when having moss.", }, npc, creature) - player:setStorageValue(Storage.TheApeCity.Started, 1) - player:setStorageValue(Storage.TheApeCity.Questline, 1) - player:setStorageValue(Storage.TheApeCity.DworcDoor, 1) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Started, 1) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Questline, 1) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.DworcDoor, 1) elseif MsgContains(message, "no") then npcHandler:say("Hairycles thought better of you.", npc, creature) addEvent(function() @@ -268,7 +268,7 @@ local function creatureSayCallback(npc, creature, type, message) end npcHandler:say("Ah yes! That's it. Thank you for bringing mighty whisper moss to Hairycles. It will help but still much is to be done. Just ask for other mission if you ready.", npc, creature) - player:setStorageValue(Storage.TheApeCity.Questline, 2) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Questline, 2) elseif MsgContains(message, "no") then npcHandler:say("Strange being you are! Our people need help!", npc, creature) end @@ -281,7 +281,7 @@ local function creatureSayCallback(npc, creature, type, message) end npcHandler:say("You so good! Brought syrup to me! Thank you, will prepare cure now. Just ask for {mission} if you want help again.", npc, creature) - player:setStorageValue(Storage.TheApeCity.Questline, 4) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Questline, 4) elseif MsgContains(message, "no") then npcHandler:say("Please hurry, urgent it is!", npc, creature) end @@ -304,8 +304,8 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 6 then if MsgContains(message, "yes") then npcHandler:say("Good thing that is! Report about your mission when have scroll.", npc, creature) - player:setStorageValue(Storage.TheApeCity.Questline, 5) - player:setStorageValue(Storage.TheApeCity.ChorDoor, 1) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Questline, 5) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.ChorDoor, 1) elseif MsgContains(message, "no") then npcHandler:say("Me sad. Me expected better from you!", npc, creature) addEvent(function() @@ -325,7 +325,7 @@ local function creatureSayCallback(npc, creature, type, message) end npcHandler:say("You brought scroll with lizard text? Good! I will see what text tells me! Come back when ready for other mission.", npc, creature) - player:setStorageValue(Storage.TheApeCity.Questline, 6) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Questline, 6) elseif MsgContains(message, "no") then npcHandler:say("That's bad news. If you lost it, only way to get other is to kill holy serpents. But you can't go there so you must ask adventurers who can.", npc, creature) end @@ -333,7 +333,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 8 then if MsgContains(message, "yes") then npcHandler:say("Good thing that is! Report about mission when you have read those signs.", npc, creature) - player:setStorageValue(Storage.TheApeCity.Questline, 7) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Questline, 7) elseif MsgContains(message, "no") then npcHandler:say("Me sad. Me expected better from you!", npc, creature) addEvent(function() @@ -344,7 +344,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 9 then if MsgContains(message, "yes") then npcHandler:say("Oh, so clear is all now! Easy it will be to read the signs now! Soon we will know what to do! Thank you again! Ask for mission if you feel ready.", npc, creature) - player:setStorageValue(Storage.TheApeCity.Questline, 8) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Questline, 8) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) elseif MsgContains(message, "no") then npcHandler:say("Me need to see it in your mind, other there is no way to proceed.", npc, creature) @@ -353,7 +353,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 10 then if MsgContains(message, "yes") then npcHandler:say("You brave hairless ape! Get me hydra egg. If you lose egg, you probably have to fight many, many hydras to get another.", npc, creature) - player:setStorageValue(Storage.TheApeCity.Questline, 9) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Questline, 9) elseif MsgContains(message, "no") then npcHandler:say("Me sad. Me expected better from you!", npc, creature) addEvent(function() @@ -369,7 +369,7 @@ local function creatureSayCallback(npc, creature, type, message) end npcHandler:say("Ah, the egg! Mighty warrior you be! Thank you. Hairycles will put it at safe place immediately.", npc, creature) - player:setStorageValue(Storage.TheApeCity.Questline, 10) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Questline, 10) elseif MsgContains(message, "no") then npcHandler:say("Please hurry. Hairycles not knows when evil lizards strike again.", npc, creature) end @@ -377,8 +377,8 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 12 then if MsgContains(message, "yes") then npcHandler:say("Long journey it will take, good luck to you.", npc, creature) - player:setStorageValue(Storage.TheApeCity.Questline, 11) - player:setStorageValue(Storage.TheApeCity.FibulaDoor, 1) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Questline, 11) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.FibulaDoor, 1) elseif MsgContains(message, "no") then npcHandler:say("Me sad. Me expected better from you!", npc, creature) addEvent(function() @@ -394,8 +394,8 @@ local function creatureSayCallback(npc, creature, type, message) end npcHandler:say("Incredible, you brought a witches' cap! Now me can prepare mighty charm of life. Yet still other {missions} will await you, friend.", npc, creature) - player:setStorageValue(Storage.TheApeCity.Questline, 12) - player:setStorageValue(Storage.TheApeCity.FibulaDoor, -1) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Questline, 12) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.FibulaDoor, -1) elseif MsgContains(message, "no") then npcHandler:say("Please try to find me a witches' cap on Fibula.", npc, creature) addEvent(function() @@ -406,8 +406,8 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 14 then if MsgContains(message, "yes") then npcHandler:say("Hairycles sure you will make it. Good luck, friend.", npc, creature) - player:setStorageValue(Storage.TheApeCity.Questline, 13) - player:setStorageValue(Storage.TheApeCity.CasksDoor, 1) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Questline, 13) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.CasksDoor, 1) elseif MsgContains(message, "no") then npcHandler:say("Me sad. Please reconsider.", npc, creature) end @@ -415,7 +415,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 15 then if MsgContains(message, "yes") then npcHandler:say("Hairycles proud of you. Go and find holy hair. Good luck, friend.", npc, creature) - player:setStorageValue(Storage.TheApeCity.Questline, 15) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Questline, 15) elseif MsgContains(message, "no") then npcHandler:say("Me sad. Please reconsider.", npc, creature) end @@ -424,12 +424,12 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "yes") then if not player:removeItem(4832, 1) then npcHandler:say("You no have hair. You lost it? Go and look again.", npc, creature) - player:setStorageValue(Storage.TheApeCity.HolyApeHair, -1) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.HolyApeHair, -1) return true end npcHandler:say("Incredible! You got a hair of holy Bong! This will raise the spirit of my people. You are truly a friend. But one last mission awaits you.", npc, creature) - player:setStorageValue(Storage.TheApeCity.Questline, 16) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Questline, 16) elseif MsgContains(message, "no") then npcHandler:say("You no have hair. You lost it? Go and look again.", npc, creature) end @@ -437,7 +437,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 17 then if MsgContains(message, "yes") then npcHandler:say("Hairycles sure you will make it. Just use hammer on all that looks like snake or lizard. Tell Hairycles if you succeed with mission.", npc, creature) - player:setStorageValue(Storage.TheApeCity.Questline, 17) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Questline, 17) player:addItem(4835, 1) elseif MsgContains(message, "no") then npcHandler:say("Me sad. Please reconsider.", npc, creature) @@ -448,7 +448,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Friend of the ape people! Take my gift and become me apprentice! Here is shaman clothing for you!", npc, creature) player:addOutfit(154) player:addOutfit(158) - player:setStorageValue(Storage.TheApeCity.ShamanOutfit, 1) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.ShamanOutfit, 1) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) elseif MsgContains(message, "no") then npcHandler:say("Come back if change mind.", npc, creature) @@ -490,7 +490,7 @@ keywordHandler:addKeyword({ "magic" }, StdModule.say, { npcHandler = npcHandler, keywordHandler:addKeyword({ "jungle" }, StdModule.say, { npcHandler = npcHandler, text = "Jungle is dangerous. Jungle also provides us food. Take care when in jungle and safe you be." }) local function onTradeRequest(npc, creature) - if Player(creature):getStorageValue(Storage.TheApeCity.Questline) < 18 then + if Player(creature):getStorageValue(Storage.Quest.U7_6.TheApeCity.Questline) < 18 then return false end diff --git a/data-otservbr-global/npc/hanna.lua b/data-otservbr-global/npc/hanna.lua index dfea1547135..cc66f83bc68 100644 --- a/data-otservbr-global/npc/hanna.lua +++ b/data-otservbr-global/npc/hanna.lua @@ -65,7 +65,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "addon") or MsgContains(message, "outfit") or MsgContains(message, "hat") then - local addonProgress = player:getStorageValue(Storage.OutfitQuest.Citizen.AddonHat) + local addonProgress = player:getStorageValue(Storage.Quest.U7_8.CitizenOutfits.AddonHat) if addonProgress < 1 then npcHandler:say("Pretty, isn't it? My friend Amber taught me how to make it, but I could help you with one if you like. What do you say?", npc, creature) npcHandler:setTopic(playerId, 1) @@ -80,9 +80,8 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then if MsgContains(message, "yes") then - player:setStorageValue(Storage.OutfitQuest.Ref, math.max(0, player:getStorageValue(Storage.OutfitQuest.Ref)) + 1) - player:setStorageValue(Storage.OutfitQuest.Citizen.AddonHat, 1) - player:setStorageValue(Storage.OutfitQuest.Citizen.MissionHat, 1) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfits.AddonHat, 1) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfits.MissionHat, 1) npcHandler:say("Okay, here we go, listen closely! I need a few things... a basic hat of course, maybe a legion helmet would do. Then about 100 chicken feathers... and 50 honeycombs as glue. That's it, come back to me once you gathered it!", npc, creature) else npcHandler:say("Aw, I guess you don't like feather hats. No big deal.", npc, creature) @@ -99,17 +98,13 @@ local function creatureSayCallback(npc, creature, type, message) else npcHandler:say("Great job! That must have taken a lot of work. Okay, you put it like this... then glue like this... here!", npc, creature) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:removeItem(3374, 1) player:removeItem(5902, 50) player:removeItem(5890, 100) - player:addOutfitAddon(136, 2) player:addOutfitAddon(128, 2) - - player:setStorageValue(Storage.OutfitQuest.Ref, math.min(0, player:getStorageValue(Storage.OutfitQuest.Ref) - 1)) - player:setStorageValue(Storage.OutfitQuest.Citizen.MissionHat, 0) - player:setStorageValue(Storage.OutfitQuest.Citizen.AddonHat, 2) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfits.MissionHat, 0) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfits.AddonHat, 2) end else npcHandler:say("Maybe another time.", npc, creature) diff --git a/data-otservbr-global/npc/haroun.lua b/data-otservbr-global/npc/haroun.lua index 33a4e1c2c72..aa7560af9dd 100644 --- a/data-otservbr-global/npc/haroun.lua +++ b/data-otservbr-global/npc/haroun.lua @@ -45,6 +45,37 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function endConversationWithDelay(npcHandler, npc, creature) + addEvent(function() + npcHandler:unGreet(npc, creature) + end, 1000) +end + +local function greetCallback(npc, creature, message) + local player = Player(creature) + local playerId = player:getId() + + if not MsgContains(message, "djanni'hah") then + npcHandler:say("Whoa! A human! This is no place for you, |PLAYERNAME|. Go and play somewhere else.", npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Start) == 1 then + npcHandler:say({ + "Hahahaha! ...", + "|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!", + }, npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + npcHandler:say("Be greeted, human |PLAYERNAME|. How can a humble djinn be of service?", npc, creature) + npcHandler:setInteraction(npc, creature) + + return true +end + local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -94,7 +125,7 @@ end local function onTradeRequest(npc, creature) local player = Player(creature) - if player:getStorageValue(Storage.DjinnWar.MaridFaction.Mission03) ~= 3 then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission03) ~= 3 then npcHandler:say("I'm sorry, human. But you need Gabel's permission to trade with me.", npc, creature) return false end @@ -102,13 +133,16 @@ local function onTradeRequest(npc, creature) return true end -npcHandler:setMessage(MESSAGE_GREET, "Be greeted, human |PLAYERNAME|. How can a humble djinn be of service?") +-- Greeting +keywordHandler:addCustomGreetKeyword({ "djanni'hah" }, greetCallback, { npcHandler = npcHandler }) + npcHandler:setMessage(MESSAGE_FAREWELL, "Farewell! May the serene light of the enlightened one rest shine on your travels.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Farewell, human.") npcHandler:setMessage(MESSAGE_SENDTRADE, "At your service, just browse through my wares.") npcHandler:setCallback(CALLBACK_ON_TRADE_REQUEST, onTradeRequest) npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) +npcHandler:setCallback(CALLBACK_GREET, greetCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) npcConfig.shop = { @@ -117,7 +151,7 @@ npcConfig.shop = { { itemName = "club ring", clientId = 3093, buy = 500, sell = 100 }, { itemName = "elven amulet", clientId = 3082, buy = 500, sell = 100, count = 50 }, { itemName = "garlic necklace", clientId = 3083, buy = 100, sell = 50 }, - { itemName = "life crystal", clientId = 4840, sell = 50 }, + { itemName = "life crystal", clientId = 3061, sell = 50 }, { itemName = "magic light wand", clientId = 3046, buy = 120, sell = 35 }, { itemName = "mind stone", clientId = 3062, sell = 100 }, { itemName = "orb", clientId = 3060, sell = 750 }, diff --git a/data-otservbr-global/npc/hugo.lua b/data-otservbr-global/npc/hugo.lua index ee7f81337bd..16f5f468897 100644 --- a/data-otservbr-global/npc/hugo.lua +++ b/data-otservbr-global/npc/hugo.lua @@ -134,28 +134,28 @@ local function creatureSayCallback(npc, creature, type, message) return true end - if player:getStorageValue(Storage.OutfitQuest.BeggarOutfit) < 1 then + if player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) < 1 then npcHandler:say({ "I think I'm having an innovative vision! I feel that people are getting tired of attempting to look wealthy and of displaying their treasures. ...", "A really new and innovative look would be - the 'poor man's look'! I can already see it in front of me... yes... a little ragged... but not too shabby! ...", "I need material right now! Argh - the vision starts to fade... please hurry, can you bring me some stuff?", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.OutfitQuest.BeggarOutfit) > 0 and player:getStorageValue(Storage.OutfitQuest.BeggarOutfit) < 5 then + elseif player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) > 0 and player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) < 5 then npcHandler:say("I am so excited! This poor man's look will be an outfit like the world has never seen before.", npc, creature) - elseif player:getStorageValue(Storage.OutfitQuest.BeggarOutfit) == 5 then - if player:getStorageValue(Storage.OutfitQuest.BeggarOutfitTimer) > os.time() then + elseif player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) == 5 then + if player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfitTimer) > os.time() then npcHandler:say("Sorry, but I am not done with the outfit yet. Venore wasn't built in a day.", npc, creature) - elseif player:getStorageValue(Storage.OutfitQuest.BeggarOutfitTimer) > 0 and player:getStorageValue(Storage.OutfitQuest.BeggarOutfitTimer) < os.time() then + elseif player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfitTimer) > 0 and player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfitTimer) < os.time() then npcHandler:say("Eureka! Alas, the poor man's outfit is finished, but... to be honest... it turned out much less appealing than I expected. However, you can have it if you want, okay?", npc, creature) npcHandler:setTopic(playerId, 5) end - elseif player:getStorageValue(Storage.OutfitQuest.BeggarOutfit) == 6 then + elseif player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) == 6 then npcHandler:say("I guess my vision wasn't that grand after all. I hope there are still people who enjoy it.", npc, creature) end elseif config[message:lower()] then local targetMessage = config[message:lower()] - if player:getStorageValue(Storage.OutfitQuest.BeggarOutfit) ~= targetMessage.value then + if player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) ~= targetMessage.value then npcHandler:say(targetMessage.messages.done, npc, creature) return true end @@ -175,7 +175,7 @@ local function creatureSayCallback(npc, creature, type, message) if player:getStorageValue(Storage.OutfitQuest.DefaultStart) ~= 1 then player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) end - player:setStorageValue(Storage.OutfitQuest.BeggarOutfit, 1) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, 1) npcHandler:say("Terrific! What are you waiting for?! Start right away gathering 20 pieces of brown cloth and come back once you have them!", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 4 then @@ -185,16 +185,16 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.OutfitQuest.BeggarOutfit, player:getStorageValue(Storage.OutfitQuest.BeggarOutfit) + 1) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) + 1) if targetMessage.lastItem then - player:setStorageValue(Storage.OutfitQuest.BeggarOutfitTimer, os.time() + 86400) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfitTimer, os.time() + 86400) end npcHandler:say(targetMessage.messages.success, npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 5 then player:addOutfit(153) player:addOutfit(157) - player:setStorageValue(Storage.OutfitQuest.BeggarOutfit, 6) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, 6) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) npcHandler:say("Here you go. Maybe you enjoy if after all.", npc, creature) npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/iptar-sin.lua b/data-otservbr-global/npc/iptar-sin.lua index 41fad376a4a..e206cac3f87 100644 --- a/data-otservbr-global/npc/iptar-sin.lua +++ b/data-otservbr-global/npc/iptar-sin.lua @@ -60,29 +60,29 @@ local stakeKeyword = keywordHandler:addKeyword({ "stake" }, StdModule.say, { "Is this stake really important enough to you so that you are willing to take this burden?", }, }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == -1 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == -1 end) stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Alright, I guess you need a stake first. Maybe Gamon can help you, the leg of a chair or something could just do. Try asking him for a stake, and if you have one, bring it back to me.", reset = true, ungreet = true }, nil, function(player) - player:setStorageValue(Storage.FriendsandTraders.DefaultStart, 1) - player:setStorageValue(Storage.FriendsandTraders.TheBlessedStake, 1) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, 1) end) -- First prayer keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "I guess you couldn't convince Gamon to give you a stake, eh?" }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 1 and player:getItemCount(5941) == 0 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 1 and player:getItemCount(5941) == 0 end) local stakeKeyword = keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "Yes, I was informed what to do. Are you prepared to receive my line of the prayer?" }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 1 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 1 end) stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "So receive my prayer: 'Light shall be near - and darkness afar'. Now, bring your stake to Tibra in the Carlin church for the next line of the prayer. I will inform her what to do.", reset = true }, nil, function(player) - player:setStorageValue(Storage.FriendsandTraders.TheBlessedStake, 2) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, 2) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) end) stakeKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "I will wait for you.", reset = true }) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You should visit Tibra in the Carlin church now." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 2 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 2 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You already received my line of the prayer." }) diff --git a/data-otservbr-global/npc/irmana.lua b/data-otservbr-global/npc/irmana.lua index e106ef0a10c..107155f6f27 100644 --- a/data-otservbr-global/npc/irmana.lua +++ b/data-otservbr-global/npc/irmana.lua @@ -46,10 +46,165 @@ npcType.onThink = function(npc, interval) npcHandler:onThink(npc, interval) end +local function creatureSayCallbackFemale(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if MsgContains(message, "addon") and player:getStorageValue(Storage.Quest.U7_8.NoblemanOutfits.NoblemanFirstAddon) < 1 then + npcHandler:say("Currently we are offering accessories for the nobleman - and, of course, noblewoman - outfit. Would you like to hear more about our offer?", npc, creature) + npcHandler:setTopic(playerId, 19) + elseif npcHandler:getTopic(playerId) == 19 and MsgContains(message, "yes") then + npcHandler:say("Especially for you, mylady, we are offering a pretty hat and a beautiful dress like the ones I wear. Which one are you interested in?", npc, creature) + npcHandler:setTopic(playerId, 20) + elseif npcHandler:getTopic(playerId) == 20 and MsgContains(message, "dress") then + npcHandler:say("Great! Since our accessories are hand-tailored designer pieces, of course they are not made for citizens with an empty wallet. Should I inform you about our payment policy?", npc, creature) + npcHandler:setTopic(playerId, 21) + elseif npcHandler:getTopic(playerId) == 21 and MsgContains(message, "yes") then + npcHandler:say({ + "The accessory requires a small fee of 150000 gold pieces. Of course, we do not want to put you at any risk to be attacked while carrying this huge amount of money. ...", + "This is why we have established our brand-new instalment sale. You can choose to either pay the price at once, or if you want to be safe, by instalments of 10000 gold pieces. ...", + "I also have to inform you that once you started paying for one of the accessories, you have to finish the payment first before you can start paying for the other one, of course. Are you interested in purchasing this accessory?", + }, npc, creature) + npcHandler:setTopic(playerId, 22) + elseif npcHandler:getTopic(playerId) == 22 and MsgContains(message, "yes") then + npcHandler:say("I'm very pleased to hear that! Which do you prefer - paying 150000 at once or 10000 for 15 times?", npc, creature) + npcHandler:setTopic(playerId, 23) + elseif npcHandler:getTopic(playerId) == 23 and MsgContains(message, "150000") then + player:setStorageValue(Storage.Quest.U7_8.NoblemanOutfits.NoblemanFirstAddon, 1) + npcHandler:say("Good, I have noted down your order. Once you have the money, please come back to pick up your accessory.", npc, creature) + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "addon") and player:getStorageValue(Storage.Quest.U7_8.NoblemanOutfits.NoblemanFirstAddon) == 1 then + npcHandler:say("Ah, are you here to pickup your accessory for 150000 gold pieces?", npc, creature) + npcHandler:setTopic(playerId, 24) + elseif npcHandler:getTopic(playerId) == 24 and MsgContains(message, "yes") then + if player:removeMoney(150000) then + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + player:addOutfitAddon(140, 1) + npcHandler:say("Congratulations! Here is your brand-new accessory, I hope you like it. Please visit us again!", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.NoblemanOutfits.NoblemanFirstAddon, 2) + else + npcHandler:say("You do not have enough money.", npc, creature) + end + elseif MsgContains(message, "addon") and player:getStorageValue(Storage.Quest.U7_8.NoblemanOutfits.NoblemanSecondAddon) < 1 then + npcHandler:say("Currently we are offering accessories for the nobleman - and, of course, noblewoman - outfit. Would you like to hear more about our offer?", npc, creature) + npcHandler:setTopic(playerId, 25) + elseif npcHandler:getTopic(playerId) == 25 and MsgContains(message, "yes") then + npcHandler:say("Especially for you, mylady, we are offering a pretty hat and a beautiful dress like the ones I wear. Which one are you interested in?", npc, creature) + npcHandler:setTopic(playerId, 26) + elseif npcHandler:getTopic(playerId) == 26 and MsgContains(message, "hat") then + npcHandler:say("Great! Since our accessories are hand-tailored designer pieces, of course they are not made for citizens with an empty wallet. Should I inform you about our payment policy?", npc, creature) + npcHandler:setTopic(playerId, 27) + elseif npcHandler:getTopic(playerId) == 27 and MsgContains(message, "yes") then + npcHandler:say({ + "This accessory requires a small fee of 150000 gold pieces. Of course, we do not want to put you at any risk to be attacked while carrying this huge amount of money. ...", + "This is why we have established our brand-new instalment sale. You can choose to either pay the price at once, or if you want to be safe, by instalments of 10000 gold pieces. ...", + "I also have to inform you that once you started paying for one of the accessories, you have to finish the payment first before you can start paying for the other one, of course. Are you interested in purchasing this accessory?", + }, npc, creature) + npcHandler:setTopic(playerId, 28) + elseif npcHandler:getTopic(playerId) == 28 and MsgContains(message, "yes") then + npcHandler:say("I'm very pleased to hear that! Which do you prefer - paying 150000 at once or 10000 for 15 times?", npc, creature) + npcHandler:setTopic(playerId, 29) + elseif npcHandler:getTopic(playerId) == 29 and MsgContains(message, "150000") then + player:setStorageValue(Storage.Quest.U7_8.NoblemanOutfits.NoblemanSecondAddon, 1) + npcHandler:say("Good, I have noted down your order. Once you have the money, please come back to pick up your accessory.", npc, creature) + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "addon") and player:getStorageValue(Storage.Quest.U7_8.NoblemanOutfits.NoblemanSecondAddon) == 1 then + npcHandler:say("Ah, are you here to pickup your accessory for 150000 gold pieces?", npc, creature) + npcHandler:setTopic(playerId, 30) + elseif npcHandler:getTopic(playerId) == 30 and MsgContains(message, "yes") then + if player:removeMoney(150000) then + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + player:addOutfitAddon(140, 2) + player:addAchievement(226) -- Achievement Aristocrat + npcHandler:say("Congratulations! Here is your brand-new accessory, I hope you like it. Please visit us again!", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.NoblemanOutfits.NoblemanSecondAddon, 2) + else + npcHandler:say("You do not have enough money.", npc, creature) + end + end + + return true +end + +local function creatureSayCallbackMale(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if MsgContains(message, "addon") and player:getStorageValue(Storage.Quest.U7_8.NoblemanOutfits.NoblemanFirstAddon) < 1 then + npcHandler:say("Currently we are offering accessories for the nobleman - and, of course, noblewoman - outfit. Would you like to hear more about our offer?", npc, creature) + npcHandler:setTopic(playerId, 9) + elseif npcHandler:getTopic(playerId) == 9 and MsgContains(message, "yes") then + npcHandler:say("Especially for you, mylord, we are offering a fashionable top hat and a fancy coat like the one Kalvin wears. Which one are you interested in?", npc, creature) + npcHandler:setTopic(playerId, 10) + elseif npcHandler:getTopic(playerId) == 10 and MsgContains(message, "coat") then + npcHandler:say("Great! Since our accessories are hand-tailored designer pieces, of course they are not made for citizens with an empty wallet. Should I inform you about our payment policy?", npc, creature) + npcHandler:setTopic(playerId, 11) + elseif npcHandler:getTopic(playerId) == 11 and MsgContains(message, "yes") then + npcHandler:say({ + "This accessory requires a small fee of 150000 gold pieces. Of course, we do not want to put you at any risk to be attacked while carrying this huge amount of money. ...", + "This is why we have established our brand-new instalment sale. You can choose to either pay the price at once, or if you want to be safe, by instalments of 10000 gold pieces. ...", + "I also have to inform you that once you started paying for one of the accessories, you have to finish the payment first before you can start paying for the other one, of course. Are you interested in purchasing this accessory?", + }, npc, creature) + npcHandler:setTopic(playerId, 12) + elseif npcHandler:getTopic(playerId) == 12 and MsgContains(message, "yes") then + npcHandler:say("I'm very pleased to hear that! Which do you prefer - paying 150000 at once or 10000 for 15 times?", npc, creature) + npcHandler:setTopic(playerId, 13) + elseif npcHandler:getTopic(playerId) == 13 and MsgContains(message, "150000") then + player:setStorageValue(Storage.Quest.U7_8.NoblemanOutfits.NoblemanFirstAddon, 1) + npcHandler:say("Good, I have noted down your order. Once you have the money, please come back to pick up your accessory.", npc, creature) + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "addon") and player:getStorageValue(Storage.Quest.U7_8.NoblemanOutfits.NoblemanFirstAddon) == 1 then + if player:removeMoney(150000) then + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + player:addOutfitAddon(132, 1) + npcHandler:say("Ah, are you here to pickup your accessory for 150000 gold pieces? Here is your nobleman coat. Enjoy!", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.NoblemanOutfits.NoblemanFirstAddon, 2) + else + npcHandler:say("You do not have enough money.", npc, creature) + end + elseif MsgContains(message, "addon") and player:getStorageValue(Storage.Quest.U7_8.NoblemanOutfits.NoblemanSecondAddon) < 1 then + npcHandler:say("Currently we are offering accessories for the nobleman - and, of course, noblewoman - outfit. Would you like to hear more about our offer?", npc, creature) + npcHandler:setTopic(playerId, 14) + elseif npcHandler:getTopic(playerId) == 14 and MsgContains(message, "yes") then + npcHandler:say("Especially for you, mylord, we are offering a fashionable top hat and a fancy coat like the one Kalvin wears. Which one are you interested in?", npc, creature) + npcHandler:setTopic(playerId, 15) + elseif npcHandler:getTopic(playerId) == 15 and MsgContains(message, "yes") then + npcHandler:say("Great! Since our accessories are hand-tailored designer pieces, of course they are not made for citizens with an empty wallet. Should I inform you about our payment policy?", npc, creature) + npcHandler:setTopic(playerId, 16) + elseif npcHandler:getTopic(playerId) == 16 and MsgContains(message, "yes") then + npcHandler:say({ + "This accessory requires a small fee of 150000 gold pieces. Of course, we do not want to put you at any risk to be attacked while carrying this huge amount of money. ...", + "This is why we have established our brand-new instalment sale. You can choose to either pay the price at once, or if you want to be safe, by instalments of 10000 gold pieces. ...", + "I also have to inform you that once you started paying for one of the accessories, you have to finish the payment first before you can start paying for the other one, of course. Are you interested in purchasing this accessory?", + }, npc, creature) + npcHandler:setTopic(playerId, 17) + elseif npcHandler:getTopic(playerId) == 17 and MsgContains(message, "yes") then + npcHandler:say("I'm very pleased to hear that! Which do you prefer - paying 150000 at once or 10000 for 15 times?", npc, creature) + npcHandler:setTopic(playerId, 18) + elseif npcHandler:getTopic(playerId) == 18 and MsgContains(message, "150000") then + player:setStorageValue(Storage.Quest.U7_8.NoblemanOutfits.NoblemanSecondAddon, 1) + npcHandler:say("Good, I have noted down your order. Once you have the money, please come back to pick up your accessory.", npc, creature) + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "addon") and player:getStorageValue(Storage.Quest.U7_8.NoblemanOutfits.NoblemanSecondAddon) == 1 then + if player:removeMoney(150000) then + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + player:addOutfitAddon(132, 2) + player:addAchievement(226) -- Achievement Aristocrat + npcHandler:say("Ah, are you here to pickup your accessory for 150000 gold pieces? Here is your nobleman hat. Enjoy!", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.NoblemanOutfits.NoblemanSecondAddon, 2) + else + npcHandler:say("You do not have enough money.", npc, creature) + end + end + + return true +end + local ThreatenedDreams = Storage.Quest.U11_40.ThreatenedDreams local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() + local playerSex = player:getSex() if MsgContains(message, "fur") then if player:getStorageValue(ThreatenedDreams.Mission01[1]) == 7 and player:getStorageValue(ThreatenedDreams.Mission01.PoacherNotes) == 1 then @@ -63,96 +218,43 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("You are not on that mission.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif MsgContains(message, "addon") then - if getPlayerStorageValue(creature, Storage.Irmana1) < 1 then - npcHandler:say("Currently we are offering accessories for the nobleman - and, of course, noblewoman - outfit. Would you like to hear more about our offer?", npc, creature) - npcHandler:setTopic(playerId, 1) - elseif getPlayerStorageValue(creature, Storage.Irmana2) < 1 then - npcHandler:say("Currently we are offering accessories for the nobleman - and, of course, noblewoman - outfit. Would you like to hear more about our offer?", npc, creature) - npcHandler:setTopic(playerId, 1) + elseif npcHandler:getTopic(playerId) == 5 then + if player:getItemCount(3566) >= 1 then + player:removeItem(3566, 1) + npcHandler:say("A {Red Robe}! Great. Here, take this red piece of cloth, I don't need it anyway.", npc, creature) + player:addItem(5911, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Are you trying to mess with me?!", npc, creature) + end + elseif npcHandler:getTopic(playerId) == 6 then + if player:getItemCount(3574) >= 1 then + player:removeItem(3574, 1) + npcHandler:say("A {Mystic Turban}! Great. Here, take this blue piece of cloth, I don't need it anyway.", npc, creature) + player:addItem(5912, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Are you trying to mess with me?!", npc, creature) + end + elseif npcHandler:getTopic(playerId) == 7 then + if player:getItemCount(3563) >= 150 then + player:removeItem(3563, 150) + npcHandler:say("A 150 {Green Tunic}! Great. Here, take this green piece of cloth, I don't need it anyway.", npc, creature) + player:addItem(5910, 1) + npcHandler:setTopic(playerId, 0) else - npcHandler:say("You have already bought the two addons.", npc, creature) + npcHandler:say("Are you trying to mess with me?!", npc, creature) end - elseif MsgContains(message, "yes") then - if npcHandler:getTopic(playerId) == 1 then - npcHandler:say("Especially for you, mylady, we are offering a pretty {hat} and a beautiful {dress} like the ones I wear. Which one are you interested in?", npc, creature) - npcHandler:setTopic(playerId, 2) - elseif npcHandler:getTopic(playerId) == 3 then - if doPlayerRemoveMoney(creature, 150000) and getPlayerStorageValue(creature, Storage.Irmana1) < 1 then - npcHandler:say("Congratulations! Here is your brand-new accessory, I hope you like it. Please visit us again! ", npc, creature) - npcHandler:setTopic(playerId, 0) - player:addOutfitAddon(140, 2) - player:addOutfitAddon(132, 2) - setPlayerStorageValue(creature, Storage.Irmana1, 1) - if player:getStorageValue(Storage.Irmana1) == 1 and player:getStorageValue(Storage.Irmana2) == 1 then - player:addAchievement(226) -- Achievement Aristocrat - end - end - elseif npcHandler:getTopic(playerId) == 4 then - if doPlayerRemoveMoney(creature, 150000) and getPlayerStorageValue(creature, Storage.Irmana2) < 1 then - npcHandler:say("Congratulations! Here is your brand-new accessory, I hope you like it. Please visit us again! ", npc, creature) - npcHandler:setTopic(playerId, 0) - player:addOutfitAddon(140, 1) - player:addOutfitAddon(132, 1) - setPlayerStorageValue(creature, Storage.Irmana2, 1) - if player:getStorageValue(Storage.Irmana1) == 1 and player:getStorageValue(Storage.Irmana2) == 1 then - player:addAchievement(226) -- Achievement Aristocrat - end - end - elseif npcHandler:getTopic(playerId) == 5 then - if getPlayerItemCount(creature, 3566) >= 1 then - doPlayerRemoveItem(creature, 3566, 1) - npcHandler:say("A {Red Robe}! Great. Here, take this red piece of cloth, I don't need it anyway.", npc, creature) - doPlayerAddItem(creature, 5911, 1) - npcHandler:setTopic(playerId, 0) - else - npcHandler:say("Are you trying to mess with me?!", npc, creature) - end - elseif npcHandler:getTopic(playerId) == 6 then - if getPlayerItemCount(creature, 3574) >= 1 then - doPlayerRemoveItem(creature, 3574, 1) - npcHandler:say("A {Mystic Turban}! Great. Here, take this blue piece of cloth, I don't need it anyway.", npc, creature) - doPlayerAddItem(creature, 5912, 1) - npcHandler:setTopic(playerId, 0) - else - npcHandler:say("Are you trying to mess with me?!", npc, creature) - end - elseif npcHandler:getTopic(playerId) == 7 then - if getPlayerItemCount(creature, 3563) >= 150 then - doPlayerRemoveItem(creature, 3563, 150) - npcHandler:say("A 150 {Green Tunic}! Great. Here, take this green piece of cloth, I don't need it anyway.", npc, creature) - doPlayerAddItem(creature, 5910, 1) - npcHandler:setTopic(playerId, 0) - else - npcHandler:say("Are you trying to mess with me?!", npc, creature) - end - elseif npcHandler:getTopic(playerId) == 8 then - if player:getMoney() >= 1000 then - player:removeMoney(1000) - player:addItem(25238, 1) -- Fur of a Wolf Whelp - npcHandler:say("Alright. Here is the fur.", npc, creature) - player:setStorageValue(ThreatenedDreams.Mission01[1], 8) - npcHandler:setTopic(playerId, 0) - else - npcHandler:say("Are you trying to mess with me?!", npc, creature) - end + elseif npcHandler:getTopic(playerId) == 8 then + if player:getMoney() >= 1000 then + player:removeMoney(1000) + player:addItem(25238, 1) -- Fur of a Wolf Whelp + npcHandler:say("Alright. Here is the fur.", npc, creature) + player:setStorageValue(ThreatenedDreams.Mission01[1], 8) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Are you trying to mess with me?!", npc, creature) end - elseif (MsgContains(message, "hat") or MsgContains(message, "accessory")) and (npcHandler:getTopic(playerId) == 2 and getPlayerStorageValue(creature, Storage.Irmana1) < 1) then - npcHandler:say({ - "This accessory requires a small fee of 150000 gold pieces. Of course, we do not want to put you at any risk to be attacked while carrying this huge amount of money. ...", - "This is why we have established our brand-new instalment sale. You can choose to either pay the price at once, or if you want to be safe, by instalments of 10000 gold pieces. ...", - "I also have to inform you that once you started paying for one of the accessories, you have to finish the payment first before you can start paying for the other one, of course. ...", - "Are you interested in purchasing this accessory?", - }, npc, creature) - npcHandler:setTopic(playerId, 3) - elseif (MsgContains(message, "dress") or MsgContains(message, "coat")) and (npcHandler:getTopic(playerId) == 2 and getPlayerStorageValue(creature, Storage.Irmana2) < 1) then - npcHandler:say({ - "This accessory requires a small fee of 150000 gold pieces. Of course, we do not want to put you at any risk to be attacked while carrying this huge amount of money. ...", - "This is why we have established our brand-new instalment sale. You can choose to either pay the price at once, or if you want to be safe, by instalments of 10000 gold pieces. ...", - "I also have to inform you that once you started paying for one of the accessories, you have to finish the payment first before you can start paying for the other one, of course. ...", - "Are you interested in purchasing this accessory?", - }, npc, creature) - npcHandler:setTopic(playerId, 4) elseif MsgContains(message, "red robe") then npcHandler:say("Have you found a {Red Robe} for me?", npc, creature) npcHandler:setTopic(playerId, 5) @@ -162,10 +264,15 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "green tunic") then npcHandler:say("Have you found {150 Green Tunic} for me?", npc, creature) npcHandler:setTopic(playerId, 7) + elseif playerSex == PLAYERSEX_MALE then + return creatureSayCallbackMale(npc, creature, type, message) + else + return creatureSayCallbackFemale(npc, creature, type, message) end return true end +npcHandler:setMessage(MESSAGE_GREET, "Welcome to the house of fashion, |PLAYERNAME|!") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/ishina.lua b/data-otservbr-global/npc/ishina.lua index 358ee2619a3..b69933c2ba3 100644 --- a/data-otservbr-global/npc/ishina.lua +++ b/data-otservbr-global/npc/ishina.lua @@ -58,23 +58,13 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "outfit") then - if player:getSex() == PLAYERSEX_MALE then - npcHandler:say("My jewelled belt? That's not very manly. Maybe you'd prefer a scimitar like Habdel has.", npc, creature) - return true - end - - if player:getStorageValue(Storage.OutfitQuest.firstOrientalAddon) < 1 then + if player:getSex() == PLAYERSEX_FEMALE and MsgContains(message, "outfit") and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder) >= 34 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) >= 44 then + if player:getStorageValue(Storage.Quest.U7_8.OrientalOutfits.FirstOrientalAddon) < 1 then npcHandler:say("My jewelled belt? Of course I could make one for you, but I have a small request. Would you fulfil a task for me?", npc, creature) npcHandler:setTopic(playerId, 1) end - elseif MsgContains(message, "comb") then - if player:getSex() == PLAYERSEX_MALE then - npcHandler:say("Comb? This is a jewellery shop.", npc, creature) - return true - end - - if player:getStorageValue(Storage.OutfitQuest.firstOrientalAddon) == 1 then + elseif player:getSex() == PLAYERSEX_FEMALE and MsgContains(message, "comb") then + if player:getStorageValue(Storage.Quest.U7_8.OrientalOutfits.FirstOrientalAddon) == 1 then npcHandler:say("Have you brought me a mermaid's comb?", npc, creature) npcHandler:setTopic(playerId, 3) end @@ -86,8 +76,11 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then - player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) - player:setStorageValue(Storage.OutfitQuest.firstOrientalAddon, 1) + if player:getStorageValue(Storage.OutfitQuest.DefaultStart) ~= 1 then + player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) + end + player:setStorageValue(Storage.Quest.U7_8.OrientalOutfits.FirstOrientalAddon, 1) + player:setStorageValue(Storage.Quest.U7_8.OrientalOutfits.OrientalDoor, 1) npcHandler:say("Yay! I will wait for you to return with a mermaid's comb then.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then @@ -97,9 +90,8 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.OutfitQuest.firstOrientalAddon, 2) - player:addOutfitAddon(150, 1) - player:addOutfitAddon(146, 1) + player:setStorageValue(Storage.Quest.U7_8.OrientalOutfits.FirstOrientalAddon, 2) + player:addOutfitAddon(150, 1) -- female addon player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) npcHandler:say("Yeah! That's it! I can't wait to comb my hair! Oh - but first, I'll fulfil my promise: Here is your jewelled belt! Thanks again!", npc, creature) npcHandler:setTopic(playerId, 0) @@ -187,7 +179,7 @@ npcConfig.shop = { { itemName = "unicorn figurine", clientId = 30054, sell = 50000 }, { itemName = "violet crystal shard", clientId = 16120, sell = 1500 }, { itemName = "wedding ring", clientId = 3004, buy = 990 }, - { itemName = "white pearl", clientId = 3026, buy = 320 }, + { itemName = "white pearl", clientId = 3026, buy = 320, sell = 160 }, { itemName = "white silk flower", clientId = 34008, sell = 9000 }, } diff --git a/data-otservbr-global/npc/isimov.lua b/data-otservbr-global/npc/isimov.lua index ef229591e53..7e7d57061c7 100644 --- a/data-otservbr-global/npc/isimov.lua +++ b/data-otservbr-global/npc/isimov.lua @@ -89,23 +89,23 @@ stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, t -- Wooden Stake keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "I think you have forgotten to bring your stake, kid." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 5 and player:getItemCount(5941) == 0 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 5 and player:getItemCount(5941) == 0 end) local stakeKeyword = keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "Yes, I was informed what to do. Are you prepared to receive my line of the prayer?" }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 5 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 5 end) stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "So receive my prayer: 'Unclean spirits shall be repelled'. Now, bring your stake to Amanda in Edron for the next line of the prayer. I will inform her what to do.", reset = true }, nil, function(player) - player:setStorageValue(Storage.FriendsandTraders.TheBlessedStake, 6) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, 6) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) end) stakeKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "I will wait for you.", reset = true }) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You should visit Amanda in Edron now, kid." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 6 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 6 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You already received my line of the prayer." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) > 6 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) > 6 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "A blessed stake? That's a strange request. Maybe Quentin knows more, he is one of the oldest monks after all." }) diff --git a/data-otservbr-global/npc/iwan.lua b/data-otservbr-global/npc/iwan.lua index 77689b12003..45763807bdd 100644 --- a/data-otservbr-global/npc/iwan.lua +++ b/data-otservbr-global/npc/iwan.lua @@ -126,7 +126,7 @@ npcConfig.shop = { { itemName = "unicorn figurine", clientId = 30054, sell = 50000 }, { itemName = "violet crystal shard", clientId = 16120, sell = 1500 }, { itemName = "wedding ring", clientId = 3004, buy = 990 }, - { itemName = "white pearl", clientId = 3026, buy = 320 }, + { itemName = "white pearl", clientId = 3026, buy = 320, sell = 160 }, { itemName = "white silk flower", clientId = 34008, sell = 9000 }, } diff --git a/data-otservbr-global/npc/jack_fate.lua b/data-otservbr-global/npc/jack_fate.lua index aba111bbeea..5a98b0eb288 100644 --- a/data-otservbr-global/npc/jack_fate.lua +++ b/data-otservbr-global/npc/jack_fate.lua @@ -64,7 +64,7 @@ local function addTravelKeyword(keyword, cost, destination, text, condition) if keyword == "goroma" then keywordHandler:addKeyword({ keyword }, StdModule.say, { npcHandler = npcHandler, text = "Never heard about a place like this." }, function(player) - return player:getStorageValue(Storage.TheShatteredIsles.AccessToGoroma) ~= 1 + return player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.AccessToGoroma) ~= 1 end) end diff --git a/data-otservbr-global/npc/jack_fate_goroma.lua b/data-otservbr-global/npc/jack_fate_goroma.lua index 5a98b1651e9..44c7931c76a 100644 --- a/data-otservbr-global/npc/jack_fate_goroma.lua +++ b/data-otservbr-global/npc/jack_fate_goroma.lua @@ -63,11 +63,11 @@ local function creatureSayCallback(npc, creature, type, message) end if table.contains({ "sail", "passage", "wreck", "liberty bay", "ship" }, message) then - if player:getStorageValue(Storage.TheShatteredIsles.AccessToGoroma) ~= 1 then - if player:getStorageValue(Storage.TheShatteredIsles.Shipwrecked) < 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.AccessToGoroma) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.Shipwrecked) < 1 then npcHandler:say("I'd love to bring you back to Liberty Bay, but as you can see, my ship is ruined. I also hurt my leg and can barely move. Can you help me?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.TheShatteredIsles.Shipwrecked) == 1 then + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.Shipwrecked) == 1 then npcHandler:say("Have you brought 30 pieces of wood so that I can repair the ship?", npc, creature) npcHandler:setTopic(playerId, 3) end @@ -85,14 +85,14 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Good! Please return once you have gathered 30 pieces of wood.", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.DefaultStart, 1) - player:setStorageValue(Storage.TheShatteredIsles.Shipwrecked, 1) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.Shipwrecked, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then if player:removeItem(5901, 30) then npcHandler:say("Excellent! Now we can leave this godforsaken place. Thank you for your help. Should you ever want to return to this island, ask me for a passage to Goroma.", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.Shipwrecked, 2) - player:setStorageValue(Storage.TheShatteredIsles.AccessToGoroma, 1) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.Shipwrecked, 2) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.AccessToGoroma, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have enough...", npc, creature) diff --git a/data-otservbr-global/npc/jessica.lua b/data-otservbr-global/npc/jessica.lua index 43b1839b3ee..42798987ee0 100644 --- a/data-otservbr-global/npc/jessica.lua +++ b/data-otservbr-global/npc/jessica.lua @@ -151,7 +151,7 @@ npcConfig.shop = { { itemName = "violet crystal shard", clientId = 16120, sell = 1500 }, { itemName = "watermelon tourmaline", clientId = 33780, sell = 230000 }, { itemName = "wedding ring", clientId = 3004, buy = 990 }, - { itemName = "white pearl", clientId = 3026, buy = 320 }, + { itemName = "white pearl", clientId = 3026, buy = 320, sell = 160 }, { itemName = "white silk flower", clientId = 34008, sell = 9000 }, } diff --git a/data-otservbr-global/npc/karl.lua b/data-otservbr-global/npc/karl.lua index 92d6ca95128..fc8e3945afd 100644 --- a/data-otservbr-global/npc/karl.lua +++ b/data-otservbr-global/npc/karl.lua @@ -64,7 +64,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "whisper beer") then - if player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 11 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 4 then npcHandler:say("Do you want to buy a bottle of our finest whisper beer for 80 gold?", npc, creature) npcHandler:setTopic(playerId, 2) end @@ -78,10 +78,10 @@ local function creatureSayCallback(npc, creature, type, message) end npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then - if player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 11 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 4 then if player:removeMoneyBank(80) then npcHandler:say("Here. Don't take it into the city though.", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 12) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 5) player:addItem(6106, 1) npcHandler:setTopic(playerId, 0) else diff --git a/data-otservbr-global/npc/kasmir.lua b/data-otservbr-global/npc/kasmir.lua index 6468a40c094..b08d52c09a9 100644 --- a/data-otservbr-global/npc/kasmir.lua +++ b/data-otservbr-global/npc/kasmir.lua @@ -90,23 +90,23 @@ stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, t -- Wooden Stake keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "I think you have forgotten to bring your stake, pilgrim." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 7 and player:getItemCount(5941) == 0 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 7 and player:getItemCount(5941) == 0 end) local stakeKeyword = keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "Yes, I was informed what to do. Are you prepared to receive my line of the prayer?" }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 7 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 7 end) stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "So receive my prayer: 'Let there be honour and humility'. Now, bring your stake to Rahkem in Ankrahmun for the next line of the prayer. I will inform him what to do.", reset = true }, nil, function(player) - player:setStorageValue(Storage.FriendsandTraders.TheBlessedStake, 8) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, 8) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) end) stakeKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "I will wait for you.", reset = true }) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You should visit Rahkem in Ankrahmun now, pilgrim." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 8 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 8 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You already received my line of the prayer." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) > 8 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) > 8 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "A blessed stake? That is a strange request. Maybe Quentin knows more, he is one of the oldest monks after all." }) diff --git a/data-otservbr-global/npc/kazzan.lua b/data-otservbr-global/npc/kazzan.lua index f137e73f43e..b20352dd1d7 100644 --- a/data-otservbr-global/npc/kazzan.lua +++ b/data-otservbr-global/npc/kazzan.lua @@ -65,7 +65,7 @@ local function creatureSayCallback(npc, creature, type, message) -- Pegando a quest if MsgContains(message, "mission") and player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) < 1 then - if player:getStorageValue(Storage.DjinnWar.Faction.MaridDoor) < 1 and player:getStorageValue(Storage.DjinnWar.Faction.EfreetDoor) < 1 then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.MaridDoor) < 1 and player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.EfreetDoor) < 1 then npcHandler:say({ "Do you know the location of the djinn fortresses in the mountains south of here?", }, npc, creature) diff --git a/data-otservbr-global/npc/kevin.lua b/data-otservbr-global/npc/kevin.lua index c8108e547aa..41686524673 100644 --- a/data-otservbr-global/npc/kevin.lua +++ b/data-otservbr-global/npc/kevin.lua @@ -88,7 +88,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif player:getStorageValue(Storage.Postman.Mission05) == 3 then npcHandler:say("Splendid, I knew we could trust you. I would like to ask for your help in another matter. Are you interested?", npc, creature) npcHandler:setTopic(playerId, 16) - elseif player:getStorageValue(Storage.Postman.Mission07) == 7 then + elseif player:getStorageValue(Storage.Postman.Mission07) == 8 then npcHandler:say("Once more you have impressed me! Are you willing to do another job?", npc, creature) npcHandler:setTopic(playerId, 21) elseif player:getStorageValue(Storage.Postman.Mission06) >= 1 and player:getStorageValue(Storage.Postman.Mission06) < 10 then @@ -127,10 +127,10 @@ local function creatureSayCallback(npc, creature, type, message) elseif player:getStorageValue(Storage.Postman.Rank) == 4 or player:getStorageValue(Storage.Postman.Rank) == 3 and player:getStorageValue(Storage.Postman.Mission09) == 0 then npcHandler:say("So are you ready for another mission?", npc, creature) npcHandler:setTopic(playerId, 25) - elseif player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 3 then + elseif player:getStorageValue(Storage.Postman.Mission07) < 1 and player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 3 then npcHandler:say("Excellent! Another job well done! Would you accept another mission?", npc, creature) npcHandler:setTopic(playerId, 19) - elseif player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 2 then + elseif player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 2 then npcHandler:say("Excellent! Another job well done! Would you accept another mission?", npc, creature) npcHandler:setTopic(playerId, 28) elseif player:getStorageValue(Storage.Postman.Mission04) == 2 and player:getStorageValue(Storage.Postman.Rank) == 2 then @@ -263,7 +263,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 22) elseif npcHandler:getTopic(playerId) == 22 then npcHandler:say("Find out about his whereabouts and retrieve him or at least his posthorn. He was looking for a new underground passage that is rumoured to be found underneath the troll-infested Mountain east of Thais.", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, 8) + player:setStorageValue(Storage.Postman.Mission07, 9) player:setStorageValue(Storage.Postman.Mission08, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 23 then diff --git a/data-otservbr-global/npc/klaus.lua b/data-otservbr-global/npc/klaus.lua index 5c5dc19e0a8..dbdba8833af 100644 --- a/data-otservbr-global/npc/klaus.lua +++ b/data-otservbr-global/npc/klaus.lua @@ -58,23 +58,19 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.TheShatteredIsles.RaysMission4) == 1 then - npcHandler:say( - "Hmm, you look like a seasoned seadog. Kill Captain Ray Striker, \ - bring me his lucky pillow as a proof and you are our hero!", - creature - ) - player:setStorageValue(Storage.TheShatteredIsles.RaysMission4, 2) - elseif player:getStorageValue(Storage.TheShatteredIsles.RaysMission4) == 3 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission4) == 1 then + npcHandler:say("Hmm, you look like a seasoned seadog. Kill Captain Ray Striker, bring me his lucky pillow as a proof and you are our hero!", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission4, 2) + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission4) == 3 then npcHandler:say("Do you have Striker's pillow?", npc, creature) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "yes") then - if player:getStorageValue(Storage.TheShatteredIsles.RaysMission4) == 3 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission4) == 3 then if npcHandler:getTopic(playerId) == 1 then if player:removeItem(6105, 1) then npcHandler:say("You DID it!!! Incredible! Boys, lets have a PAAAAAARTY!!!!", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.RaysMission4, 4) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission4, 4) npcHandler:setTopic(playerId, 0) else npcHandler:say("Come back when you have his lucky pillow.", npc, creature) @@ -86,6 +82,9 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Ho matey.") +npcHandler:setMessage(MESSAGE_FAREWELL, "Whenever your throat is dry, you know where to find my tavern.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/kroox.lua b/data-otservbr-global/npc/kroox.lua index 020153a27bf..c8adea58c72 100644 --- a/data-otservbr-global/npc/kroox.lua +++ b/data-otservbr-global/npc/kroox.lua @@ -58,16 +58,16 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "sam sent me") or MsgContains(message, "sam send me") then - if player:getStorageValue(Storage.SamsOldBackpack) == 1 then + if player:getStorageValue(Storage.Quest.U7_5.SamsOldBackpack.SamsOldBackpackNpc) == 1 then npcHandler:say({ "Oh, so its you, he wrote me about? Sadly I have no dwarven armor in stock. But I give you the permission to retrive one from the mines. ...", "The problem is, some giant spiders made the tunnels where the storage is their new home. Good luck.", }, npc, creature) - player:setStorageValue(Storage.SamsOldBackpack, 2) - player:setStorageValue(Storage.SamsOldBackpackDoor, 1) + player:setStorageValue(Storage.Quest.U7_5.SamsOldBackpack.SamsOldBackpackNpc, 2) + player:setStorageValue(Storage.Quest.U7_5.SamsOldBackpack.SamsOldBackpackDoor, 1) end - elseif MsgContains(message, "measurements") then - if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsKroox) ~= 1 then + elseif message == "lokurs measurements" then + if player:getStorageValue(Storage.Postman.Mission07) >= 7 and player:getStorageValue(Storage.Postman.MeasurementsKroox) ~= 1 then npcHandler:say("Hm, well I guess its ok to tell you ... ", npc, creature) player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) player:setStorageValue(Storage.Postman.MeasurementsKroox, 1) @@ -79,6 +79,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Welcome to Kroox Quality Armor, |PLAYERNAME|! Wanna take a look, ask me for a trade.") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/legola.lua b/data-otservbr-global/npc/legola.lua index ca2eafc3ac1..6aecaad5daf 100644 --- a/data-otservbr-global/npc/legola.lua +++ b/data-otservbr-global/npc/legola.lua @@ -88,7 +88,7 @@ addGloveKeyword({ "Maybe another time.", "Alright! Here is your money, thank you very much.", }, function(player) - return player:getStorageValue(Storage.OutfitQuest.Hunter.AddonGlove) == 1 + return player:getStorageValue(Storage.Quest.U7_8.HunterOutfits.Hunter.AddonGlove) == 1 end, function(player) player:removeItem(5875, 1) player:addMoney(2000) @@ -100,10 +100,10 @@ addGloveKeyword({ "No problem, maybe another time.", "Great! I hereby grant you the right to wear the sniper gloves as an accessory. Congratulations!", }, function(player) - return player:getStorageValue(Storage.OutfitQuest.Hunter.AddonGlove) == -1 + return player:getStorageValue(Storage.Quest.U7_8.HunterOutfits.Hunter.AddonGlove) == -1 end, function(player) player:removeItem(5875, 1) - player:setStorageValue(Storage.OutfitQuest.Hunter.AddonGlove, 1) + player:setStorageValue(Storage.Quest.U7_8.HunterOutfits.Hunter.AddonGlove, 1) player:addOutfitAddon(129, 2) player:addOutfitAddon(137, 1) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) diff --git a/data-otservbr-global/npc/lokur.lua b/data-otservbr-global/npc/lokur.lua index 62fb5a50864..59fc7ed0f7c 100644 --- a/data-otservbr-global/npc/lokur.lua +++ b/data-otservbr-global/npc/lokur.lua @@ -94,6 +94,14 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "no") and npcHandler:getTopic(playerId) > 0 then npcHandler:say("No then.", npc, creature) npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "measurements") then + if player:getStorageValue(Storage.Postman.Mission07) >= 6 and player:getStorageValue(Storage.Postman.MeasurementsKroox) ~= 1 then + npcHandler:say("Come on, I have no clue what they are. Better ask my armorer Kroox for such nonsense.Go and ask him for good ol' Lokurs measurements, he'll know.", npc, creature) + player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) + else + npcHandler:say("...", npc, creature) + npcHandler:setTopic(playerId, 0) + end end return true diff --git a/data-otservbr-global/npc/lubo.lua b/data-otservbr-global/npc/lubo.lua index 97aea1169da..2c1d7ab661b 100644 --- a/data-otservbr-global/npc/lubo.lua +++ b/data-otservbr-global/npc/lubo.lua @@ -65,7 +65,7 @@ local function creatureSayCallback(npc, creature, type, message) end -- Citizen outfit addon - local addonProgress = player:getStorageValue(Storage.OutfitQuest.Citizen.AddonBackpack) + local addonProgress = player:getStorageValue(Storage.Quest.U7_8.CitizenOutfits.AddonBackpack) if MsgContains(message, "addon") or MsgContains(message, "outfit") or (addonProgress == 1 and MsgContains(message, "leather")) or ((addonProgress == 1 or addonProgress == 2) and MsgContains(message, "backpack")) then if addonProgress < 1 then npcHandler:say("Sorry, the backpack I wear is not for sale. It's handmade from rare minotaur leather.", npc, creature) @@ -74,13 +74,11 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Ah, right, almost forgot about the backpack! Have you brought me 100 pieces of minotaur leather as requested?", npc, creature) npcHandler:setTopic(playerId, 3) elseif addonProgress == 2 then - if player:getStorageValue(Storage.OutfitQuest.Citizen.AddonBackpackTimer) < os.time() then + if player:getStorageValue(Storage.Quest.U7_8.CitizenOutfits.AddonBackpackTimer) < os.time() then npcHandler:say("Just in time! Your backpack is finished. Here you go, I hope you like it.", npc, creature) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:setStorageValue(Storage.OutfitQuest.Ref, math.min(0, player:getStorageValue(Storage.OutfitQuest.Ref) - 1)) - player:setStorageValue(Storage.OutfitQuest.Citizen.MissionBackpack, 0) - player:setStorageValue(Storage.OutfitQuest.Citizen.AddonBackpack, 3) - + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfits.MissionBackpack, 0) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfits.AddonBackpack, 3) player:addOutfitAddon(136, 1) player:addOutfitAddon(128, 1) else @@ -98,9 +96,8 @@ local function creatureSayCallback(npc, creature, type, message) end elseif npcHandler:getTopic(playerId) == 2 then if MsgContains(message, "yes") then - player:setStorageValue(Storage.OutfitQuest.Ref, math.max(0, player:getStorageValue(Storage.OutfitQuest.Ref)) + 1) - player:setStorageValue(Storage.OutfitQuest.Citizen.AddonBackpack, 1) - player:setStorageValue(Storage.OutfitQuest.Citizen.MissionBackpack, 1) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfits.AddonBackpack, 1) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfits.MissionBackpack, 1) npcHandler:say("Alright then, if you bring me 100 pieces of fine minotaur leather I will see what I can do for you. You probably have to kill really many minotaurs though... so good luck!", npc, creature) npcHandler:removeInteraction(npc, creature) else @@ -116,9 +113,9 @@ local function creatureSayCallback(npc, creature, type, message) player:removeItem(5878, 100) - player:setStorageValue(Storage.OutfitQuest.Citizen.MissionBackpack, 2) - player:setStorageValue(Storage.OutfitQuest.Citizen.AddonBackpack, 2) - player:setStorageValue(Storage.OutfitQuest.Citizen.AddonBackpackTimer, os.time() + 2 * 60 * 60) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfits.MissionBackpack, 2) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfits.AddonBackpack, 2) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfits.AddonBackpackTimer, os.time() + 2 * 60 * 60) end else npcHandler:say("I know, it's quite some work... don't lose heart, just keep killing minotaurs and you'll eventually get lucky. Would you rather like to buy a normal backpack for 10 gold?", npc, creature) diff --git a/data-otservbr-global/npc/lugri.lua b/data-otservbr-global/npc/lugri.lua index 001cadc9b14..d1a313b2d75 100644 --- a/data-otservbr-global/npc/lugri.lua +++ b/data-otservbr-global/npc/lugri.lua @@ -59,27 +59,27 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "outfit") or MsgContains(message, "addon") then - if player:getStorageValue(Storage.OutfitQuest.WizardAddon) < 1 then + if player:getStorageValue(Storage.Quest.U7_8.WizardOutfits) < 1 then npcHandler:say("This skull shows that you are a true follower of Zathroth and the glorious gods of darkness. Are you willing to prove your loyalty?", npc, creature) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "shield") or MsgContains(message, "medusa shield") then - if player:getStorageValue(Storage.OutfitQuest.WizardAddon) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.WizardOutfits) == 1 then npcHandler:say("Is it your true wish to sacrifice a medusa shield to Zathroth?", npc, creature) npcHandler:setTopic(playerId, 3) end elseif MsgContains(message, "mail") or MsgContains(message, "dragon scale mail") then - if player:getStorageValue(Storage.OutfitQuest.WizardAddon) == 2 then + if player:getStorageValue(Storage.Quest.U7_8.WizardOutfits) == 2 then npcHandler:say("Is it your true wish to sacrifice a dragon scale mail to Zathroth?", npc, creature) npcHandler:setTopic(playerId, 4) end elseif MsgContains(message, "legs") or MsgContains(message, "crown legs") then - if player:getStorageValue(Storage.OutfitQuest.WizardAddon) == 3 then + if player:getStorageValue(Storage.Quest.U7_8.WizardOutfits) == 3 then npcHandler:say("Is it your true wish to sacrifice crown legs to Zathroth?", npc, creature) npcHandler:setTopic(playerId, 5) end elseif MsgContains(message, "ring") or MsgContains(message, "ring of the sky") then - if player:getStorageValue(Storage.OutfitQuest.WizardAddon) == 4 then + if player:getStorageValue(Storage.Quest.U7_8.WizardOutfits) == 4 then npcHandler:say("Is it your true wish to sacrifice a ring of the sky to Zathroth?", npc, creature) npcHandler:setTopic(playerId, 6) end @@ -129,13 +129,13 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Good decision, |PLAYERNAME|. Your first sacrifice will be a medusa shield. Bring it to me and do give it happily.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.WizardAddon, 1) + player:setStorageValue(Storage.Quest.U7_8.WizardOutfits, 1) player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) --this for default start of Outfit and Addon Quests npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then if player:removeItem(3436, 1) then npcHandler:say("Good. I accept your sacrifice. The second sacrifice I require from you is a dragon scale mail. Bring it to me and do give it happily.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.WizardAddon, 2) + player:setStorageValue(Storage.Quest.U7_8.WizardOutfits, 2) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have it...", npc, creature) @@ -143,7 +143,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 4 then if player:removeItem(3386, 1) then npcHandler:say("Good. I accept your sacrifice. The third sacrifice I require from you are crown legs. Bring them to me and do give them happily.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.WizardAddon, 3) + player:setStorageValue(Storage.Quest.U7_8.WizardOutfits, 3) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have it...", npc, creature) @@ -151,7 +151,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 5 then if player:removeItem(3382, 1) then npcHandler:say("Good. I accept your sacrifice. The last sacrifice I require from you is a ring of the sky. Bring it to me and do give it happily.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.WizardAddon, 4) + player:setStorageValue(Storage.Quest.U7_8.WizardOutfits, 4) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have it...", npc, creature) @@ -159,7 +159,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 6 then if player:removeItem(3006, 1) then npcHandler:say("Good. I accept your sacrifice. You have proven that you are a true follower of Zathroth and do not hesitate to sacrifice worldly goods. Thus, I will reward you with this headgear. ", npc, creature) - player:setStorageValue(Storage.OutfitQuest.WizardAddon, 5) + player:setStorageValue(Storage.Quest.U7_8.WizardOutfits, 5) player:addOutfitAddon(145, 2) player:addOutfitAddon(149, 2) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) diff --git a/data-otservbr-global/npc/lurik.lua b/data-otservbr-global/npc/lurik.lua index b9ea973f6ed..14119ba0d72 100644 --- a/data-otservbr-global/npc/lurik.lua +++ b/data-otservbr-global/npc/lurik.lua @@ -59,22 +59,22 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.ExplorerSociety.TheAstralPortals) == 56 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 56 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheAstralPortals) == 56 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 56 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIslandofDragons) == 57 then --will need review in the future npcHandler:say("Ah, you've just come in time. An experienced explorer is just what we need here! Would you like to go on a mission for us?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.ExplorerSociety.TheIslandofDragons) == 58 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 58 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIslandofDragons) == 58 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 58 then if player:removeItem(7314, 1) then npcHandler:say({ "A frozen dragon lord? This is just the information we needed! And you even brought a scale from it! Take these 5000 gold pieces as a reward. ...", "As you did such a great job, I might have another mission for you later.", }, npc, creature) player:addItem(3035, 50) - player:setStorageValue(Storage.ExplorerSociety.TheIslandofDragons, 59) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 59) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIslandofDragons, 59) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 59) else npcHandler:say("You're not done yet...", npc, creature) end - elseif player:getStorageValue(Storage.ExplorerSociety.TheIslandofDragons) == 59 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 59 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIslandofDragons) == 59 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 59 then npcHandler:say({ "Ah, yes, the mission. Let me tell you about something called ice music. ...", "There is a cave on Hrodmir, north of the southernmost barbarian camp Krimhorn. ...", @@ -82,19 +82,19 @@ local function creatureSayCallback(npc, creature, type, message) "When the wind blows into this cave and hits the stalagmites, it is supposed to create a sound similar to a soft song. ...", "Please take this resonance crystal and use it on the stalagmites in the cave to record the sound of the wind.", }, npc, creature) - player:setStorageValue(Storage.ExplorerSociety.TheIceMusic, 60) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 60) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceMusic, 60) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 60) player:addItem(7242, 1) - elseif player:getStorageValue(Storage.ExplorerSociety.TheIceMusic) == 61 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 61 and player:removeItem(7315, 1) then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceMusic) == 61 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 61 and player:removeItem(7315, 1) then npcHandler:say({ "Ah! You did it! I can't wait to hear the sound... but I will do that in a silent moment. ...", "You helped as much in our research here. As a reward, you may use our astral portal in the upper room from now on. ...", "For just one orichalcum pearl, you can travel between Liberty Bay and Svargrond. Thank you again!", }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.ExplorerSociety.TheIceMusic, 62) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 62) - player:setStorageValue(Storage.ExplorerSociety.IceMusicDoor, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceMusic, 62) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 62) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.IceMusicDoor, 1) elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 32 then npcHandler:say({ "You are the one who became an honorary barbarian! The one who made friends with the grim local musher and helped the shamans of Nibelor! The one they call old bearhugg ... erm ... I mean indeed I might have a mission for someone like you ...", @@ -128,8 +128,8 @@ local function creatureSayCallback(npc, creature, type, message) "Travel to Okolnir and try to find a proof for the existence of dragon lords there in the old times. I think old Buddel might be able to bring you there.", }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.ExplorerSociety.TheIslandofDragons, 57) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 57) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIslandofDragons, 57) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 57) -- ISLAND OF DRAGONS elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Excellent. Just report about your mission when you got the memory crystal.", npc, creature) diff --git a/data-otservbr-global/npc/lynda.lua b/data-otservbr-global/npc/lynda.lua index 82a8cf8cc7d..06122163084 100644 --- a/data-otservbr-global/npc/lynda.lua +++ b/data-otservbr-global/npc/lynda.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "angelina") then - if player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonWand) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWand) == 1 then npcHandler:say({ "Angelina had been imprisoned? My, these are horrible news, but I am so glad to hear that she is safe now. ...", "I will happily carry out her wish and reward you, but I fear I need some important ingredients for my blessing spell first. ...", @@ -68,31 +68,31 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "wand") or MsgContains(message, "rod") then - if player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonWand) == 2 then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWand) == 2 then npcHandler:say("Did you bring a sample of each wand and each rod with you?", npc, creature) npcHandler:setTopic(playerId, 3) end elseif MsgContains(message, "sulphur") then - if player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonWand) == 3 then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWand) == 3 then npcHandler:say("Did you obtain 10 ounces of magic sulphur?", npc, creature) npcHandler:setTopic(playerId, 4) end elseif MsgContains(message, "soul stone") then - if player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonWand) == 4 then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWand) == 4 then npcHandler:say("Were you actually able to retrieve the Necromancer's soul stone?", npc, creature) npcHandler:setTopic(playerId, 5) end elseif MsgContains(message, "ankh") then - if player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonWand) == 5 then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWand) == 5 then npcHandler:say("Am I sensing enough holy energy from ankhs here?", npc, creature) npcHandler:setTopic(playerId, 6) end elseif MsgContains(message, "ritual") then - if player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonWand) == 6 then - if player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonWandTimer) < os.time() then - player:setStorageValue(Storage.OutfitQuest.MageSummoner.AddonWand, 7) - player:addOutfitAddon(141, 1) - player:addOutfitAddon(130, 1) + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWand) == 6 then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWandTimer) < os.time() then + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWand, 7) + player:addOutfitAddon(138, 1) --female mage addon + player:addOutfitAddon(141, 1) --female summoner addon player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) npcHandler:say("I'm glad to tell you that I have finished the ritual, player. Here is your new wand. I hope you carry it proudly for everyone to see..", npc, creature) npcHandler:setTopic(playerId, 0) @@ -114,7 +114,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Alright then. Come back to with a sample of all five wands and five rods, please.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.MageSummoner.AddonWand, 2) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWand, 2) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then if player:getItemCount(3065) > 0 and player:getItemCount(3066) > 0 and player:getItemCount(3067) > 0 and player:getItemCount(3069) > 0 and player:getItemCount(3070) > 0 and player:getItemCount(3071) > 0 and player:getItemCount(3072) > 0 and player:getItemCount(3073) > 0 and player:getItemCount(3074) > 0 and player:getItemCount(3075) > 0 then @@ -129,26 +129,26 @@ local function creatureSayCallback(npc, creature, type, message) player:removeItem(3073, 1) player:removeItem(3074, 1) player:removeItem(3075, 1) - player:setStorageValue(Storage.OutfitQuest.MageSummoner.AddonWand, 3) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWand, 3) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 4 then if player:removeItem(5904, 10) then npcHandler:say("Very good. I will immediately start to prepare the ritual and extract the elemental energy from the wands and rods. Please bring me the Necromancer's soul stone now.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.MageSummoner.AddonWand, 4) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWand, 4) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 5 then if player:removeItem(5809, 1) then npcHandler:say("You have found a rarity there, |PLAYERNAME|. This will become the tip of your blessed wand. Please bring me 20 ankhs now to complete the ritual.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.MageSummoner.AddonWand, 5) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWand, 5) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 6 then if player:removeItem(3077, 20) then npcHandler:say("The ingredients for the ritual are complete! I will start to prepare your blessed wand, but I have to medidate first. Please come back later to hear how the ritual went.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.MageSummoner.AddonWand, 6) - player:setStorageValue(Storage.OutfitQuest.MageSummoner.AddonWandTimer, os.time() + 10800) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWand, 6) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWandTimer, os.time() + 10800) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/maealil.lua b/data-otservbr-global/npc/maealil.lua index eaa103366b1..f53dfd767a8 100644 --- a/data-otservbr-global/npc/maealil.lua +++ b/data-otservbr-global/npc/maealil.lua @@ -85,23 +85,23 @@ stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, t -- Wooden Stake keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "I think you have forgotten to bring your stake." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 3 and player:getItemCount(5941) == 0 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 3 and player:getItemCount(5941) == 0 end) local stakeKeyword = keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "Yes, I was informed what to do. Are you prepared to receive my line of the prayer?" }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 3 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 3 end) stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "So receive my prayer: 'Peace may fill your soul - evil shall be cleansed'. Now, bring your stake to Yberius in the Venore temple for the next line of the prayer. I will inform him what to do.", reset = true }, nil, function(player) - player:setStorageValue(Storage.FriendsandTraders.TheBlessedStake, 4) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, 4) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) end) stakeKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "I will wait for you.", reset = true }) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You should visit Yberius in the Venore temple now." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 4 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 4 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You already received my line of the prayer." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) > 4 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) > 4 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "A blessed stake? That is a strange request. Maybe Quentin knows more, he is one of the oldest monks after all." }) diff --git a/data-otservbr-global/npc/malor.lua b/data-otservbr-global/npc/malor.lua index b4a1f630d6a..646bb32205d 100644 --- a/data-otservbr-global/npc/malor.lua +++ b/data-otservbr-global/npc/malor.lua @@ -54,6 +54,37 @@ local function releasePlayer(npc, creature) npcHandler:resetNpc(creature) end +local function endConversationWithDelay(npcHandler, npc, creature) + addEvent(function() + npcHandler:unGreet(npc, creature) + end, 1000) +end + +local function greetCallback(npc, creature, message) + local player = Player(creature) + local playerId = player:getId() + + if not MsgContains(message, "djanni'hah") then + npcHandler:say("Shove off, little one! Humans are not welcome here, |PLAYERNAME|!", npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Start) == 1 then + npcHandler:say({ + "Hahahaha! ...", + "|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!", + }, npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + npcHandler:say("Greetings, human |PLAYERNAME|. My patience with your kind is limited, so speak quickly and choose your words well.", npc, creature) + npcHandler:setInteraction(npc, creature) + + return true +end + local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -62,9 +93,9 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local missionProgress = player:getStorageValue(Storage.DjinnWar.EfreetFaction.Mission03) + local missionProgress = player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission03) if MsgContains(message, "mission") then - if player:getStorageValue(Storage.DjinnWar.EfreetFaction.Mission02) == 3 then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission02) == 3 then if missionProgress < 1 then npcHandler:say({ "I guess this is the first time I entrust a human with a mission. And such an important mission, too. But well, we live in hard times, and I am a bit short of adequate staff. ...", @@ -96,7 +127,7 @@ local function creatureSayCallback(npc, creature, type, message) "Once you have found the lamp you must enter Ashta'daramai again. Sneak into Gabel's personal chambers and exchange his sleeping lamp with Fa'hradin's lamp! ...", "If you succeed, the war could be over one night later!", }, npc, creature) - player:setStorageValue(Storage.DjinnWar.EfreetFaction.Mission03, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission03, 1) elseif MsgContains(message, "no") then npcHandler:say("Your choice.", npc, creature) npcHandler:setTopic(playerId, 0) @@ -111,8 +142,8 @@ local function creatureSayCallback(npc, creature, type, message) "But that's in the future. For now, I will confine myself to give you the permission to trade with my people whenever you want to. ...", "Farewell, human!", }, npc, creature) - player:setStorageValue(Storage.DjinnWar.EfreetFaction.Mission03, 3) - player:setStorageValue(Storage.DjinnWar.EfreetFaction.DoorToMaridTerritory, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission03, 3) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.DoorToMaridTerritory, 1) player:addAchievement("Efreet Ally") addEvent(function() releasePlayer(npc, creature) @@ -121,7 +152,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Just do it!", npc, creature) end npcHandler:setTopic(playerId, 0) - elseif MsgContains(message, "task") and player:getStorageValue(Storage.DjinnWar.EfreetFaction.Mission03) == 3 then + elseif MsgContains(message, "task") and player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission03) == 3 then if player:getStorageValue(Storage.KillingInTheNameOf.BlueDjinnTask) < 0 or player:getStorageValue(Storage.KillingInTheNameOf.BlueDjinnTask) == 3 then npcHandler:say("There are still blue djinns everywhere! We can't let a single one of them live. I guess a start would be for you to kill 500 blue djinns and Marid. Will you assist us?", npc, creature) npcHandler:setTopic(playerId, 3) @@ -157,8 +188,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end --- Greeting -keywordHandler:addGreetKeyword({ "djanni'hah" }, { npcHandler = npcHandler, text = "Greetings, human |PLAYERNAME|. My patience with your kind is limited, so speak quickly and choose your words well." }) +keywordHandler:addCustomGreetKeyword({ "djanni'hah" }, greetCallback, { npcHandler = npcHandler }) npcHandler:setMessage(MESSAGE_FAREWELL, "Farewell, human. When I have taken my rightful place I shall remember those who served me well. Even if they are only humans.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Farewell, human.") diff --git a/data-otservbr-global/npc/marina.lua b/data-otservbr-global/npc/marina.lua index 5bcdebf2804..bb71e1860d2 100644 --- a/data-otservbr-global/npc/marina.lua +++ b/data-otservbr-global/npc/marina.lua @@ -54,37 +54,37 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "silk") or MsgContains(message, "yarn") or MsgContains(message, "silk yarn") or MsgContains(message, "spool of yarn") then - if player:getStorageValue(Storage.FriendsandTraders.TheMermaidMarina) < 1 then + if player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheMermaidMarina) < 1 then npcHandler:say("Um. You mean, you really want me to touch that gooey spider silk just because you need yarn? Well... do you think that I'm pretty?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.FriendsandTraders.TheMermaidMarina) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheMermaidMarina) == 2 then npcHandler:say("Okay... a deal is a deal, would you like me to create a {spool of yarn} from {10 pieces of spider silk}?", npc, creature) npcHandler:setTopic(playerId, 5) end elseif MsgContains(message, "honey") or MsgContains(message, "honeycomb") or MsgContains(message, "50 honeycombs") then - if player:getStorageValue(Storage.FriendsandTraders.TheMermaidMarina) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheMermaidMarina) == 1 then npcHandler:say("Did you bring me the 50 honeycombs I requested and do you absolutely admire my beauty?", npc, creature) npcHandler:setTopic(playerId, 4) end elseif MsgContains(message, "raymond striker") then - if player:getStorageValue(Storage.TheShatteredIsles.APoemForTheMermaid) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.APoemForTheMermaid) == 1 then npcHandler:say(" I think he has a crush on me. Well, silly man, it is only for his own good. This way he can get accustomed to TRUE beauty. And I won't give him up anymore now that he is mine.", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.APoemForTheMermaid, 2) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.APoemForTheMermaid, 2) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "date") then - if player:getStorageValue(Storage.TheShatteredIsles.ADjinnInLove) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ADjinnInLove) == 1 then npcHandler:say("Is that the best you can do? A true Djinn would have done something more poetic.", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.ADjinnInLove, 2) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ADjinnInLove, 2) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheShatteredIsles.ADjinnInLove) == 4 then + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ADjinnInLove) == 4 then npcHandler:say({ "This lovely, exotic Djinn is a true poet. And he is asking me for a date? Excellent. Now I can finaly dump this human pirate. He was growing to be boring more and more with each day ...", "As a little reward for your efforts I allow you to ride my sea turtles. Just look around at the shores and you will find them.", }, npc, creature) player:addAchievement("Matchmaker") - player:setStorageValue(Storage.TheShatteredIsles.ADjinnInLove, 5) - player:setStorageValue(Storage.TheShatteredIsles.AccessToLagunaIsland, 1) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ADjinnInLove, 5) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.AccessToLagunaIsland, 1) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "yes") then @@ -97,13 +97,16 @@ local function creatureSayCallback(npc, creature, type, message) "You want me to touch something gooey, so you have to touch something gooey for me too. ...", "I love honey and I haven't eaten it in a while, so bring me 50 honeycombs and worship my beauty a little more, then we will see.", }, npc, creature) - player:setStorageValue(Storage.FriendsandTraders.TheMermaidMarina, 1) - player:setStorageValue(Storage.FriendsandTraders.DefaultStart, 1) + if player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.DefaultStart) ~= 1 then + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.DefaultStart, 1) + end + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheMermaidMarina, 1) + npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 4 then if player:removeItem(5902, 50) then npcHandler:say("Oh goodie! Thank you! Okay... I guess since my fingers are sticky now anyway, I will help you. From now on, if you bring me {10 pieces of spider silk}, I will create one {spool of yarn}.", npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.FriendsandTraders.TheMermaidMarina, 2) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheMermaidMarina, 2) else npcHandler:say("You don't have enough honey.", npc, creature) npcHandler:setTopic(playerId, 0) @@ -122,7 +125,8 @@ local function creatureSayCallback(npc, creature, type, message) return true end -keywordHandler:addKeyword({ "comb" }, StdModule.say, { npcHandler = npcHandler, text = "Sorry, I don't have a spare comb. I lost my favourite one when diving around in Calassa." }) +npcHandler:setMessage(MESSAGE_GREET, "Oh, hello |PLAYERNAME|. A visitor, how nice!") + keywordHandler:addKeyword({ "mermaid comb" }, StdModule.say, { npcHandler = npcHandler, text = "Sorry, I don't have a spare comb. I lost my favourite one when diving around in Calassa." }) npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) diff --git a/data-otservbr-global/npc/markwin.lua b/data-otservbr-global/npc/markwin.lua index b70437dddae..f0b2e055f5f 100644 --- a/data-otservbr-global/npc/markwin.lua +++ b/data-otservbr-global/npc/markwin.lua @@ -66,6 +66,7 @@ local function greetCallback(npc, creature) position:sendMagicEffect(CONST_ME_TELEPORT) end end + npcHandler:say("No! The hornless have reached my city! BODYGUARDS TO ME!", npc, creature) return false elseif player:getStorageValue(Storage.MarkwinGreeting) == 1 then npcHandler:setMessage(MESSAGE_GREET, "Well ... you defeated my guards! Now everything is over! I guess I will have to answer your questions now.") diff --git a/data-otservbr-global/npc/maryza.lua b/data-otservbr-global/npc/maryza.lua index 44901801fc4..bf061a2fe2f 100644 --- a/data-otservbr-global/npc/maryza.lua +++ b/data-otservbr-global/npc/maryza.lua @@ -49,6 +49,27 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function endConversationWithDelay(npcHandler, npc, creature) + addEvent(function() + npcHandler:unGreet(npc, creature) + end, 1000) +end + +local function greetCallback(npc, creature, message) + local player = Player(creature) + local playerId = player:getId() + + if not MsgContains(message, "hi maryza") then + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + npcHandler:say("Welcome to the Jolly Axeman, |PLAYERNAME|. Have a good time and eat some food!", npc, creature) + npcHandler:setInteraction(npc, creature) + + return true +end + local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -81,13 +102,13 @@ local function creatureSayCallback(npc, creature, type, message) return true end --- Greeting message -keywordHandler:addGreetKeyword({ "maryza" }, { npcHandler = npcHandler, text = "Welcome to the Jolly Axeman, |PLAYERNAME|. Have a good time and eat some food!" }) +-- Greeting +keywordHandler:addCustomGreetKeyword({ "hi maryza" }, greetCallback, { npcHandler = npcHandler }) -npcHandler:setMessage(MESSAGE_GREET, "Welcome to the Jolly Axeman, |PLAYERNAME|. Have a good time and eat some food!") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye!") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) +npcHandler:setCallback(CALLBACK_GREET, greetCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) npcConfig.shop = { diff --git a/data-otservbr-global/npc/melchior.lua b/data-otservbr-global/npc/melchior.lua index ba4713a9e7f..2f9fe787523 100644 --- a/data-otservbr-global/npc/melchior.lua +++ b/data-otservbr-global/npc/melchior.lua @@ -64,8 +64,8 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "greeting") then - if player:getStorageValue(Storage.DjinnWar.Faction.Greeting) ~= 0 then + if MsgContains(message, "word of greeting") then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.Greeting) ~= 0 then npcHandler:say({ "The djinns have an ancient code of honour. This code includes a special concept of hospitality. Anybody who utters the word of greeting must not be attacked even if he is an enemy. Well, at least that is what the code says. ...", "I have found out, though, that this does not work at all times. There is no point to say the word of greeting to an enraged djinn. ...", @@ -73,10 +73,10 @@ local function creatureSayCallback(npc, creature, type, message) "And keep in mind that you must choose sides in this conflict. You can only follow the Efreet or the Marid - once you have made your choice there is no way back. I know from experience that djinn do not tolerate double-crossing.", }, npc, creature) - if player:getStorageValue(Storage.Factions) ~= 1 then - player:setStorageValue(Storage.Factions, 1) + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Factions) ~= 1 then + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.Factions, 1) end - player:setStorageValue(Storage.DjinnWar.Faction.Greeting, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.Greeting, 1) end end diff --git a/data-otservbr-global/npc/miraia.lua b/data-otservbr-global/npc/miraia.lua index 00101154766..bcc2cb88076 100644 --- a/data-otservbr-global/npc/miraia.lua +++ b/data-otservbr-global/npc/miraia.lua @@ -103,19 +103,15 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "outfit") then - npcHandler:say(player:getSex() == PLAYERSEX_FEMALE and "Hehe, would you like to wear a pretty veil like I do? Well... I could help you, but you would have to complete a task first." or "My veil? No, I will definitely not lift it for you! If you are looking for an addon, go talk to Razan.", npc, creature) - elseif MsgContains(message, "task") then - if player:getSex() == PLAYERSEX_MALE then - npcHandler:say("Uh... I don't think that I have work for you right now. If you need a job, go talk to Razan.", npc, creature) - return true - end - if player:getStorageValue(Storage.OutfitQuest.secondOrientalAddon) < 1 then + if player:getSex() == PLAYERSEX_FEMALE and MsgContains(message, "outfit") then + npcHandler:say("Hehe, would you like to wear a pretty veil like I do? Well... I could help you, but you would have to complete a task first." or "My veil? No, I will definitely not lift it for you! If you are looking for an addon, go talk to Razan.", npc, creature) + elseif player:getSex() == PLAYERSEX_FEMALE and MsgContains(message, "task") then + if player:getStorageValue(Storage.Quest.U7_8.OrientalOutfits.SecondOrientalAddon) < 1 then npcHandler:say("You mean, you would like to prove that you deserve to wear such a veil?", npc, creature) npcHandler:setTopic(playerId, 1) end elseif config[message] and npcHandler:getTopic(playerId) == 0 then - if player:getStorageValue(Storage.OutfitQuest.secondOrientalAddon) == config[message].storageValue then + if player:getStorageValue(Storage.Quest.U7_8.OrientalOutfits.SecondOrientalAddon) == config[message].storageValue then npcHandler:say(config[message].text[1], npc, creature) npcHandler:setTopic(playerId, 3) topic[playerId] = message @@ -144,7 +140,7 @@ local function creatureSayCallback(npc, creature, type, message) if player:getStorageValue(Storage.OutfitQuest.DefaultStart) ~= 1 then player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) end - player:setStorageValue(Storage.OutfitQuest.secondOrientalAddon, 1) + player:setStorageValue(Storage.Quest.U7_8.OrientalOutfits.SecondOrientalAddon, 1) npcHandler:say("Excellent! Come back to me once you have collected 100 pieces of ape fur.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then @@ -154,10 +150,9 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) return true end - player:setStorageValue(Storage.OutfitQuest.secondOrientalAddon, player:getStorageValue(Storage.OutfitQuest.secondOrientalAddon) + 1) - if player:getStorageValue(Storage.OutfitQuest.secondOrientalAddon) == 5 then - player:addOutfitAddon(146, 2) - player:addOutfitAddon(150, 2) + player:setStorageValue(Storage.Quest.U7_8.OrientalOutfits.SecondOrientalAddon, player:getStorageValue(Storage.Quest.U7_8.OrientalOutfits.SecondOrientalAddon) + 1) + if player:getStorageValue(Storage.Quest.U7_8.OrientalOutfits.SecondOrientalAddon) == 5 then + player:addOutfitAddon(150, 2) -- female addon player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) end npcHandler:say(targetMessage.text[3], npc, creature) diff --git a/data-otservbr-global/npc/morgan.lua b/data-otservbr-global/npc/morgan.lua index f1e8897a046..f4bfdc43105 100644 --- a/data-otservbr-global/npc/morgan.lua +++ b/data-otservbr-global/npc/morgan.lua @@ -59,33 +59,24 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "firebird") then - if player:getStorageValue(Storage.OutfitQuest.PirateSabreAddon) == 4 then - player:setStorageValue(Storage.OutfitQuest.PirateSabreAddon, 5) + if player:getStorageValue(Storage.Quest.U7_8.PirateOutfits.PirateSabreAddon) == 4 then + player:setStorageValue(Storage.Quest.U7_8.PirateOutfits.PirateSabreAddon, 5) player:addOutfitAddon(151, 1) player:addOutfitAddon(155, 1) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - npcHandler:say( - "Ahh. So Duncan sent you, eh? You must have done something really impressive. \ - Okay, take this fine sabre from me, mate.", - npc, - creature - ) + npcHandler:say("Ahh. So Duncan sent you, eh? You must have done something really impressive. Okay, take this fine sabre from me, mate.", npc, creature) end elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 3 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 6 then npcHandler:say({ - "Hm, if you are that eager to work I have an idea how you could help me out. \z - A distant relative of mine, the old sage Eremo lives on the isle Cormaya, near Edron. ...", - "He has not heard from me since ages. He might assume that I am dead. \z - Since I don't want him to get into trouble for receiving a letter from a \z - pirate I ask you to deliver it personally. ...", - "Of course it's a long journey but you asked for it. \z - You will have to prove us your worth. Are you up to that?", + "Hm, if you are that eager to work I have an idea how you could help me out. A distant relative of mine, the old sage Eremo lives on the isle Cormaya, near Edron. ...", + "He has not heard from me since ages. He might assume that I am dead. Since I don't want him to get into trouble for receiving a letter from a pirate I ask you to deliver it personally. ...", + "Of course it's a long journey but you asked for it. You will have to prove us your worth. Are you up to that?", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 5 then + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 8 then npcHandler:say("Thank you for delivering my letter to Eremo. I have no more missions for you.", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 6) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 9) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "warrior's sword") then @@ -94,16 +85,17 @@ local function creatureSayCallback(npc, creature, type, message) return true end - if player:getStorageValue(Storage.OutfitQuest.WarriorSwordAddon) < 1 then - player:setStorageValue(Storage.OutfitQuest.WarriorSwordAddon, 1) + if player:getStorageValue(Storage.Quest.U7_8.WarriorOutfits.WarriorSwordAddon) < 1 then + player:setStorageValue(Storage.Quest.U7_8.WarriorOutfits.WarriorSwordAddon, 1) npcHandler:say("Great! Simply bring me 100 iron ore and one royal steel and I will happily {forge} it for you.", npc, creature) - elseif player:getStorageValue(Storage.OutfitQuest.WarriorSwordAddon) == 1 and npcHandler:getTopic(playerId) == 1 then + elseif player:getStorageValue(Storage.Quest.U7_8.WarriorOutfits.WarriorSwordAddon) == 1 and npcHandler:getTopic(playerId) == 1 then if player:getItemCount(5887) > 0 and player:getItemCount(5880) > 99 then player:removeItem(5887, 1) player:removeItem(5880, 100) player:addOutfitAddon(134, 2) player:addOutfitAddon(142, 2) - player:setStorageValue(Storage.OutfitQuest.WarriorSwordAddon, 2) + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + player:setStorageValue(Storage.Quest.U7_8.WarriorOutfits.WarriorSwordAddon, 2) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) player:addAchievementProgress("Wild Warrior", 2) npcHandler:say("Alright! As a matter of fact, I have one in store. Here you go!", npc, creature) @@ -118,16 +110,16 @@ local function creatureSayCallback(npc, creature, type, message) return true end - if player:getStorageValue(Storage.OutfitQuest.Knight.AddonSword) < 1 then - player:setStorageValue(Storage.OutfitQuest.Knight.AddonSword, 1) + if player:getStorageValue(Storage.Quest.U7_8.KnightOutfits.AddonSword) < 1 then + player:setStorageValue(Storage.Quest.U7_8.KnightOutfits.AddonSword, 1) npcHandler:say("Great! Simply bring me 100 Iron Ore and one Crude Iron and I will happily {forge} it for you.", npc, creature) - elseif player:getStorageValue(Storage.OutfitQuest.Knight.AddonSword) == 1 and npcHandler:getTopic(playerId) == 1 then + elseif player:getStorageValue(Storage.Quest.U7_8.KnightOutfits.AddonSword) == 1 and npcHandler:getTopic(playerId) == 1 then if player:getItemCount(5892) > 0 and player:getItemCount(5880) > 99 then player:removeItem(5892, 1) player:removeItem(5880, 100) player:addOutfitAddon(131, 1) player:addOutfitAddon(139, 1) - player:setStorageValue(Storage.OutfitQuest.Knight.AddonSword, 2) + player:setStorageValue(Storage.Quest.U7_8.KnightOutfits.AddonSword, 2) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) npcHandler:say("Alright! As a matter of fact, I have one in store. Here you go!", npc, creature) else @@ -140,10 +132,10 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 2 then - if player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 3 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 6 then npcHandler:say("Alright, we will see. Here, take this letter and deliver it safely to old Eremo on Cormaya.", npc, creature) player:addItem(3506, 1) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 4) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 7) npcHandler:setTopic(playerId, 0) end end @@ -153,8 +145,7 @@ end keywordHandler:addKeyword({ "addon" }, StdModule.say, { npcHandler = npcHandler, - text = "I can forge the finest {weapons} for knights and warriors. \ - They may wear them proudly and visible to everyone.", + text = "I can forge the finest {weapons} for knights and warriors. They may wear them proudly and visible to everyone.", }) keywordHandler:addKeyword({ "weapons" }, StdModule.say, { npcHandler = npcHandler, diff --git a/data-otservbr-global/npc/mortimer.lua b/data-otservbr-global/npc/mortimer.lua index 79c8d734640..38303c1025d 100644 --- a/data-otservbr-global/npc/mortimer.lua +++ b/data-otservbr-global/npc/mortimer.lua @@ -61,7 +61,7 @@ local function creatureSayCallback(npc, creature, type, message) -- JOINING if MsgContains(message, "join") then - if player:getStorageValue(Storage.ExplorerSociety.JoiningTheExplorers) < 1 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) < 1 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers) < 1 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) < 1 then npcHandler:say("Do you want to join the explorer society?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -87,81 +87,82 @@ local function creatureSayCallback(npc, creature, type, message) -- MISSION CHECK elseif MsgContains(message, "mission") then if - player:getStorageValue(Storage.ExplorerSociety.JoiningTheExplorers) > 4 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) > 4 and player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) < 26 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) < 26 - or player:getStorageValue(Storage.ExplorerSociety.TheIceDelivery) == 8 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 8 - or player:getStorageValue(Storage.ExplorerSociety.TheButterflyHunt) == 17 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 17 - or player:getStorageValue(Storage.ExplorerSociety.JoiningTheExplorers) == 5 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 5 + player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers) > 4 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) > 4 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) < 26 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) < 26 + or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceDelivery) == 8 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 8 + or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt) == 17 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 17 + or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers) == 5 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 5 then npcHandler:say("The missions available for your rank are the {butterfly hunt}, {plant collection} and {ice delivery}.", npc, creature) npcHandler:setTopic(playerId, 0) elseif - player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) > 25 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) > 35 and player:getStorageValue(Storage.ExplorerSociety.TheOrcPowder) < 35 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) < 35 - or player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) == 26 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 26 - or player:getStorageValue(Storage.ExplorerSociety.TheLizardUrn) == 29 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 29 - or player:getStorageValue(Storage.ExplorerSociety.TheBonelordSecret) == 32 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 32 + player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) > 25 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) > 35 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder) < 35 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) < 35 + or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) == 26 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 26 + or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheLizardUrn) == 29 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 29 + or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheBonelordSecret) == 32 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 32 then npcHandler:say("The missions available for your rank are {lizard urn}, {bonelord secrets} and {orc powder}.", npc, creature) npcHandler:setTopic(playerId, 0) elseif - player:getStorageValue(Storage.ExplorerSociety.TheOrcPowder) > 34 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) > 34 and player:getStorageValue(Storage.ExplorerSociety.TheRuneWritings) < 44 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) < 44 - or player:getStorageValue(Storage.ExplorerSociety.TheOrcPowder) == 35 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 35 - or player:getStorageValue(Storage.ExplorerSociety.TheElvenPoetry) == 38 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 38 - or player:getStorageValue(Storage.ExplorerSociety.TheMemoryStone) == 41 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 41 + player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder) > 34 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) > 34 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheRuneWritings) < 44 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) < 44 + or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder) == 35 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 35 + or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheElvenPoetry) == 38 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 38 + or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheMemoryStone) == 41 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 41 then npcHandler:say("The missions available for your rank are {elven poetry}, {memory stone} and {rune writings}.", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.ExplorerSociety.TheRuneWritings) == 44 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 44 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheRuneWritings) == 44 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 44 then npcHandler:say("The explorer society needs a great deal of help in the research of astral travel. Are you willing to help?", npc, creature) npcHandler:setTopic(playerId, 27) - elseif player:getStorageValue(Storage.ExplorerSociety.TheEctoplasm) == 46 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 46 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheEctoplasm) == 46 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 46 then npcHandler:say("Do you have some collected ectoplasm with you?", npc, creature) npcHandler:setTopic(playerId, 29) - elseif player:getStorageValue(Storage.ExplorerSociety.TheEctoplasm) == 47 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 47 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheEctoplasm) == 47 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 47 then npcHandler:say({ "The research on ectoplasm makes good progress. Now we need some spectral article. Our scientists think a spectral dress would be a perfect object for their studies ...", "The bad news is that the only source to got such a dress is the queen of the banshees. Do you dare to seek her out?", }, npc, creature) npcHandler:setTopic(playerId, 30) - elseif player:getStorageValue(Storage.ExplorerSociety.TheSpectralDress) == 49 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 48 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralDress) == 49 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 48 then npcHandler:say("Did you bring the dress?", npc, creature) npcHandler:setTopic(playerId, 31) -- SPECTRAL STONE - elseif player:getStorageValue(Storage.ExplorerSociety.TheSpectralDress) == 50 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 50 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralDress) == 50 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 50 then npcHandler:say({ "With the objects you've provided our researchers will make steady progress. Still we are missing some test results from fellow explorers ...", "Please travel to our base in Port Hope and ask them to mail us their latest research reports. Then return here and ask about new missions.", }, npc, creature) - player:setStorageValue(Storage.ExplorerSociety.TheSpectralStone, 51) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 51) - player:setStorageValue(Storage.ExplorerSociety.SpectralStone, 2) - elseif player:getStorageValue(Storage.ExplorerSociety.TheSpectralStone) == 51 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 51 and player:getStorageValue(Storage.ExplorerSociety.SpectralStone) == 1 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone, 51) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 51) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.SpectralStone, 2) + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone) == 51 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 51 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.SpectralStone) == 1 then npcHandler:say("Oh, yes! Tell our fellow explorer that the papers are in the mail already.", npc, creature) - player:setStorageValue(Storage.ExplorerSociety.TheSpectralStone, 52) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 52) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone, 52) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 52) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.ExplorerSociety.TheSpectralStone) == 52 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 52 and player:getStorageValue(Storage.ExplorerSociety.SpectralStone) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone) == 52 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 52 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.SpectralStone) == 2 then npcHandler:say("The reports from Port Hope have already arrived here and our progress is astonishing. We think it is possible to create an astral bridge between our bases. Are you interested to assist us with this?", npc, creature) npcHandler:setTopic(playerId, 32) -- SPECTRAL STONE -- ASTRAL PORTALS - elseif player:getStorageValue(Storage.ExplorerSociety.TheSpectralStone) == 55 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 55 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone) == 55 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 55 then npcHandler:say({ "Both carvings are now charged and harmonised. In theory you should be able to travel in zero time from one base to the other ...", "However, you will need to have an orichalcum pearl in your possession to use it as power source. It will be destroyed during the process. I will give you 6 of such pearls and you can buy new ones in our bases ...", "In addition, you need to be a premium explorer to use the astral travel. ...", "And remember: it's a small teleport for you, but a big teleport for all Tibians! Here is a small present for your efforts!", }, npc, creature) - player:setStorageValue(Storage.ExplorerSociety.TheAstralPortals, 56) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 56) - player:addItem(5021, 6) -- orichalcum pearl - player:addItem(9605, 1) -- crown backpack + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheAstralPortals, 56) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 56) + player:addItem(5021, 6) -- Orichalcum pearl + player:addItem(9605, 1) -- Crown backpack + player:addItem(3035, 50) -- 50 Platinum coins -- ASTRAL PORTALS end -- MISSION CHECK -- PICKAXE MISSION elseif MsgContains(message, "pickaxe") then - if player:getStorageValue(Storage.ExplorerSociety.JoiningTheExplorers) < 5 or player:getStorageValue(Storage.ExplorerSociety.JoiningTheExplorers) > 1 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) < 1 or player:getStorageValue(Storage.ExplorerSociety.QuestLine) > 1 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers) < 5 or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers) > 1 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) < 1 or player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) > 1 then npcHandler:say("Did you get the requested pickaxe from Uzgod in Kazordoon?", npc, creature) npcHandler:setTopic(playerId, 3) end @@ -169,14 +170,14 @@ local function creatureSayCallback(npc, creature, type, message) -- ICE DELIVERY elseif MsgContains(message, "ice delivery") then - if player:getStorageValue(Storage.ExplorerSociety.JoiningTheExplorers) == 5 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 5 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers) == 5 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 5 then npcHandler:say({ "Our finest minds came up with the theory that deep beneath the ice island of Folda ice can be found that is ancient. To prove this theory we would need a sample of the aforesaid ice ...", "Of course the ice melts away quickly so you would need to hurry to bring it here ...", "Would you like to accept this mission?", }, npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.ExplorerSociety.TheIceDelivery) == 7 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 7 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceDelivery) == 7 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 7 then npcHandler:say("Did you get the ice we are looking for?", npc, creature) npcHandler:setTopic(playerId, 5) end @@ -184,62 +185,62 @@ local function creatureSayCallback(npc, creature, type, message) -- BUTTERFLY HUNT elseif MsgContains(message, "butterfly hunt") then - if player:getStorageValue(Storage.ExplorerSociety.TheIceDelivery) == 8 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 8 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceDelivery) == 8 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 8 then npcHandler:say("The mission asks you to collect some species of butterflies, are you interested?", npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.ExplorerSociety.TheButterflyHunt) == 10 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 10 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt) == 10 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 10 then npcHandler:say("Did you acquire the purple butterfly we are looking for?", npc, creature) npcHandler:setTopic(playerId, 8) - elseif player:getStorageValue(Storage.ExplorerSociety.TheButterflyHunt) == 11 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 11 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt) == 11 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 11 then npcHandler:say({ "This preparation kit will allow you to collect a blue butterfly you have killed ...", "Just use it on the fresh corpse of a blue butterfly, return the prepared butterfly to me and give me a report of your butterfly hunt.", }, npc, creature) npcHandler:setTopic(playerId, 0) player:addItem(4863, 1) - player:setStorageValue(Storage.ExplorerSociety.TheButterflyHunt, 12) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 12) - elseif player:getStorageValue(Storage.ExplorerSociety.TheButterflyHunt) == 13 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 13 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt, 12) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 12) + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt) == 13 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 13 then npcHandler:say("Did you acquire the blue butterfly we are looking for?", npc, creature) npcHandler:setTopic(playerId, 9) - elseif player:getStorageValue(Storage.ExplorerSociety.TheButterflyHunt) == 14 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 14 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt) == 14 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 14 then npcHandler:say({ "This preparation kit will allow you to collect a red butterfly you have killed ...", "Just use it on the fresh corpse of a red butterfly, return the prepared butterfly to me and give me a report of your butterfly hunt.", }, npc, creature) npcHandler:setTopic(playerId, 0) player:addItem(4863, 1) - player:setStorageValue(Storage.ExplorerSociety.TheButterflyHunt, 15) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 15) - elseif player:getStorageValue(Storage.ExplorerSociety.TheButterflyHunt) == 16 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 16 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt, 15) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 15) + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt) == 16 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 16 then npcHandler:say("Did you acquire the red butterfly we are looking for?", npc, creature) npcHandler:setTopic(playerId, 10) end -- BUTTERFLY HUNT -- PLANT COLLECTION elseif MsgContains(message, "plant collection") then - if player:getStorageValue(Storage.ExplorerSociety.TheButterflyHunt) == 17 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 17 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt) == 17 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 17 then npcHandler:say("In this mission we require you to get us some plant samples from Tiquandan plants. Would you like to fulfil this mission?", npc, creature) npcHandler:setTopic(playerId, 11) - elseif player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) == 119 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 19 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) == 119 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 19 then npcHandler:say("Did you acquire the sample of the jungle bells plant we are looking for?", npc, creature) npcHandler:setTopic(playerId, 12) - elseif player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) == 20 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 20 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) == 20 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 20 then npcHandler:say("Use this botanist's container on a witches cauldron to collect a sample for us. Bring it here and report about your plant collection.", npc, creature) npcHandler:setTopic(playerId, 0) player:addItem(4867, 1) - player:setStorageValue(Storage.ExplorerSociety.ThePlantCollection, 21) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 21) - elseif player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) == 22 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 22 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection, 21) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 21) + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) == 22 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 22 then npcHandler:say("Did you acquire the sample of the witches cauldron we are looking for?", npc, creature) npcHandler:setTopic(playerId, 13) - elseif player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) == 23 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 23 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) == 23 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 23 then npcHandler:say("Use this botanist's container on a giant jungle rose to obtain a sample for us. Bring it here and report about your plant collection.", npc, creature) npcHandler:setTopic(playerId, 0) player:addItem(4867, 1) - player:setStorageValue(Storage.ExplorerSociety.ThePlantCollection, 24) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 24) - elseif player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) == 25 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 25 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection, 24) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 24) + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) == 25 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 25 then npcHandler:say("Did you acquire the sample of the giant jungle rose we are looking for?", npc, creature) npcHandler:setTopic(playerId, 14) end @@ -247,10 +248,10 @@ local function creatureSayCallback(npc, creature, type, message) -- LIZARD URN elseif MsgContains(message, "lizard urn") then - if player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) == 26 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 26 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) == 26 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 26 then npcHandler:say("The explorer society would like to acquire an ancient urn which is some sort of relic to the lizard people of Tiquanda. Would you like to accept this mission?", npc, creature) npcHandler:setTopic(playerId, 15) - elseif player:getStorageValue(Storage.ExplorerSociety.TheLizardUrn) == 28 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 27 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheLizardUrn) == 28 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 27 then npcHandler:say("Did you manage to get the ancient urn?", npc, creature) npcHandler:setTopic(playerId, 16) end @@ -258,14 +259,14 @@ local function creatureSayCallback(npc, creature, type, message) -- BONELORDS elseif MsgContains(message, "bonelord secrets") then - if player:getStorageValue(Storage.ExplorerSociety.TheLizardUrn) == 29 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 29 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheLizardUrn) == 29 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 29 then npcHandler:say({ "We want to learn more about the ancient race of bonelords. We believe the black pyramid north east of Darashia was originally built by them ...", "We ask you to explore the ruins of the black pyramid and look for any signs that prove our theory. You might probably find some document with the numeric bonelord language ...", "That would be sufficient proof. Would you like to accept this mission?", }, npc, creature) npcHandler:setTopic(playerId, 17) - elseif player:getStorageValue(Storage.ExplorerSociety.TheBonelordSecret) == 31 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 30 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheBonelordSecret) == 31 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 30 then npcHandler:say("Have you found any proof that the pyramid was built by bonelords?", npc, creature) npcHandler:setTopic(playerId, 18) end @@ -273,14 +274,14 @@ local function creatureSayCallback(npc, creature, type, message) -- ORC POWDER elseif MsgContains(message, "orc powder") then - if player:getStorageValue(Storage.ExplorerSociety.TheBonelordSecret) == 32 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 32 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheBonelordSecret) == 32 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 32 then npcHandler:say({ "It is commonly known that orcs of Uldereks Rock use some sort of powder to increase the fierceness of their war wolves and berserkers ...", "What we do not know are the ingredients of this powder and its effect on humans ...", "So we would like you to get a sample of the aforesaid powder. Do you want to accept this mission?", }, npc, creature) npcHandler:setTopic(playerId, 19) - elseif player:getStorageValue(Storage.ExplorerSociety.TheOrcPowder) == 34 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 33 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder) == 34 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 33 then npcHandler:say("Did you acquire some of the orcish powder?", npc, creature) npcHandler:setTopic(playerId, 20) end @@ -288,13 +289,13 @@ local function creatureSayCallback(npc, creature, type, message) -- ELVEN POETRY elseif MsgContains(message, "elven poetry") then - if player:getStorageValue(Storage.ExplorerSociety.TheOrcPowder) == 35 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 35 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder) == 35 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 35 then npcHandler:say({ "Some high ranking members would like to study elven poetry. They want the rare book 'Songs of the Forest' ...", "For sure someone in Ab'Dendriel will own a copy. So you would just have to ask around there. Are you willing to accept this mission?", }, npc, creature) npcHandler:setTopic(playerId, 21) - elseif player:getStorageValue(Storage.ExplorerSociety.TheElvenPoetry) == 37 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 36 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheElvenPoetry) == 37 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 36 then npcHandler:say("Did you acquire a copy of 'Songs of the Forest' for us?", npc, creature) npcHandler:setTopic(playerId, 22) end @@ -302,14 +303,14 @@ local function creatureSayCallback(npc, creature, type, message) -- MEMORY STONE elseif MsgContains(message, "memory stone") then - if player:getStorageValue(Storage.ExplorerSociety.TheElvenPoetry) == 38 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 38 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheElvenPoetry) == 38 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 38 then npcHandler:say({ "We acquired some knowledge about special magic stones. Some lost civilisations used it to store knowledge and lore, just like we use books ...", "The wisdom in such stones must be immense, but so are the dangers faced by every person who tries to obtain one...", "As far as we know the ruins found in the north-west of Edron were once inhabited by beings who used such stones. Do you have the heart to go there and to get us such a stone?", }, npc, creature) npcHandler:setTopic(playerId, 23) - elseif player:getStorageValue(Storage.ExplorerSociety.TheMemoryStone) == 40 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 39 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheMemoryStone) == 40 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 39 then npcHandler:say("Were you able to acquire a memory stone for our society?", npc, creature) npcHandler:setTopic(playerId, 24) end @@ -317,7 +318,7 @@ local function creatureSayCallback(npc, creature, type, message) -- RUNE WRITINGS elseif MsgContains(message, "rune writings") then - if player:getStorageValue(Storage.ExplorerSociety.TheMemoryStone) == 41 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 41 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheMemoryStone) == 41 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 41 then npcHandler:say({ "We would like to study some ancient runes that were used by the lizard race. We suspect some relation of the lizards to the founders of Ankrahmun ...", "Somewhere under the ape infested city of Banuta, one can find dungeons that were once inhabited by lizards...", @@ -325,7 +326,7 @@ local function creatureSayCallback(npc, creature, type, message) "Are you up to that challenge?", }, npc, creature) npcHandler:setTopic(playerId, 25) - elseif player:getStorageValue(Storage.ExplorerSociety.TheRuneWritings) == 43 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 43 then + elseif player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheRuneWritings) == 43 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 43 then npcHandler:say("Did you create a copy of the ancient runes as requested?", npc, creature) npcHandler:setTopic(playerId, 26) end @@ -343,12 +344,12 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("We will see if you can handle this simple task. Get the pickaxe from Uzgod in Kazordoon and bring it to one of our bases. Report there about the pickaxe.", npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.ExplorerSociety.JoiningTheExplorers, 1) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 1) elseif npcHandler:getTopic(playerId) == 3 then if player:removeItem(4845, 1) then - player:setStorageValue(Storage.ExplorerSociety.JoiningTheExplorers, 5) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 5) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers, 5) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 5) npcHandler:say({ "Excellent, you brought just the tool we need! Of course it was only a simple task. However ...", "I officially welcome you to the explorer society. From now on you can ask for missions to improve your rank.", @@ -356,8 +357,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 4 then - player:setStorageValue(Storage.ExplorerSociety.TheIceDelivery, 5) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 5) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceDelivery, 5) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 5) npcHandler:say({ "So listen please: Take this ice pick and use it on a block of ice in the caves beneath Folda. Get some ice and bring it here as fast as you can ...", "Should the ice melt away, report on your ice delivery mission anyway. I will then tell you if the time is right to start another mission.", @@ -366,21 +367,21 @@ local function creatureSayCallback(npc, creature, type, message) player:addItem(3456, 1) elseif npcHandler:getTopic(playerId) == 5 then if player:removeItem(4837, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheIceDelivery, 7) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 7) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceDelivery, 7) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 7) npcHandler:say("Just in time. Sadly not much ice is left over but it will do. Thank you again.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 6 then - player:setStorageValue(Storage.ExplorerSociety.TheIceDelivery, 5) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 5) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceDelivery, 5) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 5) npcHandler:say("*Sigh* I think the time is right to grant you another chance to get that ice. Hurry up this time.", npc, creature) npcHandler:setTopic(playerId, 0) -- BUTTERFLY HUNT elseif npcHandler:getTopic(playerId) == 7 then - player:setStorageValue(Storage.ExplorerSociety.TheButterflyHunt, 8) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 8) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt, 8) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 8) npcHandler:say({ "This preparation kit will allow you to collect a purple butterfly you have killed ...", "Just use it on the fresh corpse of a purple butterfly, return the prepared butterfly to me and give me a report of your butterfly hunt.", @@ -389,22 +390,22 @@ local function creatureSayCallback(npc, creature, type, message) player:addItem(4863, 1) elseif npcHandler:getTopic(playerId) == 8 then if player:removeItem(4864, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheButterflyHunt, 10) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 10) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt, 10) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 10) npcHandler:say("A little bit battered but it will do. Thank you! If you think you are ready, ask for another butterfly hunt.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 9 then if player:removeItem(4865, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheButterflyHunt, 13) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 13) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt, 13) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 13) npcHandler:say("A little bit battered but it will do. Thank you! If you think you are ready, ask for another butterfly hunt.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 10 then if player:removeItem(4866, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheButterflyHunt, 16) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 16) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt, 16) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 16) npcHandler:say("That is an extraordinary species you have brought. Thank you! That was the last butterfly we needed.", npc, creature) npcHandler:setTopic(playerId, 0) end @@ -412,29 +413,29 @@ local function creatureSayCallback(npc, creature, type, message) -- PLANT COLLECTION elseif npcHandler:getTopic(playerId) == 11 then - player:setStorageValue(Storage.ExplorerSociety.ThePlantCollection, 17) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 17) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection, 17) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 17) npcHandler:say("Fine! Here take this botanist's container. Use it on a jungle bells plant to collect a sample for us. Report about your plant collection when you have been successful.", npc, creature) npcHandler:setTopic(playerId, 0) player:addItem(4867, 1) elseif npcHandler:getTopic(playerId) == 12 then if player:removeItem(4868, 1) then - player:setStorageValue(Storage.ExplorerSociety.ThePlantCollection, 19) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 19) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection, 19) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 19) npcHandler:say("I see. It seems you've got some quite useful sample by sheer luck. Thank you! Just tell me when you are ready to continue with the plant collection.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 13 then if player:removeItem(4869, 1) then - player:setStorageValue(Storage.ExplorerSociety.ThePlantCollection, 22) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 22) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection, 22) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 22) npcHandler:say("Ah, finally. I started to wonder what took you so long. But thank you! Another fine sample, indeed. Just tell me when you are ready to continue with the plant collection.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 14 then if player:removeItem(4870, 1) then - player:setStorageValue(Storage.ExplorerSociety.ThePlantCollection, 26) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 26) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection, 26) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 26) npcHandler:say("What a lovely sample! With that you have finished your plant collection missions.", npc, creature) npcHandler:setTopic(playerId, 0) end @@ -442,9 +443,9 @@ local function creatureSayCallback(npc, creature, type, message) -- LIZARD URN elseif npcHandler:getTopic(playerId) == 15 then - player:setStorageValue(Storage.ExplorerSociety.TheLizardUrn, 27) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 27) - player:setStorageValue(Storage.ExplorerSociety.ChorurnDoor, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheLizardUrn, 27) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 27) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ChorurnDoor, 1) npcHandler:say({ "You have indeed the spirit of an adventurer! In the south-east of Tiquanda is a small settlement of the lizard people ...", "Beneath the newly constructed temple there, the lizards hide the said urn. Our attempts to acquire this item were without success ...", @@ -453,8 +454,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 16 then if player:removeItem(4847, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheLizardUrn, 29) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 29) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheLizardUrn, 29) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 29) npcHandler:say("Yes, that is the prized relic we have been looking for so long. You did a great job, thank you.", npc, creature) npcHandler:setTopic(playerId, 0) end @@ -462,9 +463,9 @@ local function creatureSayCallback(npc, creature, type, message) -- BONELORDS elseif npcHandler:getTopic(playerId) == 17 then - player:setStorageValue(Storage.ExplorerSociety.TheBonelordSecret, 30) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 30) - player:setStorageValue(Storage.ExplorerSociety.BonelordsDoor, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheBonelordSecret, 30) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 30) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.BonelordsDoor, 1) npcHandler:say({ "Excellent! So travel to the city of Darashia and then head north-east for the pyramid ...", "If any documents are left, you probably find them in the catacombs beneath. Good luck!", @@ -472,8 +473,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 18 then if player:removeItem(173, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheBonelordSecret, 32) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 32) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheBonelordSecret, 32) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 32) npcHandler:say("You did it! Excellent! The scientific world will be shaken by this discovery!", npc, creature) npcHandler:setTopic(playerId, 0) end @@ -481,9 +482,9 @@ local function creatureSayCallback(npc, creature, type, message) -- ORC POWDER elseif npcHandler:getTopic(playerId) == 19 then - player:setStorageValue(Storage.ExplorerSociety.TheOrcPowder, 33) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 33) - player:setStorageValue(Storage.ExplorerSociety.OrcDoor, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder, 33) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 33) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.OrcDoor, 1) npcHandler:say({ "You are a brave soul. As far as we can tell, the orcs maintain some sort of training facility in some hill in the north-east of their city ...", "There you should find lots of their war wolves and hopefully also some of the orcish powder. Good luck!", @@ -491,8 +492,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 20 then if player:removeItem(13974, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheOrcPowder, 35) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 35) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder, 35) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 35) npcHandler:say("You really got it? Amazing! Thank you for your efforts.", npc, creature) npcHandler:setTopic(playerId, 0) end @@ -500,15 +501,15 @@ local function creatureSayCallback(npc, creature, type, message) -- ELVEN POETRY elseif npcHandler:getTopic(playerId) == 21 then - player:setStorageValue(Storage.ExplorerSociety.TheElvenPoetry, 36) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 36) - player:setStorageValue(Storage.ExplorerSociety.ElvenDoor, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheElvenPoetry, 36) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 36) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ElvenDoor, 1) npcHandler:say("Excellent. This mission is easy but nonetheless vital. Travel to Ab'Dendriel and get the book.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 22 then if player:removeItem(4844, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheElvenPoetry, 38) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 38) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheElvenPoetry, 38) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 38) npcHandler:say("Let me have a look! Yes, that's what we wanted. A copy of 'Songs of the Forest'. I won't ask any questions about those bloodstains.", npc, creature) npcHandler:setTopic(playerId, 0) end @@ -516,15 +517,15 @@ local function creatureSayCallback(npc, creature, type, message) -- MEMORY STONE elseif npcHandler:getTopic(playerId) == 23 then - player:setStorageValue(Storage.ExplorerSociety.TheMemoryStone, 39) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 39) - player:setStorageValue(Storage.ExplorerSociety.MemoryStoneDoor, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheMemoryStone, 39) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 39) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.MemoryStoneDoor, 1) npcHandler:say("In the ruins of north-western Edron you should be able to find a memory stone. Good luck.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 24 then if player:removeItem(4841, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheMemoryStone, 41) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 41) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheMemoryStone, 41) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 41) npcHandler:say("A flawless memory stone! Incredible! It will take years even to figure out how it works but what an opportunity for science, thank you!", npc, creature) npcHandler:setTopic(playerId, 0) end @@ -532,15 +533,15 @@ local function creatureSayCallback(npc, creature, type, message) -- RUNE WRITINGS elseif npcHandler:getTopic(playerId) == 25 then - player:setStorageValue(Storage.ExplorerSociety.TheRuneWritings, 42) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 42) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheRuneWritings, 42) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 42) npcHandler:say("Excellent! Here, take this tracing paper and use it on the object you will find there to create a copy of the ancient runes.", npc, creature) npcHandler:setTopic(playerId, 0) player:addItem(4842, 1) elseif npcHandler:getTopic(playerId) == 26 then if player:removeItem(4843, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheRuneWritings, 44) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 44) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheRuneWritings, 44) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 44) npcHandler:say("It's a bit wrinkled but it will do. Thanks again.", npc, creature) npcHandler:setTopic(playerId, 0) end @@ -558,13 +559,13 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Good! Take this container and use it on a ghost that was recently slain. Return with the collected ectoplasm and hand me that container ...", npc, creature) npcHandler:say("Don't lose the container. They are expensive!", npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.ExplorerSociety.TheEctoplasm, 45) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 45) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheEctoplasm, 45) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 45) player:addItem(4852, 1) elseif npcHandler:getTopic(playerId) == 29 then if player:removeItem(4853, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheEctoplasm, 47) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 47) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheEctoplasm, 47) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 47) npcHandler:say("Phew, I had no idea that ectoplasm would smell that ... oh, it's you, well, sorry. Thank you for the ectoplasm.", npc, creature) npcHandler:setTopic(playerId, 0) end @@ -577,12 +578,12 @@ local function creatureSayCallback(npc, creature, type, message) "Any violence will probably be futile, you will have to negotiate with her. Try to get a spectral dress from her. Good luck.", }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.ExplorerSociety.TheSpectralDress, 48) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 48) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralDress, 48) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 48) elseif npcHandler:getTopic(playerId) == 31 then if player:removeItem(4836, 1) then - player:setStorageValue(Storage.ExplorerSociety.TheSpectralDress, 50) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 50) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralDress, 50) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 50) npcHandler:say("Good! Ask me for another mission.", npc, creature) npcHandler:setTopic(playerId, 0) end @@ -595,9 +596,9 @@ local function creatureSayCallback(npc, creature, type, message) "As soon as you have charged the portal tiles that way, report about the spectral portals.", }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.ExplorerSociety.TheSpectralStone, 53) - player:setStorageValue(Storage.ExplorerSociety.SpectralStoneDoor, 1) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 53) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone, 53) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.SpectralStoneDoor, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 53) player:addItem(4840, 1) -- spectral stone -- SPECTRAL STONE @@ -605,9 +606,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 33 then if player:removeItem(3207, 1) then npcHandler:say("Poor Ratha. Thank you for returning this skull to the society. We will see to a honourable burial of Ratha.", npc, creature) - player:setStorageValue(Storage.ExplorerSociety.SkullOfRatha, 1) - player:addItem(3035, 2) - player:addItem(3031, 50) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.SkullOfRatha.Bag1, 2) npcHandler:setTopic(playerId, 0) else npcHandler:say("Come back when you find any information.", npc, creature) @@ -616,15 +615,19 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 34 then if player:removeItem(12510, 1) then npcHandler:say("Marvellous! You brought a giant smith hammer for the explorer society!", npc, creature) - player:setStorageValue(Storage.ExplorerSociety.GiantSmithHammer, 1) - player:addItem(3035, 2) - player:addItem(3031, 50) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.GiantSmithHammer.Hamer, 2) npcHandler:setTopic(playerId, 0) else npcHandler:say("No you don't.", npc, creature) npcHandler:setTopic(playerId, 0) end -- SKULL OF RATHA / GIANT SMITHHAMMER + elseif npcHandler:getTopic(playerId) == 35 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ExplorerBrooch) == 1 and player:removeItem(4871, 1) then + npcHandler:say("It's always a sad day when we learn about the death of a member. But at least we learnt about his fate. Thank you, here is your reward.", npc, creature) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ExplorerBrooch, 2) + npcHandler:setTopic(playerId, 0) + end end -- ANSWER YES @@ -643,22 +646,30 @@ local function creatureSayCallback(npc, creature, type, message) -- ANSWER NO -- SKULL OF RATHA / GIANT SMITHHAMMER - elseif MsgContains(message, "skull of ratha") and player:getStorageValue(Storage.ExplorerSociety.SkullOfRatha) < 1 then + elseif MsgContains(message, "skull of ratha") and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.SkullOfRatha.Bag1) == 1 then npcHandler:say({ "Ratha was a great explorer and even greater ladies' man. Sadly he never returned from a visit to the amazons. Probably he is dead ...", "The society offers a substantial reward for the retrieval of Ratha or his remains. Do you have any news about Ratha?", }, npc, creature) npcHandler:setTopic(playerId, 33) - elseif MsgContains(message, "giant smithhammer") and player:getStorageValue(Storage.ExplorerSociety.GiantSmithHammer) < 1 then + elseif MsgContains(message, "giant smith hammer") and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.GiantSmithHammer.Hammer) == 1 then npcHandler:say("The explorer society is looking for a genuine giant smith hammer for our collection. It is rumoured the cyclopses of the Plains of Havoc might be using one. Did you by chance obtain such a hammer?", npc, creature) npcHandler:setTopic(playerId, 34) - -- SKULL OF RATHA / GIANT SMITHHAMMER + -- Explorer Brooch + elseif MsgContains(message, "brooch") and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ExplorerBrooch) == 1 then + npcHandler:say({ + "Our members travel to far away places and cross dangerous areas, many fall prey to enemies or the land ...", + "Sometimes the personal explorer brooches can be recovered. That way we learn about the fate of our members ...", + "We offer a reward for each brooch returned to us. Have you found an explorer brooch?", + }, npc, creature) + npcHandler:setTopic(playerId, 35) end + return true end local function onTradeRequest(npc, creature) - if Player(creature):getStorageValue(Storage.ExplorerSociety.TheAstralPortals) ~= 56 then + if Player(creature):getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheAstralPortals) ~= 56 then return false end diff --git a/data-otservbr-global/npc/mr_morris.lua b/data-otservbr-global/npc/mr_morris.lua index 5cb155a88c9..dfcbadd400b 100644 --- a/data-otservbr-global/npc/mr_morris.lua +++ b/data-otservbr-global/npc/mr_morris.lua @@ -118,9 +118,8 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "herbs") then if player:getStorageValue(Storage.Quest.U10_55.Dawnport.TheRareHerb) < 1 then npcHandler:say( - "One of our ...less fortunate members lost an ancient amulet somewhere on the island, \z - along with his life. If you could retrieve the amulet at least, there's a little reward. \z - Would you go on that errand?", + "Some of those salamanders have crawled into Oressa's herb garden and munched all her Dawnfire herbs. \z + Would you get some fresh herbs?", npc, creature ) @@ -139,7 +138,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "key") then if player:getStorageValue(Storage.Quest.U10_55.Dawnport.TheDormKey) < 1 then npcHandler:say( - "his is an undercover thing - the key to the dormitory has disappeared. \z + "This is an undercover thing - the key to the dormitory has disappeared. \z No one wants to own up who has lost it, at least not to me. Maybe they'll talk to you. \z I'll reward you if you find it. You in?", npc, @@ -147,7 +146,7 @@ local function creatureSayCallback(npc, creature, type, message) ) npcHandler:setTopic(playerId, 4) elseif player:getStorageValue(Storage.Quest.U10_55.Dawnport.TheDormKey) == 4 then - npcHandler:say("Ah, you're here to report about the key - any progress?", npc, creature) + npcHandler:say("Ah, you're here to report about the {key} - any progress?", npc, creature) npcHandler:setTopic(playerId, 5) end elseif MsgContains(message, "yes") then diff --git a/data-otservbr-global/npc/myra.lua b/data-otservbr-global/npc/myra.lua index 29593f4024a..b8ee8352ab7 100644 --- a/data-otservbr-global/npc/myra.lua +++ b/data-otservbr-global/npc/myra.lua @@ -50,119 +50,278 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end --- Start -local tiaraKeyword = keywordHandler:addKeyword({ "tiara" }, StdModule.say, { npcHandler = npcHandler, text = "Well... maybe, if you help me a little, I could convince the academy of Edron that you are a valuable help here and deserve an award too. How about it?" }, function(player) - return player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonHatCloak) == -1 -end) -local yesKeyword = tiaraKeyword:addChildKeyword({ "yes" }, StdModule.say, { - npcHandler = npcHandler, - text = { - "Okay, great! You see, I need a few magical ingredients which I've run out of. First of all, please bring me 70 bat wings. ...", - "Then, I urgently need a lot of red cloth. I think 20 pieces should suffice. ...", - "Oh, and also, I could use a whole load of ape fur. Please bring me 40 pieces. ...", - "After that, um, let me think... I'd like to have some holy orchids. Or no, many holy orchids, to be safe. Like 35. ...", - "Then, 10 spools of spider silk yarn, 60 lizard scales and 40 red dragon scales. ...", - "I know I'm forgetting something.. wait... ah yes, 15 ounces of magic sulphur and 30 ounces of vampire dust. ...", - "That's it already! Easy task, isn't it? I'm sure you could get all of that within a short time. ...", - "Did you understand everything I told you and are willing to handle this task?", - }, -}) - -yesKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Fine! Let's start with the 70 bat wings. I really feel uncomfortable out there in the jungle.", reset = true }, nil, function(player) - player:setStorageValue(Storage.OutfitQuest.MageSummoner.AddonHatCloak, 1) - player:setStorageValue(Storage.OutfitQuest.MageSummoner.MissionHatCloak, 1) - player:setStorageValue(Storage.OutfitQuest.Ref, math.max(0, player:getStorageValue(Storage.OutfitQuest.Ref)) + 1) -end) -yesKeyword:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Would you like me to repeat the task requirements then?", moveup = 2 }) - -tiaraKeyword:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "That's a pity.", reset = true }) -keywordHandler:addAliasKeyword({ "award" }) - --- When asking for your award before completing your tasks -keywordHandler:addKeyword({ "tiara" }, StdModule.say, { npcHandler = npcHandler, text = "Before I can nominate you for an award, please complete your task" }, function(player) - return player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonHatCloak) > 0 and player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonHatCloak) < 10 -end) -keywordHandler:addAliasKeyword({ "award" }) - --- What happens when you say task -local function addTaskKeyword(value, text) - keywordHandler:addKeyword({ "task" }, StdModule.say, { npcHandler = npcHandler, text = text }, function(player) - return player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonHatCloak) == value - end) - if value == 10 then - keywordHandler:addAliasKeyword({ "tiara" }) - keywordHandler:addAliasKeyword({ "award" }) +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false end -end -addTaskKeyword(1, "Your current task is to bring me 70 bat wings, |PLAYERNAME|.") -addTaskKeyword(2, "Your current task is to bring me 20 pieces of red cloth, |PLAYERNAME|.") -addTaskKeyword(3, "Your current task is to bring me 40 pieces of ape fur, |PLAYERNAME|.") -addTaskKeyword(4, "Your current task is to bring me 35 holy orchids, |PLAYERNAME|.") -addTaskKeyword(5, "Your current task is to bring me 10 spools of spider silk yarn, |PLAYERNAME|.") -addTaskKeyword(6, "Your current task is to bring me 60 lizard scales, |PLAYERNAME|.") -addTaskKeyword(7, "Your current task is to bring me 40 red dragon scales, |PLAYERNAME|.") -addTaskKeyword(8, "Your current task is to bring me 15 ounces of magic sulphur, |PLAYERNAME|.") -addTaskKeyword(9, "Your current task is to bring me 30 ounces of vampire dust, |PLAYERNAME|.") -addTaskKeyword(10, "Go to the academy in Edron and tell Zoltan that I sent you, |PLAYERNAME|.") -addTaskKeyword(11, "I don't have any tasks for you right now, |PLAYERNAME|. You were of great help.") - --- Hand over items -local function addItemKeyword(keyword, text, value, itemId, count, last) - local itemKeyword = keywordHandler:addKeyword({ keyword }, StdModule.say, { npcHandler = npcHandler, text = text[1] }, function(player) - return player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonHatCloak) == value - end) - itemKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "No, no. That's not enough, I fear.", reset = true }, function(player) - return player:getItemCount(itemId) < count - end) - local rewardKeyword = itemKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = text[2] }, nil, function(player) - player:removeItem(itemId, count) - player:setStorageValue(Storage.OutfitQuest.MageSummoner.AddonHatCloak, player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonHatCloak) + 1) - player:setStorageValue(Storage.OutfitQuest.MageSummoner.MissionHatCloak, player:getStorageValue(Storage.OutfitQuest.MageSummoner.MissionHatCloak) + 1) - if not last then - npcHandler:resetNpc(player.uid) - end - end) - - if last then - rewardKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "I thought so. Go to the academy of Edron and tell Zoltan that I sent you. I will send a nomination to him. You were really a great help. Thanks again!", reset = true }) - rewardKeyword:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Really? Well, if you should change your mind, go to the academy of Edron and tell Zoltan that I sent you. I will send a nomination to him.", reset = true }) + if MsgContains(message, "outfit") then + npcHandler:say("This Tiara is an award by the academy of Edron in recognition of my service here.", npc, creature) + npcHandler:setTopic(playerId, 100) + elseif MsgContains(message, "tiara") and player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak) < 1 then + if npcHandler:getTopic(playerId) ~= 100 then + npcHandler:say("Please ask about the 'outfit' first.", npc, creature) + else + local storageValue = player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak) + if storageValue == -1 then + npcHandler:say("Well... maybe, if you help me a little, I could convince the academy of Edron that you are a valuable help here and deserve an award too. How about it?", npc, creature) + npcHandler:setTopic(playerId, 1) + elseif storageValue > 0 and storageValue < 10 then + npcHandler:say("Before I can nominate you for an award, please complete your task.", npc, creature) + elseif storageValue == 10 then + npcHandler:say("Go to the academy in Edron and tell Zoltan that I sent you, |PLAYERNAME|.", npc, creature) + elseif storageValue == 11 then + npcHandler:say("I don't have any tasks for you right now, |PLAYERNAME|. You were of great help.", npc, creature) + end + end + elseif npcHandler:getTopic(playerId) == 1 then + if MsgContains(message, "yes") then + npcHandler:say({ + "Okay, great! You see, I need a few magical ingredients which I've run out of. First of all, please bring me 70 bat wings. ...", + "Then, I urgently need a lot of red cloth. I think 20 pieces should suffice. ...", + "Oh, and also, I could use a whole load of ape fur. Please bring me 40 pieces. ...", + "After that, um, let me think... I'd like to have some holy orchids. Or no, many holy orchids, to be safe. Like 35. ...", + "Then, 10 spools of spider silk yarn, 60 lizard scales and 40 red dragon scales. ...", + "I know I'm forgetting something.. wait... ah yes, 15 ounces of magic sulphur and 30 ounces of vampire dust. ...", + "That's it already! Easy task, isn't it? I'm sure you could get all of that within a short time. ...", + "Did you understand everything I told you and are willing to handle this task?", + }, npc, creature) + npcHandler:setTopic(playerId, 2) + elseif MsgContains(message, "no") then + npcHandler:say("That's a pity.", npc, creature) + npcHandler:setTopic(playerId, 0) + end + elseif npcHandler:getTopic(playerId) == 2 then + if MsgContains(message, "yes") then + npcHandler:say("Fine! Let's start with the 70 bat wings. I really feel uncomfortable out there in the jungle.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak, 1) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.MissionHatCloak, 1) + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "no") then + npcHandler:say("Would you like me to repeat the task requirements then?", npc, creature) + npcHandler:setTopic(playerId, 1) + end + elseif MsgContains(message, "task") then + local tasks = { + [1] = "Your current task is to bring me 70 bat wings, |PLAYERNAME|.", + [2] = "Your current task is to bring me 20 pieces of red cloth, |PLAYERNAME|.", + [3] = "Your current task is to bring me 40 pieces of ape fur, |PLAYERNAME|.", + [4] = "Your current task is to bring me 35 holy orchids, |PLAYERNAME|.", + [5] = "Your current task is to bring me 10 spools of spider silk yarn, |PLAYERNAME|.", + [6] = "Your current task is to bring me 60 lizard scales, |PLAYERNAME|.", + [7] = "Your current task is to bring me 40 red dragon scales, |PLAYERNAME|.", + [8] = "Your current task is to bring me 15 ounces of magic sulphur, |PLAYERNAME|.", + [9] = "Your current task is to bring me 30 ounces of vampire dust, |PLAYERNAME|.", + [10] = "Go to the academy in Edron and tell Zoltan that I sent you, |PLAYERNAME|.", + [11] = "I don't have any tasks for you right now, |PLAYERNAME|. You were of great help.", + } + local taskMessage = tasks[player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak)] + if taskMessage then + npcHandler:say(taskMessage, npc, creature) + end + elseif MsgContains(message, "bat wing") then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak) == 1 then + npcHandler:say("Oh, did you bring the 70 bat wings for me?", npc, creature) + npcHandler:setTopic(playerId, 3) + end + elseif MsgContains(message, "red cloth") then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak) == 2 then + npcHandler:say("Have you found 20 pieces of red cloth?", npc, creature) + npcHandler:setTopic(playerId, 4) + end + elseif MsgContains(message, "ape fur") then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak) == 3 then + npcHandler:say("Were you able to retrieve 40 pieces of ape fur?", npc, creature) + npcHandler:setTopic(playerId, 5) + end + elseif MsgContains(message, "holy orchid") then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak) == 4 then + npcHandler:say("Did you convince the elves to give you 35 holy orchids?", npc, creature) + npcHandler:setTopic(playerId, 6) + end + elseif MsgContains(message, "spider silk") then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak) == 5 then + npcHandler:say("Oh, did you bring 10 spools of spider silk yarn for me?", npc, creature) + npcHandler:setTopic(playerId, 7) + end + elseif MsgContains(message, "lizard scale") then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak) == 6 then + npcHandler:say("Have you found 60 lizard scales?", npc, creature) + npcHandler:setTopic(playerId, 8) + end + elseif MsgContains(message, "red dragon scale") then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak) == 7 then + npcHandler:say("Were you able to get all 40 red dragon scales?", npc, creature) + npcHandler:setTopic(playerId, 9) + end + elseif MsgContains(message, "magic sulphur") then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak) == 8 then + npcHandler:say("Have you collected 15 ounces of magic sulphur?", npc, creature) + npcHandler:setTopic(playerId, 10) + end + elseif MsgContains(message, "vampire dust") then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak) == 9 then + npcHandler:say("Have you gathered 30 ounces of vampire dust?", npc, creature) + npcHandler:setTopic(playerId, 11) + end + elseif npcHandler:getTopic(playerId) == 3 then + if MsgContains(message, "yes") then + if player:getItemCount(5894) < 70 then + npcHandler:say("No, no. That's not enough, I fear.", npc, creature) + else + npcHandler:say("Thank you! I really needed them for my anti-wrinkle lotion. Now, please bring me 20 pieces of red cloth.", npc, creature) + player:removeItem(5894, 70) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak, 2) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.MissionHatCloak, 2) + end + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "no") then + npcHandler:say("Would you like me to repeat the task requirements then?", npc, creature) + npcHandler:setTopic(playerId, 1) + end + elseif npcHandler:getTopic(playerId) == 4 then + if MsgContains(message, "yes") then + if player:getItemCount(5911) < 20 then + npcHandler:say("No, no. That's not enough, I fear.", npc, creature) + else + npcHandler:say("Great! This should be enough for my new dress. Don't forget to bring me 40 pieces of ape fur next!", npc, creature) + player:removeItem(5911, 20) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak, 3) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.MissionHatCloak, 3) + end + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "no") then + npcHandler:say("Would you like me to repeat the task requirements then?", npc, creature) + npcHandler:setTopic(playerId, 1) + end + elseif npcHandler:getTopic(playerId) == 5 then + if MsgContains(message, "yes") then + if player:getItemCount(5883) < 40 then + npcHandler:say("No, no. That's not enough, I fear.", npc, creature) + else + npcHandler:say("Nice job, player. You see, I'm testing a new depilation cream. I guess if it works on ape fur it's good quality. Next, please bring me 35 holy orchids.", npc, creature) + player:removeItem(5883, 40) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak, 4) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.MissionHatCloak, 4) + end + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "no") then + npcHandler:say("Would you like me to repeat the task requirements then?", npc, creature) + npcHandler:setTopic(playerId, 1) + end + elseif npcHandler:getTopic(playerId) == 6 then + if MsgContains(message, "yes") then + if player:getItemCount(5922) < 35 then + npcHandler:say("No, no. That's not enough, I fear.", npc, creature) + else + npcHandler:say("Thank god! The scent of holy orchids is simply the only possible solution against the horrible stench from the tavern latrine. Now, please bring me 10 rolls of spider silk yarn.", npc, creature) + player:removeItem(5922, 35) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak, 5) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.MissionHatCloak, 5) + end + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "no") then + npcHandler:say("Would you like me to repeat the task requirements then?", npc, creature) + npcHandler:setTopic(playerId, 1) + end + elseif npcHandler:getTopic(playerId) == 7 then + if MsgContains(message, "yes") then + if player:getItemCount(5886) < 10 then + npcHandler:say("No, no. That's not enough, I fear.", npc, creature) + else + npcHandler:say("I appreciate it. My pet doggie manages to bite through all sorts of leashes, which is why he is always gone. I'm sure this strong yarn will keep him. Now, go for the 60 lizard scales!", npc, creature) + player:removeItem(5886, 10) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak, 6) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.MissionHatCloak, 6) + end + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "no") then + npcHandler:say("Would you like me to repeat the task requirements then?", npc, creature) + npcHandler:setTopic(playerId, 1) + end + elseif npcHandler:getTopic(playerId) == 8 then + if MsgContains(message, "yes") then + if player:getItemCount(5881) < 60 then + npcHandler:say("No, no. That's not enough, I fear.", npc, creature) + else + npcHandler:say("Good job. They will look almost like sequins on my new dress. Please go for the 40 red dragon scales now.", npc, creature) + player:removeItem(5881, 60) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak, 7) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.MissionHatCloak, 7) + end + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "no") then + npcHandler:say("Would you like me to repeat the task requirements then?", npc, creature) + npcHandler:setTopic(playerId, 1) + end + elseif npcHandler:getTopic(playerId) == 9 then + if MsgContains(message, "yes") then + if player:getItemCount(5882) < 40 then + npcHandler:say("No, no. That's not enough, I fear.", npc, creature) + else + npcHandler:say("Thanks! They make a pretty decoration, don't you think? Please bring me 15 ounces of magic sulphur now!", npc, creature) + player:removeItem(5882, 40) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak, 8) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.MissionHatCloak, 8) + end + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "no") then + npcHandler:say("Would you like me to repeat the task requirements then?", npc, creature) + npcHandler:setTopic(playerId, 1) + end + elseif npcHandler:getTopic(playerId) == 10 then + if MsgContains(message, "yes") then + if player:getItemCount(5904) < 15 then + npcHandler:say("No, no. That's not enough, I fear.", npc, creature) + else + npcHandler:say("Ah, that's enough magic sulphur for my new peeling. You should try it once, your skin gets incredibly smooth. Now, the only thing I need is vampire dust. 30 ounces will suffice.", npc, creature) + player:removeItem(5904, 15) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak, 9) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.MissionHatCloak, 9) + end + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "no") then + npcHandler:say("Would you like me to repeat the task requirements then?", npc, creature) + npcHandler:setTopic(playerId, 1) + end + elseif npcHandler:getTopic(playerId) == 11 then + if MsgContains(message, "yes") then + if player:getItemCount(5905) < 30 then + npcHandler:say("No, no. That's not enough, I fear.", npc, creature) + else + npcHandler:say("Ah, great. Now I can finally finish the potion which the academy of Edron asked me to. I guess, now you want your reward, don't you?", npc, creature) + player:removeItem(5905, 30) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak, 10) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.MissionHatCloak, 10) + end + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "no") then + npcHandler:say("Would you like me to repeat the task requirements then?", npc, creature) + npcHandler:setTopic(playerId, 1) + end + elseif MsgContains(message, "addon") then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak) == 10 then + npcHandler:say("This Tiara is an award by the academy of Edron in recognition of my service here.", npc, creature) + npcHandler:setTopic(playerId, 12) + end + elseif npcHandler:getTopic(playerId) == 12 then + if MsgContains(message, "tiara") and player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak) == 10 then + npcHandler:say("Go to the academy in Edron and tell Zoltan that I sent you, |PLAYERNAME|.", npc, creature) + end end - itemKeyword:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "That's a pity.", reset = true }) - keywordHandler:addKeyword({ keyword }, StdModule.say, { npcHandler = npcHandler, text = text[3] }) + return true end -addItemKeyword("bat wing", { "Oh, did you bring the 70 bat wings for me?", "Thank you! I really needed them for my anti-wrinkle lotion. Now, please bring me 20 pieces of {red cloth}.", "I love to say 'creatures of the night'. Got a dramatic as well as romantic ring to it." }, 1, 5894, 70) -addItemKeyword("red cloth", { "Have you found 20 pieces of red cloth?", "Great! This should be enough for my new dress. Don't forget to bring me 40 pieces of {ape fur} next!", "Nice material for a cape, isn't it?" }, 2, 5911, 20) -addItemKeyword("ape fur", { "Were you able to retrieve 40 pieces of ape fur?", "Nice job, player. You see, I'm testing a new depilation cream. I guess if it works on ape fur it's good quality. Next, please bring me 35 {holy orchids}.", "This feels really smooth." }, 3, 5883, 40) -addItemKeyword("holy orchid", { "Did you convince the elves to give you 35 holy orchids?", "Thank god! The scent of holy orchids is simply the only possible solution against the horrible stench from the tavern latrine. Now, please bring me 10 rolls of {spider silk yarn}!", "I heard that some elves cultivate these flowers." }, 4, 5922, 35) -addItemKeyword( - "spider silk", - { "Oh, did you bring 10 spools of spider silk yarn for me?", "I appreciate it. My pet doggie manages to bite through all sorts of leashes, which is why he is always gone. I'm sure this strong yarn will keep him. Now, go for the 60 {lizard scales}!", "Only very large spiders produce silk which is strong enough to be yarned. I heard that mermaids can turn spider silk into yarn." }, - 5, - 5886, - 10 -) -addItemKeyword("lizard scale", { "Have you found 60 lizard scales?", "Good job. They will look almost like sequins on my new dress. Please go for the 40 {red dragon scales} now.", "Lizard scales are great for all sorts of magical potions." }, 6, 5881, 60) -addItemKeyword("red dragon scale", { "Were you able to get all 40 red dragon scales?", "Thanks! They make a pretty decoration, don't you think? Please bring me 15 ounces of {magic sulphur} now!", "Red dragon scales are hard to come by, but much harder than the green ones." }, 7, 5882, 40) -addItemKeyword("magic sulphur", { "Have you collected 15 ounces of magic sulphur?", "Ah, that's enough magic sulphur for my new peeling. You should try it once, your skin gets incredibly smooth. Now, the only thing I need is {vampire dust}. 30 ounces will suffice.", "Magic sulphur can be extracted from magical weapons. I heard that Djinns are good at magical extractions." }, 8, 5904, 15) -addItemKeyword( - "vampire dust", - { "Have you gathered 30 ounces of vampire dust?", "Ah, great. Now I can finally finish the potion which the academy of Edron asked me to. I guess, now you want your reward, don't you?", "The Tibian vampires are quite restistant. I needs a special blessed stake to turn their corpse into dust, and it doesn't work all the time. Maybe a priest can help you." }, - 9, - 5905, - 30, - true -) - --- Basic -keywordHandler:addKeyword({ "outfit" }, StdModule.say, { npcHandler = npcHandler, text = "This Tiara is an award by the academy of Edron in recognition of my service here." }) - npcHandler:setMessage(MESSAGE_GREET, "Greetings, |PLAYERNAME|. If you are looking for sorcerer {spells} don't hesitate to ask.") npcHandler:setMessage(MESSAGE_FAREWELL, "Farewell, |PLAYERNAME|.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Farewell.") +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) + npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- npcType registering the npcConfig table diff --git a/data-otservbr-global/npc/nah_bob.lua b/data-otservbr-global/npc/nah_bob.lua index e63fffef7ba..a2511034e06 100644 --- a/data-otservbr-global/npc/nah_bob.lua +++ b/data-otservbr-global/npc/nah_bob.lua @@ -45,6 +45,37 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function endConversationWithDelay(npcHandler, npc, creature) + addEvent(function() + npcHandler:unGreet(npc, creature) + end, 1000) +end + +local function greetCallback(npc, creature, message) + local player = Player(creature) + local playerId = player:getId() + + if not MsgContains(message, "djanni'hah") then + npcHandler:say("Whoa! A human! This is no place for you, |PLAYERNAME|. Go and play somewhere else.", npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Start) == 1 then + npcHandler:say({ + "Hahahaha! ...", + "|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!", + }, npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + npcHandler:say(" Another {customer}! I've only just sat down! What is it, |PLAYERNAME|?", npc, creature) + npcHandler:setInteraction(npc, creature) + + return true +end + local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -89,7 +120,7 @@ local function onTradeRequest(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.DjinnWar.MaridFaction.Mission03) ~= 3 then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission03) ~= 3 then npcHandler:say("I'm sorry, human. But you need Gabel's permission to trade with me.", npc, creature) return false end @@ -97,13 +128,16 @@ local function onTradeRequest(npc, creature) return true end -npcHandler:setMessage(MESSAGE_GREET, " Another {customer}! I've only just sat down! What is it, |PLAYERNAME|?") +-- Greeting +keywordHandler:addCustomGreetKeyword({ "djanni'hah" }, greetCallback, { npcHandler = npcHandler }) + npcHandler:setMessage(MESSAGE_FAREWELL, "Bye now, Neutrala |PLAYERNAME|. Visit old Bob again one day!") npcHandler:setMessage(MESSAGE_WALKAWAY, "Bye then.") npcHandler:setMessage(MESSAGE_SENDTRADE, "At your service, just browse through my wares.") npcHandler:setCallback(CALLBACK_ON_TRADE_REQUEST, onTradeRequest) npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) +npcHandler:setCallback(CALLBACK_GREET, greetCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) npcConfig.shop = { diff --git a/data-otservbr-global/npc/ninev.lua b/data-otservbr-global/npc/ninev.lua index f21ae7ed612..b888f005330 100644 --- a/data-otservbr-global/npc/ninev.lua +++ b/data-otservbr-global/npc/ninev.lua @@ -60,29 +60,29 @@ local stakeKeyword = keywordHandler:addKeyword({ "stake" }, StdModule.say, { "Is this stake really important enough to you so that you are willing to take this burden?", }, }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == -1 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == -1 end) stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Alright, I guess you need a stake first. Maybe Gamon can help you, the leg of a chair or something could just do. Try asking him for a stake, and if you have one, bring it back to me.", reset = true, ungreet = true }, nil, function(player) - player:setStorageValue(Storage.FriendsandTraders.DefaultStart, 1) - player:setStorageValue(Storage.FriendsandTraders.TheBlessedStake, 1) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, 1) end) -- First prayer keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "I guess you couldn't convince Gamon to give you a stake, eh?" }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 1 and player:getItemCount(5941) == 0 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 1 and player:getItemCount(5941) == 0 end) local stakeKeyword = keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "Yes, I was informed what to do. Are you prepared to receive my line of the prayer?" }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 1 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 1 end) stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "So receive my prayer: 'Light shall be near - and darkness afar'. Now, bring your stake to Tibra in the Carlin church for the next line of the prayer. I will inform her what to do.", reset = true }, nil, function(player) - player:setStorageValue(Storage.FriendsandTraders.TheBlessedStake, 2) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, 2) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) end) stakeKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "I will wait for you.", reset = true }) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You should visit Tibra in the Carlin church now." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 2 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 2 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You already received my line of the prayer." }) diff --git a/data-otservbr-global/npc/norma.lua b/data-otservbr-global/npc/norma.lua index 9842a07ebee..693dc7fadbb 100644 --- a/data-otservbr-global/npc/norma.lua +++ b/data-otservbr-global/npc/norma.lua @@ -78,25 +78,22 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "addon") or MsgContains(message, "outfit") or MsgContains(message, "hat") then - local addonProgress = player:getStorageValue(Storage.OutfitQuest.Citizen.AddonHat) - if addonProgress < 1 then - npcHandler:say("Pretty, isn't it? My friend Amber taught me how to make it, but I could help you with one if you like. What do you say?", npc, creature) - npcHandler:setTopic(playerId, 1) - elseif addonProgress == 1 then + if player:getStorageValue(Storage.Quest.U7_8.CitizenOutfitsRook.AddonHatRook) == 1 then npcHandler:say("Oh, you're back already? Did you bring a legion helmet, 100 chicken feathers and 50 honeycombs?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif addonProgress == 2 then - npcHandler:say("Pretty hat, isn't it?", npc, creature) + elseif player:getStorageValue(Storage.Quest.U7_8.CitizenOutfitsRook.MissionHatRookRook) < 1 then + npcHandler:say("Pretty, isn't it? I made it myself, but I could teach you how to do that if you like. What do you say?", npc, creature) + npcHandler:setTopic(playerId, 1) end + return true end if npcHandler:getTopic(playerId) == 1 then if MsgContains(message, "yes") then - player:setStorageValue(Storage.OutfitQuest.Ref, math.max(0, player:getStorageValue(Storage.OutfitQuest.Ref)) + 1) - player:setStorageValue(Storage.OutfitQuest.Citizen.AddonHat, 1) - player:setStorageValue(Storage.OutfitQuest.Citizen.MissionHat, 1) - npcHandler:say("Okay, here we go, listen closely! I need a few things... a basic hat of course, maybe a legion helmet would do. Then about 100 chicken feathers... and 50 honeycombs as glue. That's it, come back to me once you gathered it!", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfitsRook.AddonHatRook, 1) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfitsRook.MissionHatRook, 1) + npcHandler:say("Okay, here we go, listen closely! I need a few things... a basic hat of course, maybe a legion helmet would do. Then about 100 chicken feathers... and 50 honeycombs as glue.That's it, come back to me once you gathered it!!", npc, creature) else npcHandler:say("Aw, I guess you don't like feather hats. No big deal.", npc, creature) end @@ -112,17 +109,13 @@ local function creatureSayCallback(npc, creature, type, message) else npcHandler:say("Great job! That must have taken a lot of work. Okay, you put it like this... then glue like this... here!", npc, creature) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:removeItem(3374, 1) player:removeItem(5902, 50) player:removeItem(5890, 100) - player:addOutfitAddon(136, 2) player:addOutfitAddon(128, 2) - - player:setStorageValue(Storage.OutfitQuest.Ref, math.min(0, player:getStorageValue(Storage.OutfitQuest.Ref) - 1)) - player:setStorageValue(Storage.OutfitQuest.Citizen.MissionHat, 0) - player:setStorageValue(Storage.OutfitQuest.Citizen.AddonHat, 2) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfitsRook.MissionHatRook, 0) + player:setStorageValue(Storage.Quest.U7_8.CitizenOutfitsRook.AddonHatRook, 2) end else npcHandler:say("Maybe another time.", npc, creature) diff --git a/data-otservbr-global/npc/ocelus.lua b/data-otservbr-global/npc/ocelus.lua index d0032104e74..c705fd08c8b 100644 --- a/data-otservbr-global/npc/ocelus.lua +++ b/data-otservbr-global/npc/ocelus.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "eleonore") then - if player:getStorageValue(Storage.TheShatteredIsles.APoemForTheMermaid) == 2 and player:getStorageValue(Storage.TheShatteredIsles.ADjinnInLove) < 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.APoemForTheMermaid) == 2 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ADjinnInLove) < 1 then npcHandler:say("I heard the birds sing about her beauty. But how could a human rival the enchanting beauty of a {mermaid}?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -70,9 +70,9 @@ local function creatureSayCallback(npc, creature, type, message) "... I guess I am quite shy. Oh my, if I were not blue, I would turn red now. If there would be someone to arrange a {date} with her.", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.TheShatteredIsles.ADjinnInLove) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ADjinnInLove) == 2 then npcHandler:say("Oh my. Its not easy to impress a mermaid I guess. Please get me a {love poem}. I think elves are the greatest poets so their city seems like a good place to look for one.", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.ADjinnInLove, 3) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ADjinnInLove, 3) end elseif MsgContains(message, "date") then if npcHandler:getTopic(playerId) == 2 then @@ -83,12 +83,12 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 3 then npcHandler:say("Thank you. How ironic, a human granting a djinn a wish.", npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.TheShatteredIsles.ADjinnInLove, 1) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ADjinnInLove, 1) elseif npcHandler:getTopic(playerId) == 4 then if player:removeItem(6119, 1) then npcHandler:say("Excellent. Here, with this little spell I enable you to recite the poem like a true elven poet. Now go and ask her for a date again.", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.ADjinnInLove, 4) - player:setStorageValue(Storage.TheShatteredIsles.APoemForTheMermaid, 3) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ADjinnInLove, 4) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.APoemForTheMermaid, 3) npcHandler:setTopic(playerId, 0) else npcHandler:setTopic(playerId, 0) @@ -96,7 +96,7 @@ local function creatureSayCallback(npc, creature, type, message) end end elseif MsgContains(message, "love poem") then - if player:getStorageValue(Storage.TheShatteredIsles.ADjinnInLove) == 3 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ADjinnInLove) == 3 then npcHandler:say("Did you get a love poem from Ab'Dendriel?", npc, creature) npcHandler:setTopic(playerId, 4) end diff --git a/data-otservbr-global/npc/odemara.lua b/data-otservbr-global/npc/odemara.lua index 3e1986714c7..5417e2d6b1c 100644 --- a/data-otservbr-global/npc/odemara.lua +++ b/data-otservbr-global/npc/odemara.lua @@ -123,7 +123,7 @@ npcConfig.shop = { { itemName = "violet crystal shard", clientId = 16120, sell = 1500 }, { itemName = "watermelon tourmaline", clientId = 33780, sell = 230000 }, { itemName = "wedding ring", clientId = 3004, buy = 990 }, - { itemName = "white pearl", clientId = 3026, buy = 320 }, + { itemName = "white pearl", clientId = 3026, buy = 320, sell = 160 }, { itemName = "white silk flower", clientId = 34008, sell = 9000 }, } diff --git a/data-otservbr-global/npc/oiriz.lua b/data-otservbr-global/npc/oiriz.lua index 4b731c015a2..84fb1619bda 100644 --- a/data-otservbr-global/npc/oiriz.lua +++ b/data-otservbr-global/npc/oiriz.lua @@ -116,7 +116,7 @@ npcConfig.shop = { { itemName = "unicorn figurine", clientId = 30054, sell = 50000 }, { itemName = "violet crystal shard", clientId = 16120, sell = 1500 }, { itemName = "wedding ring", clientId = 3004, buy = 990 }, - { itemName = "white pearl", clientId = 3026, buy = 320 }, + { itemName = "white pearl", clientId = 3026, buy = 320, sell = 160 }, { itemName = "white silk flower", clientId = 34008, sell = 9000 }, } diff --git a/data-otservbr-global/npc/oldrak.lua b/data-otservbr-global/npc/oldrak.lua index ff5860fa322..cc064dfd8c6 100644 --- a/data-otservbr-global/npc/oldrak.lua +++ b/data-otservbr-global/npc/oldrak.lua @@ -22,9 +22,6 @@ npcConfig.outfit = { npcConfig.flags = { floorchange = false, } -npcConfig.shop = { - { itemName = "holy tible", clientId = 2836 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) @@ -176,6 +173,24 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Yenny, known as the Gentle, was one of the most powerful wielders of magic in ancient times. She was known throughout the world for her mercy and kindness.", npc, creature) npcHandler:setTopic(playerId, 0) end + + if MsgContains(message, "holy") or MsgContains(message, "tible") then + if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ChestTible) == 1 then + npcHandler:say("Would you like to buy a The Holy Tible for 1000 gold?", npc, creature) + npcHandler:setTopic(playerId, 3) + else + npcHandler:say("You need to complete the quest for the book first before you can buy The Holy Tible.", npc, creature) + end + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 3 then + if player:removeMoney(1000) then + player:addItem(2836, 1) + npcHandler:say("Here is your The Holy Tible.", npc, creature) + else + npcHandler:say("You do not have enough money.", npc, creature) + end + npcHandler:setTopic(playerId, 0) + end + return true end diff --git a/data-otservbr-global/npc/partos.lua b/data-otservbr-global/npc/partos.lua index 2172e137a57..a1587e9c4cf 100644 --- a/data-otservbr-global/npc/partos.lua +++ b/data-otservbr-global/npc/partos.lua @@ -59,12 +59,12 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "supplies") then - if player:getStorageValue(Storage.DjinnWar.EfreetFaction.Mission01) == 1 then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission01) == 1 then npcHandler:say({ "What!? I bet, Baa'leal sent you! ...", "I won't tell you anything! Shove off!", }, npc, creature) - player:setStorageValue(Storage.DjinnWar.EfreetFaction.Mission01, 2) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission01, 2) else npcHandler:say("I won't talk about that.", npc, creature) end diff --git a/data-otservbr-global/npc/paulie.lua b/data-otservbr-global/npc/paulie.lua index 38c91e2b902..3b099caaa88 100644 --- a/data-otservbr-global/npc/paulie.lua +++ b/data-otservbr-global/npc/paulie.lua @@ -56,6 +56,20 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local count = {} + +local function greetCallback(npc, creature) + local playerId = creature:getId() + local player = Player(creature) + -- Mission 8: The Rookie Guard Quest + if player:getStorageValue(Storage.TheRookieGuard.Mission08) == 1 then + npcHandler:setMessage(MESSAGE_GREET, "Welcome |PLAYERNAME|! Special newcomer offer, today only! Deposit some money - or {deposit ALL} of your money! - and get 50 gold for free!") + else + npcHandler:setMessage(MESSAGE_GREET, "Yes? What may I do for you, |PLAYERNAME|? Bank business, perhaps?") + end + return true +end + local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -64,19 +78,272 @@ local function creatureSayCallback(npc, creature, type, message) return false end - -- Parse bank - npc:parseBank(message, npc, creature, npcHandler) - -- Parse guild bank - npc:parseGuildBank(message, npc, creature, playerId, npcHandler) - -- Normal messages - npc:parseBankMessages(message, npc, creature, npcHandler) + --Help + if MsgContains(message, "bank account") then + npcHandler:say({ + "Every Adventurer has one. \z + The big advantage is that you can access your money in every branch of the World Bank! ...", + "Would you like to know more about the {basic} functions of your bank account, the {advanced} functions, \z + or are you already bored, perhaps?", + }, npc, creature, 10) + npcHandler:setTopic(playerId, 0) + return true + --Balance + elseif MsgContains(message, "balance") then + npcHandler:setTopic(playerId, 0) + if player:getBankBalance() >= 100000000 then + npcHandler:say("I think you must be one of the richest inhabitants in the world! \z + Your account balance is " .. player:getBankBalance() .. " gold.", npc, creature) + return true + elseif player:getBankBalance() >= 10000000 then + npcHandler:say("You have made ten millions and it still grows! Your account balance is \z + " .. player:getBankBalance() .. " gold.", npc, creature) + return true + elseif player:getBankBalance() >= 1000000 then + npcHandler:say("Wow, you have reached the magic number of a million gp!!! \z + Your account balance is " .. player:getBankBalance() .. " gold!", npc, creature) + return true + elseif player:getBankBalance() >= 100000 then + npcHandler:say("You certainly have made a pretty penny. Your account balance is \z + " .. player:getBankBalance() .. " gold.", npc, creature) + return true + else + npcHandler:say("Your account balance is " .. player:getBankBalance() .. " gold.", npc, creature) + return true + end + --Deposit + elseif MsgContains(message, "deposit") then + count[playerId] = player:getMoney() + if count[playerId] < 1 then + npcHandler:say("You do not have enough gold.", npc, creature) + npcHandler:setTopic(playerId, 0) + return false + elseif not isValidMoney(count[playerId]) then + npcHandler:say("Sorry, but you can't deposit that much.", npc, creature) + npcHandler:setTopic(playerId, 0) + return false + end + if MsgContains(message, "all") then + count[playerId] = player:getMoney() + npcHandler:say("Would you really like to deposit " .. count[playerId] .. " gold?", npc, creature) + npcHandler:setTopic(playerId, 2) + return true + else + if string.match(message, "%d+") then + count[playerId] = getMoneyCount(message) + if count[playerId] < 1 then + npcHandler:say("You do not have enough gold.", npc, creature) + npcHandler:setTopic(playerId, 0) + return false + end + npcHandler:say("Would you really like to deposit " .. count[playerId] .. " gold?", npc, creature) + npcHandler:setTopic(playerId, 2) + return true + else + npcHandler:say("Please tell me how much gold it is you would like to deposit.", npc, creature) + npcHandler:setTopic(playerId, 1) + return true + end + end + elseif npcHandler:getTopic(playerId) == 1 then + count[playerId] = getMoneyCount(message) + if isValidMoney(count[playerId]) then + npcHandler:say("Would you really like to deposit " .. count[playerId] .. " gold?", npc, creature) + npcHandler:setTopic(playerId, 2) + return true + else + npcHandler:say("You do not have enough gold.", npc, creature) + npcHandler:setTopic(playerId, 0) + return true + end + elseif npcHandler:getTopic(playerId) == 2 then + if MsgContains(message, "yes") then + if player:getStorageValue(Storage.TheRookieGuard.Mission08) == 1 then + player:depositMoney(count[playerId]) + Bank.credit(player, 50) + npcHandler:say("Alright, we have added the amount of " .. count[playerId] .. " +50 gold to your {balance} - that is the money you deposited plus a bonus of 50 gold. \z + Thank you! You can withdraw your money anytime.", npc, creature) + player:setStorageValue(Storage.TheRookieGuard.Mission08, 2) + npcHandler:setTopic(playerId, 0) + return false + end + if player:depositMoney(count[playerId]) then + npcHandler:say("Alright, we have added the amount of " .. count[playerId] .. " gold to your {balance}. \z + You can {withdraw} your money anytime you want to.", npc, creature) + else + npcHandler:say("You do not have enough gold.", npc, creature) + end + elseif MsgContains(message, "no") then + npcHandler:say("As you wish. Is there something else I can do for you?", npc, creature) + end + npcHandler:setTopic(playerId, 0) + return true + --Withdraw + elseif MsgContains(message, "withdraw") then + if string.match(message, "%d+") then + count[playerId] = getMoneyCount(message) + if isValidMoney(count[playerId]) then + npcHandler:say("Are you sure you wish to withdraw " .. count[playerId] .. " gold from your bank account?", npc, creature) + npcHandler:setTopic(playerId, 7) + else + npcHandler:say("There is not enough gold on your account.", npc, creature) + npcHandler:setTopic(playerId, 0) + end + return true + else + npcHandler:say("Please tell me how much gold you would like to withdraw.", npc, creature) + npcHandler:setTopic(playerId, 6) + return true + end + elseif npcHandler:getTopic(playerId) == 6 then + count[playerId] = getMoneyCount(message) + if isValidMoney(count[playerId]) then + npcHandler:say("Are you sure you wish to withdraw " .. count[playerId] .. " gold from your bank account?", npc, creature) + npcHandler:setTopic(playerId, 7) + else + npcHandler:say("There is not enough gold on your account.", npc, creature) + npcHandler:setTopic(playerId, 0) + end + return true + elseif npcHandler:getTopic(playerId) == 7 then + if MsgContains(message, "yes") then + if player:getFreeCapacity() >= getMoneyWeight(count[playerId]) then + if not player:withdrawMoney(count[playerId]) then + npcHandler:say("There is not enough gold on your account.", npc, creature) + else + npcHandler:say("Here you are, " .. count[playerId] .. " gold. \z + Please let me know if there is something else I can do for you.", npc, creature) + end + else + npcHandler:say( + "Whoah, hold on, you have no room in your inventory to carry all those coins. \z + I don't want you to drop it on the floor, maybe come back with a cart!", + npc, + creature + ) + end + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "no") then + npcHandler:say("The customer is king! Come back anytime you want to if you wish to {withdraw} your money.", npc, creature) + npcHandler:setTopic(playerId, 0) + end + return true + --Money exchange + elseif MsgContains(message, "change gold") then + npcHandler:say("How many platinum coins would you like to get?", npc, creature) + npcHandler:setTopic(playerId, 14) + elseif npcHandler:getTopic(playerId) == 14 then + if getMoneyCount(message) < 1 then + npcHandler:say("Sorry, you do not have enough gold coins.", npc, creature) + npcHandler:setTopic(playerId, 0) + else + count[playerId] = getMoneyCount(message) + npcHandler:say("So you would like me to change " .. count[playerId] * 100 .. " of your gold \z + coins into " .. count[playerId] .. " platinum coins?", npc, creature) + npcHandler:setTopic(playerId, 15) + end + elseif npcHandler:getTopic(playerId) == 15 then + if MsgContains(message, "yes") then + if player:removeItem(3031, count[playerId] * 100) then + player:addItem(3035, count[playerId]) + npcHandler:say("Here you are.", npc, creature) + else + npcHandler:say("Sorry, you do not have enough gold coins.", npc, creature) + end + else + npcHandler:say("Well, can I help you with something else?", npc, creature) + end + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "change platinum") then + npcHandler:say("Would you like to change your platinum coins into gold or crystal?", npc, creature) + npcHandler:setTopic(playerId, 16) + elseif npcHandler:getTopic(playerId) == 16 then + if MsgContains(message, "gold") then + npcHandler:say("How many platinum coins would you like to change into gold?", npc, creature) + npcHandler:setTopic(playerId, 17) + elseif MsgContains(message, "crystal") then + npcHandler:say("How many crystal coins would you like to get?", npc, creature) + npcHandler:setTopic(playerId, 19) + else + npcHandler:say("Well, can I help you with something else?", npc, creature) + npcHandler:setTopic(playerId, 0) + end + elseif npcHandler:getTopic(playerId) == 17 then + if getMoneyCount(message) < 1 then + npcHandler:say("Sorry, you do not have enough platinum coins.", npc, creature) + npcHandler:setTopic(playerId, 0) + else + count[playerId] = getMoneyCount(message) + npcHandler:say("So you would like me to change " .. count[playerId] .. " of your platinum \z + coins into " .. count[playerId] * 100 .. " gold coins for you?", npc, creature) + npcHandler:setTopic(playerId, 18) + end + elseif npcHandler:getTopic(playerId) == 18 then + if MsgContains(message, "yes") then + if player:removeItem(3035, count[playerId]) then + player:addItem(3031, count[playerId] * 100) + npcHandler:say("Here you are.", npc, creature) + else + npcHandler:say("Sorry, you do not have enough platinum coins.", npc, creature) + end + else + npcHandler:say("Well, can I help you with something else?", npc, creature) + end + npcHandler:setTopic(playerId, 0) + elseif npcHandler:getTopic(playerId) == 19 then + if getMoneyCount(message) < 1 then + npcHandler:say("Sorry, you do not have enough platinum coins.", npc, creature) + npcHandler:setTopic(playerId, 0) + else + count[playerId] = getMoneyCount(message) + npcHandler:say("So you would like me to change " .. count[playerId] * 100 .. " of your platinum coins \z + into " .. count[playerId] .. " crystal coins for you?", npc, creature) + npcHandler:setTopic(playerId, 20) + end + elseif npcHandler:getTopic(playerId) == 20 then + if MsgContains(message, "yes") then + if player:removeItem(3035, count[playerId] * 100) then + player:addItem(3043, count[playerId]) + npcHandler:say("Here you are.", npc, creature) + else + npcHandler:say("Sorry, you do not have enough platinum coins.", npc, creature) + end + else + npcHandler:say("Well, can I help you with something else?", npc, creature) + end + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "change crystal") then + npcHandler:say("How many crystal coins would you like to change into platinum?", npc, creature) + npcHandler:setTopic(playerId, 21) + elseif npcHandler:getTopic(playerId) == 21 then + if getMoneyCount(message) < 1 then + npcHandler:say("Sorry, you do not have enough crystal coins.", npc, creature) + npcHandler:setTopic(playerId, 0) + else + count[playerId] = getMoneyCount(message) + npcHandler:say("So you would like me to change " .. count[playerId] .. " of your crystal coins \z + into " .. count[playerId] * 100 .. " platinum coins for you?", npc, creature) + npcHandler:setTopic(playerId, 22) + end + elseif npcHandler:getTopic(playerId) == 22 then + if MsgContains(message, "yes") then + if player:removeItem(3043, count[playerId]) then + player:addItem(3035, count[playerId] * 100) + npcHandler:say("Here you are.", npc, creature) + else + npcHandler:say("Sorry, you do not have enough crystal coins.", npc, creature) + end + else + npcHandler:say("Well, can I help you with something else?", npc, creature) + end + npcHandler:setTopic(playerId, 0) + end return true end -npcHandler:setMessage(MESSAGE_GREET, "Yes? What may I do for you, |PLAYERNAME|? Bank business, perhaps?") +npcHandler:setCallback(CALLBACK_GREET, greetCallback) npcHandler:setMessage(MESSAGE_FAREWELL, "Have a nice day.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Have a nice day.") -npcHandler:setCallback(CALLBACK_GREET, NpcBankGreetCallback) npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/pemaret.lua b/data-otservbr-global/npc/pemaret.lua index ab8ea5ecc62..3af5fc2d0c7 100644 --- a/data-otservbr-global/npc/pemaret.lua +++ b/data-otservbr-global/npc/pemaret.lua @@ -59,14 +59,17 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "marlin") then - if player:getItemCount(901) > 0 then - npcHandler:say("WOW! You have a marlin!! I could make a nice decoration for your wall from it. May I have it?", npc, creature) - npcHandler:setTopic(playerId, 1) + if player:getStorageValue(Storage.Quest.U7_8.MarlinTrophy) < 1 then + if player:getItemCount(901) > 0 then + npcHandler:say("WOW! You have a marlin!! I could make a nice decoration for your wall from it. May I have it?", npc, creature) + npcHandler:setTopic(playerId, 1) + end end - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 then + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.Quest.U7_8.MarlinTrophy) < 1 then if player:removeItem(901, 1) then npcHandler:say("Yeah! Now let's see... There you go, I hope you like it!", npc, creature) player:addItem(902, 1) + player:setStorageValue(Storage.Quest.U7_8.MarlinTrophy, 1) else npcHandler:say("You don't have the fish.", npc, creature) end diff --git a/data-otservbr-global/npc/quentin.lua b/data-otservbr-global/npc/quentin.lua index 905933053e3..5a60aded8e0 100644 --- a/data-otservbr-global/npc/quentin.lua +++ b/data-otservbr-global/npc/quentin.lua @@ -55,29 +55,29 @@ local stakeKeyword = keywordHandler:addKeyword({ "stake" }, StdModule.say, { "Is this stake really important enough to you so that you are willing to take this burden?", }, }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == -1 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == -1 end) stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Alright, I guess you need a stake first. Maybe Gamon can help you, the leg of a chair or something could just do. Try asking him for a stake, and if you have one, bring it back to me.", reset = true, ungreet = true }, nil, function(player) - player:setStorageValue(Storage.FriendsandTraders.DefaultStart, 1) - player:setStorageValue(Storage.FriendsandTraders.TheBlessedStake, 1) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, 1) end) -- First prayer keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "I guess you couldn't convince Gamon to give you a stake, eh?" }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 1 and player:getItemCount(5941) == 0 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 1 and player:getItemCount(5941) == 0 end) -local stakeKeyword = keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "Yes, I was informed what to do. Are you prepared to receive my line of the prayer?" }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 1 +local stakeKeyword = keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, I see you brought a stake with you. Are you ready to receive my line of the prayer then?" }, function(player) + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 1 end) stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "So receive my prayer: 'Light shall be near - and darkness afar'. Now, bring your stake to Tibra in the Carlin church for the next line of the prayer. I will inform her what to do.", reset = true }, nil, function(player) - player:setStorageValue(Storage.FriendsandTraders.TheBlessedStake, 2) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, 2) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) end) stakeKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "I will wait for you.", reset = true }) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You should visit Tibra in the Carlin church now." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 2 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 2 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You already received my line of the prayer." }) diff --git a/data-otservbr-global/npc/rahkem.lua b/data-otservbr-global/npc/rahkem.lua index b585aa0ec9f..a50f7c2aa7c 100644 --- a/data-otservbr-global/npc/rahkem.lua +++ b/data-otservbr-global/npc/rahkem.lua @@ -121,23 +121,23 @@ keywordHandler:addKeyword({ "heal" }, StdModule.say, { npcHandler = npcHandler, -- Wooden Stake keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "I think you have forgotten to bring your stake, pilgrim." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 8 and player:getItemCount(5941) == 0 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 8 and player:getItemCount(5941) == 0 end) local stakeKeyword = keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "Yes, I was informed what to do. Are you prepared to receive my line of the prayer?" }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 8 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 8 end) stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "So receive my prayer: 'Let there be power and compassion'. Now, bring your stake to Brewster in Port Hope for the next line of the prayer. I will inform him what to do.", reset = true }, nil, function(player) - player:setStorageValue(Storage.FriendsandTraders.TheBlessedStake, 9) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, 9) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) end) stakeKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "I will wait for you.", reset = true }) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You should visit Brewster in Port Hope now." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 9 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 9 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You already received my line of the prayer." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) > 9 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) > 9 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "A blessed stake? That is a strange request. Maybe Quentin knows more, he is one of the oldest monks after all." }) diff --git a/data-otservbr-global/npc/rata_mari.lua b/data-otservbr-global/npc/rata_mari.lua index 03284edad00..1d81ea47dcb 100644 --- a/data-otservbr-global/npc/rata_mari.lua +++ b/data-otservbr-global/npc/rata_mari.lua @@ -47,7 +47,7 @@ end local function greetCallback(npc, creature) local playerId = creature:getId() - if Player(creature):getStorageValue(Storage.DjinnWar.MaridFaction.Mission02) == -1 then + if Player(creature):getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission02) == -1 then return false end return true @@ -62,7 +62,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "spy report") then - local reportProgress = player:getStorageValue(Storage.DjinnWar.MaridFaction.RataMari) + local reportProgress = player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.RataMari) if reportProgress < 1 then npcHandler:say({ "You have come for the report? Great! I have been working hard on it during the last months. And nobody came to pick it up. I thought everybody had forgotten about me! ...", @@ -71,7 +71,7 @@ local function creatureSayCallback(npc, creature, type, message) "All right - listen - I know Fa'hradin would not approve of this, but I can't help it. I need some cheese! I need it now! ...", "And I will not give the report to you until you get me some! Meep!", }, npc, creature) - player:setStorageValue(Storage.DjinnWar.MaridFaction.RataMari, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.RataMari, 1) elseif reportProgress == 1 then npcHandler:say("Ok, have you brought me the cheese, I've asked for?", npc, creature) npcHandler:setTopic(playerId, 1) @@ -84,7 +84,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("No cheese - no report.", npc, creature) return true end - player:setStorageValue(Storage.DjinnWar.MaridFaction.RataMari, 2) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.RataMari, 2) player:addItem(3232, 1) npcHandler:say("Meep! Meep! Great! Here is the spyreport for you!", npc, creature) else diff --git a/data-otservbr-global/npc/raymond_striker.lua b/data-otservbr-global/npc/raymond_striker.lua index 37cb0dbe557..e31e737321c 100644 --- a/data-otservbr-global/npc/raymond_striker.lua +++ b/data-otservbr-global/npc/raymond_striker.lua @@ -59,29 +59,29 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "eleonore") then - if player:getStorageValue(Storage.TheShatteredIsles.APoemForTheMermaid) < 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.APoemForTheMermaid) < 1 then npcHandler:say("Eleonore ... Yes, I remember her... vaguely. She is a pretty girl ... but still only a girl and now I am in love with a beautiful and passionate woman. A true {mermaid} even.", npc, creature) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.TheShatteredIsles.APoemForTheMermaid) < 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.APoemForTheMermaid) < 1 then npcHandler:say("Don't ask about silly missions. All I can think about is this lovely {mermaid}.", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.TheShatteredIsles.APoemForTheMermaid) == 3 and player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) < 1 then + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.APoemForTheMermaid) == 3 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) < 1 then npcHandler:say("Ask around in the settlement where you can help out. If you have proven your worth I might have some missions for you.", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 1) - elseif player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 14 and player:getStorageValue(Storage.TheShatteredIsles.RaysMission1) < 1 then + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 1) + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 13 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission1) < 1 then npcHandler:say({ "Indeed, I could use some help. The evil pirates of Nargor have convinced an alchemist from Edron to supply them with a substance called Fafnar's Fire ...", "It can burn even on water and is a threat to us all. I need you to travel to Edron and pretend to the alchemist Sandra that you are the one whom the other pirates sent to get the fire ...", "When she asks for a payment, tell her 'Your continued existence is payment enough'. That should enrage any member of the Edron academy enough to refuse any further deals with the pirates.", }, npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.RaysMission1, 1) - elseif player:getStorageValue(Storage.TheShatteredIsles.RaysMission1) == 2 then + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission1, 1) + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission1) == 2 then npcHandler:say("I think that means 'mission accomplished'. Hehe. I guess that will put an end to their efforts to buy any alchemical substance from Edron.", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 15) - player:setStorageValue(Storage.TheShatteredIsles.RaysMission1, 3) - elseif player:getStorageValue(Storage.TheShatteredIsles.RaysMission1) == 3 and player:getStorageValue(Storage.TheShatteredIsles.RaysMission2) < 1 then + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 15) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission1, 3) + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission1) == 3 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission2) < 1 then npcHandler:say({ "The mission on which I will send you is vital to our cause. It is a sabotage mission. Nargor is guarded by several heavy catapults. ...", "I need you to sabotage the most dangerous of those catapults which can be found right in their harbour, aiming at ships passing by the entrance. ...", @@ -91,13 +91,13 @@ local function creatureSayCallback(npc, creature, type, message) "Of course, he can't drop you off directly in the pirate's base. However, we have discovered a secret way into the Howling Grotto. ...", "Try to make your way through the caves of Nargor to reach their harbour. This is where you will find the catapult in question.", }, npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.AccessToNargor, 1) - player:setStorageValue(Storage.TheShatteredIsles.RaysMission2, 1) - elseif player:getStorageValue(Storage.TheShatteredIsles.RaysMission2) == 2 and player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 16 then + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.AccessToNargor, 1) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission2, 1) + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission2) == 2 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 16 then npcHandler:say("You did it! Excellent!", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 18) - player:setStorageValue(Storage.TheShatteredIsles.RaysMission2, 3) - elseif player:getStorageValue(Storage.TheShatteredIsles.RaysMission2) == 3 and player:getStorageValue(Storage.TheShatteredIsles.RaysMission3) < 1 then + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 18) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission2, 3) + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission2) == 3 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission3) < 1 then npcHandler:say({ "If you manage to accomplish this vital mission you will prove yourself to be a worthy member of our community. Imight even grant you your own ship and pirate clothing! ...", "So listen to the first step of my plan. I want you to infiltrate their base. Try to enter their tavern, which meansthat you have to get past the guard. ...", @@ -105,52 +105,52 @@ local function creatureSayCallback(npc, creature, type, message) "In the tavern, the pirates feel safe and plan their next strikes. Study ALL of their maps and plans lying around ...", "Afterwards, return here and report to me about your mission.", }, npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.RaysMission3, 1) - elseif player:getStorageValue(Storage.TheShatteredIsles.RaysMission3) == 1 and player:getStorageValue(Storage.TheShatteredIsles.TavernMap1) == 1 and player:getStorageValue(Storage.TheShatteredIsles.TavernMap2) == 1 and player:getStorageValue(Storage.TheShatteredIsles.TavernMap3) == 1 then + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission3, 1) + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission3) == 1 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TavernMap1) == 1 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TavernMap2) == 1 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TavernMap3) == 1 then npcHandler:say({ "Well done, my friend. That will help us a lot. Of course there are other things to be done though. ...", "I learned that Klaus, the owner of the tavern, wants me dead. He is offering any of those pirates a mission to kill me....", "If we could convince him that you fulfilled that mission, the pirates will have the party of their lives. This would beour chance for a sneak attack to damage their boats and steal their plunder! ...", "Obtain this mission from him and learn what he needs as a proof. Then return to me and report to me about yourmission so we can formulate an appropriate plan.", }, npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 20) - player:setStorageValue(Storage.TheShatteredIsles.RaysMission3, 3) - player:setStorageValue(Storage.TheShatteredIsles.RaysMission4, 1) - elseif player:getStorageValue(Storage.TheShatteredIsles.RaysMission4) == 2 then + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 20) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission3, 3) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission4, 1) + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission4) == 2 then npcHandler:say("My pillow?? They know me all too well... I've owned it since my childhood. However. Here, take it and convincehim that I am dead.", npc, creature) player:addItem(6105, 1) - player:setStorageValue(Storage.TheShatteredIsles.RaysMission4, 3) - elseif player:getStorageValue(Storage.TheShatteredIsles.RaysMission4) == 4 then + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission4, 3) + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission4) == 4 then npcHandler:say({ "Incredible! You did what no other did even dare to think about! You are indeed a true hero to our cause ...", "Sadly I have no ship that lacks a captain, else you would of course be our first choice. I am still true to my word asbest as I am able. ...", "So take this as your very own ship. Oh, and remind me about the pirate outfit sometime.", }, npc, creature) player:addItem(2994, 1) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 21) - player:setStorageValue(Storage.TheShatteredIsles.RaysMission4, 5) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 21) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission4, 5) end elseif MsgContains(message, "mermaid") then - if player:getStorageValue(Storage.TheShatteredIsles.APoemForTheMermaid) < 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.APoemForTheMermaid) < 1 then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("The mermaid is the most beautiful creature I have ever met. She is so wonderful. It was some kind of magic as we first met. A look in her eyes and I suddenly knew there would be never again another woman in my life but her.", npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.TheShatteredIsles.APoemForTheMermaid, 1) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.APoemForTheMermaid, 1) end - elseif player:getStorageValue(Storage.TheShatteredIsles.APoemForTheMermaid) == 1 and player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) < 1 then + elseif player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.APoemForTheMermaid) == 1 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) < 1 then npcHandler:say("I am deeply ashamed that I lacked the willpower to resist her spell. Thank you for your help in that matter. Now my head is once more free to think about our {mission}.", npc, creature) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "pirate outfit") then - if player:getStorageValue(Storage.TheShatteredIsles.AccessToLagunaIsland) == 1 and player:getStorageValue(Storage.OutfitQuest.PirateBaseOutfit) < 1 and player:getStorageValue(Storage.TheShatteredIsles.RaysMission4) == 5 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.AccessToLagunaIsland) == 1 and player:getStorageValue(Storage.Quest.U7_8.PirateOutfits.PirateBaseOutfit) < 1 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission4) == 5 then npcHandler:say("Ah, right! The pirate outfit! Here you go, now you are truly one of us.", npc, creature) player:addOutfit(151) player:addOutfit(155) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) - player:setStorageValue(Storage.OutfitQuest.PirateBaseOutfit, 1) + player:setStorageValue(Storage.Quest.U7_8.PirateOutfits.PirateBaseOutfit, 1) npcHandler:setTopic(playerId, 0) end - elseif MsgContains(message, "task") and player:getStorageValue(Storage.TheShatteredIsles.RaysMission4) == 5 then + elseif MsgContains(message, "task") and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission4) == 5 then if player:getStorageValue(Storage.KillingInTheNameOf.PirateTask) < 0 then npcHandler:say({ "The pirates on Nargor are becoming more and more of a threat to us each day. I wish someone could get rid of them once and for all, but unfortunately they just keep coming! ...", diff --git a/data-otservbr-global/npc/razan.lua b/data-otservbr-global/npc/razan.lua index 0882e172f62..57fb6fdf4f9 100644 --- a/data-otservbr-global/npc/razan.lua +++ b/data-otservbr-global/npc/razan.lua @@ -103,20 +103,15 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "outfit") then - npcHandler:say(player:getSex() == PLAYERSEX_FEMALE and "My turban? I know something better for a pretty girl like you. Why don't you go talk to Miraia?" or "My turban? Eh no, you can't have it. Only oriental weaponmasters may wear it after having completed a difficult task.", npc, creature) - elseif MsgContains(message, "task") then - if player:getSex() == PLAYERSEX_FEMALE then - npcHandler:say("I really don't want to make girls work for me. If you are looking for a job, ask Miraia.", npc, creature) - return true - end - - if player:getStorageValue(Storage.OutfitQuest.secondOrientalAddon) < 1 then + if player:getSex() == PLAYERSEX_MALE and MsgContains(message, "outfit") then + npcHandler:say("My turban? Eh no, you can't have it. Only oriental weapon masters may wear it after having completed a difficult task.", npc, creature) + elseif player:getSex() == PLAYERSEX_MALE and MsgContains(message, "task") then + if player:getStorageValue(Storage.Quest.U7_8.OrientalOutfits.SecondOrientalAddon) < 1 then npcHandler:say("You mean, you would like to prove that you deserve to wear such a turban?", npc, creature) npcHandler:setTopic(playerId, 1) end elseif config[message] and npcHandler:getTopic(playerId) == 0 then - if player:getStorageValue(Storage.OutfitQuest.secondOrientalAddon) == config[message].storageValue then + if player:getStorageValue(Storage.Quest.U7_8.OrientalOutfits.SecondOrientalAddon) == config[message].storageValue then npcHandler:say(config[message].text[1], npc, creature) npcHandler:setTopic(playerId, 3) topic[playerId] = message @@ -138,7 +133,7 @@ local function creatureSayCallback(npc, creature, type, message) if player:getStorageValue(Storage.OutfitQuest.DefaultStart) ~= 1 then player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) end - player:setStorageValue(Storage.OutfitQuest.secondOrientalAddon, 1) + player:setStorageValue(Storage.Quest.U7_8.OrientalOutfits.SecondOrientalAddon, 1) npcHandler:say("Excellent! Come back to me once you have collected 100 pieces of ape fur.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then @@ -149,10 +144,9 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.OutfitQuest.secondOrientalAddon, player:getStorageValue(Storage.OutfitQuest.secondOrientalAddon) + 1) - if player:getStorageValue(Storage.OutfitQuest.secondOrientalAddon) == 5 then - player:addOutfitAddon(146, 2) - player:addOutfitAddon(150, 2) + player:setStorageValue(Storage.Quest.U7_8.OrientalOutfits.SecondOrientalAddon, player:getStorageValue(Storage.Quest.U7_8.OrientalOutfits.SecondOrientalAddon) + 1) + if player:getStorageValue(Storage.Quest.U7_8.OrientalOutfits.SecondOrientalAddon) == 5 then + player:addOutfitAddon(146, 2) -- male addon player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) end npcHandler:say(targetMessage.text[3], npc, creature) diff --git a/data-otservbr-global/npc/sam.lua b/data-otservbr-global/npc/sam.lua index fdca8c02f01..0fb2e8e1b5a 100644 --- a/data-otservbr-global/npc/sam.lua +++ b/data-otservbr-global/npc/sam.lua @@ -65,16 +65,16 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "adorn") or MsgContains(message, "outfit") or MsgContains(message, "addon") then - local addonProgress = player:getStorageValue(Storage.OutfitQuest.Knight.AddonHelmet) + local addonProgress = player:getStorageValue(Storage.Quest.U7_8.KnightOutfits.AddonHelmet) if addonProgress == 5 then - player:setStorageValue(Storage.OutfitQuest.Knight.MissionHelmet, 6) - player:setStorageValue(Storage.OutfitQuest.Knight.AddonHelmet, 6) - player:setStorageValue(Storage.OutfitQuest.Knight.AddonHelmetTimer, os.time() + 7200) + player:setStorageValue(Storage.Quest.U7_8.KnightOutfits.MissionHelmet, 6) + player:setStorageValue(Storage.Quest.U7_8.KnightOutfits.AddonHelmet, 6) + player:setStorageValue(Storage.Quest.U7_8.KnightOutfits.AddonHelmetTimer, os.time() + 7200) -- 2 hours npcHandler:say("Oh, Gregor sent you? I see. It will be my pleasure to adorn your helmet. Please give me some time to finish it.", npc, creature) elseif addonProgress == 6 then - if player:getStorageValue(Storage.OutfitQuest.Knight.AddonHelmetTimer) < os.time() then - player:setStorageValue(Storage.OutfitQuest.Knight.MissionHelmet, 0) - player:setStorageValue(Storage.OutfitQuest.Knight.AddonHelmet, 7) + if player:getStorageValue(Storage.Quest.U7_8.KnightOutfits.AddonHelmetTimer) < os.time() then + player:setStorageValue(Storage.Quest.U7_8.KnightOutfits.MissionHelmet, 0) + player:setStorageValue(Storage.Quest.U7_8.KnightOutfits.AddonHelmet, 7) player:setStorageValue(Storage.OutfitQuest.Ref, math.min(0, player:getStorageValue(Storage.OutfitQuest.Ref) - 1)) player:addOutfitAddon(131, 2) player:addOutfitAddon(139, 2) @@ -89,7 +89,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Sorry, but without the permission of Gregor I cannot help you with this matter.", npc, creature) end elseif MsgContains(message, "old backpack") or MsgContains(message, "backpack") then - if player:getStorageValue(Storage.SamsOldBackpack) < 1 then + if player:getStorageValue(Storage.Quest.U7_5.SamsOldBackpack.SamsOldBackpackNpc) < 1 then npcHandler:say("What? Are you telling me you found my old adventurer's backpack that I lost years ago??", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -113,7 +113,7 @@ local function creatureSayCallback(npc, creature, type, message) "Thank you very much! This brings back good old memories! Please, as a reward, travel to Kazordoon and ask my old friend Kroox to provide you a special dwarven armor. ...", "I will mail him about you immediately. Just tell him, his old buddy Sam is sending you.", }, npc, creature) - player:setStorageValue(Storage.SamsOldBackpack, 1) + player:setStorageValue(Storage.Quest.U7_5.SamsOldBackpack.SamsOldBackpackNpc, 1) player:addAchievement("Backpack Tourist") else npcHandler:say("You don't have it...", npc, creature) diff --git a/data-otservbr-global/npc/sandra.lua b/data-otservbr-global/npc/sandra.lua index 69bc18a17b7..a362b8ee78c 100644 --- a/data-otservbr-global/npc/sandra.lua +++ b/data-otservbr-global/npc/sandra.lua @@ -66,10 +66,10 @@ local function creatureSayCallback(npc, creature, type, message) end if table.contains({ "vial", "ticket", "bonus", "deposit" }, message) then - if player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonBelt) < 1 then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonBelt) < 1 then npcHandler:say("We have a special offer right now for depositing vials. Are you interested in hearing it?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonBelt) >= 1 then + elseif player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonBelt) >= 1 then npcHandler:say("Would you like to get a lottery ticket instead of the deposit for your vials?", npc, creature) npcHandler:setTopic(playerId, 3) end @@ -77,45 +77,31 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Are you here to claim a prize?", npc, creature) npcHandler:setTopic(playerId, 4) elseif string.match(message:lower(), "fafnar") then - if player:getStorageValue(Storage.TheShatteredIsles.RaysMission1) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission1) == 1 then npcHandler:say("Pssht, not that loud. So they have sent you to get... the stuff?", npc, creature) npcHandler:setTopic(playerId, 5) end elseif MsgContains(message, "your continued existence is payment enough") then if npcHandler:getTopic(playerId) == 6 then - if player:getStorageValue(Storage.TheShatteredIsles.RaysMission1) == 1 then - npcHandler:say( - "What?? How dare you?! I am a sorcerer of the most reknown academy on the face of this world. \ - Do you think some lousy pirates could scare me? Get lost! Now! \ - I will have no further dealings with the likes of you!", - npc, - creature - ) - player:setStorageValue(Storage.TheShatteredIsles.RaysMission1, 2) + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission1) == 1 then + npcHandler:say("What?? How dare you?! I am a sorcerer of the most reknown academy on the face of this world. Do you think some lousy pirates could scare me? Get lost! Now! I will have no further dealings with the likes of you!", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission1, 2) npcHandler:setTopic(playerId, 0) end end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say({ - "The Edron academy has introduced a bonus system. Each time you deposit 100 vials without \ - claiming the money for it, you will receive a lottery ticket. ...", - "Some of these lottery tickets will grant you a special potion belt accessory, \ - if you bring the ticket to me. ...", - "If you join the bonus system now, I will ask you each time you are bringing back 100 or \ - more vials to me whether you claim your deposit or rather want a lottery ticket. ...", + "The Edron academy has introduced a bonus system. Each time you deposit 100 vials without claiming the money for it, you will receive a lottery ticket. ...", + "Some of these lottery tickets will grant you a special potion belt accessory, if you bring the ticket to me. ...", + "If you join the bonus system now, I will ask you each time you are bringing back 100 or more vials to me whether you claim your deposit or rather want a lottery ticket. ...", "Of course, you can leave or join the bonus system at any time by just asking me for the 'bonus'. ...", "Would you like to join the bonus system now?", }, npc, creature) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then - npcHandler:say( - "Great! I've signed you up for our bonus system. From now on, \ - you will have the chance to win the potion belt addon!", - npc, - creature - ) - player:setStorageValue(Storage.OutfitQuest.MageSummoner.AddonBelt, 1) + npcHandler:say("Great! I've signed you up for our bonus system. From now on, you will have the chance to win the potion belt addon!", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonBelt, 1) player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) --this for default start of Outfit and Addon Quests npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then @@ -124,33 +110,23 @@ local function creatureSayCallback(npc, creature, type, message) player:addItem(5957, 1) npcHandler:setTopic(playerId, 0) else - npcHandler:say( - "Sorry, but you don't have 100 empty flasks or vials of the SAME kind and thus don't qualify for the lottery. \ - Would you like to deposit the vials you have as usual and receive 5 gold per vial?", - npc, - creature - ) + npcHandler:say("Sorry, but you don't have 100 empty flasks or vials of the SAME kind and thus don't qualify for the lottery. Would you like to deposit the vials you have as usual and receive 5 gold per vial?", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 4 then - if player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonBelt) == 1 and player:removeItem(5958, 1) then + if player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonBelt) == 1 and player:removeItem(5958, 1) then npcHandler:say("Congratulations! Here, from now on you can wear our lovely potion belt as accessory.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.MageSummoner.AddonBelt, 2) - player:addOutfitAddon(138, 1) - player:addOutfitAddon(133, 1) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonBelt, 2) + player:addOutfitAddon(130, 1) --male mage addon + player:addOutfitAddon(133, 1) --male summoner addon player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) else npcHandler:say("Sorry, but you don't have your lottery ticket with you.", npc, creature) end npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 5 then - if player:getStorageValue(Storage.TheShatteredIsles.RaysMission1) == 1 then - npcHandler:say( - "Finally. You have no idea how difficult it is to keep something secret here. \ - And you brought me all the crystal coins I demanded?", - npc, - creature - ) + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission1) == 1 then + npcHandler:say("Finally. You have no idea how difficult it is to keep something secret here. And you brought me all the crystal coins I demanded?", npc, creature) npcHandler:setTopic(playerId, 6) end end @@ -166,11 +142,7 @@ keywordHandler:addKeyword({ "shop" }, StdModule.say, { npcHandler:setMessage(MESSAGE_GREET, "Hello |PLAYERNAME|, welcome to the fluid and potion {shop} of Edron.") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye, |PLAYERNAME|, please come back soon.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye, |PLAYERNAME|, please come back soon.") -npcHandler:setMessage( - MESSAGE_SENDTRADE, - "Of course, just browse through my wares. By the way, if you'd like to join our bonus \ - system for depositing flasks and vial, you have to tell me about that {deposit}." -) +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. By the way, if you'd like to join our bonus system for depositing flasks and vial, you have to tell me about that {deposit}.") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/sebastian.lua b/data-otservbr-global/npc/sebastian.lua index ebe69258f1d..0dd55b37af8 100644 --- a/data-otservbr-global/npc/sebastian.lua +++ b/data-otservbr-global/npc/sebastian.lua @@ -55,13 +55,13 @@ local function creatureSayCallback(npc, creature, type, message) local playerId = player:getId() if MsgContains(message, "nargor") then - if player:getStorageValue(Storage.TheShatteredIsles.AccessToNargor) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.AccessToNargor) == 1 then npcHandler:say("Do you want to sail Nargor for 50 gold coins?", npc, creature) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - if player:getStorageValue(Storage.TheShatteredIsles.AccessToNargor) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.AccessToNargor) == 1 then if player:removeMoneyBank(50) then npcHandler:say("Set the sails!", npc, creature) player:teleportTo(Position(32024, 32813, 7)) diff --git a/data-otservbr-global/npc/shauna.lua b/data-otservbr-global/npc/shauna.lua index fc6fd4fbf7e..b7834e5ffe8 100644 --- a/data-otservbr-global/npc/shauna.lua +++ b/data-otservbr-global/npc/shauna.lua @@ -60,7 +60,7 @@ local function creatureSayCallback(npc, creature, type, message) -- Mission 1 - The Supply Thief if MsgContains(message, "job") then - if Player(creature):getStorageValue(Storage.DjinnWar.EfreetFaction.Mission01) == 2 then + if Player(creature):getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission01) == 2 then npcHandler:say("What do you think? I am the sheriff of Carlin.", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -81,7 +81,7 @@ local function creatureSayCallback(npc, creature, type, message) "Obviously he wasn't pleased with this place, because he headed for Thais the next day. ...", "Something tells me that he won't stay out of trouble for too long.", }, npc, creature) - Player(creature):setStorageValue(Storage.DjinnWar.EfreetFaction.Mission01, 3) + Player(creature):setStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission01, 3) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/simon_the_beggar.lua b/data-otservbr-global/npc/simon_the_beggar.lua index 84cf524075b..1706321d132 100644 --- a/data-otservbr-global/npc/simon_the_beggar.lua +++ b/data-otservbr-global/npc/simon_the_beggar.lua @@ -72,123 +72,215 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end --- First beggar addon -local function BeggarFirst(npc, creature, message, keywords, parameters, node) +local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() - if player:isPremium() then - if player:getStorageValue(Storage.OutfitQuest.BeggarFirstAddonDoor) == -1 then - if player:getItemCount(5883) >= 100 and player:getMoney() + player:getBankBalance() >= 20000 then - if player:removeItem(5883, 100) and player:removeMoneyBank(20000) then - npcHandler:say("Ah, right! The beggar beard or beggar dress! Here you go.", npc, creature) + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + -- Outfits and Addons logic + if MsgContains(message, "outfit") then + if player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) == 6 then + if player:hasOutfit(player:getSex() == PLAYERSEX_FEMALE and 157 or 153) then + npcHandler:say("Haha, that beard is - well, not fake, but there's a trick behind it. I noticed people tend to be more generous towards a poor gramps. Want to know my trick?", npc, creature) + npcHandler:setTopic(playerId, 1) + end + end + elseif MsgContains(message, "100 ape fur") then + npcHandler:say("Have you brought me the 100 pieces of ape fur and 20000 gold pieces?", npc, creature) + npcHandler:setTopic(playerId, 3) + elseif MsgContains(message, "beard") then + if player:getSex() == PLAYERSEX_MALE then + if player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) == 8 then + npcHandler:say("Hmm, I'm not done yet with your potion. But here, let me sprinkle a few drops of my own potion on your face... there you go. Now you just have to wait.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, 9) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfitTimerAddon, os.time()) + elseif player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) == 9 then + local beggarOutfitTimer = player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfitTimerAddon) + if os.time() - beggarOutfitTimer >= 432000 then -- 5 dias em segundos + npcHandler:say("Aha! I can see it! Now that you've waited patiently without shaving, your beard is perfect! All thanks to my, err, potion. Yes. Goodbye!", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, 10) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:setStorageValue(Storage.OutfitQuest.BeggarFirstAddonDoor, 1) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarFirstAddonDoor, 1) player:addOutfitAddon(153, 1) - player:addOutfitAddon(157, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Hmm, it seems you need to wait a bit longer for the potion to take full effect. Please be patient.", npc, creature) end + end + end + elseif MsgContains(message, "addon") then + if player:getSex() == PLAYERSEX_MALE and player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) == 9 then + local beggarOutfitTimer = player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfitTimerAddon) + if os.time() - beggarOutfitTimer >= 432000 then + npcHandler:say("Aha! I can see it! Now that you've waited patiently without shaving, your beard is perfect! All thanks to my, err, potion. Yes. Goodbye!", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, 10) + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarFirstAddonDoor, 1) + player:addOutfitAddon(153, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Hmm, it seems you need to wait a bit longer for the potion to take full effect. Please be patient.", npc, creature) + end + end + elseif MsgContains(message, "gypsy dress") then + if player:getSex() == PLAYERSEX_FEMALE then + if player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) == 8 then + npcHandler:say("Oh, I'm sorry... I almost forgot! Okay, okay... here is your promised dress. I'm sure it will look so much better on you than on me- I mean, my, err, sister.", npc, creature) + player:addOutfitAddon(157, 1) + end + end + elseif MsgContains(message, "yes") then + if npcHandler:getTopic(playerId) == 1 then + if player:getSex() == PLAYERSEX_MALE then + npcHandler:say({ + "I can mix a secret potion which will increase your facial hair growth enormously. I call it 'Instabeard'. However, it requires certain ingredients. ...", + "For the small fee of 20000 gold pieces I will help you mix this potion. Just bring me 100 pieces of ape fur, which are necessary to create this potion. ...", + "Do we have a deal?", + }, npc, creature) + npcHandler:setTopic(playerId, 2) else - npcHandler:say("You do not have all the required items.", npc, creature) + npcHandler:say({ + "I can mix a secret potion which increases facial hair growth enormously. I call it 'Instabeard'. However, I fear it works only for men. ...", + "Even if it worked on girls, I'd rather not be responsible for you ruining your pretty face. I have an idea though. If you help me brew one of these potions, I will sell something nice to you. ...", + "I still have a pretty gypsy dress and a pearl necklace somewhere, which you could wear instead of this ragged skirt. For the small fee of 20000 gold pieces, it'd be yours. ...", + "You only have to bring me 100 pieces of ape fur, so I can brew the potion. Do we have a deal?", + }, npc, creature) + npcHandler:setTopic(playerId, 2) + end + elseif npcHandler:getTopic(playerId) == 2 then + npcHandler:say("Great! Come back to me once you have the 100 pieces of ape fur and I'll do my part of the deal.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, 7) + npcHandler:setTopic(playerId, 0) + elseif npcHandler:getTopic(playerId) == 3 then + if player:isPremium() then + if player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarFirstAddonDoor) == -1 then + if player:getItemCount(5883) >= 100 and player:getMoney() + player:getBankBalance() >= 20000 then + if player:removeItem(5883, 100) and player:removeMoneyBank(20000) then + npcHandler:say("Ahh! Very good. I will start mixing the potion immediately. Come back later. Bye bye.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, 8) + if player:getSex() == PLAYERSEX_MALE then + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfitTimerAddon, os.time()) + end + else + npcHandler:say("You do not have all the required items.", npc, creature) + end + else + npcHandler:say("You do not have all the required items.", npc, creature) + end + else + npcHandler:say("It seems you already have this addon, don't you try to mock me son!", npc, creature) + end end - else - npcHandler:say("It seems you already have this addon, don't you try to mock me son!", npc, creature) + npcHandler:setTopic(playerId, 0) end end -end --- Second beggar addon -local function BeggarSecond(npc, creature, message, keywords, parameters, node) - local player = Player(creature) - local playerId = player:getId() + -- Second addon logic + if MsgContains(message, "addon") and player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) == 10 then + npcHandler:say("No, no. Our deal is finished, no complaining now, I don't have time all day. And no, you can't have my staff.", npc, creature) + npcHandler:setTopic(playerId, 4) + elseif MsgContains(message, "staff") then + if npcHandler:getTopic(playerId) == 4 then + npcHandler:say("I said, no! Or well - I have a suggestion to make. Will you listen?", npc, creature) + npcHandler:setTopic(playerId, 5) + end + elseif MsgContains(message, "yes") then + if npcHandler:getTopic(playerId) == 5 then + npcHandler:say({ + "When I was wandering around in Tibia, I lost my favourite staff somewhere in the northern ruins in Edron. ...", + "Uh, don't ask me what I was doing there... sort of a pilgrimage. Well anyway, if you could bring that staff back to me, I promise I'll give you my current one. ...", + "What do you say?", + }, npc, creature) + npcHandler:setTopic(playerId, 6) + elseif npcHandler:getTopic(playerId) == 6 then + npcHandler:say("Good! Come back to me once you have retrieved my staff. Good luck.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, 11) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarFirstAddonDoor, 1) + npcHandler:setTopic(playerId, 0) + end + end - if player:isPremium() then - if player:getStorageValue(Storage.OutfitQuest.BeggarSecondAddon) == -1 then - if player:getItemCount(6107) >= 1 then - if player:removeItem(6107, 1) then - npcHandler:say("Ah, right! The beggar staff! Here you go.", npc, creature) - player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:setStorageValue(Storage.OutfitQuest.BeggarSecondAddon, 1) - player:addOutfitAddon(153, 2) - player:addOutfitAddon(157, 2) + if MsgContains(message, "staff") and player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) == 11 then + npcHandler:say("Did you bring my favourite staff??", npc, creature) + npcHandler:setTopic(playerId, 7) + elseif MsgContains(message, "yes") then + if npcHandler:getTopic(playerId) == 7 then + if player:isPremium() then + if player:getItemCount(6107) >= 1 then + if player:removeItem(6107, 1) then + npcHandler:say("Yes!! That's it! I'm so glad! Here, you can have my other one. Thanks!", npc, creature) + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarSecondAddon, 2) + player:addOutfitAddon(153, 2) + player:addOutfitAddon(157, 2) + else + npcHandler:say("You do not have the staff.", npc, creature) + end + else + npcHandler:say("You do not have the staff.", npc, creature) end else - npcHandler:say("You do not have all the required items.", npc, creature) + npcHandler:say("Sorry, but you need to have a premium account!", npc, creature) end - else - npcHandler:say("It seems you already have this addon, don't you try to mock me son!", npc, creature) + npcHandler:setTopic(playerId, 0) end end -end - -local function creatureSayCallback(npc, creature, type, message) - local player = Player(creature) - local playerId = player:getId() - - if not npcHandler:checkInteraction(npc, creature) then - return false - end if MsgContains(message, "cookie") then if player:getStorageValue(Storage.WhatAFoolish.Questline) == 31 and player:getStorageValue(Storage.WhatAFoolish.CookieDelivery.SimonTheBeggar) ~= 1 then npcHandler:say("Have you brought a cookie for the poor?", npc, creature) - npcHandler:setTopic(playerId, 1) + npcHandler:setTopic(playerId, 8) end elseif MsgContains(message, "help") then npcHandler:say("I need gold. Can you spare 100 gold pieces for me?", npc, creature) - npcHandler:setTopic(playerId, 2) + npcHandler:setTopic(playerId, 9) elseif MsgContains(message, "yes") then - if npcHandler:getTopic(playerId) == 1 then - if not player:removeItem(130, 1) then + if npcHandler:getTopic(playerId) == 8 then + if not player:removeItem(130, 8) then npcHandler:say("You have no cookie that I'd like.", npc, creature) npcHandler:setTopic(playerId, 0) return true end - player:setStorageValue(Storage.WhatAFoolish.CookieDelivery.SimonTheBeggar, 1) if player:getCookiesDelivered() == 10 then player:addAchievement("Allow Cookies?") end - npc:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS) - npcHandler:say( - "Well, it's the least you can do for those who live in dire poverty. \z - A single cookie is a bit less than I'd expected, but better than ... WHA ... WHAT?? \z - MY BEARD! MY PRECIOUS BEARD! IT WILL TAKE AGES TO CLEAR IT OF THIS CONFETTI!", - npc, - creature - ) + npcHandler:say({ + "Well, it's the least you can do for those who live in dire poverty.", + "A single cookie is a bit less than I'd expected, but better than ... WHA ... WHAT??", + "MY BEARD! MY PRECIOUS BEARD! IT WILL TAKE AGES TO CLEAR IT OF THIS CONFETTI!", + }, npc, creature) npcHandler:removeInteraction(npc, creature) npcHandler:resetNpc(creature) - elseif npcHandler:getTopic(playerId) == 2 then + elseif npcHandler:getTopic(playerId) == 9 then if not player:removeMoneyBank(100) then npcHandler:say("You haven't got enough money for me.", npc, creature) npcHandler:setTopic(playerId, 0) return true end - npcHandler:say("Thank you very much. Can you spare 500 more gold pieces for me? I will give you a nice hint.", npc, creature) - npcHandler:setTopic(playerId, 3) - elseif npcHandler:getTopic(playerId) == 3 then + npcHandler:setTopic(playerId, 10) + elseif npcHandler:getTopic(playerId) == 10 then if not player:removeMoneyBank(500) then npcHandler:say("Sorry, that's not enough.", npc, creature) npcHandler:setTopic(playerId, 0) return true end - - npcHandler:say( - "That's great! I have stolen something from Dermot. \z - You can buy it for 200 gold. Do you want to buy it?", - npc, - creature - ) - npcHandler:setTopic(playerId, 4) - elseif npcHandler:getTopic(playerId) == 4 then + npcHandler:say({ + "That's great! I have stolen something from Dermot.", + "You can buy it for 200 gold. Do you want to buy it?", + }, npc, creature) + npcHandler:setTopic(playerId, 11) + elseif npcHandler:getTopic(playerId) == 11 then if not player:removeMoneyBank(200) then npcHandler:say("Pah! I said 200 gold. You don't have that much.", npc, creature) npcHandler:setTopic(playerId, 0) return true end - local key = player:addItem(2968, 1) if key then key:setActionId(3940) @@ -196,78 +288,34 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Now you own the hot key.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif MsgContains(message, "no") and npcHandler:getTopic(playerId) ~= 0 then - if npcHandler:getTopic(playerId) == 1 then - npcHandler:say("I see.", npc, creature) - elseif npcHandler:getTopic(playerId) == 2 then - npcHandler:say("Hmm, maybe next time.", npc, creature) - elseif npcHandler:getTopic(playerId) == 3 then - npcHandler:say("It was your decision.", npc, creature) - elseif npcHandler:getTopic(playerId) == 4 then - npcHandler:say("Ok. No problem. I'll find another buyer.", npc, creature) - end + end + + if MsgContains(message, "no") and npcHandler:getTopic(playerId) ~= 0 then + local noResponse = { + [1] = "I see.", + [2] = "Hmm, maybe next time.", + [3] = "It was your decision.", + [4] = "I see.", + [5] = "Hmm, maybe next time.", + [6] = "It was your decision.", + [7] = "Ok. No problem", + [8] = "Ok. No problem", + [9] = "Ok. No problem", + [10] = "Ok. No problem", + [11] = "Ok. No problem", + } + npcHandler:say(noResponse[npcHandler:getTopic(playerId)], npc, creature) npcHandler:setTopic(playerId, 0) end + return true end --- Node 1 -local node1 = keywordHandler:addKeyword({ "addon" }, StdModule.say, { - npcHandler = npcHandler, - text = "For the small fee of 20000 gold pieces I will help you mix this potion. \z - Just bring me 100 pieces of ape fur, which are necessary to create this potion. ... Do we have a deal?", -}) -node1:addChildKeyword({ "yes" }, BeggarSecond, {}) -node1:addChildKeyword({ "no" }, StdModule.say, { - npcHandler = npcHandler, - text = "Alright then. Come back when you got all neccessary items.", - reset = true, -}) - --- Node 2 -local node2 = keywordHandler:addKeyword({ "dress" }, StdModule.say, { - npcHandler = npcHandler, - text = "For the small fee of 20000 gold pieces I will help you mix this potion. \z - Just bring me 100 pieces of ape fur, which are necessary to create this potion. ...Do we have a deal?", -}) -node2:addChildKeyword({ "yes" }, BeggarFirst, {}) -node2:addChildKeyword({ "no" }, StdModule.say, { - npcHandler = npcHandler, - text = "Alright then. Come back when you got all neccessary items.", - reset = true, -}) - --- Node 3 -local node3 = keywordHandler:addKeyword({ "staff" }, StdModule.say, { - npcHandler = npcHandler, - text = "To get beggar staff you need to give me simon the beggar's staff. Do you have it with you?", -}) -node3:addChildKeyword({ "yes" }, BeggarSecond, {}) -node3:addChildKeyword({ "no" }, StdModule.say, { - npcHandler = npcHandler, - text = "Alright then. Come back when you got all neccessary items.", - reset = true, -}) - --- Node 4 -local node4 = keywordHandler:addKeyword({ "outfit" }, StdModule.say, { - npcHandler = npcHandler, - text = "For the small fee of 20000 gold pieces I will help you mix this potion. \z - Just bring me 100 pieces of ape fur, which are necessary to create this potion. ...Do we have a deal?", -}) -node4:addChildKeyword({ "yes" }, BeggarFirst, {}) -node4:addChildKeyword({ "no" }, StdModule.say, { - npcHandler = npcHandler, - text = "Alright then. Come back when you got all neccessary items.", - reset = true, -}) - npcHandler:setMessage(MESSAGE_GREET, "Hello |PLAYERNAME|. I am a poor man. Please help me.") npcHandler:setMessage(MESSAGE_FAREWELL, "Have a nice day.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Have a nice day.") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) - npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- npcType registering the npcConfig table diff --git a/data-otservbr-global/npc/talphion.lua b/data-otservbr-global/npc/talphion.lua index 9a7ec7ae7e6..362dea22509 100644 --- a/data-otservbr-global/npc/talphion.lua +++ b/data-otservbr-global/npc/talphion.lua @@ -69,7 +69,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("CHESS? I DONT PLAY CHESS!", npc, creature) npcHandler:setTopic(playerId, 3) elseif npcHandler:getTopic(playerId) == 3 then - npcHandler:say("A PATTERN IN THIS MESS?? HEY DON'T INSULT MY MACHINEHALL!", npc, creature) + npcHandler:say("A PATTERN IN THIS MESS?? HEY DON'T INSULT MY MACHINE HALL!", npc, creature) npcHandler:setTopic(playerId, 4) elseif npcHandler:getTopic(playerId) == 4 then npcHandler:say("AH YES! I WORKED ON THE DRESS PATTERN FOR THOSE UNIFORMS. STAINLESS TROUSERES, STEAM DRIVEN BOOTS! ANOTHERMARVEL TO BEHOLD! I'LL SENT A COPY TO KEVIN IMEDIATELY!", npc, creature) diff --git a/data-otservbr-global/npc/tesha.lua b/data-otservbr-global/npc/tesha.lua index 6a3c4b9fadb..d204656baed 100644 --- a/data-otservbr-global/npc/tesha.lua +++ b/data-otservbr-global/npc/tesha.lua @@ -140,7 +140,7 @@ npcConfig.shop = { { itemName = "watermelon tourmaline", clientId = 33780, sell = 230000 }, { itemName = "wedding ring", clientId = 3004, buy = 990 }, { itemName = "white silk flower", clientId = 34008, sell = 9000 }, - { itemName = "white pearl", clientId = 3026, buy = 320 }, + { itemName = "white pearl", clientId = 3026, buy = 320, sell = 160 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/tezila.lua b/data-otservbr-global/npc/tezila.lua index fe667133ad7..f4d8cbafe44 100644 --- a/data-otservbr-global/npc/tezila.lua +++ b/data-otservbr-global/npc/tezila.lua @@ -115,7 +115,7 @@ npcConfig.shop = { { itemName = "unicorn figurine", clientId = 30054, sell = 50000 }, { itemName = "violet crystal shard", clientId = 16120, sell = 1500 }, { itemName = "wedding ring", clientId = 3004, buy = 990 }, - { itemName = "white pearl", clientId = 3026, buy = 320 }, + { itemName = "white pearl", clientId = 3026, buy = 320, sell = 160 }, { itemName = "white silk flower", clientId = 34008, sell = 9000 }, } diff --git a/data-otservbr-global/npc/the_blind_prophet.lua b/data-otservbr-global/npc/the_blind_prophet.lua index 682cc34446e..16ddb7a3c0c 100644 --- a/data-otservbr-global/npc/the_blind_prophet.lua +++ b/data-otservbr-global/npc/the_blind_prophet.lua @@ -83,11 +83,16 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 1) elseif npcHandler:getTopic(playerId) == 1 then if MsgContains(message, "yes") then - npcHandler:say("Take care!", npc, creature) - local destination = Position(33025, 32580, 6) - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - player:teleportTo(destination) - destination:sendMagicEffect(CONST_ME_TELEPORT) + local questlineValue = player:getStorageValue(Storage.Quest.U7_6.TheApeCity.Questline) + if questlineValue >= 15 then + npcHandler:say("Take care!", npc, creature) + local destination = Position(33025, 32580, 6) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + player:teleportTo(destination) + destination:sendMagicEffect(CONST_ME_TELEPORT) + else + npcHandler:say("You are not worthy to be transported there yet.", npc, creature) + end elseif MsgContains(message, "no") then npcHandler:say("Wise decision maybe.", npc, creature) end diff --git a/data-otservbr-global/npc/the_bone_master.lua b/data-otservbr-global/npc/the_bone_master.lua index 67a6322f299..99ee9989cb5 100644 --- a/data-otservbr-global/npc/the_bone_master.lua +++ b/data-otservbr-global/npc/the_bone_master.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "join") then - if player:getStorageValue(Storage.OutfitQuest.NightmareOutfit) < 1 and player:getStorageValue(Storage.OutfitQuest.BrotherhoodOutfit) < 1 then + if player:getStorageValue(Storage.Quest.U7_9.NightmareOutfits.Outfits) < 1 and player:getStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits) < 1 then npcHandler:say({ "The Brotherhood of Bones has suffered greatly in the past, but we did survive as we always will ...", "You have proven resourceful by beating the silly riddles the Nightmare Knights set up to test their candidates ...", @@ -69,13 +69,13 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "advancement") or MsgContains(message, "demonic") or MsgContains(message, "essence") then - if player:getStorageValue(Storage.OutfitQuest.BrotherhoodOutfit) == 1 then + if player:getStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits) == 1 then npcHandler:say("So you want to advance to a {Hyaena} rank? Did you bring 500 demonic essences with you?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.OutfitQuest.BrotherhoodOutfit) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits) == 2 then npcHandler:say("So you want to advance to a {Death Dealer} rank? Did you bring 1000 demonic essences with you?", npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.OutfitQuest.BrotherhoodOutfit) == 3 then + elseif player:getStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits) == 3 then npcHandler:say("So you want to advance to a {Dread Lord} rank? Did you bring 1500 demonic essences with you?", npc, creature) npcHandler:setTopic(playerId, 5) end @@ -92,14 +92,14 @@ local function creatureSayCallback(npc, creature, type, message) "Take it, if you are up to that challenge ... or perish in agony if you deserve this fate ...", "You can always ask me about your current rank and about the privileges the ranks grant to those who hold them.", }, npc, creature) - player:setStorageValue(Storage.OutfitQuest.BrotherhoodOutfit, 1) + player:setStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits, 1) player:addAchievement("Bone Brother") npcHandler:setTopic(playerId, 0) player:addItem(768, 1) elseif npcHandler:getTopic(playerId) == 3 then if player:removeItem(6499, 500) then player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:setStorageValue(Storage.OutfitQuest.BrotherhoodOutfit, 2) + player:setStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits, 2) player:addItem(769, 1) npcHandler:say("You advanced to {Hyaena} rank! You are now able to use teleports of second floor of Knightwatch Tower.", npc, creature) else @@ -109,7 +109,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 4 then if player:removeItem(6499, 1000) then player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:setStorageValue(Storage.OutfitQuest.BrotherhoodOutfit, 3) + player:setStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits, 3) player:addItem(770, 1) player:addItem(6432, 1) player:addAchievement("Skull and Bones") @@ -121,9 +121,9 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 5 then if player:removeItem(6499, 1500) then player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:setStorageValue(Storage.OutfitQuest.BrotherhoodOutfit, 4) - player:setStorageValue(Storage.OutfitQuest.BrotherhoodDoor, 1) - player:setStorageValue(Storage.KnightwatchTowerDoor, 1) + player:setStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits, 4) + player:setStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Door, 1) + player:setStorageValue(Storage.Quest.U7_9.NightmareOutfits.KnightwatchTowerDoor, 1) player:addAchievement("Dread Lord") npcHandler:say("You advanced to {Dread Lord} rank! You are now able to use teleports of fourth floor of Knightwatch Tower and to create addon scrolls.", npc, creature) else @@ -135,6 +135,9 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Welcome to my little realm.") +npcHandler:setMessage(MESSAGE_FAREWELL, "We will meet again.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/the_dream_master.lua b/data-otservbr-global/npc/the_dream_master.lua index b282908b375..c45afda22d3 100644 --- a/data-otservbr-global/npc/the_dream_master.lua +++ b/data-otservbr-global/npc/the_dream_master.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "join") then - if player:getStorageValue(Storage.OutfitQuest.BrotherhoodOutfit) < 1 and player:getStorageValue(Storage.OutfitQuest.NightmareOutfit) < 1 then + if player:getStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits) < 1 and player:getStorageValue(Storage.Quest.U7_9.NightmareOutfits.Outfits) < 1 then npcHandler:say({ "The Nightmare Knights are almost extinct now, and as far as I know I am the only teacher that is left. But you might beright and its time to accept new disciples ...", "After all you have passed the Dream Challenge to reach this place, which used to be the process of initiation in the past...", @@ -68,13 +68,13 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "advancement") or MsgContains(message, "demonic") or MsgContains(message, "essence") then - if player:getStorageValue(Storage.OutfitQuest.NightmareOutfit) == 1 then + if player:getStorageValue(Storage.Quest.U7_9.NightmareOutfits.Outfits) == 1 then npcHandler:say("So you want to advance to a {Initiate} rank? Did you bring 500 demonic essences with you?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.OutfitQuest.NightmareOutfit) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_9.NightmareOutfits.Outfits) == 2 then npcHandler:say("So you want to advance to a {Dreamer} rank? Did you bring 1000 demonic essences with you?", npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.OutfitQuest.NightmareOutfit) == 3 then + elseif player:getStorageValue(Storage.Quest.U7_9.NightmareOutfits.Outfits) == 3 then npcHandler:say("So you want to advance to a {Lord Protector} rank? Did you bring 1500 demonic essences with you?", npc, creature) npcHandler:setTopic(playerId, 5) end @@ -89,14 +89,14 @@ local function creatureSayCallback(npc, creature, type, message) "You can always ask me about your current rank and about the privileges the ranks grant to those who hold them.", }, npc, creature) player:addItem(768, 1) - player:setStorageValue(Storage.OutfitQuest.NightmareOutfit, 1) + player:setStorageValue(Storage.Quest.U7_9.NightmareOutfits.Outfits, 1) player:addAchievement("Nightmare Knight") npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then if player:removeItem(6499, 500) then player:addItem(769, 1) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:setStorageValue(Storage.OutfitQuest.NightmareOutfit, 2) + player:setStorageValue(Storage.Quest.U7_9.NightmareOutfits.Outfits, 2) npcHandler:say("You advanced to {Initiate} rank! You are now able to use teleports of second floor of Knightwatch Tower.", npc, creature) else npcHandler:say("Come back when you gather all essences.", npc, creature) @@ -105,7 +105,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 4 then if player:removeItem(6499, 1000) then player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:setStorageValue(Storage.OutfitQuest.NightmareOutfit, 3) + player:setStorageValue(Storage.Quest.U7_9.NightmareOutfits.Outfits, 3) player:addItem(770, 1) player:addItem(6390, 1) player:addAchievement("Nightmare Walker") @@ -117,9 +117,9 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 5 then if player:removeItem(6499, 1500) then player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:setStorageValue(Storage.OutfitQuest.NightmareOutfit, 4) - player:setStorageValue(Storage.OutfitQuest.NightmareDoor, 1) - player:setStorageValue(Storage.KnightwatchTowerDoor, 1) + player:setStorageValue(Storage.Quest.U7_9.NightmareOutfits.Outfits, 4) + player:setStorageValue(Storage.Quest.U7_9.NightmareOutfits.Door, 1) + player:setStorageValue(Storage.Quest.U7_9.NightmareOutfits.KnightwatchTowerDoor, 1) player:addAchievement("Lord Protector") npcHandler:say("You advanced to {Lord Protector} rank! You are now able to use teleports of fourth floor of Knightwatch Tower and to create addon scrolls.", npc, creature) else @@ -131,6 +131,9 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Be greeted, visitor.") +npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye. May the gods watch over your path.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/the_orc_king.lua b/data-otservbr-global/npc/the_orc_king.lua index c835f57e314..c7450c7dfdb 100644 --- a/data-otservbr-global/npc/the_orc_king.lua +++ b/data-otservbr-global/npc/the_orc_king.lua @@ -71,11 +71,11 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local efreet, marid = player:getStorageValue(Storage.DjinnWar.EfreetFaction.Mission03), player:getStorageValue(Storage.DjinnWar.MaridFaction.Mission03) + local efreet, marid = player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission03), player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission03) -- Mission 3 - Orc Fortress if MsgContains(message, "lamp") then if efreet == 1 or marid == 1 then - if player:getStorageValue(Storage.DjinnWar.ReceivedLamp) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.RecievedLamp) ~= 1 then npcHandler:say({ "I can sense your evil intentions to imprison a djinn! You are longing for the lamp, which I still possess. ...", "Who do you want to trap in this cursed lamp?", @@ -95,12 +95,12 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 1 then if MsgContains(message, "malor") then if efreet == 1 then - player:setStorageValue(Storage.DjinnWar.EfreetFaction.DoorToLamp, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.DoorToLamp, 1) elseif marid == 1 then - player:setStorageValue(Storage.DjinnWar.MaridFaction.DoorToLamp, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.DoorToLamp, 1) end - player:setStorageValue(Storage.DjinnWar.ReceivedLamp, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.RecievedLamp, 1) player:addItem(3231, 1) npcHandler:say("I was waiting for this day! Take the lamp and let Malor feel my wrath!", npc, creature) else @@ -150,7 +150,7 @@ keywordHandler:addKeyword({ "deathwish" }, StdModule.say, { npcHandler = npcHand keywordHandler:addKeyword({ "good djinn" }, StdModule.say, { npcHandler = npcHandler, text = "I will not share anything more about that topic with you {paleskins}." }) keywordHandler:addKeyword({ "paleskins" }, StdModule.say, { npcHandler = npcHandler, text = "You are as ugly as maggots, although not quite as as tasty." }) keywordHandler:addKeyword({ "malor" }, StdModule.say, { npcHandler = npcHandler, text = "This cursed djinn king! I set him free from an enchanted lamp, and he cheated me!" }, function(player) - return player:getStorageValue(Storage.DjinnWar.ReceivedLamp) == 1 + return player:getStorageValue(Storage.Quest.U7_4.DjinnWar.RecievedLamp) == 1 end) npcHandler:setCallback(CALLBACK_GREET, greetCallback) diff --git a/data-otservbr-global/npc/the_queen_of_the_banshees.lua b/data-otservbr-global/npc/the_queen_of_the_banshees.lua index 14ac38f4170..e619269fc64 100644 --- a/data-otservbr-global/npc/the_queen_of_the_banshees.lua +++ b/data-otservbr-global/npc/the_queen_of_the_banshees.lua @@ -60,62 +60,35 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "seventh seal") then - npcHandler:say( - "If you have passed the first six seals and entered the blue fires that lead to \z - the chamber of the seal you might receive my {kiss} ... It will open the last seal. \z - Do you think you are ready?", - npc, - creature - ) + npcHandler:say("If you have passed the first six seals and entered the blue fires that lead to the chamber of the seal you might receive my {kiss} ... It will open the last seal. Do you think you are ready?", npc, creature) npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "kiss") and npcHandler:getTopic(playerId) == 7 then if player:getStorageValue(Storage.Quest.U7_2.TheQueenOfTheBanshees.LastSeal) < 1 then - npcHandler:say( - "Are you prepared to receive my kiss, even though this will mean that your \z - death as well as a part of your soul will forever belong to me, my dear?", - npc, - creature - ) + npcHandler:say("Are you prepared to receive my kiss, even though this will mean that your death as well as a part of your soul will forever belong to me, my dear?", npc, creature) npcHandler:setTopic(playerId, 8) else npcHandler:say("You have already received my kiss. You should know better then to ask for it.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "spectral dress") then - if player:getStorageValue(Storage.ExplorerSociety.TheSpectralDress) == 48 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 48 and player:getStorageValue(Storage.ExplorerSociety.BansheeDoor) < 1 then - npcHandler:say( - "Your wish for a spectral dress is silly. \z - Although I will grant you the permission to take one. \z - My maidens left one in a box in a room, directly south of here.", - npc, - creature - ) - player:setStorageValue(Storage.ExplorerSociety.BansheeDoor, 1) + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralDress) == 48 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 48 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.BansheeDoor) < 1 then + npcHandler:say("Your wish for a spectral dress is silly. Although I will grant you the permission to take one. My maidens left one in a box in a room, directly south of here.", npc, creature) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.BansheeDoor, 1) end elseif MsgContains(message, "addon") then - if player:getStorageValue(Storage.OutfitQuest.WizardAddon) == 5 then - npcHandler:say( - "Say... I have been longing for something for an eternity now... \z - if you help me retrieve it, I will reward you. Do you consent to this arrangement?", - npc, - creature - ) + if player:getStorageValue(Storage.Quest.U7_8.WizardOutfits) == 5 then + npcHandler:say("Say... I have been longing for something for an eternity now... if you help me retrieve it, I will reward you. Do you consent to this arrangement?", npc, creature) npcHandler:setTopic(playerId, 9) end elseif MsgContains(message, "orchid") or MsgContains(message, "holy orchid") then - if player:getStorageValue(Storage.OutfitQuest.WizardAddon) == 6 then + if player:getStorageValue(Storage.Quest.U7_8.WizardOutfits) == 6 then npcHandler:say("Have you really brought me 50 holy orchids?", npc, creature) npcHandler:setTopic(playerId, 11) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then if player:getStorageValue(Storage.Quest.U7_2.TheQueenOfTheBanshees.FourthSeal) == 1 then - npcHandler:say( - "The Queen of the Banshee: Yessss, I can sense you have passed the seal of sacrifice. \z - Have you passed any other seal yet?", - npc, - creature - ) + npcHandler:say("The Queen of the Banshee: Yessss, I can sense you have passed the seal of sacrifice. Have you passed any other seal yet?", npc, creature) npcHandler:setTopic(playerId, 2) else npcHandler:say("You have not passed the seal of sacrifice yet. Return to me when you are better prepared.", npc, creature) @@ -123,12 +96,7 @@ local function creatureSayCallback(npc, creature, type, message) end elseif npcHandler:getTopic(playerId) == 2 then if player:getStorageValue(Storage.Quest.U7_2.TheQueenOfTheBanshees.FirstSeal) == 1 then - npcHandler:say( - "The Queen of the Banshee: I sense you have passed the hidden seal as well. \z - Have you passed any other seal yet?", - npc, - creature - ) + npcHandler:say("The Queen of the Banshee: I sense you have passed the hidden seal as well. Have you passed any other seal yet?", npc, creature) npcHandler:setTopic(playerId, 3) else npcHandler:say("You have not found the hidden seal yet. Return when you are better prepared.", npc, creature) @@ -136,12 +104,7 @@ local function creatureSayCallback(npc, creature, type, message) end elseif npcHandler:getTopic(playerId) == 3 then if player:getStorageValue(Storage.Quest.U7_2.TheQueenOfTheBanshees.SecondSeal) == 1 then - npcHandler:say( - "The Queen of the Banshee: Oh yes, you have braved the plague seal. \z - Have you passed any other seal yet?", - npc, - creature - ) + npcHandler:say("The Queen of the Banshee: Oh yes, you have braved the plague seal. Have you passed any other seal yet?", npc, creature) npcHandler:setTopic(playerId, 4) else npcHandler:say("You have not faced the plagueseal yet. Return to me when you are better prepared.", npc, creature) @@ -149,12 +112,7 @@ local function creatureSayCallback(npc, creature, type, message) end elseif npcHandler:getTopic(playerId) == 4 then if player:getStorageValue(Storage.Quest.U7_2.TheQueenOfTheBanshees.ThirdSeal) == 1 then - npcHandler:say( - "The Queen of the Banshee: Ah, I can sense the power of the seal of \z - demonrage burning in your heart. Have you passed any other seal yet?", - npc, - creature - ) + npcHandler:say("The Queen of the Banshee: Ah, I can sense the power of the seal of demonrage burning in your heart. Have you passed any other seal yet?", npc, creature) npcHandler:setTopic(playerId, 5) else npcHandler:say("You are not filled with the fury of the imprisoned demon. Return when you are better prepared.", npc, creature) @@ -162,12 +120,7 @@ local function creatureSayCallback(npc, creature, type, message) end elseif npcHandler:getTopic(playerId) == 5 then if player:getStorageValue(Storage.Quest.U7_2.TheQueenOfTheBanshees.FifthSeal) == 1 then - npcHandler:say( - "The Queen of the Banshee: So, you have managed to pass the seal of the true path. \z - Have you passed any other seal yet?", - npc, - creature - ) + npcHandler:say("The Queen of the Banshee: So, you have managed to pass the seal of the true path. Have you passed any other seal yet?", npc, creature) npcHandler:setTopic(playerId, 6) else npcHandler:say("You have not found your true path yet. Return when you are better prepared.", npc, creature) @@ -175,13 +128,7 @@ local function creatureSayCallback(npc, creature, type, message) end elseif npcHandler:getTopic(playerId) == 6 then if player:getStorageValue(Storage.Quest.U7_2.TheQueenOfTheBanshees.SixthSeal) == 1 then - npcHandler:say( - "The Queen of the Banshee: I see! You have mastered the seal of logic. \z - You have made the sacrifice, you have seen the unseen, you possess fortitude, \z - you have filled yourself with power and found your path. You may ask me for my {kiss} now.", - npc, - creature - ) + npcHandler:say("The Queen of the Banshee: I see! You have mastered the seal of logic. You have made the sacrifice, you have seen the unseen, you possess fortitude, you have filled yourself with power and found your path. You may ask me for my {kiss} now.", npc, creature) npcHandler:setTopic(playerId, 7) else npcHandler:say("You have not found your true path yet. Return to meh when you are better prepared.", npc, creature) @@ -197,30 +144,20 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(Storage.Quest.U7_2.TheQueenOfTheBanshees.LastSealDoor, 1) player:setStorageValue(Storage.Quest.U7_2.TheQueenOfTheBanshees.BansheeDoor, 1) else - npcHandler:say( - "You have spilled too much blood recently and the dead are hungry for your soul. \z - Perhaps return when you regained you inner balance.", - npc, - creature - ) + npcHandler:say("You have spilled too much blood recently and the dead are hungry for your soul. Perhaps return when you regained you inner balance.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 9 then - npcHandler:say({ - "Listen... there are no blooming flowers down here and the only smell present is that of death and decay. ...", - "I wish that I could breathe the lovely smell of beautiful flowers just one more time, \z - especially those which elves cultivate. ...", - "Could you please bring me 50 holy orchids?", - }, npc, creature) + npcHandler:say("Listen... there are no blooming flowers down here and the only smell present is that of death and decay. I wish that I could breathe the lovely smell of beautiful flowers just one more time, especially those which elves cultivate. Could you please bring me 50 holy orchids?", npc, creature) npcHandler:setTopic(playerId, 10) elseif npcHandler:getTopic(playerId) == 10 then npcHandler:say("Thank you. I will wait for your return.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.WizardAddon, 6) + player:setStorageValue(Storage.Quest.U7_8.WizardOutfits, 6) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 11 then if player:removeItem(5922, 50) then - npcHandler:say("Thank you! You have no idea what that means to me. As promised,here is your reward... as a follower of Zathroth, I hope that you will like this accessory.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.WizardAddon, 7) + npcHandler:say("Thank you! You have no idea what that means to me. As promised, here is your reward... as a follower of Zathroth, I hope that you will like this accessory.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.WizardOutfits, 7) player:addOutfitAddon(145, 1) player:addOutfitAddon(149, 1) player:addAchievement("Warlock") @@ -246,35 +183,27 @@ keywordHandler:addKeyword({ "stay" }, StdModule.say, { }) keywordHandler:addKeyword({ "guardian" }, StdModule.say, { npcHandler = npcHandler, - text = "I'm the {guardian} of the {SEVENTH} and final seal. The seal to open the last door before ... \z - but perhaps it's better to see it with your own eyes.", + text = "I'm the {guardian} of the {SEVENTH} and final seal. The seal to open the last door before ... but perhaps it's better to see it with your own eyes.", }) keywordHandler:addKeyword({ "place" }, StdModule.say, { npcHandler = npcHandler, - text = "It served as a temple, a source of power and ... \z - as a sender for an ancient {race} which lived a long time ago and has long been forgotten.", + text = "It served as a temple, a source of power and ... as a sender for an ancient {race} which lived a long time ago and has long been forgotten.", }) keywordHandler:addKeyword({ "race" }, StdModule.say, { npcHandler = npcHandler, - text = "The race that built this edifice came to this place from the stars. \z - They ran from an enemy even more horrible than themselves. \z - But they carried the {seed} of their own destruction in them.", + text = "The race that built this edifice came to this place from the stars. They ran from an enemy even more horrible than themselves. But they carried the {seed} of their own destruction in them.", }) keywordHandler:addKeyword({ "seed" }, StdModule.say, { npcHandler = npcHandler, - text = "This ancient race was annihilated by its own doings, that's all I know. \z - Aeons have passed since then, but the sheer presence of this {complex} is still defiling and desecrating this area.", + text = "This ancient race was annihilated by its own doings, that's all I know. Aeons have passed since then, but the sheer presence of this {complex} is still defiling and desecrating this area.", }) keywordHandler:addKeyword({ "complex" }, StdModule.say, { npcHandler = npcHandler, - text = "Its constructors were too strange for you or even me to understand. \z - We don't know what this ... thing they built was supposed to be good for. \z - I feel a constant twisting and binding of souls, though, that is probably only a side-effect.", + text = "Its constructors were too strange for you or even me to understand. We don't know what this ... thing they built was supposed to be good for. I feel a constant twisting and binding of souls, though, that is probably only a side-effect.", }) keywordHandler:addKeyword({ "ghostlands" }, StdModule.say, { npcHandler = npcHandler, - text = "The place you know as the Ghostlands had a different name once ... \z - and many names after. Too many to remember them all.", + text = "The place you know as the Ghostlands had a different name once ... and many names after. Too many to remember them all.", }) keywordHandler:addKeyword({ "banshee" }, StdModule.say, { npcHandler = npcHandler, diff --git a/data-otservbr-global/npc/tibra.lua b/data-otservbr-global/npc/tibra.lua index 3746347f1a6..ab8ef1271eb 100644 --- a/data-otservbr-global/npc/tibra.lua +++ b/data-otservbr-global/npc/tibra.lua @@ -52,23 +52,23 @@ end -- Wooden Stake keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "I think you have forgotten to bring your stake, my child." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 2 and player:getItemCount(5941) == 0 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 2 and player:getItemCount(5941) == 0 end) local stakeKeyword = keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "Yes, I was informed what to do. Are you prepared to receive my line of the prayer?" }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 2 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 2 end) stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "So receive my prayer: 'Hope may fill your heart - doubt shall be banned'. Now, bring your stake to Maealil in the elven settlement for the next line of the prayer. I will inform him what to do.", reset = true }, nil, function(player) - player:setStorageValue(Storage.FriendsandTraders.TheBlessedStake, 3) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, 3) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) end) stakeKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "I will wait for you.", reset = true }) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You should visit Maealil in the elven settlement now, my child." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 3 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 3 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You already received my line of the prayer, dear child." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) > 3 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) > 3 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "A blessed stake? That is a strange request, my child. Maybe Quentin knows more, he is one of the oldest monks after all." }) diff --git a/data-otservbr-global/npc/tom.lua b/data-otservbr-global/npc/tom.lua index c278a728d77..c66ade91e30 100644 --- a/data-otservbr-global/npc/tom.lua +++ b/data-otservbr-global/npc/tom.lua @@ -228,13 +228,13 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "cough syrup") then npcHandler:say("I had some cough syrup a while ago. It was stolen in an ape raid. I fear if you want more cough syrup you will have to buy it in the druids guild in carlin.", npc, creature) elseif MsgContains(message, "addon") then - if player:getStorageValue(Storage.OutfitQuest.DruidBodyAddon) < 1 then + if player:getStorageValue(Storage.Quest.U7_8.DruidOutfitsRook.DruidBodyAddonRook) < 1 then npcHandler:say("Would you like to wear bear paws like I do? No problem, just bring me 50 bear paws and 50 wolf paws and I'll fit them on.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.DruidBodyAddon, 1) + player:setStorageValue(Storage.Quest.U7_8.DruidOutfitsRook.DruidBodyAddonRook, 1) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "paws") or MsgContains(message, "bear paws") then - if player:getStorageValue(Storage.OutfitQuest.DruidBodyAddon) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.DruidOutfitsRook.DruidBodyAddonRook) == 1 then npcHandler:say("Have you brought 50 bear paws and 50 wolf paws?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -244,7 +244,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Excellent! Like promised, here are your bear paws. ", npc, creature) player:removeItem(5896, 50) player:removeItem(5897, 50) - player:setStorageValue(Storage.OutfitQuest.DruidBodyAddon, 2) + player:setStorageValue(Storage.Quest.U7_8.DruidOutfitsRook.DruidBodyAddonRook, 2) + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) player:addOutfitAddon(148, 1) player:addOutfitAddon(144, 1) npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/trisha.lua b/data-otservbr-global/npc/trisha.lua index 1dbafeb7024..2542d3dde3c 100644 --- a/data-otservbr-global/npc/trisha.lua +++ b/data-otservbr-global/npc/trisha.lua @@ -101,7 +101,7 @@ local topic = {} local function greetCallback(npc, creature) local playerId = creature:getId() - npcHandler:setMessage(MESSAGE_GREET, "Salutations, |PLAYERNAME|. What can I do for you?") + npcHandler:setMessage(MESSAGE_GREET, "Welcome back, knight |PLAYERNAME|!") topic[playerId] = nil return true end @@ -114,33 +114,18 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local player, storage = Player(creature), Storage.OutfitQuest.WarriorShoulderAddon + local player, storage = Player(creature), Storage.Quest.U7_8.WarriorOutfits.WarriorShoulderAddon if npcHandler:getTopic(playerId) == 0 then if table.contains({ "outfit", "addon" }, message) then - npcHandler:say( - "Are you talking about my spiky shoulder pad? You can't buy one of these. \z - They have to be {earned}.", - npc, - creature - ) + npcHandler:say("Are you talking about my spiky shoulder pad? You can't buy one of these. They have to be {earned}.", npc, creature) elseif MsgContains(message, "earn") then if player:getStorageValue(storage) < 1 then - npcHandler:say( - "I'm not sure if you are enough of a hero to earn them. \z - You could try, though. What do you think?", - npc, - creature - ) + npcHandler:say("I'm not sure if you are enough of a hero to earn them. You could try, though. What do you think?", npc, creature) npcHandler:setTopic(playerId, 1) elseif player:getStorageValue(storage) >= 1 and player:getStorageValue(storage) < 5 then npcHandler:say("Before I can nominate you for an award, please complete your task.", npc, creature) elseif player:getStorageValue(storage) == 5 then - npcHandler:say( - "You did it! I have seldom seen a man as courageous as you. \z - I really have to say that you deserve to wear a spike. Go ask Cornelia to adorn your armour.", - npc, - creature - ) + npcHandler:say("You did it! I have seldom seen a man as courageous as you. I really have to say that you deserve to wear a spike. Go ask Cornelia to adorn your armour.", npc, creature) end elseif config[message:lower()] then local targetMessage = config[message:lower()] @@ -158,8 +143,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say({ "Okay, who knows, maybe you have a chance. A really small one though. Listen up: ...", "First, you have to prove your guts by bringing me 100 hardened bones. ...", - "Next, if you actually managed to collect that many, please complete a small task for \z - our guild and bring us 100 turtle shells. ...", + "Next, if you actually managed to collect that many, please complete a small task for our guild and bring us 100 turtle shells. ...", "It is said that excellent shields can be created from these. ...", "Alright, um, afterwards show me that you have fighting spirit. Any true hero needs plenty of that. ...", "The last task is the hardest. You will need to bring me a claw from a mighty dragon king. ...", diff --git a/data-otservbr-global/npc/tyrias.lua b/data-otservbr-global/npc/tyrias.lua index 16dd2dd4ab7..6ea39bab9f2 100644 --- a/data-otservbr-global/npc/tyrias.lua +++ b/data-otservbr-global/npc/tyrias.lua @@ -90,16 +90,16 @@ stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, t -- Wooden Stake keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You don't even have that strange stake with you." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 10 and player:getItemCount(5941) == 0 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 10 and player:getItemCount(5941) == 0 end) local stakeKeyword = keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "Brewster sent me a strange message about some strange hocus-pocus. I think it's nonsense, but since you have come that far, I'll play along. Are you ready?" }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 10 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 10 end) stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "So receive my prayer: 'Your mind shall be a vessel for joy, light and wisdom' - uh, wow, something happened. Well, I guess that's it, but next time if you need some mumbo jumbo rather go to Chondur.", reset = true }, function(player) return player:getItemCount(5941) > 0 end, function(player) - player:setStorageValue(Storage.FriendsandTraders.TheBlessedStake, 11) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, 11) player:removeItem(5941, 1) player:addItem(5942, 1) end) @@ -107,10 +107,10 @@ stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler stakeKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem, I have other things to do.", reset = true }) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "A blessed stake? I don't believe in things like that. If anyone does, it's probably old Quentin." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) < 10 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) < 10 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "I won't do that rubbish again. Go pester Chondur with your hocus-pocus." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 11 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 11 end) -- Healing diff --git a/data-otservbr-global/npc/ubaid.lua b/data-otservbr-global/npc/ubaid.lua index f6fd3e814af..6d46bb32d9c 100644 --- a/data-otservbr-global/npc/ubaid.lua +++ b/data-otservbr-global/npc/ubaid.lua @@ -45,28 +45,48 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function endConversationWithDelay(npcHandler, npc, creature) + addEvent(function() + npcHandler:unGreet(npc, creature) + end, 1000) +end + local function greetCallback(npc, creature, message) local player = Player(creature) local playerId = player:getId() - if not MsgContains(message, "djanni'hah") and player:getStorageValue(Storage.DjinnWar.Faction.EfreetDoor) ~= 1 then + if not MsgContains(message, "djanni'hah") then npcHandler:say("Shove off, little one! Humans are not welcome here, |PLAYERNAME|!", npc, creature) + endConversationWithDelay(npcHandler, npc, creature) return false end - if player:getStorageValue(Storage.DjinnWar.Faction.Greeting) == -1 then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Start) == 1 then npcHandler:say({ "Hahahaha! ...", "|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!", }, npc, creature) + endConversationWithDelay(npcHandler, npc, creature) return false end - if player:getStorageValue(Storage.DjinnWar.Faction.EfreetDoor) ~= 1 then - npcHandler:setMessage(MESSAGE_GREET, "What? You know the word, |PLAYERNAME|? All right then - I won't kill you. At least, not now. What brings you {here}?") + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.Greeting) == -1 then + npcHandler:say({ + "Hahahaha! ...", + "|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!", + }, npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.EfreetDoor) ~= 1 then + npcHandler:say("What? You know the word, |PLAYERNAME|? All right then - I won't kill you. At least, not now. What brings you {here}?", npc, creature) else - npcHandler:setMessage(MESSAGE_GREET, "Still alive, |PLAYERNAME|? What brings you {here}?") + npcHandler:say("Still alive, |PLAYERNAME|? What brings you {here}?", npc, creature) end + + npcHandler:setInteraction(npc, creature) + return true end @@ -93,7 +113,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "passage") then - if player:getStorageValue(Storage.DjinnWar.Faction.EfreetDoor) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.EfreetDoor) ~= 1 then npcHandler:say({ "Only the mighty Efreet, the true djinn of Tibia, may enter Mal'ouquah! ...", "All Marid and little worms like yourself should leave now or something bad may happen. Am I right?", @@ -113,7 +133,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Of course. Then don't waste my time and shove off.", npc, creature) npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "no") then - if player:getStorageValue(Storage.DjinnWar.Faction.MaridDoor) == 1 then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.MaridDoor) == 1 then npcHandler:say("Who do you think you are? A Marid? Shove off you worm!", npc, creature) npcHandler:setTopic(playerId, 0) else @@ -140,8 +160,8 @@ local function creatureSayCallback(npc, creature, type, message) "Go now to general Baa'leal and don't forget to greet him correctly! ...", "And don't touch anything!", }, npc, creature) - player:setStorageValue(Storage.DjinnWar.Faction.EfreetDoor, 1) - player:setStorageValue(Storage.DjinnWar.Faction.Greeting, 0) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.EfreetDoor, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.Greeting, 0) elseif MsgContains(message, "no") then npcHandler:say("Of course. Then don't waste my time and shove off.", npc, creature) end @@ -150,8 +170,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end --- Greeting -keywordHandler:addGreetKeyword({ "djanni'hah" }, { npcHandler = npcHandler, text = "Shove off, little one! Humans are not welcome here, |PLAYERNAME|" }) +keywordHandler:addCustomGreetKeyword({ "djanni'hah" }, greetCallback, { npcHandler = npcHandler }) npcHandler:setMessage(MESSAGE_FAREWELL, "Farewell human!") npcHandler:setMessage(MESSAGE_WALKAWAY, "Farewell human!") diff --git a/data-otservbr-global/npc/umar.lua b/data-otservbr-global/npc/umar.lua index 51865a19cbb..4836c568958 100644 --- a/data-otservbr-global/npc/umar.lua +++ b/data-otservbr-global/npc/umar.lua @@ -45,32 +45,52 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function endConversationWithDelay(npcHandler, npc, creature) + addEvent(function() + npcHandler:unGreet(npc, creature) + end, 1000) +end + local function greetCallback(npc, creature, message) local player = Player(creature) local playerId = player:getId() - if not MsgContains(message, "djanni'hah") and player:getStorageValue(Storage.DjinnWar.Faction.MaridDoor) ~= 1 then + if not MsgContains(message, "djanni'hah") then npcHandler:say("Whoa! A human! This is no place for you, |PLAYERNAME|. Go and play somewhere else.", npc, creature) + endConversationWithDelay(npcHandler, npc, creature) return false end - if player:getStorageValue(Storage.DjinnWar.Faction.Greeting) == -1 then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Start) == 1 then npcHandler:say({ "Hahahaha! ...", "|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!", }, npc, creature) + endConversationWithDelay(npcHandler, npc, creature) return false end - if player:getStorageValue(Storage.DjinnWar.Faction.MaridDoor) ~= 1 then - npcHandler:setMessage(MESSAGE_GREET, { + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.Greeting) == -1 then + npcHandler:say({ + "Hahahaha! ...", + "|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!", + }, npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.MaridDoor) ~= 1 then + npcHandler:say({ "Whoa? You know the word! Amazing, |PLAYERNAME|! ...", "I should go and tell Fa'hradin. ...", "Well. Why are you here anyway, |PLAYERNAME|?", - }) + }, npc, creature) else - npcHandler:setMessage(MESSAGE_GREET, "|PLAYERNAME|! How's it going these days? What brings you {here}?") + npcHandler:say("|PLAYERNAME|! How's it going these days? What brings you {here}?", npc, creature) end + + npcHandler:setInteraction(npc, creature) + return true end @@ -98,7 +118,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "passage") then - if player:getStorageValue(Storage.DjinnWar.Faction.MaridDoor) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.MaridDoor) ~= 1 then npcHandler:say({ "If you want to enter our fortress you have to become one of us and fight the Efreet. ...", "So, are you willing to do so?", @@ -109,7 +129,7 @@ local function creatureSayCallback(npc, creature, type, message) end elseif npcHandler:getTopic(playerId) == 1 then if MsgContains(message, "yes") then - if player:getStorageValue(Storage.DjinnWar.Faction.EfreetDoor) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.EfreetDoor) ~= 1 then npcHandler:say("Are you sure? You pledge loyalty to king Gabel, who is... you know. And you are willing to never ever set foot on Efreets' territory, unless you want to kill them? Yes?", npc, creature) npcHandler:setTopic(playerId, 2) else @@ -126,8 +146,8 @@ local function creatureSayCallback(npc, creature, type, message) "Oh. Ok. Welcome then. You may pass. ...", "And don't forget to kill some Efreets, now and then.", }, npc, creature) - player:setStorageValue(Storage.DjinnWar.Faction.MaridDoor, 1) - player:setStorageValue(Storage.DjinnWar.Faction.Greeting, 0) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.MaridDoor, 1) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.Greeting, 0) elseif MsgContains(message, "no") then npcHandler:say("This isn't your war anyway, human.", npc, creature) end @@ -137,7 +157,7 @@ local function creatureSayCallback(npc, creature, type, message) end -- Greeting -keywordHandler:addGreetKeyword({ "djanni'hah" }, { npcHandler = npcHandler, text = "Whoa! A human! This is no place for you, |PLAYERNAME|. Go and play somewhere else" }) +keywordHandler:addCustomGreetKeyword({ "djanni'hah" }, greetCallback, { npcHandler = npcHandler }) npcHandler:setMessage(MESSAGE_FAREWELL, "Aaaa -tention!") npcHandler:setMessage(MESSAGE_WALKAWAY, "Aaaa -tention!") diff --git a/data-otservbr-global/npc/ustan.lua b/data-otservbr-global/npc/ustan.lua index b7c037ae6e9..cd0ccf33b4b 100644 --- a/data-otservbr-global/npc/ustan.lua +++ b/data-otservbr-global/npc/ustan.lua @@ -61,13 +61,13 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "cough syrup") then npcHandler:say("I had some cough syrup a while ago. It was stolen in an ape raid. I fear if you want more cough syrup you will have to buy it in the druids guild in carlin.", npc, creature) elseif MsgContains(message, "addon") then - if player:getStorageValue(Storage.OutfitQuest.DruidBodyAddon) < 1 then + if player:getStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidBodyAddon) < 1 then npcHandler:say("Would you like to wear bear paws like I do? No problem, just bring me 50 bear paws and 50 wolf paws and I'll fit them on.", npc, creature) - player:setStorageValue(Storage.OutfitQuest.DruidBodyAddon, 1) + player:setStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidBodyAddon, 1) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "paws") or MsgContains(message, "bear paws") then - if player:getStorageValue(Storage.OutfitQuest.DruidBodyAddon) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidBodyAddon) == 1 then npcHandler:say("Have you brought 50 bear paws and 50 wolf paws?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -77,7 +77,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Excellent! Like promised, here are your bear paws. ", npc, creature) player:removeItem(5896, 50) player:removeItem(5897, 50) - player:setStorageValue(Storage.OutfitQuest.DruidBodyAddon, 2) + player:setStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidBodyAddon, 2) + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) player:addOutfitAddon(148, 1) player:addOutfitAddon(144, 1) npcHandler:setTopic(playerId, 0) @@ -87,6 +88,8 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Crunor's blessing, traveller.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/uzgod.lua b/data-otservbr-global/npc/uzgod.lua index 698ad8ea579..db9ec364b58 100644 --- a/data-otservbr-global/npc/uzgod.lua +++ b/data-otservbr-global/npc/uzgod.lua @@ -57,7 +57,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "piece of draconian steel") then + if MsgContains(message, "piece of draconian steel") and player:getStorageValue(Storage.Quest.U7_8.ObsidianKnife) < 1 then npcHandler:say("You bringing me draconian steel and obsidian lance in exchange for obsidian knife?", npc, creature) npcHandler:setTopic(playerId, 15) elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 15 then @@ -65,6 +65,7 @@ local function creatureSayCallback(npc, creature, type, message) if player:removeItem(5889, 1) and player:removeItem(3313, 1) then npcHandler:say("Here you have it.", npc, creature) player:addItem(5908, 1) + player:setStorageValue(Storage.Quest.U7_8.ObsidianKnife, 1) npcHandler:setTopic(playerId, 0) end else @@ -74,7 +75,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "pickaxe") then - if player:getStorageValue(Storage.ExplorerSociety.JoiningTheExplorers) == 1 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 1 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers) == 1 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 1 then npcHandler:say("True dwarven pickaxes having to be maded by true weaponsmith! You wanting to get pickaxe for explorer society?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -89,7 +90,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 6) end elseif MsgContains(message, "brooch") then - if player:getStorageValue(Storage.ExplorerSociety.JoiningTheExplorers) == 3 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 3 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers) == 3 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 3 then npcHandler:say("You got me brooch?", npc, creature) npcHandler:setTopic(playerId, 3) end @@ -103,9 +104,9 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Last key should be in the generals quarter near armory. Only General might have key to enter there too. But me not knowing how to enter Generals private room at barracks. You looking on your own ...", npc, creature) npcHandler:say("When got key, then you going down to dwarven prison and getting me that brooch. Tell me that you got brooch when having it.", npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.ExplorerSociety.JoiningTheExplorers, 2) - player:setStorageValue(Storage.ExplorerSociety.DwacatraDoor, 1) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 2) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers, 2) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.DwacatraDoor, 1) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 2) elseif npcHandler:getTopic(playerId) == 3 then if player:removeItem(4834, 1) then ----- npcHandler:say("Thanking you for brooch. Me guessing you now want your pickaxe?", npc, creature) @@ -114,8 +115,8 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 4 then npcHandler:say("Here you have it.", npc, creature) player:addItem(4845, 1) ----- - player:setStorageValue(Storage.ExplorerSociety.JoiningTheExplorers, 4) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 4) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers, 4) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 4) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 9 then if player:getMoney() + player:getBankBalance() >= 250 and player:getItemCount(5880) >= 3 then @@ -142,6 +143,10 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Hiho |PLAYERNAME|! Wanna weapon, eh?") +npcHandler:setMessage(MESSAGE_FAREWELL, "Guut bye. Coming back soon.") +npcHandler:setMessage(MESSAGE_WALKAWAY, "Guut bye. Coming back soon.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/vascalir.lua b/data-otservbr-global/npc/vascalir.lua index 0f07ecaf73d..ef799e65709 100644 --- a/data-otservbr-global/npc/vascalir.lua +++ b/data-otservbr-global/npc/vascalir.lua @@ -218,6 +218,7 @@ local mission2Accept = mission2:addChildKeyword( text = { "Great. We best start by reinforcing our defences. There are four large catapults positioned on roofs high over the village. If you want to fight, you have to build up some muscles. ...", "Go into the barn just a few steps to the north-west of here and down the ladder into the cellar. You'll find a huge stone pile down there. Use it to pick up one of the big stones. ...", + "They are really heavy, so make sure you have lots of space in your inventory. ...", "Carry one stone to at least two of the four catapults located on Norma's roof to the north, this academy and Obi's roof to the south. ...", "Use the stone on the catapult to load it. You can load each catapult only once, so try spotting two different catapults. Have you understood all of that?", }, @@ -279,6 +280,7 @@ local mission3 = keywordHandler:addKeyword({ "yes" }, StdModule.say, { text = { "Ah, that came with confidence. Suited monsters to do some basic fighting would be rats - they actually fight back, but they don't hit that hard. Just make sure you wear your new studded shield and a sword. ...", "You can find rats in the sewers. In case you might think so, this task is not a lame excuse to help us with some rat infestation, we got the rat population quite under control. ...", + "Also please don't come carrying their dead bodies - what adventurers somehow tend to do for some reason. Maybe they think they're cats? I'm going to believe you, promise. ...", "So, back to the topic - please kill 5 rats and then come back to me. Shouldn't be too hard, should it? Just pay attention they don't trap you in a narrow passage and take on one at a time. ...", "If you run low on health, go on full defence - click the little shield icon - and leave the dungeon. Nothing corwardish about running, because dying hurts. Are you ready to go?", }, @@ -301,9 +303,9 @@ mission3:addChildKeyword( { npcHandler = npcHandler, text = { - "Nice. I've marked two rat dungeons on your map. Kill 5 rats and return to me. Smart adventurers try to face one creature at a time - use the environment to your advantage. ...", - "If you should happen to forget how many you have killed in the meantime, simply check your questlog. ...", - "Once you reach level 8, you should leave this island. While it is possible to reach higher levels, this quest is meant to be played up to level 8. ...", + "Nice. I've marked two rat dungeons on your map. Kill 5 rats and return to me. If you should happen to forget how many you have killed in the meantime, simply check your questlog. ...", + "I should also give you a small word of warning - once you reach level 8, you should leave this island. Thus you won't be able to continue this quest once you've reached level 9. ...", + "It's not good to reach level 9 without having chosen a vocation - you'll be weaker than normal. ...", "No need to be scared, just saying you don't need to plan large hunting sessions while helping me with this mission or kill more rats than I've asked you to. So, good hunting!", }, }, @@ -348,7 +350,7 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { "Anyway, I think you're well enough equipped now to leave the village of Rookgaard for another small task. Find Lily south-west of here, she will tell you what she needs done.", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission03) == 1 and player:getStorageValue(Storage.TheRookieGuard.RatKills) == 5 + return player:getStorageValue(Storage.TheRookieGuard.Mission03) == 1 and player:getStorageValue(Storage.TheRookieGuard.RatKills) >= 5 end, function(player) player:setStorageValue(Storage.TheRookieGuard.Mission03, 2) player:setStorageValue(Storage.TheRookieGuard.Mission04, 1) @@ -884,7 +886,7 @@ end) keywordHandler:addKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = { - "You DID kill him indeed! Incredible! This little village can finally live in peace again - and you've grown so strong, too. I'm proud of you, Synanceia Horrida. My work here is done, and yours too. Thank you for all you've done for us. ...", + "You DID kill him indeed! Incredible! This little village can finally live in peace again - and you've grown so strong, too. I'm proud of you, |PLAYERNAME|. My work here is done, and yours too. Thank you for all you've done for us. ...", "Now all that is left for you to do here is to talk to the oracle above the academy and travel to the Isle of Destiny. There, you will determine your future - which I'm sure is a bright one. ...", "What will become of you? A mighty sorcerer? A fierce knight? A skilled paladin? Or a powerful druid? Only you can decide. ...", "Rookgaard will miss you, but the whole world of Tibia is open to you now. Take care, |PLAYERNAME|. It's good to know you.", diff --git a/data-otservbr-global/npc/vescu.lua b/data-otservbr-global/npc/vescu.lua index b5bb19f773f..57924d9c601 100644 --- a/data-otservbr-global/npc/vescu.lua +++ b/data-otservbr-global/npc/vescu.lua @@ -91,14 +91,23 @@ local config = { }, } +local function endConversationWithDelay(npcHandler, npc, creature) + addEvent(function() + npcHandler:unGreet(npc, creature) + end, 1000) +end + local function greetCallback(npc, creature) local playerId = creature:getId() - if Player(creature):getCondition(CONDITION_DRUNK) then + if Player(creature):getCondition(CONDITION_DRUNK) and player:getStorageValue(Storage.Quest.U7_8.AssassinOutfits.AssassinBaseOutfit) < 1 then npcHandler:setMessage(MESSAGE_GREET, "Hey t-there, you look like someone who enjoys a good {booze}.") + npcHandler:setInteraction(npc, creature) else npcHandler:say("Oh, two t-trolls. Hellooo, wittle twolls. ", npc, creature) + endConversationWithDelay(npcHandler, npc, creature) return false end + return true end @@ -110,29 +119,36 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "potion") then - if player:getStorageValue(Storage.OutfitQuest.AssassinBaseOutfit) < 1 then - npcHandler:say("It's so hard to know the exact time when to stop drinking. C-could you help me to brew such a potion?", npc, creature) + if MsgContains(message, "sober") then + if player:getStorageValue(Storage.Quest.U7_8.AssassinOutfits.AssassinBaseOutfit) < 1 then + npcHandler:say("I wish there was like a {potion} which makes you sober in an instant. Dwarven rings wear off so fast. ", npc, creature) npcHandler:setTopic(playerId, 1) end + elseif MsgContains(message, "potion") then + if npcHandler:getTopic(playerId) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.AssassinOutfits.AssassinBaseOutfit) < 1 then + npcHandler:say("It's so hard to know the exact time when to stop drinking. C-could you help me to brew such a potion?", npc, creature) + npcHandler:setTopic(playerId, 2) + end + end elseif config[message] and npcHandler:getTopic(playerId) == 0 then - if player:getStorageValue(Storage.OutfitQuest.AssassinBaseOutfit) == config[message].storageValue then + if player:getStorageValue(Storage.Quest.U7_8.AssassinOutfits.AssassinBaseOutfit) == config[message].storageValue then npcHandler:say(config[message].text[1], npc, creature) - npcHandler:setTopic(playerId, 3) + npcHandler:setTopic(playerId, 4) topic[playerId] = message else npcHandler:say(config[message].text[2], npc, creature) end elseif MsgContains(message, "secret") then - if player:getStorageValue(Storage.OutfitQuest.AssassinBaseOutfit) == 8 then + if player:getStorageValue(Storage.Quest.U7_8.AssassinOutfits.AssassinBaseOutfit) == 8 then npcHandler:say("Right. Since you helped me to b-brew that potion and thus ensured the high quality of my work , I'll give you my old assassin costume. It lacks the head part, but it's almost like new. Don't pretend to be me though, 'kay? ", npc, creature) player:addOutfit(156) player:addOutfit(152) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) - player:setStorageValue(Storage.OutfitQuest.AssassinBaseOutfit, 9) + player:setStorageValue(Storage.Quest.U7_8.AssassinOutfits.AssassinBaseOutfit, 9) end elseif MsgContains(message, "yes") then - if npcHandler:getTopic(playerId) == 1 then + if npcHandler:getTopic(playerId) == 2 then npcHandler:say({ "You're a true buddy. I promise I will t-try to avoid killing you even if someone asks me to. ...", "Listen, I have this old formula from my grandma. It says... 30 {bonelord eyes}... 10 {red dragon scales}. ...", @@ -140,15 +156,15 @@ local function creatureSayCallback(npc, creature, type, message) "Add 20 ounces of {vampire dust}, 10 ounces of {demon dust} and mix well with one flask of {warrior's sweat}. ...", "Okayyy, this is a lot... we'll take this step by step. Will you help me gathering 30 {bonelord eyes}?", }, npc, creature) - npcHandler:setTopic(playerId, 2) - elseif npcHandler:getTopic(playerId) == 2 then + npcHandler:setTopic(playerId, 3) + elseif npcHandler:getTopic(playerId) == 3 then if player:getStorageValue(Storage.OutfitQuest.DefaultStart) ~= 1 then player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) end - player:setStorageValue(Storage.OutfitQuest.AssassinBaseOutfit, 1) + player:setStorageValue(Storage.Quest.U7_8.AssassinOutfits.AssassinBaseOutfit, 1) npcHandler:say("G-good. Go get them, I'll have a beer in the meantime.", npc, creature) npcHandler:setTopic(playerId, 0) - elseif npcHandler:getTopic(playerId) == 3 then + elseif npcHandler:getTopic(playerId) == 4 then local targetMessage = config[topic[playerId]] local count = targetMessage.count or 1 if not player:removeItem(targetMessage.itemId, count) then @@ -157,14 +173,14 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.OutfitQuest.AssassinBaseOutfit, player:getStorageValue(Storage.OutfitQuest.AssassinBaseOutfit) + 1) + player:setStorageValue(Storage.Quest.U7_8.AssassinOutfits.AssassinBaseOutfit, player:getStorageValue(Storage.Quest.U7_8.AssassinOutfits.AssassinBaseOutfit) + 1) npcHandler:say(targetMessage.text[3], npc, creature) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "no") then - if npcHandler:getTopic(playerId) ~= 3 then + if npcHandler:getTopic(playerId) ~= 4 then npcHandler:say("Then not .", npc, creature) - elseif npcHandler:getTopic(playerId) == 3 then + elseif npcHandler:getTopic(playerId) == 4 then npcHandler:say("H-hurry up! I have to start working soon.", npc, creature) end npcHandler:setTopic(playerId, 0) @@ -177,14 +193,6 @@ local function onReleaseFocus(npc, creature) topic[playerId] = nil end -keywordHandler:addKeyword({ "addon" }, StdModule.say, { npcHandler = npcHandler, text = "I can give you a scar as an addon. Nyahahah." }) -keywordHandler:addKeyword({ "booze" }, StdModule.say, { npcHandler = npcHandler, text = "Did I say booze? I meant, {flamingo}. Pink birds are kinda cool, don't you think? Especially on a painting." }) -keywordHandler:addKeyword({ "flamingo" }, StdModule.say, { npcHandler = npcHandler, text = "You have to enjoy the word. Like, {flayyyminnngoooo}. Say it with me. " }) -keywordHandler:addKeyword({ "flayyyminnngoooo" }, StdModule.say, { npcHandler = npcHandler, text = "Yes, you got it! Hahaha, we understand each other. Good {job}. " }) -keywordHandler:addKeyword({ "job" }, StdModule.say, { npcHandler = npcHandler, text = "I'm a killer! Yeshindeed! A masterful assassin. I prefer that too 'Peekay'. " }) -keywordHandler:addKeyword({ "outfit" }, StdModule.say, { npcHandler = npcHandler, text = "O-outfit? You already have a t-troll outfit. That's good enough for you. " }) -keywordHandler:addKeyword({ "sober" }, StdModule.say, { npcHandler = npcHandler, text = "I wish there was like a {potion} which makes you sober in an instant. Dwarven rings wear off so fast. " }) - npcHandler:setMessage(MESSAGE_FAREWELL, "T-time for another b-beer. ") npcHandler:setMessage(MESSAGE_WALKAWAY, "Oh, two t-trolls. Hellooo, wittle twolls. ") diff --git a/data-otservbr-global/npc/vulturenose.lua b/data-otservbr-global/npc/vulturenose.lua index 97610fff906..3623e661cc6 100644 --- a/data-otservbr-global/npc/vulturenose.lua +++ b/data-otservbr-global/npc/vulturenose.lua @@ -54,21 +54,16 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "enter") then - if player:getStorageValue(Storage.TheShatteredIsles.RaysMission3) == 1 and player:getStorageValue(Storage.TheShatteredIsles.YavernDoor) < 0 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission3) == 1 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.YavernDoor) < 0 then local headItem = player:getSlotItem(CONST_SLOT_HEAD) local armorItem = player:getSlotItem(CONST_SLOT_ARMOR) local legsItem = player:getSlotItem(CONST_SLOT_LEGS) local feetItem = player:getSlotItem(CONST_SLOT_FEET) if headItem and headItem.itemid == 6096 and armorItem and armorItem.itemid == 6095 and legsItem and legsItem.itemid == 5918 and feetItem and feetItem.itemid == 5461 then npcHandler:say("Hey, I rarely see a dashing pirate like you! Get in, matey!", npc, creature) - player:setStorageValue(Storage.TheShatteredIsles.YavernDoor, 1) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.YavernDoor, 1) else - npcHandler:say( - "YOU WILL NOT PASS! Erm ... \ - I mean you don't look like a true pirate to me. You won't get in.", - npc, - creature - ) + npcHandler:say("YOU WILL NOT PASS! Erm ... I mean you don't look like a true pirate to me. You won't get in.", npc, creature) end end end diff --git a/data-otservbr-global/npc/wyrdin.lua b/data-otservbr-global/npc/wyrdin.lua index ee7ff28fdee..6e66b007db7 100644 --- a/data-otservbr-global/npc/wyrdin.lua +++ b/data-otservbr-global/npc/wyrdin.lua @@ -77,7 +77,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.TheWayToYalahar.QuestLine) < 1 and player:getStorageValue(Storage.ExplorerSociety.JoiningTheExplorers) >= 4 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) >= 4 then + if player:getStorageValue(Storage.TheWayToYalahar.QuestLine) < 1 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers) >= 4 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) >= 4 then npcHandler:say({ "There is indeed something that needs our attention. In the far north, a new city named Yalahar was discovered. It seems to be incredibly huge. ...", "According to travelers, it's a city of glory and wonders. We need to learn as much as we can about this city and its inhabitants. ...", diff --git a/data-otservbr-global/npc/yaman.lua b/data-otservbr-global/npc/yaman.lua index 3c66cd888e5..cb86fd7346f 100644 --- a/data-otservbr-global/npc/yaman.lua +++ b/data-otservbr-global/npc/yaman.lua @@ -45,6 +45,37 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function endConversationWithDelay(npcHandler, npc, creature) + addEvent(function() + npcHandler:unGreet(npc, creature) + end, 1000) +end + +local function greetCallback(npc, creature, message) + local player = Player(creature) + local playerId = player:getId() + + if not MsgContains(message, "djanni'hah") then + npcHandler:say("Shove off, little one! Humans are not welcome here, |PLAYERNAME|!", npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Start) == 1 then + npcHandler:say({ + "Hahahaha! ...", + "|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!", + }, npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + npcHandler:say("Be greeted, human |PLAYERNAME|. How can a humble djinn be of service?", npc, creature) + npcHandler:setInteraction(npc, creature) + + return true +end + local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -121,18 +152,20 @@ local function onTradeRequest(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.DjinnWar.EfreetFaction.Mission03) ~= 3 then + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission03) ~= 3 then npcHandler:say("I'm sorry, but you don't have Malor's permission to trade with me.", npc, creature) return false end return true end -npcHandler:setMessage(MESSAGE_GREET, "Be greeted, human |PLAYERNAME|. How can a humble djinn be of service?") +keywordHandler:addCustomGreetKeyword({ "djanni'hah" }, greetCallback, { npcHandler = npcHandler }) + npcHandler:setMessage(MESSAGE_FAREWELL, "Farewell, human.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Farewell, human.") npcHandler:setMessage(MESSAGE_SENDTRADE, "At your service, just browse through my wares.") +npcHandler:setCallback(CALLBACK_GREET, greetCallback) npcHandler:setCallback(CALLBACK_ON_TRADE_REQUEST, onTradeRequest) npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) diff --git a/data-otservbr-global/npc/yberius.lua b/data-otservbr-global/npc/yberius.lua index 7d2f6fa7b9b..ab6a48d323b 100644 --- a/data-otservbr-global/npc/yberius.lua +++ b/data-otservbr-global/npc/yberius.lua @@ -89,23 +89,23 @@ stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, t -- Wooden Stake keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "I think you have forgotten to bring your stake." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 4 and player:getItemCount(5941) == 0 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 4 and player:getItemCount(5941) == 0 end) local stakeKeyword = keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "Yes, I was informed what to do. Are you prepared to receive my line of the prayer?" }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 4 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 4 end) stakeKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "So receive my prayer: 'Protection will be granted - from dangers at hand'. Now, bring your stake to Isimov in the dwarven settlement for the next line of the prayer. I will inform him what to do.", reset = true }, nil, function(player) - player:setStorageValue(Storage.FriendsandTraders.TheBlessedStake, 5) + player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, 5) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) end) stakeKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "I will wait for you.", reset = true }) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You should visit Isimov in the dwarven settlement now." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) == 5 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) == 5 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "You already received my line of the prayer." }, function(player) - return player:getStorageValue(Storage.FriendsandTraders.TheBlessedStake) > 5 + return player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake) > 5 end) keywordHandler:addKeyword({ "stake" }, StdModule.say, { npcHandler = npcHandler, text = "A blessed stake? That is a strange request. Maybe Quentin knows more, he is one of the oldest monks after all." }) diff --git a/data-otservbr-global/npc/yonan.lua b/data-otservbr-global/npc/yonan.lua index 69bddee5cb3..1b85ecc7c17 100644 --- a/data-otservbr-global/npc/yonan.lua +++ b/data-otservbr-global/npc/yonan.lua @@ -87,7 +87,7 @@ npcConfig.shop = { { itemName = "unicorn figurine", clientId = 30054, sell = 50000 }, { itemName = "violet crystal shard", clientId = 16120, sell = 1500 }, { itemName = "wedding ring", clientId = 3004, buy = 990 }, - { itemName = "white pearl", clientId = 3026, buy = 320 }, + { itemName = "white pearl", clientId = 3026, buy = 320, sell = 160 }, { itemName = "white silk flower", clientId = 34008, sell = 9000 }, } diff --git a/data-otservbr-global/npc/zoltan.lua b/data-otservbr-global/npc/zoltan.lua index 2b6d0d78518..9d783dd0441 100644 --- a/data-otservbr-global/npc/zoltan.lua +++ b/data-otservbr-global/npc/zoltan.lua @@ -62,55 +62,54 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "yenny the gentle") then npcHandler:say("Ah, Yenny the Gentle was one of the founders of the druid order called Crunor's Caress, that has been originated in her hometown Carlin.", npc, creature) npcHandler:setTopic(playerId, 0) - elseif MsgContains(message, "crunors caress") then + elseif MsgContains(message, "crunor's caress") then if player:getStorageValue(Storage.Quest.U7_24.TheParadoxTower.TheFearedHugo) == 1 then -- Questlog: The Feared Hugo (Padreia) player:setStorageValue(Storage.Quest.U7_24.TheParadoxTower.TheFearedHugo, 2) end npcHandler:say("A quite undruidic order of druids they were, as far as we know. I have no more enlightening knowledge about them though.", npc, creature) npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "proof") then + npcHandler:say("... I cannot believe my eyes. You retrieved this hat from Ferumbras' remains? That is incredible. If you give it to me, I will grant you the right to wear this hat as addon. What do you say?", npc, creature) + npcHandler:setTopic(playerId, 1) + elseif npcHandler:getTopic(playerId) == 1 then + if player:getSex() == PLAYERSEX_MALE and not player:hasOutfit(130, 2) then + if MsgContains(message, "yes") then + if player:getItemCount(5903) == 1 then + npcHandler:say("Sorry you don't have the Ferumbras' hat.", npc, creature) + else + npcHandler:say("I bow to you, player, and hereby grant you the right to wear Ferumbras' hat as accessory. Congratulations!", npc, creature) + player:removeItem(5903, 1) + player:addOutfitAddon(130, 2) -- male mage addon + player:addOutfitAddon(133, 2) -- male summoner addon + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) + end + else + npcHandler:say("This task is only available for male players who don't already have the addon.", npc, creature) + end + end + elseif MsgContains(message, "myra") then + if player:getSex() == PLAYERSEX_FEMALE and player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak) == 10 and not player:hasOutfit(138, 2) then + npcHandler:say({ + "Bah, I know. I received some sort of 'nomination' from our outpost in Port Hope. ...", + "Usually it takes a little more than that for an award though. However, I honour Myra's word. ...", + "I hereby grant you the right to wear a special sign of honour, acknowledged by the academy of Edron. Since you are a woman, I guess you don't want manly stuff. There you go.", + }, npc, creature, 100) + player:addOutfitAddon(138, 2) -- female mage addon + player:addOutfitAddon(141, 2) -- female summoner addon + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak, 11) + player:setStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.MissionHatCloak, 0) + elseif player:getStorageValue(Storage.Quest.U7_8.MageAndSummonerOutfits.AddonHatCloak) == 11 then + npcHandler:say("Stop bothering me. I am a far too busy man to be constantly giving out awards.", npc, creature) + else + npcHandler:say("What the hell are you talking about?", npc, creature) + end end + return true end --- Female Summoner and Male Mage Hat Addon (needs to be rewritten) -local hatKeyword = keywordHandler:addKeyword({ "proof" }, StdModule.say, { npcHandler = npcHandler, text = "... I cannot believe my eyes. You retrieved this hat from Ferumbras' remains? That is incredible. If you give it to me, I will grant you the right to wear this hat as addon. What do you say?" }, function(player) - return not player:hasOutfit(player:getSex() == PLAYERSEX_FEMALE and 141 or 130, 2) -end) -hatKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Sorry you don't have the Ferumbras' hat." }, function(player) - return player:getItemCount(5903) == 0 -end) -hatKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "I bow to you, player, and hereby grant you the right to wear Ferumbras' hat as accessory. Congratulations!" }, nil, function(player) - player:removeItem(5903, 1) - player:addOutfitAddon(141, 2) - player:addOutfitAddon(130, 2) - player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) -end) --- hatKeyword:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, text = ''}) - -keywordHandler:addKeyword({ "myra" }, StdModule.say, { - npcHandler = npcHandler, - text = { - "Bah, I know. I received some sort of 'nomination' from our outpost in Port Hope. ...", - "Usually it takes a little more than that for an award though. However, I honour Myra's word. ...", - "I hereby grant you the right to wear a special sign of honour, acknowledged by the academy of Edron. Since you are a man, I guess you don't want girlish stuff. There you go.", - }, -}, function(player) - return player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonHatCloak) == 10 -end, function(player) - player:addOutfitAddon(138, 2) - player:addOutfitAddon(133, 2) - player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:setStorageValue(Storage.OutfitQuest.MageSummoner.AddonHatCloak, 11) - player:setStorageValue(Storage.OutfitQuest.MageSummoner.MissionHatCloak, 0) - player:setStorageValue(Storage.OutfitQuest.Ref, math.min(0, player:getStorageValue(Storage.OutfitQuest.Ref) - 1)) -end) - -keywordHandler:addKeyword({ "myra" }, StdModule.say, { npcHandler = npcHandler, text = "Stop bothering me. I am a far too busy man to be constantly giving out awards." }, function(player) - return player:getStorageValue(Storage.OutfitQuest.MageSummoner.AddonHatCloak) == 11 -end) -keywordHandler:addKeyword({ "myra" }, StdModule.say, { npcHandler = npcHandler, text = "What the hell are you talking about?" }) - npcHandler:setMessage(MESSAGE_GREET, "Welcome |PLAYERNAME|, student of the arcane arts. I teach the fiercest {spells} available.") npcHandler:setMessage(MESSAGE_FAREWELL, "Use your knowledge wisely, |PLAYERNAME|.") diff --git a/data-otservbr-global/scripts/actions/other/others/quest_system1.lua b/data-otservbr-global/scripts/actions/other/others/quest_system1.lua index f0781d45dd7..1783d8454a3 100644 --- a/data-otservbr-global/scripts/actions/other/others/quest_system1.lua +++ b/data-otservbr-global/scripts/actions/other/others/quest_system1.lua @@ -1,8 +1,4 @@ local specialQuests = { - -- {x = 32752, y = 32343, z = 14} - [52167] = Storage.DreamersChallenge.Reward, - -- {x = 32806, y = 32230, z = 11} - [52003] = Storage.PitsOfInferno.WeaponReward, -- {x = 32311, y = 32211, z = 8} [51400] = Storage.ThievesGuild.Reward, [51324] = Storage.WrathoftheEmperor.MainReward, @@ -176,8 +172,8 @@ function questSystem1.onUse(player, item, fromPosition, target, toPosition, isHo end if table.contains(hotaQuest, item.uid) then - if player:getStorageValue(Storage.TheAncientTombs.DefaultStart) ~= 1 then - player:setStorageValue(Storage.TheAncientTombs.DefaultStart, 1) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.DefaultStart) ~= 1 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.DefaultStart, 1) end end diff --git a/data-otservbr-global/scripts/actions/other/others/quest_system2.lua b/data-otservbr-global/scripts/actions/other/others/quest_system2.lua index 42fc5bb8ab8..4f8dbd32546 100644 --- a/data-otservbr-global/scripts/actions/other/others/quest_system2.lua +++ b/data-otservbr-global/scripts/actions/other/others/quest_system2.lua @@ -1,9 +1,9 @@ local config = { - [2285] = { + [2285] = { -- The Djinn War Quest - lamp items = { { itemId = 3243 }, }, - storage = Storage.DjinnWar.EfreetFaction.Mission03, + storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission03, formerValue = 1, newValue = 2, needItem = { itemId = 3231 }, @@ -15,12 +15,6 @@ local config = { }, storage = Storage.QuestChests.FamilyBrooch, }, - [3002] = { - items = { - { itemId = 3030, count = 6 }, - }, - storage = Storage.QuestChests.SixRubiesQuest, - }, [3018] = { items = { { itemId = 3219 }, @@ -41,7 +35,7 @@ local config = { items = { { itemId = 3243 }, }, - storage = Storage.DjinnWar.MaridFaction.Mission03, + storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission03, formerValue = 1, newValue = 2, needItem = { itemId = 3231 }, @@ -106,35 +100,11 @@ local config = { say = "A batch of documents has been stashed in the shelf. These might be of interest to Zalamon.", effect = CONST_ME_POFF, }, - [3311] = { - items = { - { itemId = 2970, actionId = 3301 }, - }, - storage = Storage.QuestChests.OutlawCampKey1, - }, - [3312] = { - items = { - { itemId = 2969, actionId = 3302 }, - }, - storage = Storage.QuestChests.OutlawCampKey2, - }, - [3313] = { - items = { - { itemId = 2970, actionId = 3303 }, - }, - storage = Storage.QuestChests.OutlawCampKey3, - }, [4010] = { items = { { itemId = 4832 }, }, - storage = Storage.TheApeCity.HolyApeHair, - }, - [5556] = { - items = { - { itemId = 3357 }, - }, - storage = Storage.GhostShipQuest, + storage = Storage.Quest.U7_6.TheApeCity.HolyApeHair, }, [9136] = { items = { @@ -142,33 +112,26 @@ local config = { }, storage = Storage.QuestChests.DeeperFibulaKey, }, - [9185] = { - items = { - { itemId = 3017 }, - { itemId = 3030, count = 2 }, - { itemId = 3028, count = 3 }, - }, - storage = Storage.QuestChests.SilverBrooch, - }, [9226] = { items = { { itemId = 3397 }, }, - storage = Storage.SamsOldBackpack, + storage = Storage.Quest.U7_5.SamsOldBackpack.SamsOldBackpackNpc, formerValue = 2, newValue = 3, }, + -- Hydra Egg Quest [9255] = { items = { { itemId = 4839 }, }, - storage = Storage.HydraEggQuest, + storage = Storage.Quest.U7_6.HydraEggQuest, }, [9256] = { items = { { itemId = 4829, decay = true }, }, - storage = Storage.TheApeCity.WitchesCapSpot, + storage = Storage.Quest.U7_6.TheApeCity.WitchesCapSpot, time = true, }, [9259] = { @@ -195,12 +158,6 @@ local config = { }, storage = Storage.SecretService.RottenTree, }, - [50032] = { - items = { - { itemId = 3734 }, - }, - storage = Storage.BloodHerbQuest, - }, [50112] = { items = { { itemId = 3725, count = 10 }, @@ -221,30 +178,6 @@ local config = { }, storage = 857440, }, - [65202] = { - items = { - { itemId = 2969, actionId = 3610 }, - }, - storage = 857441, - }, - [65204] = { - items = { - { itemId = 3269, count = 1 }, - }, - storage = 857442, - }, - [65205] = { - items = { - { itemId = 3356, count = 1 }, - }, - storage = 857443, - }, - [65206] = { - items = { - { itemId = 3029, count = 4 }, - }, - storage = 857444, - }, [65207] = { items = { { itemId = 3551, count = 1 }, @@ -257,30 +190,12 @@ local config = { }, storage = 857446, }, - [65209] = { - items = { - { itemId = 3054, count = 1 }, - }, - storage = 857447, - }, [65210] = { items = { { itemId = 3147, count = 3 }, }, storage = 857448, }, - [65211] = { - items = { - { itemId = 3028, count = 1 }, - }, - storage = 857449, - }, - [65212] = { - items = { - { itemId = 2969, actionId = 3667 }, - }, - storage = 857450, - }, [14037] = { items = { { @@ -397,12 +312,6 @@ The map shows the original floor plan of this mine. You recognise your position }, storage = Storage.QuestChests.FormorgarMinesHoistSkeleton, }, - [20004] = { - items = { - { itemId = 3266 }, - }, - storage = Storage.BattleAxeQuest, - }, [14041] = { items = { { diff --git a/data-otservbr-global/scripts/actions/quests/dawnport/legion_helmet.lua b/data-otservbr-global/scripts/actions/quests/dawnport/legion_helmet.lua index a692ed8618c..a867a2b1578 100644 --- a/data-otservbr-global/scripts/actions/quests/dawnport/legion_helmet.lua +++ b/data-otservbr-global/scripts/actions/quests/dawnport/legion_helmet.lua @@ -15,9 +15,9 @@ function sacredSnake.onUse(player, item, fromPosition, target, toPosition, isHot for i = 1, #sacrificialPosition do local tile = Tile(sacrificialPosition[i]) if toPosition == sacrificialPosition[i] then - if player:getStorageValue(Storage.Quest.U10_55.SanctuaryOfTheLizardGod.LizardGodTeleport) < 1 then + if not player:kv():scoped("lizard-god-teleport"):get("discovered") then player:removeItem(21469, 1) - player:setStorageValue(Storage.Quest.U10_55.SanctuaryOfTheLizardGod.LizardGodTeleport, 1) + player:kv():scoped("lizard-god-teleport"):set("discovered", true) player:say("The lizard god accepts your offer! You may enter the santuary!", TALKTYPE_MONSTER_SAY, false, player, toPosition) toPosition:sendMagicEffect(CONST_ME_MORTAREA) item:remove(1) diff --git a/data-otservbr-global/scripts/actions/quests/others/desert_dungeon_lever_quest.lua b/data-otservbr-global/scripts/actions/quests/desert_dungeon_quest/desert_dungeon_lever.lua similarity index 99% rename from data-otservbr-global/scripts/actions/quests/others/desert_dungeon_lever_quest.lua rename to data-otservbr-global/scripts/actions/quests/desert_dungeon_quest/desert_dungeon_lever.lua index 1361a521185..a026ed96cd1 100644 --- a/data-otservbr-global/scripts/actions/quests/others/desert_dungeon_lever_quest.lua +++ b/data-otservbr-global/scripts/actions/quests/desert_dungeon_quest/desert_dungeon_lever.lua @@ -78,5 +78,5 @@ function othersDesert.onUse(player, item, fromPosition, target, toPosition, isHo return true end -othersDesert:uid(1912) +othersDesert:uid(30030) othersDesert:register() diff --git a/data-otservbr-global/scripts/actions/quests/druid_outfit/waterskin.lua b/data-otservbr-global/scripts/actions/quests/druid_outfit/waterskin.lua deleted file mode 100644 index 084ce3ecffe..00000000000 --- a/data-otservbr-global/scripts/actions/quests/druid_outfit/waterskin.lua +++ /dev/null @@ -1,13 +0,0 @@ -local druidWaterSkin = Action() -function druidWaterSkin.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if target.itemid ~= 5662 then - return false - end - - toPosition:sendMagicEffect(CONST_ME_LOSEENERGY) - item:transform(5939) - return true -end - -druidWaterSkin:id(5938) -druidWaterSkin:register() diff --git a/data-otservbr-global/scripts/actions/quests/explorer_society/botanist.lua b/data-otservbr-global/scripts/actions/quests/explorer_society/botanist.lua deleted file mode 100644 index 27298f5e7ba..00000000000 --- a/data-otservbr-global/scripts/actions/quests/explorer_society/botanist.lua +++ /dev/null @@ -1,33 +0,0 @@ -local explorerSocietyBotanist = Action() -function explorerSocietyBotanist.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if target.itemid == 3874 and player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) == 18 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 18 then - player:setStorageValue(Storage.ExplorerSociety.ThePlantCollection, 19) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 19) - toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - item:transform(4868) - elseif target.itemid == 3885 and player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) == 21 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 21 then - player:setStorageValue(Storage.ExplorerSociety.ThePlantCollection, 22) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 22) - toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - item:transform(4869) - elseif target.itemid == 3878 and player:getStorageValue(Storage.ExplorerSociety.ThePlantCollection) == 24 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 24 then - player:setStorageValue(Storage.ExplorerSociety.ThePlantCollection, 25) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 25) - toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - item:transform(4870) - elseif target.itemid == 5658 and target.uid == 3152 then - if player:getStorageValue(53051) < 1 then - toPosition:sendMagicEffect(CONST_ME_MAGIC_RED) - item:transform(5937) - player:setStorageValue(53051, 1) - player:say("You successfully took a sample of the rare griffinclaw flower.", TALKTYPE_MONSTER_SAY) - else - toPosition:sendMagicEffect(CONST_ME_POFF) - player:say("You already took a sample of the rare griffinclaw flower.", TALKTYPE_MONSTER_SAY) - end - end - return true -end - -explorerSocietyBotanist:id(4867) -explorerSocietyBotanist:register() diff --git a/data-otservbr-global/scripts/actions/quests/explorer_society/butterfly.lua b/data-otservbr-global/scripts/actions/quests/explorer_society/butterfly.lua deleted file mode 100644 index 4ac5fc0828d..00000000000 --- a/data-otservbr-global/scripts/actions/quests/explorer_society/butterfly.lua +++ /dev/null @@ -1,26 +0,0 @@ -local explorerSocietyButterfly = Action() -function explorerSocietyButterfly.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if target.itemid == 4992 and player:getStorageValue(Storage.ExplorerSociety.TheButterflyHunt) == 9 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 9 then - player:setStorageValue(Storage.ExplorerSociety.TheButterflyHunt, 10) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 10) - toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - item:transform(4864) - target:remove() - elseif target.itemid == 4993 and player:getStorageValue(Storage.ExplorerSociety.TheButterflyHunt) == 12 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 12 then - player:setStorageValue(Storage.ExplorerSociety.TheButterflyHunt, 13) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 13) - toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - item:transform(4865) - target:remove() - elseif target.itemid == 4991 and player:getStorageValue(Storage.ExplorerSociety.TheButterflyHunt) == 15 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 15 then - player:setStorageValue(Storage.ExplorerSociety.TheButterflyHunt, 16) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 16) - toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - item:transform(4866) - target:remove() - end - return true -end - -explorerSocietyButterfly:id(4863) -explorerSocietyButterfly:register() diff --git a/data-otservbr-global/scripts/actions/quests/explorer_society/dragon.lua b/data-otservbr-global/scripts/actions/quests/explorer_society/dragon.lua deleted file mode 100644 index 267153e1d97..00000000000 --- a/data-otservbr-global/scripts/actions/quests/explorer_society/dragon.lua +++ /dev/null @@ -1,13 +0,0 @@ -local explorerSocietyDragon = Action() -function explorerSocietyDragon.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.ExplorerSociety.TheIslandofDragons) == 57 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 57 then - player:setStorageValue(Storage.ExplorerSociety.TheIslandofDragons, 58) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 58) - player:addItem(7314, 1) - toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - end - return true -end - -explorerSocietyDragon:uid(40042) -explorerSocietyDragon:register() diff --git a/data-otservbr-global/scripts/actions/quests/explorer_society/icicle.lua b/data-otservbr-global/scripts/actions/quests/explorer_society/icicle.lua deleted file mode 100644 index 83ddf5ec044..00000000000 --- a/data-otservbr-global/scripts/actions/quests/explorer_society/icicle.lua +++ /dev/null @@ -1,13 +0,0 @@ -local explorerSocietyIcicle = Action() -function explorerSocietyIcicle.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if target.itemid == 4994 and player:getStorageValue(Storage.ExplorerSociety.TheIceDelivery) == 6 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 6 then - player:setStorageValue(Storage.ExplorerSociety.TheIceDelivery, 7) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 7) - player:addItem(4837, 1) - toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - end - return true -end - -explorerSocietyIcicle:id(4872) -explorerSocietyIcicle:register() diff --git a/data-otservbr-global/scripts/actions/quests/explorer_society/resonance.lua b/data-otservbr-global/scripts/actions/quests/explorer_society/resonance.lua deleted file mode 100644 index 3840a17cca2..00000000000 --- a/data-otservbr-global/scripts/actions/quests/explorer_society/resonance.lua +++ /dev/null @@ -1,15 +0,0 @@ -local explorerSocietyResonance = Action() -function explorerSocietyResonance.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if target.uid == 40043 then - if player:getStorageValue(Storage.ExplorerSociety.TheIceMusic) == 60 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 60 then - player:setStorageValue(Storage.ExplorerSociety.TheIceMusic, 61) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 61) - toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - item:transform(7315) - end - end - return true -end - -explorerSocietyResonance:id(7242) -explorerSocietyResonance:register() diff --git a/data-otservbr-global/scripts/actions/quests/explorer_society/stone.lua b/data-otservbr-global/scripts/actions/quests/explorer_society/stone.lua deleted file mode 100644 index 9d1916641fe..00000000000 --- a/data-otservbr-global/scripts/actions/quests/explorer_society/stone.lua +++ /dev/null @@ -1,26 +0,0 @@ -local explorerSocietyStone = Action() -function explorerSocietyStone.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if target.uid == 25018 and player:getStorageValue(Storage.ExplorerSociety.TheSpectralStone) == 53 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 53 and player:getStorageValue(Storage.ExplorerSociety.SpectralStone) == 1 then -- mission taken from Angus - player:setStorageValue(Storage.ExplorerSociety.TheSpectralStone, 54) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 54) - toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - elseif target.uid == 25019 and player:getStorageValue(Storage.ExplorerSociety.TheSpectralStone) == 54 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 54 and player:getStorageValue(Storage.ExplorerSociety.SpectralStone) == 1 then -- mission taken from Angus - player:setStorageValue(Storage.ExplorerSociety.TheSpectralStone, 55) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 55) - player:removeItem(4840, 1) - toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - elseif target.uid == 25019 and player:getStorageValue(Storage.ExplorerSociety.TheSpectralStone) == 53 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 53 and player:getStorageValue(Storage.ExplorerSociety.SpectralStone) == 2 then -- mission taken from Mortimer - player:setStorageValue(Storage.ExplorerSociety.TheSpectralStone, 54) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 54) - toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - elseif target.uid == 25018 and player:getStorageValue(Storage.ExplorerSociety.TheSpectralStone) == 54 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 54 and player:getStorageValue(Storage.ExplorerSociety.SpectralStone) == 2 then -- mission taken from Mortimer - player:setStorageValue(Storage.ExplorerSociety.TheSpectralStone, 55) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 55) - player:removeItem(4840, 1) - toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - end - return true -end - -explorerSocietyStone:id(4840) -explorerSocietyStone:register() diff --git a/data-otservbr-global/scripts/actions/quests/green_djinn/tear.lua b/data-otservbr-global/scripts/actions/quests/green_djinn/tear.lua deleted file mode 100644 index 47b7dc8750f..00000000000 --- a/data-otservbr-global/scripts/actions/quests/green_djinn/tear.lua +++ /dev/null @@ -1,14 +0,0 @@ -local greenTear = Action() -function greenTear.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.DjinnWar.EfreetFaction.Mission02) ~= 1 then - return true - end - - Game.createItem(3233, 1, fromPosition) - player:setStorageValue(Storage.DjinnWar.EfreetFaction.Mission02, 2) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a tear of daraman.") - return true -end - -greenTear:aid(5390) -greenTear:register() diff --git a/data-otservbr-global/scripts/actions/quests/ice_islands/paint.lua b/data-otservbr-global/scripts/actions/quests/ice_islands/paint.lua index b1172b164bc..f7fd78ecd58 100644 --- a/data-otservbr-global/scripts/actions/quests/ice_islands/paint.lua +++ b/data-otservbr-global/scripts/actions/quests/ice_islands/paint.lua @@ -19,7 +19,7 @@ function icePaint.onUse(player, item, fromPosition, target, toPosition, isHotkey player:setStorageValue(Storage.TheIceIslands.Questline, 9) player:setStorageValue(Storage.TheIceIslands.Mission04, 2) -- Questlog The Ice Islands Quest, Nibelor 3: Artful Sabotage player:removeItem(7253, 1) - if player:getStorageValue(Storage.TheShatteredIsles.TortoiseEggNargorDoor) >= 2 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TortoiseEggNargorDoor) >= 2 then player:addAchievement("Animal Activist") end end diff --git a/data-otservbr-global/scripts/actions/quests/devil_helmet/lever.lua b/data-otservbr-global/scripts/actions/quests/mintwallin_quest/devil_helmet_lever.lua similarity index 94% rename from data-otservbr-global/scripts/actions/quests/devil_helmet/lever.lua rename to data-otservbr-global/scripts/actions/quests/mintwallin_quest/devil_helmet_lever.lua index e5e968d5afc..01d3ffeaac7 100644 --- a/data-otservbr-global/scripts/actions/quests/devil_helmet/lever.lua +++ b/data-otservbr-global/scripts/actions/quests/mintwallin_quest/devil_helmet_lever.lua @@ -15,5 +15,5 @@ function devilHelmetLever.onUse(player, item, fromPosition, target, toPosition, return true end -devilHelmetLever:aid(20594) +devilHelmetLever:aid(30008) devilHelmetLever:register() diff --git a/data-otservbr-global/scripts/actions/quests/others/black_knight_quest.lua b/data-otservbr-global/scripts/actions/quests/others/black_knight_quest.lua deleted file mode 100644 index b4f763c8672..00000000000 --- a/data-otservbr-global/scripts/actions/quests/others/black_knight_quest.lua +++ /dev/null @@ -1,15 +0,0 @@ -local othersBlackKnight = Action() -function othersBlackKnight.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.QuestChests.BlackKnightTreeKey) ~= 1 then - local newItem = Game.createItem(2969, 1) - newItem:setActionId(5010) - player:addItemEx(newItem) - player:setStorageValue(Storage.QuestChests.BlackKnightTreeKey, 1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a silver key.") - else - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. ItemType(item.itemid):getName() .. " is empty.") - end -end - -othersBlackKnight:aid(5558) -othersBlackKnight:register() diff --git a/data-otservbr-global/scripts/actions/quests/others/calassa_comb_door.lua b/data-otservbr-global/scripts/actions/quests/others/calassa_comb_door.lua index 4d84988d59d..681712d6aee 100644 --- a/data-otservbr-global/scripts/actions/quests/others/calassa_comb_door.lua +++ b/data-otservbr-global/scripts/actions/quests/others/calassa_comb_door.lua @@ -4,7 +4,7 @@ function othersCalassa.onUse(player, item, fromPosition, target, toPosition, isH return false end - if player:getStorageValue(Storage.OutfitQuest.firstOrientalAddon) ~= 1 or player:hasOutfit(player:getSex() == PLAYERSEX_FEMALE and 150 or 146, 1) then + if player:getStorageValue(Storage.Quest.U7_8.OrientalOutfits.FirstOrientalAddon) ~= 1 or player:hasOutfit(player:getSex() == PLAYERSEX_FEMALE and 150 or 146, 1) then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The door seems to be sealed against unwanted intruders.") return true end diff --git a/data-otservbr-global/scripts/actions/quests/others/ectoplasm_container.lua b/data-otservbr-global/scripts/actions/quests/others/ectoplasm_container.lua index 4c98cc53fdf..80e45219e2a 100644 --- a/data-otservbr-global/scripts/actions/quests/others/ectoplasm_container.lua +++ b/data-otservbr-global/scripts/actions/quests/others/ectoplasm_container.lua @@ -1,4 +1,5 @@ local othersEctoplasm = Action() + function othersEctoplasm.onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.actionid == 4206 then if player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) ~= 1 then @@ -9,10 +10,10 @@ function othersEctoplasm.onUse(player, item, fromPosition, target, toPosition, i item:transform(131) target:remove() toPosition:sendMagicEffect(CONST_ME_POFF) - elseif target.itemid == 4290 then - if player:getStorageValue(Storage.ExplorerSociety.TheEctoplasm) == 45 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 45 then - player:setStorageValue(Storage.ExplorerSociety.TheEctoplasm, 46) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 46) + elseif target.itemid == 4094 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheEctoplasm) == 45 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 45 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheEctoplasm, 46) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 46) toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) item:transform(4853) target:remove() diff --git a/data-otservbr-global/scripts/actions/quests/others/fire_bug.lua b/data-otservbr-global/scripts/actions/quests/others/fire_bug.lua index e75bebf26bd..42c6b19e7fe 100644 --- a/data-otservbr-global/scripts/actions/quests/others/fire_bug.lua +++ b/data-otservbr-global/scripts/actions/quests/others/fire_bug.lua @@ -57,9 +57,9 @@ function othersFireBug.onUse(player, item, fromPosition, target, toPosition, isH createTeleport:setDestination(Position(32857, 32234, 11)) return true elseif target.uid == 2273 then - if player:getStorageValue(Storage.TheShatteredIsles.RaysMission2) == 1 and player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 15 then - player:setStorageValue(Storage.TheShatteredIsles.RaysMission2, 2) - player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 16) + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission2) == 1 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven) == 15 then + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission2, 2) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, 16) toPosition:sendMagicEffect(CONST_ME_HITBYFIRE) return true else diff --git a/data-otservbr-global/scripts/actions/quests/others/plate_armor_quest.lua b/data-otservbr-global/scripts/actions/quests/others/plate_armor_quest.lua deleted file mode 100644 index 79bc0232397..00000000000 --- a/data-otservbr-global/scripts/actions/quests/others/plate_armor_quest.lua +++ /dev/null @@ -1,13 +0,0 @@ -local othersPlateArmor = Action() -function othersPlateArmor.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.GhostShipQuest) == 1 then - return false - end - - player:setStorageValue(Storage.GhostShipQuest, 1) - player:addItem(3357, 1) - return true -end - -othersPlateArmor:aid(5556) -othersPlateArmor:register() diff --git a/data-otservbr-global/scripts/actions/quests/others/life_ring_lever.lua b/data-otservbr-global/scripts/actions/quests/thais_quest/life_ring_lever.lua similarity index 97% rename from data-otservbr-global/scripts/actions/quests/others/life_ring_lever.lua rename to data-otservbr-global/scripts/actions/quests/thais_quest/life_ring_lever.lua index 60c490b8ddd..61786e84ec3 100644 --- a/data-otservbr-global/scripts/actions/quests/others/life_ring_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/thais_quest/life_ring_lever.lua @@ -33,5 +33,5 @@ function othersLifeRing.onUse(player, item, fromPosition, target, toPosition, is return true end -othersLifeRing:aid(50129) +othersLifeRing:aid(30007) othersLifeRing:register() diff --git a/data-otservbr-global/scripts/actions/quests/the_ancient_tombs/active_teleport_switches.lua b/data-otservbr-global/scripts/actions/quests/the_ancient_tombs/active_teleport_switches.lua deleted file mode 100644 index 8b846f435ea..00000000000 --- a/data-otservbr-global/scripts/actions/quests/the_ancient_tombs/active_teleport_switches.lua +++ /dev/null @@ -1,37 +0,0 @@ -local config = { - [12121] = GlobalStorage.TheAncientTombs.ThalasSwitchesGlobalStorage, - [12122] = GlobalStorage.TheAncientTombs.DiprathSwitchesGlobalStorage, - [12123] = GlobalStorage.TheAncientTombs.AshmunrahSwitchesGlobalStorage, -} - -local function resetScript(position, storage) - local item = Tile(position):getItemById(2773) - if item then - item:transform(2772) - end - - Game.setStorageValue(storage, Game.getStorageValue(storage) - 1) -end - -local theAncientActiveTeleport = Action() -function theAncientActiveTeleport.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local storage = config[item.actionid] - if not storage then - return true - end - - if item.itemid ~= 2772 then - return false - end - - Game.setStorageValue(storage, Game.getStorageValue(storage) + 1) - item:transform(2773) - addEvent(resetScript, 20 * 60 * 1000, toPosition, storage) - return true -end - -for actionId, info in pairs(config) do - theAncientActiveTeleport:aid(actionId) -end - -theAncientActiveTeleport:register() diff --git a/data-otservbr-global/scripts/actions/quests/the_ancient_tombs/lever.lua b/data-otservbr-global/scripts/actions/quests/the_ancient_tombs/lever.lua deleted file mode 100644 index 7c37af8b682..00000000000 --- a/data-otservbr-global/scripts/actions/quests/the_ancient_tombs/lever.lua +++ /dev/null @@ -1,62 +0,0 @@ -local config = { - bridgePositions = { - { position = Position(33119, 32794, 14), groundId = 727 }, - { position = Position(33119, 32795, 14), groundId = 727 }, - { position = Position(33120, 32794, 14), groundId = 727 }, - { position = Position(33120, 32795, 14), groundId = 727 }, - { position = Position(33121, 32794, 14), groundId = 727 }, - { position = Position(33121, 32795, 14), groundId = 727 }, - }, - leverPositions = { - Position(33115, 32797, 14), - Position(33118, 32790, 14), - Position(33122, 32790, 14), - }, - relocatePosition = Position(33120, 2791, 14), - relocateMonsterPosition = Position(33120, 32799, 14), - bridgeId = 5770, -} - -local theAncientLever = Action() -function theAncientLever.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local leverLeft, lever = item.itemid == 2772 - for i = 1, #config.leverPositions do - lever = Tile(config.leverPositions[i]):getItemById(leverLeft and 2772 or 2773) - if lever then - lever:transform(leverLeft and 2773 or 2772) - end - end - - local tile, tmpItem, bridge - if leverLeft then - for i = 1, #config.bridgePositions do - bridge = config.bridgePositions[i] - tile = Tile(bridge.position) - - tmpItem = tile:getGround() - if tmpItem then - tmpItem:transform(config.bridgeId) - end - - if bridge.itemId then - tmpItem = tile:getItemById(bridge.itemId) - if tmpItem then - tmpItem:remove() - end - end - end - else - for i = 1, #config.bridgePositions do - bridge = config.bridgePositions[i] - tile = Tile(bridge.position) - - tile:relocateTo(config.relocatePosition, true, config.relocateMonsterPosition) - tile:getGround():transform(bridge.groundId) - Game.createItem(bridge.itemId, 1, bridge.position) - end - end - return true -end - -theAncientLever:aid(12120) -theAncientLever:register() diff --git a/data-otservbr-global/scripts/actions/quests/the_ancient_tombs/ruins_instruments.lua b/data-otservbr-global/scripts/actions/quests/the_ancient_tombs/ruins_instruments.lua deleted file mode 100644 index 7b405f94d0d..00000000000 --- a/data-otservbr-global/scripts/actions/quests/the_ancient_tombs/ruins_instruments.lua +++ /dev/null @@ -1,32 +0,0 @@ -local config = { - [3255] = 1, - [3261] = 2, - [3258] = 3, - [3260] = 4, - [3257] = 5, -} - -local storage = Storage.TheAncientTombs.VashresamunInstruments - -local theAncientRuinsInstru = Action() -function theAncientRuinsInstru.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local targetTable = config[item.itemid] - if not targetTable then - player:setStorageValue(storage, 0) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You played them wrong, now you must begin with first again!") - doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, -20, -20, CONST_ME_GROUNDSHAKER) - return true - end - - if player:getStorageValue(storage) == targetTable and targetTable < 4 then - player:setStorageValue(storage, math.max(1, player:getPlayerStorageValue(storage)) + 1) - fromPosition:sendMagicEffect(CONST_ME_SOUND_BLUE) - else - player:setStorageValue(Storage.TheAncientTombs.VashresamunsDoor, 1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You played them in correct order and got the access through door!") - end - return true -end - -theAncientRuinsInstru:aid(12105) -theAncientRuinsInstru:register() diff --git a/data-otservbr-global/scripts/actions/quests/the_ape_city/mission9_catacombs_snake_destroyer.lua b/data-otservbr-global/scripts/actions/quests/the_ape_city/mission9_catacombs_snake_destroyer.lua deleted file mode 100644 index f726109d622..00000000000 --- a/data-otservbr-global/scripts/actions/quests/the_ape_city/mission9_catacombs_snake_destroyer.lua +++ /dev/null @@ -1,20 +0,0 @@ -local theApeMiss9 = Action() -function theApeMiss9.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if target.itemid ~= 4850 then - return false - end - - if player:getStorageValue(Storage.TheApeCity.Questline) ~= 17 or player:getStorageValue(Storage.TheApeCity.SnakeDestroyer) == 1 then - return false - end - - player:setStorageValue(Storage.TheApeCity.SnakeDestroyer, 1) - item:remove() - target:transform(4851) - target:decay() - toPosition:sendMagicEffect(CONST_ME_FIREAREA) - return true -end - -theApeMiss9:id(4835) -theApeMiss9:register() diff --git a/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/oven.lua b/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/oven.lua index b7f7499336b..45527f07f10 100644 --- a/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/oven.lua +++ b/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/oven.lua @@ -19,5 +19,5 @@ function theOutlawOven.onUse(player, item, fromPosition, target, toPosition, isH return true end -theOutlawOven:uid(3400) +theOutlawOven:uid(30031) theOutlawOven:register() diff --git a/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_burn.lua b/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_burn.lua index b05c5882e76..43c9918be0b 100644 --- a/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_burn.lua +++ b/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_burn.lua @@ -16,5 +16,5 @@ function theOutlawPower.onUse(player, item, fromPosition, target, toPosition, is return true end -theOutlawPower:uid(3402) +theOutlawPower:uid(30033) theOutlawPower:register() diff --git a/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_switch.lua b/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_switch.lua index 3cdd3e766ee..01ab8b3f969 100644 --- a/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_switch.lua +++ b/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_switch.lua @@ -14,5 +14,5 @@ function theOutlawPowerSwitch.onUse(player, item, fromPosition, target, toPositi return true end -theOutlawPowerSwitch:uid(3401) +theOutlawPowerSwitch:uid(30032) theOutlawPowerSwitch:register() diff --git a/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/the_outlaw_camp_quest.lua b/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/the_outlaw_camp_quest.lua new file mode 100644 index 00000000000..bdecd57c01f --- /dev/null +++ b/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/the_outlaw_camp_quest.lua @@ -0,0 +1,33 @@ +-- Bag -> bright sword and red gem +local outlawQuest = Action() + +function outlawQuest.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local bagId = 2853 + local rewardIds = { + { 3295, 1 }, -- bright sword + { 3039, 1 }, -- red gem + } + + for _, reward in ipairs(rewardIds) do + local rewardId, rewardCount = reward[1], reward[2] + if not player:canGetReward(rewardId, "outlaw") then + return true + end + end + + local bag = player:addItem(bagId, 1) + if bag then + for _, reward in ipairs(rewardIds) do + local rewardId, rewardCount = reward[1], reward[2] + bag:addItem(rewardId, rewardCount) + end + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a bag.") + player:questKV("outlaw"):set("completed", true) + player:setStorageValue(Storage.QuestChests.OutlawCamp, 1) + end + + return true +end + +outlawQuest:uid(14091) +outlawQuest:register() diff --git a/data-otservbr-global/scripts/actions/quests/others/triangle_tower_lever.lua b/data-otservbr-global/scripts/actions/quests/triangle_tower_quest/triangle_tower_lever.lua similarity index 95% rename from data-otservbr-global/scripts/actions/quests/others/triangle_tower_lever.lua rename to data-otservbr-global/scripts/actions/quests/triangle_tower_quest/triangle_tower_lever.lua index ec0884d9e0a..2edd6c4626c 100644 --- a/data-otservbr-global/scripts/actions/quests/others/triangle_tower_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/triangle_tower_quest/triangle_tower_lever.lua @@ -15,5 +15,5 @@ function othersTriangle.onUse(player, item, fromPosition, target, toPosition, is return true end -othersTriangle:uid(50023) +othersTriangle:uid(30034) othersTriangle:register() diff --git a/data-otservbr-global/scripts/actions/rookgaard/banana_quest.lua b/data-otservbr-global/scripts/actions/rookgaard/banana_quest.lua deleted file mode 100644 index 05e89ebae69..00000000000 --- a/data-otservbr-global/scripts/actions/rookgaard/banana_quest.lua +++ /dev/null @@ -1,15 +0,0 @@ -local bananaQuest = Action() - -function bananaQuest.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.QuestChests.BananaPalm) == 1 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The banana palm is empty.") - else - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a banana.") - player:addItem(3587, 1) - player:setStorageValue(Storage.QuestChests.BananaPalm, 1) - end - return true -end - -bananaQuest:aid(5641) -bananaQuest:register() diff --git a/data-otservbr-global/scripts/actions/rookgaard/bearroom_quest_lever.lua b/data-otservbr-global/scripts/actions/rookgaard/bear_room_quest/bear_room_quest_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/rookgaard/bearroom_quest_lever.lua rename to data-otservbr-global/scripts/actions/rookgaard/bear_room_quest/bear_room_quest_lever.lua diff --git a/data-otservbr-global/scripts/actions/rookgaard/bear_room_quest/bear_room_quest_stone.lua b/data-otservbr-global/scripts/actions/rookgaard/bear_room_quest/bear_room_quest_stone.lua new file mode 100644 index 00000000000..ec8457748a8 --- /dev/null +++ b/data-otservbr-global/scripts/actions/rookgaard/bear_room_quest/bear_room_quest_stone.lua @@ -0,0 +1,17 @@ +local bearStone = Action() +function bearStone.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local stonePosition = { x = 32145, y = 32101, z = 11 } + + if item.itemid == 2772 then + Tile(stonePosition):getItemById(1791):remove() + item:transform(2773) + elseif item.itemid == 2773 then + Position(stonePosition):hasCreature({ x = 32145, y = 32102, z = 11 }) + Game.createItem(1791, 1, stonePosition) + item:transform(2772) + end + return true +end + +bearStone:aid(30006) +bearStone:register() diff --git a/data-otservbr-global/scripts/actions/rookgaard/doublet_quest.lua b/data-otservbr-global/scripts/actions/rookgaard/doublet_quest.lua deleted file mode 100644 index cb74877614e..00000000000 --- a/data-otservbr-global/scripts/actions/rookgaard/doublet_quest.lua +++ /dev/null @@ -1,15 +0,0 @@ -local doubletQuest = Action() - -function doubletQuest.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.QuestChests.DoubletQuest) == 1 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The loose board is empty.") - else - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a doublet.") - player:addItem(3379, 1) - player:setStorageValue(Storage.QuestChests.DoubletQuest, 1) - end - return true -end - -doubletQuest:aid(5639) -doubletQuest:register() diff --git a/data-otservbr-global/scripts/actions/rookgaard/goblin_temple_quest.lua b/data-otservbr-global/scripts/actions/rookgaard/goblin_temple_quest.lua new file mode 100644 index 00000000000..8244cdf3a54 --- /dev/null +++ b/data-otservbr-global/scripts/actions/rookgaard/goblin_temple_quest.lua @@ -0,0 +1,67 @@ +-- Reward = bag -> sandals, 5 small stones, 50 gold coins +local goblintemple1Quest = Action() + +function goblintemple1Quest.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local bagId = 2853 + local rewardIds = { + { 3551, 1 }, + { 1781, 5 }, + { 3031, 50 }, + } + + for _, reward in ipairs(rewardIds) do + local rewardId, rewardCount = reward[1], reward[2] + if not player:canGetReward(rewardId, "goblintemple") then + return true + end + end + + local bag = player:addItem(bagId, 1) + if bag then + for _, reward in ipairs(rewardIds) do + local rewardId, rewardCount = reward[1], reward[2] + bag:addItem(rewardId, rewardCount) + end + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a bag.") + player:questKV("goblintemple"):set("completed", true) + end + + return true +end + +goblintemple1Quest:uid(14049) +goblintemple1Quest:register() + +-- Reward = bag -> pan, 4 snowballs, vial of milk +local goblintemple2Quest = Action() + +function goblintemple2Quest.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local bagId = 2853 + local rewardIds = { + { 3466, 1 }, + { 2992, 4 }, + { 2874, 1 }, + } + + for _, reward in ipairs(rewardIds) do + local rewardId, rewardCount = reward[1], reward[2] + if not player:canGetReward(rewardId, "goblintemple2") then + return true + end + end + + local bag = player:addItem(bagId, 1) + if bag then + for _, reward in ipairs(rewardIds) do + local rewardId, rewardCount = reward[1], reward[2] + bag:addItem(rewardId, rewardCount) + end + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a bag.") + player:questKV("goblintemple2"):set("completed", true) + end + + return true +end + +goblintemple2Quest:uid(14050) +goblintemple2Quest:register() diff --git a/data-otservbr-global/scripts/actions/rookgaard/honey_flower_quest.lua b/data-otservbr-global/scripts/actions/rookgaard/honey_flower_quest.lua deleted file mode 100644 index 8f5b7e08857..00000000000 --- a/data-otservbr-global/scripts/actions/rookgaard/honey_flower_quest.lua +++ /dev/null @@ -1,15 +0,0 @@ -local honeyFlowerQuest = Action() - -function honeyFlowerQuest.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.QuestChests.HoneyFlower) == 1 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The honeyflower patch is empty.") - else - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a honey flower.") - player:addItem(2984, 1) - player:setStorageValue(Storage.QuestChests.HoneyFlower, 1) - end - return true -end - -honeyFlowerQuest:aid(5640) -honeyFlowerQuest:register() diff --git a/data-otservbr-global/scripts/actions/rookgaard/katana_quest/katana_quest_door.lua b/data-otservbr-global/scripts/actions/rookgaard/katana_quest/katana_quest_door.lua new file mode 100644 index 00000000000..1d53962b0c5 --- /dev/null +++ b/data-otservbr-global/scripts/actions/rookgaard/katana_quest/katana_quest_door.lua @@ -0,0 +1,20 @@ +local doorPosition = Position(32177, 32148, 11) +local leverPosition = Position(32182, 32145, 11) + +local katanaQuestDoor = Action() + +function katanaQuestDoor.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local doorItem = Tile(doorPosition):getItemById(5108) + if doorItem then + doorItem:transform(5107) + doorItem:setAttribute(ITEM_ATTRIBUTE_UNIQUEID, 22006) + end + local leverItem = Tile(leverPosition):getItemById(2773) + if leverItem then + leverItem:transform(2772) + end + return false +end + +katanaQuestDoor:uid(22006) +katanaQuestDoor:register() diff --git a/data-otservbr-global/scripts/actions/rookgaard/katana_quest_lever.lua b/data-otservbr-global/scripts/actions/rookgaard/katana_quest/katana_quest_lever.lua similarity index 81% rename from data-otservbr-global/scripts/actions/rookgaard/katana_quest_lever.lua rename to data-otservbr-global/scripts/actions/rookgaard/katana_quest/katana_quest_lever.lua index 98d0a155417..c628b8e4959 100644 --- a/data-otservbr-global/scripts/actions/rookgaard/katana_quest_lever.lua +++ b/data-otservbr-global/scripts/actions/rookgaard/katana_quest/katana_quest_lever.lua @@ -8,7 +8,7 @@ function katanaQuestLever.onUse(player, item, fromPosition, target, toPosition, local doorItem = Tile(doorPosition):getItemById(5107) if doorItem then doorItem:transform(5108) - doorItem:setAttribute(ITEM_ATTRIBUTE_UNIQUEID, 1055) + doorItem:setAttribute(ITEM_ATTRIBUTE_UNIQUEID, 22006) item:transform(2773) end else @@ -17,12 +17,12 @@ function katanaQuestLever.onUse(player, item, fromPosition, target, toPosition, if doorItem then tile:relocateTo(relocatePosition, true) doorItem:transform(5107) - doorItem:setAttribute(ITEM_ATTRIBUTE_UNIQUEID, 1055) + doorItem:setAttribute(ITEM_ATTRIBUTE_UNIQUEID, 22006) item:transform(2772) end end return true end -katanaQuestLever:uid(1054) +katanaQuestLever:uid(30029) katanaQuestLever:register() diff --git a/data-otservbr-global/scripts/actions/rookgaard/katana_quest_door.lua b/data-otservbr-global/scripts/actions/rookgaard/katana_quest_door.lua deleted file mode 100644 index f620a1733e8..00000000000 --- a/data-otservbr-global/scripts/actions/rookgaard/katana_quest_door.lua +++ /dev/null @@ -1,8 +0,0 @@ -local katanaQuestDoor = Action() - -function katanaQuestDoor.onUse(player, item, fromPosition, target, toPosition, isHotkey) - return false -end - -katanaQuestDoor:uid(1055) -katanaQuestDoor:register() diff --git a/data-otservbr-global/scripts/actions/system/quest_reward_common.lua b/data-otservbr-global/scripts/actions/system/quest_reward_common.lua index 7c79df383e7..a991cdbbcf1 100644 --- a/data-otservbr-global/scripts/actions/system/quest_reward_common.lua +++ b/data-otservbr-global/scripts/actions/system/quest_reward_common.lua @@ -18,6 +18,33 @@ Ferumbras * Frodo ** Noodles ****]], }, + [6112] = { + text = [[ +... the dream master retreated to the world behind the curtains of awareness, I can't reach him, now that the last hall of dreams is lost to the forces of evil. +I sealed Goshnar's grave so no one can enter the pits without knowing our secret. +I will try to retreat to Knightwatch Tower and wait for a dreamer in possession of the key. +So we can travel on one of the dream paths to a saver place to regroup and to plan a counter-attack. +I fear we have to recruit new members and we have only little time left to train them. +I hope Taciror will not waste our last forces in a futile attack on the Ruthless Seven. +Our order has never truly recovered from the losses in our war against Goshnar and his undead hordes. +Now that our leaders and best warriors have died in the attack on the demonic forces, we don't stand a chance against our enemies. +Our only hope is to gather new forces and to recapture the chamber of dreams. +Of course I know the right method to distract Hugo long enough to get past him. +The dream master is important to teach our recruits in the old ways and in the art of dreamwalking. +We need a leader for our cause and we need him badly. Headless we will fail and fall. +It is already uncertain who took the Nightmare Chronicles out of the pits and I have no idea where they are hidden. +They are fighting about power and influence but unity is the key to success. Our whole order is centred about unity. +All our rituals and procedures rooted on unity and sharing, they can't neglect that. +]], + }, + [6183] = { + text = [[ +Looks like the fox is out! +More luck next time! +Signed: +the horned fox +]], + }, } local achievementTable = { @@ -41,7 +68,7 @@ local function playerAddItem(params, item) -- Needs independent verification because it cannot be set as "key" in items.xml -- Because it generate bug in the item description if itemType:isKey() or itemType:getId(21392) then - -- If is key not in container, uses the "isKey = true" variable + -- If is key not in container, uses the "isKey = true" variab keyItem = player:addItem(params.itemid, params.count) keyItem:setActionId(params.storage) end @@ -59,10 +86,16 @@ local function playerAddItem(params, item) end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, params.message .. ".") - if params.timer then - player:setStorageValue(params.timer, os.time() + params.time * 3600) + if params.useKV then + player:questKV(params.questName):set("completed", true) + if params.timer then + player:questKV(params.questName):set("params.questName", os.time() + params.time * 3600) -- multiplicação por hora + end else player:setStorageValue(params.storage, 1) + if params.timer then + player:setStorageValue(params.timer, os.time() + params.time * 3600) -- multiplicação por hora + end end return true end @@ -73,7 +106,6 @@ local function playerAddContainerItem(params, item) local reward = params.containerReward local itemType = ItemType(params.itemid) if itemType:isKey() then - -- If is key inside container, uses the "keyAction" variable keyItem = reward:addItem(params.itemid, params.count) if params.storage then keyItem:setActionId(params.action) @@ -92,7 +124,17 @@ local function playerAddContainerItem(params, item) end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a " .. getItemName(params.itemBagName) .. ".") - player:setStorageValue(params.storage, 1) + if params.useKV then + player:questKV(params.questName):set("completed", true) + if params.timer then + player:questKV(params.questName):set("params.questName", os.time() + params.time * 3600) -- multiplicação por hora + end + else + player:setStorageValue(params.storage, 1) + if params.timer then + player:setStorageValue(params.timer, os.time() + params.time * 3600) -- multiplicação por hora + end + end return true end @@ -118,20 +160,32 @@ function questReward.onUse(player, item, fromPosition, itemEx, toPosition) end end - if setting.timerStorage then - if player:getStorageValue(setting.timerStorage) > os.time() then + if setting.useKV then + if player:questKV(setting.questName):get("completed") then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. getItemName(setting.itemId) .. " is empty.") + return true + end + if setting.timerStorage and player:questKV(setting.questName):get("timer") and player:questKV(setting.questName):get("timer") > os.time() then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. getItemName(setting.itemId) .. " is empty.") + return true + end + else + if player:getStorageValue(setting.storage) >= 1 then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. getItemName(setting.itemId) .. " is empty.") + return true + end + if setting.timerStorage and player:getStorageValue(setting.timerStorage) > os.time() then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. getItemName(setting.itemId) .. " is empty.") return true end - elseif player:getStorageValue(setting.storage) >= 0 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. getItemName(setting.itemId) .. " is empty.") - return true end + if setting.randomReward then local randomReward = math.random(#setting.randomReward) setting.reward[1][1] = setting.randomReward[randomReward][1] setting.reward[1][2] = setting.randomReward[randomReward][2] end + local container = player:addItem(setting.container) for i = 1, #setting.reward do local itemid = setting.reward[i][1] @@ -152,6 +206,8 @@ function questReward.onUse(player, item, fromPosition, itemEx, toPosition) key = setting.isKey, timer = setting.timerStorage, time = setting.time, + questName = setting.questName, + useKV = setting.useKV, } if count > 1 and ItemType(itemid):isStackable() then @@ -182,6 +238,8 @@ function questReward.onUse(player, item, fromPosition, itemEx, toPosition) action = setting.keyAction, itemBagName = itemBagName, containerReward = itemBag, + questName = setting.questName, + useKV = setting.useKV, } if not playerAddContainerItem(addContainerItemParams, item) then @@ -189,6 +247,7 @@ function questReward.onUse(player, item, fromPosition, itemEx, toPosition) end end end + return true end diff --git a/data-otservbr-global/scripts/actions/tools/crowbar.lua b/data-otservbr-global/scripts/actions/tools/crowbar.lua new file mode 100644 index 00000000000..0981bd61d24 --- /dev/null +++ b/data-otservbr-global/scripts/actions/tools/crowbar.lua @@ -0,0 +1,39 @@ +local function the_ape_city(player, item, target, toPosition) + if target:getActionId() == 40041 and target:getId() == 4848 then + local storageValue = player:getStorageValue(Storage.Quest.U7_6.TheApeCity.Casks) + if storageValue < 0 then + storageValue = 0 + end + + if storageValue >= 3 then + return true + end + + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Casks, storageValue + 1) + + return true + end + return false +end + +local crowbarActions = { + the_ape_city = the_ape_city, +} + +local function onUseCrowbar(player, item, fromPosition, target, toPosition, isHotkey) + for actionName, actionFunction in pairs(crowbarActions) do + if actionFunction(player, item, target, toPosition) then + return true + end + end + return true +end + +local crowbar = Action() + +function crowbar.onUse(player, item, fromPosition, target, toPosition, isHotkey) + return onUseCrowbar(player, item, fromPosition, target, toPosition, isHotkey) +end + +crowbar:id(3304) +crowbar:register() diff --git a/data-otservbr-global/scripts/actions/tools/rake.lua b/data-otservbr-global/scripts/actions/tools/rake.lua index 6279a5132fa..5d520e99aed 100644 --- a/data-otservbr-global/scripts/actions/tools/rake.lua +++ b/data-otservbr-global/scripts/actions/tools/rake.lua @@ -7,11 +7,11 @@ function rake.onUse(player, item, fromPosition, target, toPosition, isHotkey) player:say("You dig out a handful of ordinary clay.", TALKTYPE_MONSTER_SAY) -- The Shattered Isles Parrot ring elseif target.itemid == 6094 then - if player:getStorageValue(Storage.TheShatteredIsles.TheGovernorDaughter) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheGovernorDaughter) == 1 then toPosition:sendMagicEffect(CONST_ME_POFF) Game.createItem(6093, 1, Position(32422, 32770, 1)) player:say("You have found a ring.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.TheShatteredIsles.TheGovernorDaughter, 2) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheGovernorDaughter, 2) end end return true diff --git a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua index 6f7e00e77f6..da3c346e34d 100644 --- a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua +++ b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua @@ -91,25 +91,25 @@ local questTable = { { storage = Storage.CultsOfTibia.Misguided.BossTimer, storageValue = 1 }, { storage = Storage.CultsOfTibia.Minotaurs.EntranceAccessDoor, storageValue = 1 }, { storage = Storage.CultsOfTibia.Minotaurs.AccessDoor, storageValue = 1 }, - { storage = Storage.ExplorerSociety.QuestLine, storageValue = 1 }, - { storage = Storage.ExplorerSociety.QuestLine, storageValue = 4 }, - { storage = Storage.ExplorerSociety.QuestLine, storageValue = 7 }, - { storage = Storage.ExplorerSociety.QuestLine, storageValue = 16 }, - { storage = Storage.ExplorerSociety.QuestLine, storageValue = 26 }, - { storage = Storage.ExplorerSociety.QuestLine, storageValue = 29 }, - { storage = Storage.ExplorerSociety.QuestLine, storageValue = 32 }, - { storage = Storage.ExplorerSociety.QuestLine, storageValue = 35 }, - { storage = Storage.ExplorerSociety.QuestLine, storageValue = 38 }, - { storage = Storage.ExplorerSociety.QuestLine, storageValue = 41 }, - { storage = Storage.ExplorerSociety.QuestLine, storageValue = 43 }, - { storage = Storage.ExplorerSociety.QuestLine, storageValue = 46 }, - { storage = Storage.ExplorerSociety.QuestLine, storageValue = 47 }, - { storage = Storage.ExplorerSociety.QuestLine, storageValue = 50 }, - { storage = Storage.ExplorerSociety.QuestLine, storageValue = 55 }, - { storage = Storage.ExplorerSociety.QuestLine, storageValue = 56 }, - { storage = Storage.ExplorerSociety.QuestLine, storageValue = 58 }, - { storage = Storage.ExplorerSociety.QuestLine, storageValue = 61 }, - { storage = Storage.ExplorerSociety.CalassaQuest, storageValue = 2 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 1 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 4 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 7 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 16 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 26 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 29 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 32 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 35 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 38 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 41 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 43 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 46 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 47 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 50 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 55 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 56 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 58 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.QuestLine, storageValue = 61 }, + { storage = Storage.Quest.U7_6.ExplorerSociety.CalassaQuest, storageValue = 2 }, { storage = Storage.ForgottenKnowledge.Tomes, storageValue = 1 }, { storage = Storage.ForgottenKnowledge.LastLoreKilled, storageValue = 1 }, { storage = Storage.ForgottenKnowledge.TimeGuardianKilled, storageValue = 1 }, @@ -135,18 +135,18 @@ local questTable = { { storage = Storage.ChildrenoftheRevolution.SpyBuilding02, storageValue = 1 }, { storage = Storage.ChildrenoftheRevolution.SpyBuilding03, storageValue = 1 }, { storage = Storage.ChildrenoftheRevolution.StrangeSymbols, storageValue = 1 }, - { storage = Storage.DjinnWar.Faction.Greeting, storageValue = 2 }, - { storage = Storage.DjinnWar.Faction.MaridDoor, storageValue = 2 }, - { storage = Storage.DjinnWar.Faction.EfreetDoor, storageValue = 2 }, - { storage = Storage.DjinnWar.EfreetFaction.Start, storageValue = 1 }, - { storage = Storage.DjinnWar.EfreetFaction.Mission01, storageValue = 3 }, - { storage = Storage.DjinnWar.EfreetFaction.Mission02, storageValue = 3 }, - { storage = Storage.DjinnWar.EfreetFaction.Mission03, storageValue = 3 }, - { storage = Storage.DjinnWar.MaridFaction.Start, storageValue = 1 }, - { storage = Storage.DjinnWar.MaridFaction.Mission01, storageValue = 2 }, - { storage = Storage.DjinnWar.MaridFaction.Mission02, storageValue = 2 }, - { storage = Storage.DjinnWar.MaridFaction.RataMari, storageValue = 2 }, - { storage = Storage.DjinnWar.MaridFaction.Mission03, storageValue = 3 }, + { storage = Storage.Quest.U7_4.DjinnWar.Faction.Greeting, storageValue = 2 }, + { storage = Storage.Quest.U7_4.DjinnWar.Faction.MaridDoor, storageValue = 2 }, + { storage = Storage.Quest.U7_4.DjinnWar.Faction.EfreetDoor, storageValue = 2 }, + { storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Start, storageValue = 1 }, + { storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission01, storageValue = 3 }, + { storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission02, storageValue = 3 }, + { storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission03, storageValue = 3 }, + { storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.Start, storageValue = 1 }, + { storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission01, storageValue = 2 }, + { storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission02, storageValue = 2 }, + { storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.RataMari, storageValue = 2 }, + { storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission03, storageValue = 3 }, { storage = Storage.TheWayToYalahar.QuestLine, storageValue = 1 }, { storage = Storage.SearoutesAroundYalahar.TownsCounter, storageValue = 5 }, { storage = Storage.SearoutesAroundYalahar.AbDendriel, storageValue = 1 }, @@ -209,17 +209,17 @@ local questTable = { { storage = Storage.Quest.U8_54.TheNewFrontier.Mission05.Wyrdin, storageValue = 1 }, { storage = Storage.Quest.U8_54.TheNewFrontier.Mission05.Telas, storageValue = 1 }, { storage = Storage.Quest.U8_54.TheNewFrontier.Mission05.Humgolf, storageValue = 1 }, - { storage = Storage.TheShatteredIsles.DefaultStart, storageValue = 3 }, - { storage = Storage.TheShatteredIsles.TheGovernorDaughter, storageValue = 3 }, - { storage = Storage.TheShatteredIsles.TheErrand, storageValue = 2 }, - { storage = Storage.TheShatteredIsles.AccessToMeriana, storageValue = 1 }, - { storage = Storage.TheShatteredIsles.APoemForTheMermaid, storageValue = 3 }, - { storage = Storage.TheShatteredIsles.ADjinnInLove, storageValue = 5 }, - { storage = Storage.TheShatteredIsles.AccessToLagunaIsland, storageValue = 1 }, - { storage = Storage.TheShatteredIsles.AccessToGoroma, storageValue = 1 }, - { storage = Storage.TheShatteredIsles.Shipwrecked, storageValue = 2 }, - { storage = Storage.TheShatteredIsles.DragahsSpellbook, storageValue = 1 }, - { storage = Storage.TheShatteredIsles.TheCounterspell, storageValue = 4 }, + { storage = Storage.Quest.U7_8.TheShatteredIsles.DefaultStart, storageValue = 3 }, + { storage = Storage.Quest.U7_8.TheShatteredIsles.TheGovernorDaughter, storageValue = 3 }, + { storage = Storage.Quest.U7_8.TheShatteredIsles.TheErrand, storageValue = 2 }, + { storage = Storage.Quest.U7_8.TheShatteredIsles.AccessToMeriana, storageValue = 1 }, + { storage = Storage.Quest.U7_8.TheShatteredIsles.APoemForTheMermaid, storageValue = 3 }, + { storage = Storage.Quest.U7_8.TheShatteredIsles.ADjinnInLove, storageValue = 5 }, + { storage = Storage.Quest.U7_8.TheShatteredIsles.AccessToLagunaIsland, storageValue = 1 }, + { storage = Storage.Quest.U7_8.TheShatteredIsles.AccessToGoroma, storageValue = 1 }, + { storage = Storage.Quest.U7_8.TheShatteredIsles.Shipwrecked, storageValue = 2 }, + { storage = Storage.Quest.U7_8.TheShatteredIsles.DragahsSpellbook, storageValue = 1 }, + { storage = Storage.Quest.U7_8.TheShatteredIsles.TheCounterspell, storageValue = 4 }, { storage = Storage.ThievesGuild.Quest, storageValue = 1 }, { storage = Storage.ThievesGuild.Mission01, storageValue = 2 }, { storage = Storage.ThievesGuild.Mission02, storageValue = 3 }, @@ -244,10 +244,10 @@ local questTable = { { storage = 12330, storageValue = 1 }, { storage = 12332, storageValue = 13 }, { storage = 12333, storageValue = 3 }, - { storage = Storage.FriendsandTraders.DefaultStart, storageValue = 1 }, - { storage = Storage.FriendsandTraders.TheSweatyCyclops, storageValue = 2 }, - { storage = Storage.FriendsandTraders.TheMermaidMarina, storageValue = 2 }, - { storage = Storage.FriendsandTraders.TheBlessedStake, storageValue = 12 }, + { storage = Storage.Quest.U7_8.FriendsAndTraders.DefaultStart, storageValue = 1 }, + { storage = Storage.Quest.U7_8.FriendsAndTraders.TheSweatyCyclops, storageValue = 2 }, + { storage = Storage.Quest.U7_8.FriendsAndTraders.TheMermaidMarina, storageValue = 2 }, + { storage = Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, storageValue = 12 }, { storage = 100157, storageValue = 1 }, { storage = Storage.WrathoftheEmperor.Questline, storageValue = 29 }, { storage = Storage.WrathoftheEmperor.Mission01, storageValue = 3 }, @@ -260,8 +260,8 @@ local questTable = { { storage = Storage.WrathoftheEmperor.Mission08, storageValue = 2 }, { storage = Storage.WrathoftheEmperor.Mission09, storageValue = 2 }, { storage = Storage.WrathoftheEmperor.Mission10, storageValue = 1 }, - { storage = Storage.TheApeCity.Started, storageValue = 1 }, - { storage = Storage.TheApeCity.Questline, storageValue = 18 }, + { storage = Storage.Quest.U7_6.TheApeCity.Started, storageValue = 1 }, + { storage = Storage.Quest.U7_6.TheApeCity.Questline, storageValue = 18 }, { storage = Storage.BanutaSecretTunnel.DeeperBanutaShortcut, storageValue = 1 }, { storage = Storage.Oramond.QuestLine, storageValue = 1 }, { storage = Storage.Oramond.MissionToTakeRoots, storageValue = 3000 }, @@ -343,10 +343,10 @@ local questTable = { { storage = Storage.TheSecretLibrary.MiniBosses.GrandCommanderSoeren, storageValue = 1 }, { storage = Storage.TheSecretLibrary.MiniBosses.DazedLeafGolem, storageValue = 1 }, - { storage = Storage.DjinnWar.EfreetFaction.DoorToLamp, storageValue = 1 }, - { storage = Storage.DjinnWar.EfreetFaction.DoorToMaridTerritory, storageValue = 1 }, - { storage = Storage.DjinnWar.MaridFaction.DoorToLamp, storageValue = 1 }, - { storage = Storage.DjinnWar.MaridFaction.DoorToEfreetTerritory, storageValue = 1 }, + { storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.DoorToLamp, storageValue = 1 }, + { storage = Storage.Quest.U7_4.DjinnWar.EfreetFaction.DoorToMaridTerritory, storageValue = 1 }, + { storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.DoorToLamp, storageValue = 1 }, + { storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.DoorToEfreetTerritory, storageValue = 1 }, { storage = Storage.Quest.U12_20.GraveDanger.QuestLine, storageValue = 14 }, { storage = Storage.Quest.U12_20.GraveDanger.Bosses.KingZelosDoor, storageValue = 1 }, @@ -364,10 +364,10 @@ local questTable = { { storage = Storage.ToOutfoxAFoxQuest, storageValue = 2 }, -- Hunter Outfit quests - { storage = Storage.OutfitQuest.HunterMusicSheet01, storageValue = 1 }, - { storage = Storage.OutfitQuest.HunterMusicSheet02, storageValue = 1 }, - { storage = Storage.OutfitQuest.HunterMusicSheet03, storageValue = 1 }, - { storage = Storage.OutfitQuest.HunterMusicSheet04, storageValue = 1 }, + { storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet01, storageValue = 1 }, + { storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet02, storageValue = 1 }, + { storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet03, storageValue = 1 }, + { storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet04, storageValue = 1 }, -- Norseman { storage = Storage.OutfitQuest.NorsemanAddon, storageValue = 1 }, diff --git a/data-otservbr-global/scripts/game_migrations/20241715984294_quests_storages_to_kv.lua b/data-otservbr-global/scripts/game_migrations/20241715984294_quests_storages_to_kv.lua new file mode 100644 index 00000000000..a6c4dae0547 --- /dev/null +++ b/data-otservbr-global/scripts/game_migrations/20241715984294_quests_storages_to_kv.lua @@ -0,0 +1,81 @@ +local migrationStoragetokv = { + { storageOld = 10061, questName = "behemothquest1" }, -- Storage.Quest.U7_2.Behemoth.Bag + { storageOld = 10062, questName = "behemothquest2" }, -- Storage.Quest.U7_2.Behemoth.GuardianHalberd + { storageOld = 10063, questName = "behemothquest3" }, -- Storage.Quest.U7_2.Behemoth.DemonShield + { storageOld = 10064, questName = "behemothquest4" }, -- Storage.Quest.U7_2.Behemoth.GoldenArmor + { storageOld = 51763, questName = "doublet" }, -- Storage.QuestChests.DoubletQuest + { storageOld = 51764, questName = "honeyflower" }, -- Storage.QuestChests.HoneyFlower + { storageOld = 40125, questName = "ringquest1" }, -- Storage.Quest.U7_1.Ring.Rewards.TimeRing + { storageOld = 40126, questName = "ringquest2" }, -- Storage.Quest.U7_1.Ring.Rewards.SwordRing + { storageOld = 40111, questName = "AlawarsVault1" }, -- Storage.Quest.U6_5.AlawarsVault.Rewards.WhitePearl + { storageOld = 40112, questName = "AlawarsVault2" }, -- Storage.Quest.U6_5.AlawarsVault.Rewards.Broadsword + { storageOld = 40121, questName = "Blackknight1" }, -- Storage.Quest.U7_1.BlackKnight.Rewards.CrownArmor + { storageOld = 40122, questName = "Blackknight2" }, -- Storage.Quest.U7_1.BlackKnight.Rewards.CrownShield + { storageOld = 40127, questName = "timering1" }, -- Storage.Quest.U7_1.TimeRing.Rewards.CrystallBall + { storageOld = 40128, questName = "timering2" }, -- Storage.Quest.U7_1.TimeRing.Rewards.TimeRing + { storageOld = 40129, questName = "timering3" }, -- Storage.Quest.U7_1.TimeRing.Rewards.ElvenAmulet + { storageOld = 30005, questName = "platearmor" }, -- Storage.GhostShipQuest + { storageOld = 51744, questName = "silverbrooch" }, -- Storage.QuestChests.SilverBrooch + { storageOld = 51749, questName = "sixrubies" }, -- Storage.QuestChests.SixRubiesQuest + { storageOld = 20021, questName = "legiondawnport" }, -- Storage.Quest.U10_55.SanctuaryOfTheLizardGod.LegionHelmet + { storageOld = 30059, questName = "battleaxe" }, -- Storage.BattleAxeQuest + { storageOld = 30010, questName = "deeperfibula1" }, -- Storage.BloodHerbQuest + { storageOld = 40001, questName = "deeperfibula2" }, -- Storage.Quest.PreU6_0.DeeperFibula.Rewards.TowerShield + { storageOld = 40002, questName = "deeperfibula3" }, -- Storage.Quest.PreU6_0.DeeperFibula.Rewards.WarriorHelmet + { storageOld = 40003, questName = "deeperfibula4" }, -- Storage.Quest.PreU6_0.DeeperFibula.Rewards.DwarvenRing + { storageOld = 40004, questName = "deeperfibula5" }, -- Storage.Quest.PreU6_0.DeeperFibula.Rewards.ElvenAmulet + { storageOld = 40005, questName = "deeperfibula6" }, -- Storage.Quest.PreU6_0.DeeperFibula.Rewards.KnightAxe + { storageOld = 40008, questName = "shortswordbook" }, -- Storage.Quest.PreU6_0.ShortSword.Rewards.Book + { storageOld = 40009, questName = "lighthouse1" }, -- Storage.Quest.PreU6_0.ThaisLighthouse.Rewards.BattleHammer + { storageOld = 40010, questName = "lighthouse2" }, -- Storage.Quest.PreU6_0.ThaisLighthouse.Rewards.DarkShield + { storageOld = 40021, questName = "bananafree" }, -- Storage.Quest.U6_0.StuddedShield.Rewards.BananaFre + { storageOld = 40022, questName = "bananapremium" }, -- Storage.Quest.U6_0.StuddedShield.Rewards.BananaPremium + { storageOld = 40032, questName = "explorerbrooch" }, -- Storage.Quest.U6_1.ExplorerBrooch.Brooch + { storageOld = 40033, questName = "orcfortress1" }, -- Storage.Quest.U6_1.OrcFortress.Rewards.KnightAxe + { storageOld = 40034, questName = "orcfortress2" }, -- Storage.Quest.U6_1.ExplorerBrooch.KnightArmor + { storageOld = 40035, questName = "orcfortress3" }, -- Storage.Quest.U6_1.ExplorerBrooch.FireSword + { storageOld = 40051, questName = "draconia1" }, -- Storage.Quest.U6_2.Draconia.Rewards.BagWithWeapons + { storageOld = 40052, questName = "draconia2" }, -- Storage.Quest.U6_2.Draconia.Rewards.BagWithAmulets + { storageOld = 40071, questName = "adoreduh" }, -- Storage.Quest.U6_4.AdornedUHRune.Rewards.SilverRuneEmblem + { storageOld = 40072, questName = "barbarianaxe1" }, -- Storage.Quest.U6_4.BarbarianAxe.Rewards.BarbarianAxe + { storageOld = 40073, questName = "barbarianaxe2" }, -- Storage.Quest.U6_4.BarbarianAxe.Rewards.Scimitar + { storageOld = 40075, questName = "darkarmor" }, -- Storage.Quest.U6_4.DarkArmor.Rewards.Armor + { storageOld = 40079, questName = "doublehero1" }, -- Storage.Quest.U6_4.DoubleHero.Rewards.RedGem + { storageOld = 40080, questName = "doublehero2" }, -- Storage.Quest.U6_4.DoubleHero.Rewards.ClubRing + { storageOld = 40081, questName = "edrongoblin1" }, -- Storage.Quest.U6_4.EdronGoblin.Rewards.SilverAmulet + { storageOld = 40082, questName = "edrongoblin2" }, -- Storage.Quest.U6_4.EdronGoblin.Rewards.SteelShield + { storageOld = 40083, questName = "fireaxe1" }, -- Storage.Quest.U6_4.FireAxe.Rewards.Bag + { storageOld = 40084, questName = "fireaxe2" }, -- Storage.Quest.U6_4.FireAxe.Rewards.FireAxe + { storageOld = 40085, questName = "poisondaggers" }, -- Storage.Quest.U6_4.PoisonDaggers.Rewards.BackpackReward + { storageOld = 40086, questName = "shamantreasure" }, -- Storage.Quest.U6_4.ShamanTreasure.Rewards.BlankRunes + { storageOld = 40089, questName = "vampireshield1" }, -- Storage.Quest.U6_4.VampireShield.Rewards.StrangeSymbol + { storageOld = 40090, questName = "vampireshield2" }, -- Storage.Quest.U6_4.VampireShield.Rewards.DragonLance + { storageOld = 40091, questName = "vampireshield3" }, -- Storage.Quest.U6_4.VampireShield.Rewards.VampireShield + { storageOld = 40087, questName = "trollcave1" }, -- Storage.Quest.U6_4.TrollCave.Rewards.GarlicNecklace + { storageOld = 40088, questName = "trollcave2" }, -- Storage.Quest.U6_4.TrollCave.Rewards.BrassLegs + { storageOld = 40092, questName = "weddingring1" }, -- Storage.Quest.U6_4.WeddingRing.Rewards.DragonNecklace + { storageOld = 40093, questName = "weddingring2" }, -- Storage.Quest.U6_4.WeddingRing.Rewards.WeedingRing + { storageOld = 10097, questName = "madmageroom1" }, -- Storage.Quest.U7_24.MadMageRoom.StarAmulet + { storageOld = 10098, questName = "madmageroom2" }, -- Storage.Quest.U7_24.MadMageRoom.Hat + { storageOld = 10099, questName = "madmageroom3" }, -- Storage.Quest.U7_24.MadMageRoom.StoneSkinAmulet + { storageOld = 40007, questName = "ornamentedshield" }, -- Storage.Quest.PreU6_0.OrnamentedShield.Rewards.TimeRing + { storageOld = 40036, questName = "panpipe" }, -- Storage.Quest.U6_1.Panpipe.Rewards.Panpipe +} + +local function migrate(player) + for _, scrollTable in ipairs(migrationStoragetokv) do + local oldStorage = player:getStorageValue(scrollTable.storageOld) + if oldStorage > 0 then + player:questKV(scrollTable.questName):set("completed", true) + player:setStorageValue(scrollTable.storageOld, -1) + end + end +end + +local migration = Migration("20241715984294_quests_storages_to_kv") + +function migration:onExecute() + self:forEachPlayer(migrate) +end + +migration:register() diff --git a/data-otservbr-global/scripts/movements/quests/bright_sword/entrance.lua b/data-otservbr-global/scripts/movements/quests/bright_sword/entrance.lua deleted file mode 100644 index 85447176db6..00000000000 --- a/data-otservbr-global/scripts/movements/quests/bright_sword/entrance.lua +++ /dev/null @@ -1,15 +0,0 @@ -local brightSword = MoveEvent() - -function brightSword.onStepIn(creature, item, position, fromPosition) - local player = creature:getPlayer() - if not player then - return true - end - - player:teleportTo(Position(32619, 32249, 8)) - return true -end - -brightSword:type("stepin") -brightSword:aid(5634) -brightSword:register() diff --git a/data-otservbr-global/scripts/movements/quests/devil_helmet/sewer.lua b/data-otservbr-global/scripts/movements/quests/devil_helmet/sewer.lua index 269edf74fd2..6226a5f27ae 100644 --- a/data-otservbr-global/scripts/movements/quests/devil_helmet/sewer.lua +++ b/data-otservbr-global/scripts/movements/quests/devil_helmet/sewer.lua @@ -19,7 +19,7 @@ function sewer.onStepIn(creature, item, position, fromPosition) end sewer:type("stepin") -sewer:uid(65203) +sewer:uid(25030) sewer:register() sewer = MoveEvent() @@ -41,5 +41,5 @@ function sewer.onStepOut(creature, item, position, fromPosition) end sewer:type("stepout") -sewer:uid(65203) +sewer:uid(25030) sewer:register() diff --git a/data-otservbr-global/scripts/movements/quests/inquisition/entrance.lua b/data-otservbr-global/scripts/movements/quests/inquisition/entrance.lua index 73b28dc0c57..19f6914eb96 100644 --- a/data-otservbr-global/scripts/movements/quests/inquisition/entrance.lua +++ b/data-otservbr-global/scripts/movements/quests/inquisition/entrance.lua @@ -1,11 +1,11 @@ local throneStorages = { - Storage.PitsOfInferno.ThroneInfernatil, - Storage.PitsOfInferno.ThroneTafariel, - Storage.PitsOfInferno.ThroneVerminor, - Storage.PitsOfInferno.ThroneApocalypse, - Storage.PitsOfInferno.ThroneBazir, - Storage.PitsOfInferno.ThroneAshfalor, - Storage.PitsOfInferno.ThronePumin, + Storage.Quest.U7_9.ThePitsOfInferno.ThroneInfernatil, + Storage.Quest.U7_9.ThePitsOfInferno.ThroneTafariel, + Storage.Quest.U7_9.ThePitsOfInferno.ThroneVerminor, + Storage.Quest.U7_9.ThePitsOfInferno.ThroneApocalypse, + Storage.Quest.U7_9.ThePitsOfInferno.ThroneBazir, + Storage.Quest.U7_9.ThePitsOfInferno.ThroneAshfalor, + Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, } local function hasTouchedOneThrone(player) @@ -17,8 +17,11 @@ local function hasTouchedOneThrone(player) return false end -local entrance = MoveEvent() +local config = { + { position = { x = 33192, y = 31691, z = 14 }, destination = { x = 33168, y = 31683, z = 15 } }, +} +local entrance = MoveEvent() function entrance.onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then @@ -26,11 +29,16 @@ function entrance.onStepIn(creature, item, position, fromPosition) end if hasTouchedOneThrone(player) and player:getLevel() >= 100 and player:getStorageValue(Storage.TheInquisition.Questline) >= 20 then - local destination = Position(33168, 31683, 15) - player:teleportTo(destination) - position:sendMagicEffect(CONST_ME_TELEPORT) - destination:sendMagicEffect(CONST_ME_TELEPORT) - return true + for i = 1, #config do + local cfg = config[i] + if Position(cfg.position.x, cfg.position.y, cfg.position.z) == player:getPosition() then + local destination = Position(cfg.destination.x, cfg.destination.y, cfg.destination.z) + player:teleportTo(destination) + position:sendMagicEffect(CONST_ME_TELEPORT) + destination:sendMagicEffect(CONST_ME_TELEPORT) + return true + end + end end player:teleportTo(fromPosition, true) @@ -40,5 +48,8 @@ function entrance.onStepIn(creature, item, position, fromPosition) end entrance:type("stepin") -entrance:uid(9014) +for i = 1, #config do + entrance:position(Position(config[i].position.x, config[i].position.y, config[i].position.z)) +end + entrance:register() diff --git a/data-otservbr-global/scripts/movements/quests/pits_of_inferno/check_throne.lua b/data-otservbr-global/scripts/movements/quests/pits_of_inferno/check_throne.lua deleted file mode 100644 index 9507d731742..00000000000 --- a/data-otservbr-global/scripts/movements/quests/pits_of_inferno/check_throne.lua +++ /dev/null @@ -1,37 +0,0 @@ -local setting = { - [2090] = { storage = Storage.PitsOfInferno.ThroneInfernatil, value = 1 }, - [2091] = { storage = Storage.PitsOfInferno.ThroneTafariel, value = 1 }, - [2092] = { storage = Storage.PitsOfInferno.ThroneVerminor, value = 1 }, - [2093] = { storage = Storage.PitsOfInferno.ThroneApocalypse, value = 1 }, - [2094] = { storage = Storage.PitsOfInferno.ThroneBazir, value = 1 }, - [2095] = { storage = Storage.PitsOfInferno.ThroneAshfalor, value = 1 }, - [2096] = { storage = Storage.PitsOfInferno.ThronePumin, value = 1 }, -} - -local checkThrone = MoveEvent() - -function checkThrone.onStepIn(creature, item, position, fromPosition) - local player = creature:getPlayer() - if not player then - return true - end - - local thrones = setting[item.uid] - if not thrones then - return true - end - - if player:getStorageValue(thrones.storage) ~= thrones.value then - player:teleportTo(fromPosition, true) - player:say("You've not absorbed energy from this throne.", TALKTYPE_MONSTER_SAY) - end - return true -end - -checkThrone:type("stepin") - -for index, value in pairs(setting) do - checkThrone:uid(index) -end - -checkThrone:register() diff --git a/data-otservbr-global/scripts/movements/quests/the_ape_city/mission9_the_deepest_catacomb_teleport.lua b/data-otservbr-global/scripts/movements/quests/the_ape_city/mission9_the_deepest_catacomb_teleport.lua deleted file mode 100644 index 3209936e25a..00000000000 --- a/data-otservbr-global/scripts/movements/quests/the_ape_city/mission9_the_deepest_catacomb_teleport.lua +++ /dev/null @@ -1,32 +0,0 @@ -local mission9TheDeepestCatacombTeleport = MoveEvent() - -function mission9TheDeepestCatacombTeleport.onStepIn(creature, item, position, fromPosition) - local player = creature:getPlayer() - if not player then - return true - end - if item.uid == 9257 and player:getStorageValue(Storage.TheApeCity.Questline) >= 17 then - player:teleportTo(Position(32749, 32536, 10)) - position:sendMagicEffect(CONST_ME_TELEPORT) - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - elseif item.uid == 9258 then - if Tile(Position(32792, 32527, 10)):getItemById(4996) and Tile(Position(32823, 32525, 10)):getItemById(4996) and Tile(Position(32876, 32584, 10)):getItemById(4996) and Tile(Position(32744, 32586, 10)):getItemById(4996) then - player:teleportTo(Position(32885, 32632, 11)) - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - return true - else - player:teleportTo(fromPosition) - position:sendMagicEffect(CONST_ME_TELEPORT) - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "There are 4 large amphoras that must be broken in order to open the teleporter.") - return true - end - else - player:teleportTo(fromPosition, true) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You don't have access to this area.") - end -end - -mission9TheDeepestCatacombTeleport:type("stepin") -mission9TheDeepestCatacombTeleport:uid(9257, 9258) -mission9TheDeepestCatacombTeleport:register() diff --git a/data-otservbr-global/scripts/movements/quests/the_outlaw_camp/entrance.lua b/data-otservbr-global/scripts/movements/quests/the_outlaw_camp/entrance.lua new file mode 100644 index 00000000000..4930ab8cd77 --- /dev/null +++ b/data-otservbr-global/scripts/movements/quests/the_outlaw_camp/entrance.lua @@ -0,0 +1,25 @@ +--outlaw camp quest (bright sword quest) +local config = { + { position = { x = 32619, y = 32248, z = 6 }, destination = { x = 32619, y = 32249, z = 8 } }, +} + +local brightSword = MoveEvent() +function brightSword.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return false + end + for value in pairs(config) do + if Position(config[value].position) == player:getPosition() then + player:teleportTo(Position(config[value].destination)) + return true + end + end +end + +brightSword:type("stepin") +for value in pairs(config) do + brightSword:position(config[value].position) +end + +brightSword:register() diff --git a/data-otservbr-global/scripts/movements/teleport/tomb_coal_basin.lua b/data-otservbr-global/scripts/movements/teleport/tomb_coal_basin.lua deleted file mode 100644 index fb3957efa8d..00000000000 --- a/data-otservbr-global/scripts/movements/teleport/tomb_coal_basin.lua +++ /dev/null @@ -1,35 +0,0 @@ -local config = { - [9033] = { flamePosition = Position(33097, 32816, 13), toPosition = Position(33093, 32824, 13) }, - [9034] = { flamePosition = Position(33293, 32742, 13), toPosition = Position(33299, 32742, 13) }, - [9035] = { flamePosition = Position(33073, 32590, 13), toPosition = Position(33080, 32588, 13) }, - [9036] = { flamePosition = Position(33240, 32856, 13), toPosition = Position(33246, 32850, 13) }, - [9037] = { flamePosition = Position(33276, 32553, 14), toPosition = Position(33271, 32553, 14) }, - [9038] = { flamePosition = Position(33234, 32692, 13), toPosition = Position(33234, 32687, 13) }, - [9039] = { flamePosition = Position(33135, 32683, 12), toPosition = Position(33130, 32683, 12) }, - [9040] = { flamePosition = Position(33162, 32831, 10), toPosition = Position(33158, 32832, 10) }, -} - -local tombCoalBasin = MoveEvent() - -function tombCoalBasin.onAddItem(moveitem, tileitem, position) - local targetCoalBasin = config[tileitem.uid] - if not targetCoalBasin then - return true - end - - if moveitem.itemid ~= 3042 then - position:sendMagicEffect(CONST_ME_POFF) - return true - end - - moveitem:remove() - position:sendMagicEffect(CONST_ME_HITBYFIRE) - - Tile(targetCoalBasin.flamePosition):relocateTo(targetCoalBasin.toPosition) - targetCoalBasin.toPosition:sendMagicEffect(CONST_ME_TELEPORT) - return true -end - -tombCoalBasin:type("additem") -tombCoalBasin:id(2114) -tombCoalBasin:register() diff --git a/data-otservbr-global/scripts/movements/teleport/turtles.lua b/data-otservbr-global/scripts/movements/teleport/turtles.lua index fbc2ff2a6a7..40ffe42f0dd 100644 --- a/data-otservbr-global/scripts/movements/teleport/turtles.lua +++ b/data-otservbr-global/scripts/movements/teleport/turtles.lua @@ -17,7 +17,7 @@ function turtles.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.TheShatteredIsles.AccessToLagunaIsland) ~= 1 and item.uid == 3206 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.AccessToLagunaIsland) ~= 1 and item.uid == 3206 then local accessPosition = Position(32340, 32540, 7) player:teleportTo(accessPosition) position:sendMagicEffect(CONST_ME_TELEPORT) diff --git a/data-otservbr-global/scripts/quests/draconia/action-lever.lua b/data-otservbr-global/scripts/quests/draconia/action-lever.lua index 449eb683461..9165d071dbf 100644 --- a/data-otservbr-global/scripts/quests/draconia/action-lever.lua +++ b/data-otservbr-global/scripts/quests/draconia/action-lever.lua @@ -1,6 +1,23 @@ -local lever = Action() +local lever1 = Action() -function lever.onUse(player, item, fromPosition, target, toPosition, isHotkey) +function lever1.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local position = { x = 32792, y = 31581, z = 7 } + if item.itemid == 2772 then + Tile(position):getItemById(1282):remove() + item:transform(2773) + elseif item.itemid == 2773 then + Game.createItem(1282, 1, position) + item:transform(2772) + end + return true +end + +lever1:uid(30006) +lever1:register() + +local lever2 = Action() + +function lever2.onUse(player, item, fromPosition, target, toPosition, isHotkey) local position = { x = 32790, y = 31594, z = 7 } if item.itemid == 2772 then Tile(position):getItemById(1772):remove() @@ -12,5 +29,5 @@ function lever.onUse(player, item, fromPosition, target, toPosition, isHotkey) return true end -lever:uid(30006) -lever:register() +lever2:uid(30035) +lever2:register() diff --git a/data-otservbr-global/scripts/actions/quests/dreamer_challenge/documents.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/actions_documents.lua similarity index 79% rename from data-otservbr-global/scripts/actions/quests/dreamer_challenge/documents.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/actions_documents.lua index 7f2145c52ad..f7d7a4339cd 100644 --- a/data-otservbr-global/scripts/actions/quests/dreamer_challenge/documents.lua +++ b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/actions_documents.lua @@ -23,14 +23,14 @@ function dreamerDocuments.onUse(player, item, fromPosition, target, toPosition, end local choice = useItem[1] - if player:getStorageValue(Storage.OutfitQuest.BrotherhoodOutfit) > player:getStorageValue(Storage.OutfitQuest.NightmareOutfit) then + if player:getStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits) > player:getStorageValue(Storage.Quest.U7_9.NightmareOutfits.Outfits) then choice = useItem[2] end if choice.addon then if player:hasOutfit(player:getSex() == PLAYERSEX_FEMALE and choice.female or choice.male) then if not player:hasOutfit(player:getSex() == PLAYERSEX_FEMALE and choice.female or choice.male, choice.addon) then - if player:getStorageValue(Storage.OutfitQuest.NightmareOutfit) >= useItem.storageValue or player:getStorageValue(Storage.OutfitQuest.BrotherhoodOutfit) >= useItem.storageValue then + if player:getStorageValue(Storage.Quest.U7_9.NightmareOutfits.Outfits) >= useItem.storageValue or player:getStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits) >= useItem.storageValue then player:addOutfitAddon(choice.female, choice.addon) player:addOutfitAddon(choice.male, choice.addon) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have received the " .. choice.msg .. " addon!") @@ -47,7 +47,7 @@ function dreamerDocuments.onUse(player, item, fromPosition, target, toPosition, end else if not player:hasOutfit(player:getSex() == PLAYERSEX_FEMALE and choice.female or choice.male) then - if player:getStorageValue(Storage.OutfitQuest.NightmareOutfit) >= 1 or player:getStorageValue(Storage.OutfitQuest.BrotherhoodOutfit) >= 1 then + if player:getStorageValue(Storage.Quest.U7_9.NightmareOutfits.Outfits) >= 1 or player:getStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits) >= 1 then player:addOutfit(choice.female) player:addOutfit(choice.male) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have received the " .. choice.msg .. " outfit!") diff --git a/data-otservbr-global/scripts/actions/quests/dreamer_challenge/lever_brotherhood.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/actions_lever_brotherhood.lua similarity index 65% rename from data-otservbr-global/scripts/actions/quests/dreamer_challenge/lever_brotherhood.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/actions_lever_brotherhood.lua index e0f62069758..647373fac09 100644 --- a/data-otservbr-global/scripts/actions/quests/dreamer_challenge/lever_brotherhood.lua +++ b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/actions_lever_brotherhood.lua @@ -18,15 +18,15 @@ function dreamerBrotherhoodLever.onUse(player, item, fromPosition, target, toPos end if item.uid == config[1].uid then local diamondItem = Tile(config[1].position):getItemById(3028) - if player:getStorageValue(Storage.OutfitQuest.BrotherhoodOutfit) >= config[1].storageOutfit then - if diamondItem and player:getStorageValue(Storage.DreamersChallenge.LeverBrotherhood1) < 1 then + if player:getStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits) >= config[1].storageOutfit then + if diamondItem and player:getStorageValue(Storage.Quest.U7_9.DreamersChallenge.LeverBrotherhood1) < 1 then diamondItem:remove(1) - player:setStorageValue(Storage.DreamersChallenge.LeverBrotherhood1, 1) + player:setStorageValue(Storage.Quest.U7_9.DreamersChallenge.LeverBrotherhood1, 1) config[1].position:sendMagicEffect(CONST_ME_TELEPORT) Game.createItem(config[1].itemId, 1, config[1].position) item:transform(2773) addEvent(revertLever, 4 * 1000, toPosition) - elseif not diamondItem and player:getStorageValue(Storage.DreamersChallenge.LeverBrotherhood1) < 1 then + elseif not diamondItem and player:getStorageValue(Storage.Quest.U7_9.DreamersChallenge.LeverBrotherhood1) < 1 then player:sendCancelMessage("You need to offer a small diamond.") else player:sendCancelMessage("You have already used this lever!") @@ -35,16 +35,16 @@ function dreamerBrotherhoodLever.onUse(player, item, fromPosition, target, toPos player:sendCancelMessage("You still don't have permission.") end elseif item.uid == config[2].uid then - if player:getStorageValue(Storage.OutfitQuest.BrotherhoodOutfit) >= config[2].storageOutfit then + if player:getStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits) >= config[2].storageOutfit then local diamondItem = Tile(config[2].position):getItemById(3028) - if diamondItem and player:getStorageValue(Storage.DreamersChallenge.LeverBrotherhood2) < 1 then + if diamondItem and player:getStorageValue(Storage.Quest.U7_9.DreamersChallenge.LeverBrotherhood2) < 1 then diamondItem:remove(1) - player:setStorageValue(Storage.DreamersChallenge.LeverBrotherhood2, 1) + player:setStorageValue(Storage.Quest.U7_9.DreamersChallenge.LeverBrotherhood2, 1) config[2].position:sendMagicEffect(CONST_ME_TELEPORT) Game.createItem(config[2].itemId, 1, config[2].position) item:transform(2773) addEvent(revertLever, 4 * 1000, toPosition) - elseif not diamondItem and player:getStorageValue(Storage.DreamersChallenge.LeverBrotherhood2) < 1 then + elseif not diamondItem and player:getStorageValue(Storage.Quest.U7_9.DreamersChallenge.LeverBrotherhood2) < 1 then player:sendCancelMessage("You need to offer a small diamond.") else player:sendCancelMessage("You have already used this lever!") @@ -53,16 +53,16 @@ function dreamerBrotherhoodLever.onUse(player, item, fromPosition, target, toPos player:sendCancelMessage("You still don't have permission.") end elseif item.uid == config[3].uid then - if player:getStorageValue(Storage.OutfitQuest.BrotherhoodOutfit) >= config[3].storageOutfit then + if player:getStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits) >= config[3].storageOutfit then local diamondItem = Tile(config[3].position):getItemById(3028) - if diamondItem and player:getStorageValue(Storage.DreamersChallenge.LeverBrotherhood3) < 1 then + if diamondItem and player:getStorageValue(Storage.Quest.U7_9.DreamersChallenge.LeverBrotherhood3) < 1 then diamondItem:remove(1) - player:setStorageValue(Storage.DreamersChallenge.LeverBrotherhood3, 1) + player:setStorageValue(Storage.Quest.U7_9.DreamersChallenge.LeverBrotherhood3, 1) config[3].position:sendMagicEffect(CONST_ME_TELEPORT) Game.createItem(config[3].itemId, 1, config[3].position) item:transform(2773) addEvent(revertLever, 4 * 1000, toPosition) - elseif not diamondItem and player:getStorageValue(Storage.DreamersChallenge.LeverBrotherhood3) < 1 then + elseif not diamondItem and player:getStorageValue(Storage.Quest.U7_9.DreamersChallenge.LeverBrotherhood3) < 1 then player:sendCancelMessage("You need to offer a small diamond.") else player:sendCancelMessage("You have already used this lever!") diff --git a/data-otservbr-global/scripts/actions/quests/dreamer_challenge/lever_nightmare.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/actions_lever_nightmare.lua similarity index 65% rename from data-otservbr-global/scripts/actions/quests/dreamer_challenge/lever_nightmare.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/actions_lever_nightmare.lua index 9ed136c1fdb..bf820c21dad 100644 --- a/data-otservbr-global/scripts/actions/quests/dreamer_challenge/lever_nightmare.lua +++ b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/actions_lever_nightmare.lua @@ -18,15 +18,15 @@ function dreamerNightmareLever.onUse(player, item, fromPosition, target, toPosit end if item.uid == config[1].uid then local diamondItem = Tile(config[1].position):getItemById(3028) - if player:getStorageValue(Storage.OutfitQuest.BrotherhoodOutfit) >= config[1].storageOutfit then - if diamondItem and player:getStorageValue(Storage.DreamersChallenge.LeverNightmare1) < 1 then + if player:getStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits) >= config[1].storageOutfit then + if diamondItem and player:getStorageValue(Storage.Quest.U7_9.DreamersChallenge.LeverNightmare1) < 1 then diamondItem:remove(1) - player:setStorageValue(Storage.DreamersChallenge.LeverNightmare1, 1) + player:setStorageValue(Storage.Quest.U7_9.DreamersChallenge.LeverNightmare1, 1) config[1].position:sendMagicEffect(CONST_ME_TELEPORT) Game.createItem(config[1].itemId, 1, config[1].position) item:transform(2773) addEvent(revertLever, 4 * 1000, toPosition) - elseif not diamondItem and player:getStorageValue(Storage.DreamersChallenge.LeverNightmare1) < 1 then + elseif not diamondItem and player:getStorageValue(Storage.Quest.U7_9.DreamersChallenge.LeverNightmare1) < 1 then player:sendCancelMessage("You need to offer a small diamond.") else player:sendCancelMessage("You have already used this lever!") @@ -35,16 +35,16 @@ function dreamerNightmareLever.onUse(player, item, fromPosition, target, toPosit player:sendCancelMessage("You still don't have permission.") end elseif item.uid == config[2].uid then - if player:getStorageValue(Storage.OutfitQuest.BrotherhoodOutfit) >= config[2].storageOutfit then + if player:getStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits) >= config[2].storageOutfit then local diamondItem = Tile(config[2].position):getItemById(3028) - if diamondItem and player:getStorageValue(Storage.DreamersChallenge.LeverNightmare1) < 1 then + if diamondItem and player:getStorageValue(Storage.Quest.U7_9.DreamersChallenge.LeverNightmare1) < 1 then diamondItem:remove(1) - player:setStorageValue(Storage.DreamersChallenge.LeverNightmare1, 1) + player:setStorageValue(Storage.Quest.U7_9.DreamersChallenge.LeverNightmare1, 1) config[2].position:sendMagicEffect(CONST_ME_TELEPORT) Game.createItem(config[2].itemId, 1, config[2].position) item:transform(2773) addEvent(revertLever, 4 * 1000, toPosition) - elseif not diamondItem and player:getStorageValue(Storage.DreamersChallenge.LeverNightmare1) < 1 then + elseif not diamondItem and player:getStorageValue(Storage.Quest.U7_9.DreamersChallenge.LeverNightmare1) < 1 then player:sendCancelMessage("You need to offer a small diamond.") else player:sendCancelMessage("You have already used this lever!") @@ -53,16 +53,16 @@ function dreamerNightmareLever.onUse(player, item, fromPosition, target, toPosit player:sendCancelMessage("You still don't have permission.") end elseif item.uid == config[3].uid then - if player:getStorageValue(Storage.OutfitQuest.BrotherhoodOutfit) >= config[3].storageOutfit then + if player:getStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits) >= config[3].storageOutfit then local diamondItem = Tile(config[3].position):getItemById(3028) - if diamondItem and player:getStorageValue(Storage.DreamersChallenge.LeverNightmare3) < 1 then + if diamondItem and player:getStorageValue(Storage.Quest.U7_9.DreamersChallenge.LeverNightmare3) < 1 then diamondItem:remove(1) - player:setStorageValue(Storage.DreamersChallenge.LeverNightmare3, 1) + player:setStorageValue(Storage.Quest.U7_9.DreamersChallenge.LeverNightmare3, 1) config[3].position:sendMagicEffect(CONST_ME_TELEPORT) Game.createItem(config[3].itemId, 1, config[3].position) item:transform(2773) addEvent(revertLever, 4 * 1000, toPosition) - elseif not diamondItem and player:getStorageValue(Storage.DreamersChallenge.LeverNightmare3) < 1 then + elseif not diamondItem and player:getStorageValue(Storage.Quest.U7_9.DreamersChallenge.LeverNightmare3) < 1 then player:sendCancelMessage("You need to offer a small diamond.") else player:sendCancelMessage("You have already used this lever!") diff --git a/data-otservbr-global/scripts/actions/quests/dreamer_challenge/stone_teleport.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/actions_stone_teleport.lua similarity index 95% rename from data-otservbr-global/scripts/actions/quests/dreamer_challenge/stone_teleport.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/actions_stone_teleport.lua index 6b082e8cf70..2bb5a5a4597 100644 --- a/data-otservbr-global/scripts/actions/quests/dreamer_challenge/stone_teleport.lua +++ b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/actions_stone_teleport.lua @@ -4,7 +4,7 @@ local config = { { position = Position(32878, 32270, 14), itemId = 2886 }, { position = Position(32881, 32267, 14), itemId = 3052 }, { position = Position(32881, 32273, 14), itemId = 6299 }, - { position = Position(32884, 32270, 14), itemId = 21465 }, -- or itemID = 2118 for PVP servers + { position = Position(32884, 32270, 14), itemId = 2118 }, -- or itemID = 2118 for PVP servers }, wells = { { position = Position(32874, 32263, 14), wellId = 2094, transformId = 2098 }, diff --git a/data-otservbr-global/scripts/actions/quests/dreamer_challenge/tic_tac.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/actions_tic_tac.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dreamer_challenge/tic_tac.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/actions_tic_tac.lua diff --git a/data-otservbr-global/scripts/actions/quests/dreamer_challenge/tic_tac_teleport.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/actions_tic_tac_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dreamer_challenge/tic_tac_teleport.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/actions_tic_tac_teleport.lua diff --git a/data-otservbr-global/scripts/actions/quests/dreamer_challenge/walls.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/actions_walls.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dreamer_challenge/walls.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/actions_walls.lua diff --git a/data-otservbr-global/scripts/movements/quests/dreamer_challenge/carrot.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_carrot.lua similarity index 63% rename from data-otservbr-global/scripts/movements/quests/dreamer_challenge/carrot.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_carrot.lua index 40e02285eb1..2b860e00ed1 100644 --- a/data-otservbr-global/scripts/movements/quests/dreamer_challenge/carrot.lua +++ b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_carrot.lua @@ -8,8 +8,14 @@ function carrot.onStepIn(creature, item, position, fromPosition) if item.uid == 2241 then if player:getItemCount(3595) > 0 then - player:teleportTo(Position(32861, 32235, 9)) - player:removeItem(3595, 1) + if player:isPremium() then + player:teleportTo(Position(32861, 32235, 9)) + player:removeItem(3595, 1) + else + player:say("It seems that Hugo doesn't like free accounts", TALKTYPE_MONSTER_SAY) + player:teleportTo(fromPosition) + doAreaCombatHealth(player, COMBAT_FIREDAMAGE, fromPosition, 0, -10, -20, CONST_ME_HITBYFIRE) + end else player:teleportTo(fromPosition) doAreaCombatHealth(player, COMBAT_FIREDAMAGE, fromPosition, 0, -10, -20, CONST_ME_HITBYFIRE) diff --git a/data-otservbr-global/scripts/movements/quests/dreamer_challenge/clock_tile.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_clock_tile.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dreamer_challenge/clock_tile.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_clock_tile.lua diff --git a/data-otservbr-global/scripts/movements/quests/dreamer_challenge/court_teleport.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_court_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dreamer_challenge/court_teleport.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_court_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/dreamer_challenge/death_ring.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_death_ring.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dreamer_challenge/death_ring.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_death_ring.lua diff --git a/data-otservbr-global/scripts/movements/quests/dreamer_challenge/death_ring_teleport.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_death_ring_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dreamer_challenge/death_ring_teleport.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_death_ring_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/dreamer_challenge/fire_bug_teleport.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_fire_bug_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dreamer_challenge/fire_bug_teleport.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_fire_bug_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/dreamer_challenge/riddle.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_riddle.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dreamer_challenge/riddle.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_riddle.lua diff --git a/data-otservbr-global/scripts/movements/quests/dreamer_challenge/riddle_teleport.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_riddle_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dreamer_challenge/riddle_teleport.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_riddle_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/dreamer_challenge/sacrifice_teleport.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_sacrifice_teleport.lua similarity index 80% rename from data-otservbr-global/scripts/movements/quests/dreamer_challenge/sacrifice_teleport.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_sacrifice_teleport.lua index 80587c21e02..c30c0d4dc1e 100644 --- a/data-otservbr-global/scripts/movements/quests/dreamer_challenge/sacrifice_teleport.lua +++ b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_sacrifice_teleport.lua @@ -5,7 +5,7 @@ function sacrificeTeleport.onStepIn(creature, item, position, fromPosition) if not player then return true end - if item.actionid == 50149 and player:getStorageValue(Storage.OutfitQuest.NightmareOutfit) >= 2 then + if item.actionid == 50149 and player:getStorageValue(Storage.Quest.U7_9.NightmareOutfits.Outfits) >= 2 then player:teleportTo(Position(32835, 32225, 14)) --Sacrifice 2 doSendMagicEffect(Position(32835, 32225, 14), CONST_ME_POFF) --Sacrifice 2 elseif item.actionid == 50149 then @@ -13,7 +13,7 @@ function sacrificeTeleport.onStepIn(creature, item, position, fromPosition) player:getPosition():sendMagicEffect(CONST_ME_POFF) else player:teleportTo(Position(32844, 32228, 14)) --Sacrifice - if item.actionid == 50150 and player:getStorageValue(Storage.OutfitQuest.BrotherhoodOutfit) >= 2 then + if item.actionid == 50150 and player:getStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits) >= 2 then player:teleportTo(Position(32784, 32226, 14)) --Sacrifice 4 doSendMagicEffect(Position(32835, 32225, 14), CONST_ME_POFF) --Sacrifice 2 else diff --git a/data-otservbr-global/scripts/movements/quests/dreamer_challenge/stone_teleport.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_stone_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dreamer_challenge/stone_teleport.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_stone_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/dreamer_challenge/teleport.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dreamer_challenge/teleport.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/dreamer_challenge/tic_teleport.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_tic_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dreamer_challenge/tic_teleport.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_tic_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/dreamer_challenge/tower.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_tower.lua similarity index 84% rename from data-otservbr-global/scripts/movements/quests/dreamer_challenge/tower.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_tower.lua index db955f2e356..1ade2e63256 100644 --- a/data-otservbr-global/scripts/movements/quests/dreamer_challenge/tower.lua +++ b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_tower.lua @@ -23,7 +23,7 @@ function tower.onStepIn(creature, item, position, fromPosition) return true end - if (player:getStorageValue(Storage.OutfitQuest.NightmareOutfit) >= targetTeleport.storageValue or player:getStorageValue(Storage.OutfitQuest.BrotherhoodOutfit) >= targetTeleport.storageValue) and player:removeItem(5021, 1) then + if (player:getStorageValue(Storage.Quest.U7_9.NightmareOutfits.Outfits) >= targetTeleport.storageValue or player:getStorageValue(Storage.Quest.U7_9.BrotherhoodOutfits.Outfits) >= targetTeleport.storageValue) and player:removeItem(5021, 1) then player:teleportTo(targetTeleport.toPosition) else player:teleportTo(fromPosition) diff --git a/data-otservbr-global/scripts/movements/quests/dreamer_challenge/wall_teleport.lua b/data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_wall_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dreamer_challenge/wall_teleport.lua rename to data-otservbr-global/scripts/quests/dreamers_challenge_quest/movement_wall_teleport.lua diff --git a/data-otservbr-global/scripts/quests/druid_outfits_quest/actions_ceirons_waterskin.lua b/data-otservbr-global/scripts/quests/druid_outfits_quest/actions_ceirons_waterskin.lua new file mode 100644 index 00000000000..0457b92f7b2 --- /dev/null +++ b/data-otservbr-global/scripts/quests/druid_outfits_quest/actions_ceirons_waterskin.lua @@ -0,0 +1,15 @@ +local actions_ceirons_waterskin = Action() + +function actions_ceirons_waterskin.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if target.itemid == 5662 and target.uid == 40096 and player:getStorageValue(Storage.Quest.U7_8.DruidOutfits.CeironsWaterskin) ~= 1 then + toPosition:sendMagicEffect(CONST_ME_LOSEENERGY) + item:transform(5939) + player:setStorageValue(Storage.Quest.U7_8.DruidOutfits.CeironsWaterskin, 1) + player:say("You have successfully collected a special water sample from the hydra cave.", TALKTYPE_MONSTER_SAY) + end + + return true +end + +actions_ceirons_waterskin:id(5938) +actions_ceirons_waterskin:register() diff --git a/data-otservbr-global/scripts/actions/quests/hunter_outfit/all_hymn_piano_teleport.lua b/data-otservbr-global/scripts/quests/hunter_outfits_quest/action_all_hymn_piano_teleport.lua similarity index 59% rename from data-otservbr-global/scripts/actions/quests/hunter_outfit/all_hymn_piano_teleport.lua rename to data-otservbr-global/scripts/quests/hunter_outfits_quest/action_all_hymn_piano_teleport.lua index 794d66bfdcc..d54b9b1ae6b 100644 --- a/data-otservbr-global/scripts/actions/quests/hunter_outfit/all_hymn_piano_teleport.lua +++ b/data-otservbr-global/scripts/quests/hunter_outfits_quest/action_all_hymn_piano_teleport.lua @@ -1,8 +1,8 @@ +local hunterAll = Action() local portpos = Position({ x = 32402, y = 32794, z = 9 }) -local hunterAll = Action() function hunterAll.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.OutfitQuest.HunterMusicSheet01) == 1 and player:getStorageValue(Storage.OutfitQuest.HunterMusicSheet02) == 1 and player:getStorageValue(Storage.OutfitQuest.HunterMusicSheet03) == 1 and player:getStorageValue(Storage.OutfitQuest.HunterMusicSheet04) == 1 then + if player:getStorageValue(Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet01) == 1 and player:getStorageValue(Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet02) == 1 and player:getStorageValue(Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet03) == 1 and player:getStorageValue(Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet04) == 1 then player:teleportTo(portpos, false) portpos:sendMagicEffect(CONST_ME_TELEPORT) toPosition:sendMagicEffect(CONST_ME_SOUND_YELLOW) diff --git a/data-otservbr-global/scripts/actions/quests/hunter_outfit/music_sheet.lua b/data-otservbr-global/scripts/quests/hunter_outfits_quest/action_music_sheet.lua similarity index 65% rename from data-otservbr-global/scripts/actions/quests/hunter_outfit/music_sheet.lua rename to data-otservbr-global/scripts/quests/hunter_outfits_quest/action_music_sheet.lua index 8248020970d..fb85d1fbbe6 100644 --- a/data-otservbr-global/scripts/actions/quests/hunter_outfit/music_sheet.lua +++ b/data-otservbr-global/scripts/quests/hunter_outfits_quest/action_music_sheet.lua @@ -1,8 +1,8 @@ local config = { - [6087] = { storage = Storage.OutfitQuest.HunterMusicSheet01, text = "first" }, - [6088] = { storage = Storage.OutfitQuest.HunterMusicSheet02, text = "second" }, - [6089] = { storage = Storage.OutfitQuest.HunterMusicSheet03, text = "third" }, - [6090] = { storage = Storage.OutfitQuest.HunterMusicSheet04, text = "fourth" }, + [6087] = { storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet01, text = "first" }, + [6088] = { storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet02, text = "second" }, + [6089] = { storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet03, text = "third" }, + [6090] = { storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet04, text = "fourth" }, } local hunterMusic = Action() diff --git a/data-otservbr-global/scripts/quests/the_ancient_tombs/actions_active_teleport_switches.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/actions_active_teleport_switches.lua new file mode 100644 index 00000000000..095663a0fb2 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/actions_active_teleport_switches.lua @@ -0,0 +1,62 @@ +local config = { + [12121] = { + storage = Storage.Quest.U7_4.TheAncientTombs.ThalasSwitchesGlobalStorage, + specificCheck = function(player) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.ThalasTreasure) <= 0 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.ThalasTreasure, 1) + end + end, + }, + [12122] = { + storage = Storage.Quest.U7_4.TheAncientTombs.DiprathSwitchesGlobalStorage, + specificCheck = function(player) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.DiphtrahsTreasure) <= 1 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.DiphtrahsTreasure, 2) + end + end, + }, + [12123] = { + storage = Storage.Quest.U7_4.TheAncientTombs.AshmunrahSwitchesGlobalStorage, + specificCheck = function(player) end, + }, +} + +local function resetScript(position, storage, configEntry, playerId) + local item = Tile(position):getItemById(2773) + if item then + item:transform(2772) + end + + local player = Player(playerId) + if player then + if configEntry.specificCheck then + configEntry.specificCheck(player) + end + + player:setStorageValue(storage, player:getStorageValue(storage) - 1) + end +end + +local theAncientActiveTeleport = Action() +function theAncientActiveTeleport.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local configEntry = config[item.actionid] + if not configEntry then + return true + end + + local storage = configEntry.storage or configEntry + if item.itemid ~= 2772 then + return false + end + + player:setStorageValue(storage, player:getStorageValue(storage) + 1) + item:transform(2773) + addEvent(resetScript, 20 * 60 * 1000, toPosition, storage, configEntry, player:getId()) + return true +end + +for actionId, info in pairs(config) do + theAncientActiveTeleport:aid(actionId) +end + +theAncientActiveTeleport:register() diff --git a/data-otservbr-global/scripts/quests/the_ancient_tombs/actions_dipthrah_signs_doors.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/actions_dipthrah_signs_doors.lua new file mode 100644 index 00000000000..a2d626b8a9f --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/actions_dipthrah_signs_doors.lua @@ -0,0 +1,50 @@ +local actions_dipthrah_signs_doors = Action() + +local questSteps = { + [40032] = Storage.Quest.U7_4.TheAncientTombs.Diprath_sign1, + [40033] = Storage.Quest.U7_4.TheAncientTombs.Diprath_sign2, + [40034] = Storage.Quest.U7_4.TheAncientTombs.Diprath_sign3, + [40035] = Storage.Quest.U7_4.TheAncientTombs.Diprath_sign4, + [40036] = Storage.Quest.U7_4.TheAncientTombs.Diprath_sign5, + [40037] = Storage.Quest.U7_4.TheAncientTombs.Diprath_sign6, + [40038] = Storage.Quest.U7_4.TheAncientTombs.Diprath_sign7, + [40039] = Storage.Quest.U7_4.TheAncientTombs.Diprath_sign8, +} + +local function hasCompletedPreviousStep(player, currentStep) + if currentStep == Storage.Quest.U7_4.TheAncientTombs.Diprath_sign1 then + return true + end + + local previousStep = currentStep - 1 + return player:getStorageValue(previousStep) == 1 +end + +function actions_dipthrah_signs_doors.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local aid = item.actionid + local currentStorageKey = questSteps[aid] + + if not currentStorageKey then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Invalid action ID.") + return false + end + + if not hasCompletedPreviousStep(player, currentStorageKey) then + return true + end + + if player:getStorageValue(currentStorageKey) == 1 then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have already completed this step.") + return true + end + + player:setStorageValue(currentStorageKey, 1) + + return true +end + +for aid in pairs(questSteps) do + actions_dipthrah_signs_doors:aid(aid) +end + +actions_dipthrah_signs_doors:register() diff --git a/data-otservbr-global/scripts/actions/quests/the_ancient_tombs/oasis_lever_door.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/actions_oasis_lever_door.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_ancient_tombs/oasis_lever_door.lua rename to data-otservbr-global/scripts/quests/the_ancient_tombs/actions_oasis_lever_door.lua diff --git a/data-otservbr-global/scripts/quests/the_ancient_tombs/actions_ruins_instruments.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/actions_ruins_instruments.lua new file mode 100644 index 00000000000..247498616f2 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/actions_ruins_instruments.lua @@ -0,0 +1,45 @@ +local config = { + [3255] = 1, + [3261] = 2, + [3258] = 3, + [3260] = 4, + [3257] = 5, +} + +local storage = Storage.Quest.U7_4.TheAncientTombs.VashresamunInstruments + +local theAncientRuinsInstru = Action() +function theAncientRuinsInstru.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local targetValue = config[item.itemid] + if not targetValue then + player:setStorageValue(storage, 0) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You played it wrong, now you must begin with the first again!") + doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, -20, -20, CONST_ME_GROUNDSHAKER) + return true + end + + local currentValue = player:getStorageValue(storage) + if currentValue == -1 then + currentValue = 0 + end + + if currentValue + 1 == targetValue then + player:setStorageValue(storage, targetValue) + fromPosition:sendMagicEffect(CONST_ME_SOUND_BLUE) + if targetValue == 5 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.VashresamunsDoor, 1) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You played them in the correct order and got access through the door!") + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.VashresamunsTreasure) <= 1 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.VashresamunsTreasure, 2) + end + end + else + player:setStorageValue(storage, 0) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You played it wrong, now you must begin with the first again!") + doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, -20, -20, CONST_ME_GROUNDSHAKER) + end + return true +end + +theAncientRuinsInstru:aid(12105) +theAncientRuinsInstru:register() diff --git a/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_all_teleports_tombs_coal_basin.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_all_teleports_tombs_coal_basin.lua new file mode 100644 index 00000000000..b5cb34a1176 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_all_teleports_tombs_coal_basin.lua @@ -0,0 +1,63 @@ +local config = { + [9033] = { flamePosition = Position(33097, 32816, 13), toPosition = Position(33093, 32824, 13) }, + [9034] = { flamePosition = Position(33293, 32742, 13), toPosition = Position(33299, 32742, 13) }, + [9035] = { + flamePosition = Position(33073, 32590, 13), + toPosition = Position(33080, 32588, 13), + specificCheck = function(player) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.DiphtrahsTreasure) <= 0 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.DiphtrahsTreasure, 1) + end + end, + }, + [9036] = { + flamePosition = Position(33240, 32856, 13), + toPosition = Position(33246, 32850, 13), + specificCheck = function(player) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.MahrdisTreasure) <= 0 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.MahrdisTreasure, 1) + end + end, + }, + [9037] = { flamePosition = Position(33276, 32553, 14), toPosition = Position(33271, 32553, 14) }, + [9038] = { flamePosition = Position(33234, 32692, 13), toPosition = Position(33234, 32687, 13) }, + [9039] = { flamePosition = Position(33135, 32683, 12), toPosition = Position(33130, 32683, 12) }, + [9040] = { flamePosition = Position(33162, 32831, 10), toPosition = Position(33158, 32832, 10) }, +} + +local tombCoalBasin = MoveEvent() + +function tombCoalBasin.onAddItem(moveitem, tileitem, position) + local targetCoalBasin = config[tileitem.uid] + if not targetCoalBasin then + return true + end + + if moveitem.itemid ~= 3042 then + position:sendMagicEffect(CONST_ME_POFF) + return true + end + + moveitem:remove() + position:sendMagicEffect(CONST_ME_HITBYFIRE) + + local player = Tile(targetCoalBasin.flamePosition):getTopCreature() + if player and player:isPlayer() then + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.DefaultStart) ~= 1 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.DefaultStart, 1) + end + + if targetCoalBasin.specificCheck then + targetCoalBasin.specificCheck(player) + end + + player:teleportTo(targetCoalBasin.toPosition) + targetCoalBasin.toPosition:sendMagicEffect(CONST_ME_TELEPORT) + end + + return true +end + +tombCoalBasin:type("additem") +tombCoalBasin:id(2114) +tombCoalBasin:register() diff --git a/data-otservbr-global/scripts/movements/quests/the_ancient_tombs/craft_helmet.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_craft_helmet.lua similarity index 91% rename from data-otservbr-global/scripts/movements/quests/the_ancient_tombs/craft_helmet.lua rename to data-otservbr-global/scripts/quests/the_ancient_tombs/movements_craft_helmet.lua index a5553ae49dc..407bbf04999 100644 --- a/data-otservbr-global/scripts/movements/quests/the_ancient_tombs/craft_helmet.lua +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_craft_helmet.lua @@ -1,4 +1,4 @@ -local helmetIds = { 3222, 3223, 3224, 3225, 3226, 3227, 3228 } +local helmetIds = { 3236, 3241, 3235, 3239, 3240, 3238, 3237 } local craftHelmet = MoveEvent() @@ -41,5 +41,5 @@ function craftHelmet.onAddItem(moveitem, tileitem, position) end craftHelmet:type("additem") -craftHelmet:aid(60626) +craftHelmet:aid(40040) craftHelmet:register() diff --git a/data-otservbr-global/scripts/movements/quests/the_ancient_tombs/enter_ashmunrah_teleport_switche_done.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_ashmunrah_teleport_switche_done.lua similarity index 84% rename from data-otservbr-global/scripts/movements/quests/the_ancient_tombs/enter_ashmunrah_teleport_switche_done.lua rename to data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_ashmunrah_teleport_switche_done.lua index fb8d66329c0..de0a74f932c 100644 --- a/data-otservbr-global/scripts/movements/quests/the_ancient_tombs/enter_ashmunrah_teleport_switche_done.lua +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_ashmunrah_teleport_switche_done.lua @@ -6,7 +6,7 @@ function enterAshmunrahTeleport.onStepIn(creature, item, position, fromPosition) return true end - if Game.getStorageValue(GlobalStorage.TheAncientTombs.AshmunrahSwitchesGlobalStorage) < 6 then + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.AshmunrahSwitchesGlobalStorage) < 5 then player:teleportTo(fromPosition, true) fromPosition:sendMagicEffect(CONST_ME_TELEPORT) return true diff --git a/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_diprath_room.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_diprath_room.lua new file mode 100644 index 00000000000..1bd9d464725 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_diprath_room.lua @@ -0,0 +1,27 @@ +local movements_enter_diprath_room = MoveEvent() + +function movements_enter_diprath_room.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return true + end + + local destination = Position(33092, 32590, 15) + + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.DiprathSwitchesGlobalStorage) < 7 and player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.Diprath_sign8) ~= 1 then + player:teleportTo(fromPosition, true) + fromPosition:sendMagicEffect(CONST_ME_TELEPORT) + else + player:teleportTo(destination) + destination:sendMagicEffect(CONST_ME_TELEPORT) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.DiphtrahsTreasure) <= 2 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.DiphtrahsTreasure, 3) + end + end + + return true +end + +movements_enter_diprath_room:type("stepin") +movements_enter_diprath_room:uid(40083) +movements_enter_diprath_room:register() diff --git a/data-otservbr-global/scripts/movements/quests/the_ancient_tombs/enter_diprath_teleport_switche_done.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_diprath_teleport_switche_done.lua similarity index 70% rename from data-otservbr-global/scripts/movements/quests/the_ancient_tombs/enter_diprath_teleport_switche_done.lua rename to data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_diprath_teleport_switche_done.lua index eb418d07917..2fe6fcae5ef 100644 --- a/data-otservbr-global/scripts/movements/quests/the_ancient_tombs/enter_diprath_teleport_switche_done.lua +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_diprath_teleport_switche_done.lua @@ -6,15 +6,15 @@ function enterDiprathTeleport.onStepIn(creature, item, position, fromPosition) return true end - if Game.getStorageValue(GlobalStorage.TheAncientTombs.DiprathSwitchesGlobalStorage) < 7 then + local destination = Position(33083, 32568, 14) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.DiprathSwitchesGlobalStorage) < 7 then player:teleportTo(fromPosition, true) fromPosition:sendMagicEffect(CONST_ME_TELEPORT) - return true + else + player:teleportTo(destination) + destination:sendMagicEffect(CONST_ME_TELEPORT) end - local destination = Position(33083, 32568, 14) - player:teleportTo(destination) - destination:sendMagicEffect(CONST_ME_TELEPORT) return true end diff --git a/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_mahrdis_room.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_mahrdis_room.lua new file mode 100644 index 00000000000..6182941e34c --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_mahrdis_room.lua @@ -0,0 +1,26 @@ +local movements_enter_mahrdis_room = MoveEvent() + +function movements_enter_mahrdis_room.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return true + end + + local destination = Position(33190, 32947, 15) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.MahrdisTreasure) ~= 1 then + player:teleportTo(fromPosition, true) + fromPosition:sendMagicEffect(CONST_ME_TELEPORT) + else + player:teleportTo(destination) + destination:sendMagicEffect(CONST_ME_TELEPORT) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.MahrdisTreasure) <= 1 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.MahrdisTreasure, 2) + end + end + + return true +end + +movements_enter_mahrdis_room:type("stepin") +movements_enter_mahrdis_room:uid(40084) +movements_enter_mahrdis_room:register() diff --git a/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_morguthis_room.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_morguthis_room.lua new file mode 100644 index 00000000000..041e0dec006 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_morguthis_room.lua @@ -0,0 +1,26 @@ +local movements_enter_morguthis_room = MoveEvent() + +function movements_enter_morguthis_room.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return true + end + + local destination = Position(33259, 32707, 13) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.DefaultStart) ~= 1 then + player:teleportTo(fromPosition, true) + fromPosition:sendMagicEffect(CONST_ME_TELEPORT) + else + player:teleportTo(destination) + destination:sendMagicEffect(CONST_ME_TELEPORT) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.MorguthisTreasure) <= 0 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.MorguthisTreasure, 1) + end + end + + return true +end + +movements_enter_morguthis_room:type("stepin") +movements_enter_morguthis_room:uid(40085) +movements_enter_morguthis_room:register() diff --git a/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_omruc_room.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_omruc_room.lua new file mode 100644 index 00000000000..c1dcfedf9bf --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_omruc_room.lua @@ -0,0 +1,26 @@ +local movements_enter_omruc_room = MoveEvent() + +function movements_enter_omruc_room.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return true + end + + local destination = Position(33207, 33002, 14) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.DefaultStart) ~= 1 then + player:teleportTo(fromPosition, true) + fromPosition:sendMagicEffect(CONST_ME_TELEPORT) + else + player:teleportTo(destination) + destination:sendMagicEffect(CONST_ME_TELEPORT) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.OmrucsTreasure) <= 1 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.OmrucsTreasure, 2) + end + end + + return true +end + +movements_enter_omruc_room:type("stepin") +movements_enter_omruc_room:uid(40087) +movements_enter_omruc_room:register() diff --git a/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_omruc_specific.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_omruc_specific.lua new file mode 100644 index 00000000000..3c6b5d1378c --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_omruc_specific.lua @@ -0,0 +1,26 @@ +local movements_enter_omruc_room = MoveEvent() + +function movements_enter_omruc_room.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return true + end + + local destination = Position(33205, 32955, 14) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.DefaultStart) ~= 1 then + player:teleportTo(fromPosition, true) + fromPosition:sendMagicEffect(CONST_ME_TELEPORT) + else + player:teleportTo(destination) + destination:sendMagicEffect(CONST_ME_TELEPORT) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.OmrucsTreasure) <= 0 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.OmrucsTreasure, 1) + end + end + + return true +end + +movements_enter_omruc_room:type("stepin") +movements_enter_omruc_room:uid(40086) +movements_enter_omruc_room:register() diff --git a/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_rahemos_levers.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_rahemos_levers.lua new file mode 100644 index 00000000000..3fa01ce2332 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_rahemos_levers.lua @@ -0,0 +1,26 @@ +local movements_enter_omruc_room = MoveEvent() + +function movements_enter_omruc_room.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return true + end + + local destination = Position(33124, 32760, 14) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.DefaultStart) ~= 1 then + player:teleportTo(fromPosition, true) + fromPosition:sendMagicEffect(CONST_ME_TELEPORT) + else + player:teleportTo(destination) + destination:sendMagicEffect(CONST_ME_TELEPORT) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.RahemosTreasure) <= 0 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.RahemosTreasure, 1) + end + end + + return true +end + +movements_enter_omruc_room:type("stepin") +movements_enter_omruc_room:uid(40088) +movements_enter_omruc_room:register() diff --git a/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_rahemos_room.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_rahemos_room.lua new file mode 100644 index 00000000000..82e7a64d1d1 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_rahemos_room.lua @@ -0,0 +1,26 @@ +local movements_enter_omruc_room = MoveEvent() + +function movements_enter_omruc_room.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return true + end + + local destination = Position(33086, 32781, 14) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.DefaultStart) ~= 1 then + player:teleportTo(fromPosition, true) + fromPosition:sendMagicEffect(CONST_ME_TELEPORT) + else + player:teleportTo(destination) + destination:sendMagicEffect(CONST_ME_TELEPORT) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.RahemosTreasure) <= 1 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.RahemosTreasure, 2) + end + end + + return true +end + +movements_enter_omruc_room:type("stepin") +movements_enter_omruc_room:uid(40089) +movements_enter_omruc_room:register() diff --git a/data-otservbr-global/scripts/movements/quests/the_ancient_tombs/enter_thalas_poison_tile.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_thalas_poison_tile.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_ancient_tombs/enter_thalas_poison_tile.lua rename to data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_thalas_poison_tile.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_ancient_tombs/enter_thalas_teleport_switches_done.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_thalas_teleport_switches_done.lua similarity index 84% rename from data-otservbr-global/scripts/movements/quests/the_ancient_tombs/enter_thalas_teleport_switches_done.lua rename to data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_thalas_teleport_switches_done.lua index b3592d39b9c..8a0daba82c6 100644 --- a/data-otservbr-global/scripts/movements/quests/the_ancient_tombs/enter_thalas_teleport_switches_done.lua +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_thalas_teleport_switches_done.lua @@ -6,7 +6,7 @@ function enterThalasTeleport.onStepIn(creature, item, position, fromPosition) return true end - if Game.getStorageValue(GlobalStorage.TheAncientTombs.ThalasSwitchesGlobalStorage) < 8 then + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.ThalasSwitchesGlobalStorage) < 8 then player:teleportTo(fromPosition, true) fromPosition:sendMagicEffect(CONST_ME_TELEPORT) return true diff --git a/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_vashresamun_room.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_vashresamun_room.lua new file mode 100644 index 00000000000..bfdcd763d7a --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_vashresamun_room.lua @@ -0,0 +1,26 @@ +local movements_enter_omruc_room = MoveEvent() + +function movements_enter_omruc_room.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return true + end + + local destination = Position(33129, 32657, 15) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.DefaultStart) ~= 1 then + player:teleportTo(fromPosition, true) + fromPosition:sendMagicEffect(CONST_ME_TELEPORT) + else + player:teleportTo(destination) + destination:sendMagicEffect(CONST_ME_TELEPORT) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.VashresamunsTreasure) <= 2 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.VashresamunsTreasure, 3) + end + end + + return true +end + +movements_enter_omruc_room:type("stepin") +movements_enter_omruc_room:uid(40091) +movements_enter_omruc_room:register() diff --git a/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_vashresamun_specific.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_vashresamun_specific.lua new file mode 100644 index 00000000000..fafb96b861c --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_enter_vashresamun_specific.lua @@ -0,0 +1,26 @@ +local movements_enter_omruc_room = MoveEvent() + +function movements_enter_omruc_room.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return true + end + + local destination = Position(33194, 32665, 15) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.DefaultStart) ~= 1 then + player:teleportTo(fromPosition, true) + fromPosition:sendMagicEffect(CONST_ME_TELEPORT) + else + player:teleportTo(destination) + destination:sendMagicEffect(CONST_ME_TELEPORT) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.VashresamunsTreasure) <= 0 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.VashresamunsTreasure, 1) + end + end + + return true +end + +movements_enter_omruc_room:type("stepin") +movements_enter_omruc_room:uid(40090) +movements_enter_omruc_room:register() diff --git a/data-otservbr-global/scripts/movements/quests/the_ancient_tombs/peninsula_tomb_maze.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_peninsula_tomb_maze.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_ancient_tombs/peninsula_tomb_maze.lua rename to data-otservbr-global/scripts/quests/the_ancient_tombs/movements_peninsula_tomb_maze.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_ancient_tombs/step_morguthis_blue_flames.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_step_morguthis_blue_flames.lua similarity index 54% rename from data-otservbr-global/scripts/movements/quests/the_ancient_tombs/step_morguthis_blue_flames.lua rename to data-otservbr-global/scripts/quests/the_ancient_tombs/movements_step_morguthis_blue_flames.lua index 411628f7e12..4227aa36c51 100644 --- a/data-otservbr-global/scripts/movements/quests/the_ancient_tombs/step_morguthis_blue_flames.lua +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_step_morguthis_blue_flames.lua @@ -1,11 +1,11 @@ local setting = { - [50139] = Storage.TheAncientTombs.MorguthisBlueFlameStorage1, - [50140] = Storage.TheAncientTombs.MorguthisBlueFlameStorage2, - [50141] = Storage.TheAncientTombs.MorguthisBlueFlameStorage3, - [50142] = Storage.TheAncientTombs.MorguthisBlueFlameStorage4, - [50143] = Storage.TheAncientTombs.MorguthisBlueFlameStorage5, - [50144] = Storage.TheAncientTombs.MorguthisBlueFlameStorage6, - [50145] = Storage.TheAncientTombs.MorguthisBlueFlameStorage7, + [50139] = Storage.Quest.U7_4.TheAncientTombs.MorguthisBlueFlameStorage1, + [50140] = Storage.Quest.U7_4.TheAncientTombs.MorguthisBlueFlameStorage2, + [50141] = Storage.Quest.U7_4.TheAncientTombs.MorguthisBlueFlameStorage3, + [50142] = Storage.Quest.U7_4.TheAncientTombs.MorguthisBlueFlameStorage4, + [50143] = Storage.Quest.U7_4.TheAncientTombs.MorguthisBlueFlameStorage5, + [50144] = Storage.Quest.U7_4.TheAncientTombs.MorguthisBlueFlameStorage6, + [50145] = Storage.Quest.U7_4.TheAncientTombs.MorguthisBlueFlameStorage7, } local stepMorguthisBlueFlames = MoveEvent() @@ -25,7 +25,7 @@ function stepMorguthisBlueFlames.onStepIn(creature, item, position, fromPosition player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) else local missingStorage = false - for i = Storage.TheAncientTombs.MorguthisBlueFlameStorage1, Storage.TheAncientTombs.MorguthisBlueFlameStorage7 do + for i = Storage.Quest.U7_4.TheAncientTombs.MorguthisBlueFlameStorage1, Storage.Quest.U7_4.TheAncientTombs.MorguthisBlueFlameStorage7 do if player:getStorageValue(i) ~= 1 then missingStorage = true break @@ -40,6 +40,9 @@ function stepMorguthisBlueFlames.onStepIn(creature, item, position, fromPosition player:teleportTo(Position(33163, 32694, 14)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + if player:getStorageValue(Storage.Quest.U7_4.TheAncientTombs.MorguthisTreasure) <= 1 then + player:setStorageValue(Storage.Quest.U7_4.TheAncientTombs.MorguthisTreasure, 2) + end end return true end diff --git a/data-otservbr-global/scripts/movements/quests/the_ancient_tombs/tomb_teleport.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_tomb_teleport.lua similarity index 97% rename from data-otservbr-global/scripts/movements/quests/the_ancient_tombs/tomb_teleport.lua rename to data-otservbr-global/scripts/quests/the_ancient_tombs/movements_tomb_teleport.lua index 0015cab9ec7..142d5c6932f 100644 --- a/data-otservbr-global/scripts/movements/quests/the_ancient_tombs/tomb_teleport.lua +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/movements_tomb_teleport.lua @@ -29,7 +29,7 @@ local config = { destination = Position(33041, 32774, 14), exitDestination = Position(33133, 32642, 8), }, - -- from Dipthrah Boss + -- from Dipthrah Boss [3955] = { removeId = 3241, destination = Position(33349, 32827, 14), @@ -73,5 +73,4 @@ for index, value in pairs(config) do tombTeleport:uid(index) end -tombTeleport:aid(12108) tombTeleport:register() diff --git a/data-otservbr-global/scripts/quests/the_ape_city/actions_mission09_snake_destroyer.lua b/data-otservbr-global/scripts/quests/the_ape_city/actions_mission09_snake_destroyer.lua new file mode 100644 index 00000000000..86e1c008a6d --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_ape_city/actions_mission09_snake_destroyer.lua @@ -0,0 +1,67 @@ +local theApeMiss9 = Action() + +local amphoraStorages = { + [40092] = Storage.Quest.U7_6.TheApeCity.TheLargeAmphoras1, + [40093] = Storage.Quest.U7_6.TheApeCity.TheLargeAmphoras2, + [40094] = Storage.Quest.U7_6.TheApeCity.TheLargeAmphoras3, + [40095] = Storage.Quest.U7_6.TheApeCity.TheLargeAmphoras4, +} + +local cooldownStorage = Storage.Quest.U7_6.TheApeCity.TheLargeAmphorasCooldown +local cooldownTime = 5 * 60 + +function theApeMiss9.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local uid = target:getUniqueId() + local itemId = target.itemid + + if amphoraStorages[uid] and itemId == 4995 then + local storage = amphoraStorages[uid] + + local storageValue = player:getStorageValue(storage) + if storageValue > 0 then + return false + end + + player:setStorageValue(storage, 1) + + target:transform(4996) + + local allUsed = true + for _, s in pairs(amphoraStorages) do + if player:getStorageValue(s) < 1 then + allUsed = false + break + end + end + + if allUsed then + player:setStorageValue(cooldownStorage, os.time()) + end + + toPosition:sendMagicEffect(CONST_ME_POFF) + return true + end + + local specificPosition = Position(32858, 32526, 11) + if itemId == 4850 and toPosition == specificPosition then + if player:getStorageValue(Storage.Quest.U7_6.TheApeCity.Questline) ~= 17 then + return false + end + + if player:getStorageValue(Storage.Quest.U7_6.TheApeCity.SnakeDestroyer) == 1 then + return false + end + + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.SnakeDestroyer, 1) + item:remove() + target:transform(4851) + target:decay() + toPosition:sendMagicEffect(CONST_ME_POFF) + return true + end + + return false +end + +theApeMiss9:id(4835) +theApeMiss9:register() diff --git a/data-otservbr-global/scripts/actions/quests/the_ape_city/mission9_catacombs_lever.lua b/data-otservbr-global/scripts/quests/the_ape_city/actions_mission9_catacombs_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_ape_city/mission9_catacombs_lever.lua rename to data-otservbr-global/scripts/quests/the_ape_city/actions_mission9_catacombs_lever.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_ape_city/mission4_parchment_decyphering.lua b/data-otservbr-global/scripts/quests/the_ape_city/movements_mission4_parchment_decyphering.lua similarity index 63% rename from data-otservbr-global/scripts/movements/quests/the_ape_city/mission4_parchment_decyphering.lua rename to data-otservbr-global/scripts/quests/the_ape_city/movements_mission4_parchment_decyphering.lua index bd52c6c442c..f401d0d1c07 100644 --- a/data-otservbr-global/scripts/movements/quests/the_ape_city/mission4_parchment_decyphering.lua +++ b/data-otservbr-global/scripts/quests/the_ape_city/movements_mission4_parchment_decyphering.lua @@ -6,8 +6,8 @@ function mission4ParchmentDecyphering.onStepIn(creature, item, position, fromPos return true end - if player:getStorageValue(Storage.TheApeCity.Questline) == 7 and player:getStorageValue(Storage.TheApeCity.ParchmentDecyphering) ~= 1 then - player:setStorageValue(Storage.TheApeCity.ParchmentDecyphering, 1) + if player:getStorageValue(Storage.Quest.U7_6.TheApeCity.Questline) == 6 and player:getStorageValue(Storage.Quest.U7_6.TheApeCity.ParchmentDecyphering) ~= 1 then + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.ParchmentDecyphering, 1) end player:say("!-! -O- I_I (/( --I Morgathla", TALKTYPE_MONSTER_SAY) diff --git a/data-otservbr-global/scripts/quests/the_ape_city/movements_mission9_the_deepest_catacomb_teleport.lua b/data-otservbr-global/scripts/quests/the_ape_city/movements_mission9_the_deepest_catacomb_teleport.lua new file mode 100644 index 00000000000..2237d3f34f9 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_ape_city/movements_mission9_the_deepest_catacomb_teleport.lua @@ -0,0 +1,60 @@ +local mission9TheDeepestCatacombTeleport = MoveEvent() + +local amphoraStorages = { + Storage.Quest.U7_6.TheApeCity.TheLargeAmphoras1, + Storage.Quest.U7_6.TheApeCity.TheLargeAmphoras2, + Storage.Quest.U7_6.TheApeCity.TheLargeAmphoras3, + Storage.Quest.U7_6.TheApeCity.TheLargeAmphoras4, +} + +local cooldownStorage = Storage.Quest.U7_6.TheApeCity.TheLargeAmphorasCooldown +local cooldownTime = 5 * 60 + +function mission9TheDeepestCatacombTeleport.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return true + end + + if item.uid == 9257 and player:getStorageValue(Storage.Quest.U7_6.TheApeCity.Questline) >= 17 then + player:teleportTo(Position(32749, 32536, 10)) + position:sendMagicEffect(CONST_ME_TELEPORT) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + elseif item.uid == 9258 then + local cooldownStart = player:getStorageValue(cooldownStorage) + if cooldownStart > 0 and (os.time() - cooldownStart) > cooldownTime then + for _, storage in pairs(amphoraStorages) do + player:setStorageValue(storage, 0) + end + player:setStorageValue(cooldownStorage, 0) + end + + local allAmphorasBroken = true + for _, storage in pairs(amphoraStorages) do + local storageValue = player:getStorageValue(storage) + if storageValue < 1 then + allAmphorasBroken = false + break + end + end + + if allAmphorasBroken then + player:teleportTo(Position(32885, 32632, 11)) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + return true + else + player:teleportTo(fromPosition) + position:sendMagicEffect(CONST_ME_TELEPORT) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need to break all 4 large amphoras to use this teleporter.") + return true + end + else + player:teleportTo(fromPosition, true) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You don't have access to this area.") + end +end + +mission9TheDeepestCatacombTeleport:type("stepin") +mission9TheDeepestCatacombTeleport:uid(9257, 9258) +mission9TheDeepestCatacombTeleport:register() diff --git a/data-otservbr-global/scripts/quests/the_djinn_war_quest/action_water_fountain.lua b/data-otservbr-global/scripts/quests/the_djinn_war_quest/action_water_fountain.lua new file mode 100644 index 00000000000..0f8ae9f8ac5 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_djinn_war_quest/action_water_fountain.lua @@ -0,0 +1,15 @@ +local action_water_fountain = Action() + +function action_water_fountain.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission02) ~= 1 then + return true + end + + Game.createItem(3233, 1, fromPosition) + player:setStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission02, 2) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a tear of daraman.") + return true +end + +action_water_fountain:aid(5390) +action_water_fountain:register() diff --git a/data-otservbr-global/scripts/quests/the_explorer_society/actions_botanist.lua b/data-otservbr-global/scripts/quests/the_explorer_society/actions_botanist.lua new file mode 100644 index 00000000000..ee1a6125ca5 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_explorer_society/actions_botanist.lua @@ -0,0 +1,31 @@ +local explorerSocietyBotanist = Action() + +function explorerSocietyBotanist.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if target.itemid == 3874 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) == 18 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 18 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection, 19) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 19) + toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) + item:transform(4868) + elseif target.itemid == 3885 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) == 21 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 21 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection, 22) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 22) + toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) + item:transform(4869) + elseif target.itemid == 3878 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection) == 24 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 24 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection, 25) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 25) + toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) + item:transform(4870) + elseif target.itemid == 5658 and target.uid == 3152 and player:getStorageValue(Storage.Quest.U7_8.DruidOutfits.GriffinclawFlower) ~= 1 then --Mission-independent function that uses the same item + toPosition:sendMagicEffect(CONST_ME_MAGIC_RED) + item:transform(5937) + target:transform(5687) + player:setStorageValue(Storage.Quest.U7_8.DruidOutfits.GriffinclawFlower, 1) + player:say("You successfully took a sample of the rare griffinclaw flower.", TALKTYPE_MONSTER_SAY) + end + + return true +end + +explorerSocietyBotanist:id(4867) +explorerSocietyBotanist:register() diff --git a/data-otservbr-global/scripts/quests/the_explorer_society/actions_butterfly.lua b/data-otservbr-global/scripts/quests/the_explorer_society/actions_butterfly.lua new file mode 100644 index 00000000000..a9238f95f61 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_explorer_society/actions_butterfly.lua @@ -0,0 +1,26 @@ +local explorerSocietyButterfly = Action() +function explorerSocietyButterfly.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if target.itemid == 4992 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt) == 9 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 9 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt, 10) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 10) + toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) + item:transform(4864) + target:remove() + elseif target.itemid == 4993 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt) == 12 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 12 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt, 13) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 13) + toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) + item:transform(4865) + target:remove() + elseif target.itemid == 4991 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt) == 15 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 15 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt, 16) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 16) + toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) + item:transform(4866) + target:remove() + end + return true +end + +explorerSocietyButterfly:id(4863) +explorerSocietyButterfly:register() diff --git a/data-otservbr-global/scripts/quests/the_explorer_society/actions_dragon.lua b/data-otservbr-global/scripts/quests/the_explorer_society/actions_dragon.lua new file mode 100644 index 00000000000..90129aeaf39 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_explorer_society/actions_dragon.lua @@ -0,0 +1,13 @@ +local explorerSocietyDragon = Action() +function explorerSocietyDragon.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIslandofDragons) == 57 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 57 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIslandofDragons, 58) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 58) + player:addItem(7314, 1) + toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) + end + return true +end + +explorerSocietyDragon:uid(40042) +explorerSocietyDragon:register() diff --git a/data-otservbr-global/scripts/actions/quests/explorer_society/findings.lua b/data-otservbr-global/scripts/quests/the_explorer_society/actions_findings.lua similarity index 74% rename from data-otservbr-global/scripts/actions/quests/explorer_society/findings.lua rename to data-otservbr-global/scripts/quests/the_explorer_society/actions_findings.lua index 3f81f4cd08d..c9a7cc8f42c 100644 --- a/data-otservbr-global/scripts/actions/quests/explorer_society/findings.lua +++ b/data-otservbr-global/scripts/quests/the_explorer_society/actions_findings.lua @@ -3,49 +3,49 @@ local UniqueTable = { [14029] = { -- Uzgod's Family Brooch rewardItemId = 4834, - storageMission = Storage.ExplorerSociety.JoiningTheExplorers, + storageMission = Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers, storageMissionValue = 3, storageQuestlineValue = 3, }, [14030] = { -- Wrinkled parchment rewardItemId = 173, - storageMission = Storage.ExplorerSociety.TheBonelordSecret, + storageMission = Storage.Quest.U7_6.ExplorerSociety.TheBonelordSecret, storageMissionValue = 31, storageQuestlineValue = 30, }, [14031] = { -- Strange powder rewardItemId = 13974, - storageMission = Storage.ExplorerSociety.TheOrcPowder, + storageMission = Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder, storageMissionValue = 34, storageQuestlineValue = 33, }, [14032] = { -- Elven poetry book rewardItemId = 4844, - storageMission = Storage.ExplorerSociety.TheElvenPoetry, + storageMission = Storage.Quest.U7_6.ExplorerSociety.TheElvenPoetry, storageMissionValue = 37, storageQuestlineValue = 36, }, [14033] = { -- Memory stone rewardItemId = 4841, - storageMission = Storage.ExplorerSociety.TheMemoryStone, + storageMission = Storage.Quest.U7_6.ExplorerSociety.TheMemoryStone, storageMissionValue = 40, storageQuestlineValue = 39, }, [14034] = { -- Spectral dress rewardItemId = 4836, - storageMission = Storage.ExplorerSociety.TheSpectralDress, + storageMission = Storage.Quest.U7_6.ExplorerSociety.TheSpectralDress, storageMissionValue = 49, storageQuestlineValue = 48, }, [14035] = { -- Damage logbook rewardItemId = 21378, - storageMission = Storage.ExplorerSociety.CalassaQuest, + storageMission = Storage.Quest.U7_6.ExplorerSociety.CalassaQuest, storageMissionValue = 2, storageQuestlineValue = 0, }, @@ -53,7 +53,7 @@ local UniqueTable = { [40041] = { -- Funeral urn rewardItemId = 4847, - storageMission = Storage.ExplorerSociety.TheLizardUrn, + storageMission = Storage.Quest.U7_6.ExplorerSociety.TheLizardUrn, storageMissionValue = 28, storageQuestlineValue = 27, }, @@ -75,7 +75,7 @@ function explorerSocietyFindings.onUse(player, item, fromPosition, target, toPos player:setStorageValue(item.uid, 1) player:setStorageValue(uniqueItem.storageMission, uniqueItem.storageMissionValue) if uniqueItem.storageQuestlineValue > 0 then - player:setStorageValue(Storage.ExplorerSociety.QuestLine, uniqueItem.storageQuestlineValue) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, uniqueItem.storageQuestlineValue) end return true end diff --git a/data-otservbr-global/scripts/quests/the_explorer_society/actions_icicle.lua b/data-otservbr-global/scripts/quests/the_explorer_society/actions_icicle.lua new file mode 100644 index 00000000000..7489727a39a --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_explorer_society/actions_icicle.lua @@ -0,0 +1,13 @@ +local explorerSocietyIcicle = Action() +function explorerSocietyIcicle.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if target.itemid == 4994 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceDelivery) == 6 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 6 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceDelivery, 7) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 7) + player:addItem(4837, 1) + toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) + end + return true +end + +explorerSocietyIcicle:id(4872) +explorerSocietyIcicle:register() diff --git a/data-otservbr-global/scripts/quests/the_explorer_society/actions_resonance.lua b/data-otservbr-global/scripts/quests/the_explorer_society/actions_resonance.lua new file mode 100644 index 00000000000..172c0acbf81 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_explorer_society/actions_resonance.lua @@ -0,0 +1,16 @@ +local explorerSocietyResonance = Action() +function explorerSocietyResonance.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if target.uid == 40043 then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceMusic) == 60 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 60 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceMusic, 61) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 61) + toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) + item:transform(7315) + player:say("You recorded the ice music.", TALKTYPE_MONSTER_SAY) + end + end + return true +end + +explorerSocietyResonance:id(7242) +explorerSocietyResonance:register() diff --git a/data-otservbr-global/scripts/quests/the_explorer_society/actions_stone.lua b/data-otservbr-global/scripts/quests/the_explorer_society/actions_stone.lua new file mode 100644 index 00000000000..0852e156e8e --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_explorer_society/actions_stone.lua @@ -0,0 +1,26 @@ +local explorerSocietyStone = Action() +function explorerSocietyStone.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if target.uid == 25018 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone) == 53 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 53 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.SpectralStone) == 1 then -- mission taken from Angus + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone, 54) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 54) + toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) + elseif target.uid == 25019 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone) == 54 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 54 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.SpectralStone) == 1 then -- mission taken from Angus + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone, 55) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 55) + player:removeItem(4840, 1) + toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) + elseif target.uid == 25019 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone) == 53 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 53 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.SpectralStone) == 2 then -- mission taken from Mortimer + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone, 54) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 54) + toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) + elseif target.uid == 25018 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone) == 54 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 54 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.SpectralStone) == 2 then -- mission taken from Mortimer + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone, 55) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 55) + player:removeItem(4840, 1) + toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) + end + return true +end + +explorerSocietyStone:id(4840) +explorerSocietyStone:register() diff --git a/data-otservbr-global/scripts/actions/quests/explorer_society/tracing_paper.lua b/data-otservbr-global/scripts/quests/the_explorer_society/actions_tracing_paper.lua similarity index 53% rename from data-otservbr-global/scripts/actions/quests/explorer_society/tracing_paper.lua rename to data-otservbr-global/scripts/quests/the_explorer_society/actions_tracing_paper.lua index d2551b51402..b366671bb75 100644 --- a/data-otservbr-global/scripts/actions/quests/explorer_society/tracing_paper.lua +++ b/data-otservbr-global/scripts/quests/the_explorer_society/actions_tracing_paper.lua @@ -1,8 +1,8 @@ local explorerSocietyPaper = Action() function explorerSocietyPaper.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if target.itemid == 2199 and target.uid == 3010 and player:getStorageValue(Storage.ExplorerSociety.TheRuneWritings) == 42 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) == 42 then - player:setStorageValue(Storage.ExplorerSociety.TheRuneWritings, 43) - player:setStorageValue(Storage.ExplorerSociety.QuestLine, 43) + if target.itemid == 2199 and target.uid == 3010 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheRuneWritings) == 42 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) == 42 then + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheRuneWritings, 43) + player:setStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine, 43) item:transform(4843) toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) end diff --git a/data-otservbr-global/scripts/movements/quests/explorer_society/calassa.lua b/data-otservbr-global/scripts/quests/the_explorer_society/movements_calassa.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/explorer_society/calassa.lua rename to data-otservbr-global/scripts/quests/the_explorer_society/movements_calassa.lua diff --git a/data-otservbr-global/scripts/movements/quests/explorer_society/carving_teleport_liberty_bay.lua b/data-otservbr-global/scripts/quests/the_explorer_society/movements_carving_teleport_liberty_bay.lua similarity index 81% rename from data-otservbr-global/scripts/movements/quests/explorer_society/carving_teleport_liberty_bay.lua rename to data-otservbr-global/scripts/quests/the_explorer_society/movements_carving_teleport_liberty_bay.lua index c709008c9e4..5bc03c29b53 100644 --- a/data-otservbr-global/scripts/movements/quests/explorer_society/carving_teleport_liberty_bay.lua +++ b/data-otservbr-global/scripts/quests/the_explorer_society/movements_carving_teleport_liberty_bay.lua @@ -16,7 +16,7 @@ function carvingTeleportLibertyBay.onStepIn(creature, item, position, fromPositi return end - if player:getStorageValue(Storage.ExplorerSociety.TheIceMusic) >= 62 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) >= 62 and player:removeItem(5021, 1) then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheIceMusic) >= 62 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) >= 62 and player:removeItem(5021, 1) then player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(carvingTP.position) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) diff --git a/data-otservbr-global/scripts/movements/quests/explorer_society/carvingteleport_port_hope.lua b/data-otservbr-global/scripts/quests/the_explorer_society/movements_carvingteleport_port_hope.lua similarity index 80% rename from data-otservbr-global/scripts/movements/quests/explorer_society/carvingteleport_port_hope.lua rename to data-otservbr-global/scripts/quests/the_explorer_society/movements_carvingteleport_port_hope.lua index 572a3a86738..b91de8e9fd3 100644 --- a/data-otservbr-global/scripts/movements/quests/explorer_society/carvingteleport_port_hope.lua +++ b/data-otservbr-global/scripts/quests/the_explorer_society/movements_carvingteleport_port_hope.lua @@ -16,7 +16,7 @@ function carvingTeleportPortHope.onStepIn(creature, item, position, fromPosition return end - if player:getStorageValue(Storage.ExplorerSociety.TheAstralPortals) >= 56 and player:getStorageValue(Storage.ExplorerSociety.QuestLine) >= 56 and player:removeItem(5021, 1) then + if player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.TheAstralPortals) >= 56 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) >= 56 and player:removeItem(5021, 1) then player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(carvingTP.position) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) diff --git a/data-otservbr-global/scripts/quests/the_paradox_tower/action-fifth_floor_lever.lua b/data-otservbr-global/scripts/quests/the_paradox_tower/action_fifth_floor_lever.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_paradox_tower/action-fifth_floor_lever.lua rename to data-otservbr-global/scripts/quests/the_paradox_tower/action_fifth_floor_lever.lua diff --git a/data-otservbr-global/scripts/quests/the_paradox_tower/action-four_floor_lever.lua b/data-otservbr-global/scripts/quests/the_paradox_tower/action_four_floor_lever.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_paradox_tower/action-four_floor_lever.lua rename to data-otservbr-global/scripts/quests/the_paradox_tower/action_four_floor_lever.lua diff --git a/data-otservbr-global/scripts/quests/the_paradox_tower/action-second_floor_lever.lua b/data-otservbr-global/scripts/quests/the_paradox_tower/action_second_floor_lever.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_paradox_tower/action-second_floor_lever.lua rename to data-otservbr-global/scripts/quests/the_paradox_tower/action_second_floor_lever.lua diff --git a/data-otservbr-global/scripts/quests/the_paradox_tower/action-third_floor_lever.lua b/data-otservbr-global/scripts/quests/the_paradox_tower/action_third_floor_lever.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_paradox_tower/action-third_floor_lever.lua rename to data-otservbr-global/scripts/quests/the_paradox_tower/action_third_floor_lever.lua diff --git a/data-otservbr-global/scripts/quests/the_paradox_tower/move_let_the _quest.lua b/data-otservbr-global/scripts/quests/the_paradox_tower/move_let_the _quest.lua new file mode 100644 index 00000000000..a20f503a9f8 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_paradox_tower/move_let_the _quest.lua @@ -0,0 +1,37 @@ +local teleportTileBack = MoveEvent() + +function teleportTileBack.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return true + end + + -- UIDs específicos do tile + local specificUIDs = { 25034, 25035, 25036, 25037 } + + -- Posições específicas + local specificPositions = { + { x = 32486, y = 31927, z = 7 }, + { x = 32487, y = 31927, z = 7 }, + { x = 32486, y = 31928, z = 7 }, + { x = 32487, y = 31928, z = 7 }, + } + + -- Posição de teletransporte + local teleportPosition = { x = 32566, y = 31959, z = 1 } + + -- Verifica se a posição, o UID e o itemID coincidem + for _, pos in ipairs(specificPositions) do + if position.x == pos.x and position.y == pos.y and position.z == pos.z and item:getId() == 599 and table.contains(specificUIDs, item.uid) then + player:teleportTo(teleportPosition) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + break + end + end + + return true +end + +-- Registra o evento para os UIDs específicos +teleportTileBack:uid(25034, 25035, 25036, 25037) +teleportTileBack:register() diff --git a/data-otservbr-global/scripts/quests/the_paradox_tower/movement-poison.lua b/data-otservbr-global/scripts/quests/the_paradox_tower/movement-poison.lua deleted file mode 100644 index 565762fa480..00000000000 --- a/data-otservbr-global/scripts/quests/the_paradox_tower/movement-poison.lua +++ /dev/null @@ -1,32 +0,0 @@ -local positions = { - { x = 32497, y = 31889, z = 7 }, - { x = 32497, y = 31890, z = 7 }, - { x = 32498, y = 31890, z = 7 }, - { x = 32499, y = 31890, z = 7 }, - { x = 32502, y = 31890, z = 7 }, - { x = 32494, y = 31888, z = 7 }, -} - -local poison = MoveEvent() - -function poison.onStepOut(creature, item, position, fromPosition) - local player = creature:getPlayer() - if not player then - return true - end - - local removeHealth = Tile({ x = 32497, y = 31889, z = 7 }):getFieldItem() - if not removeHealth then - player:addHealth(-200, COMBAT_EARTHDAMAGE) - for i = 1, #positions do - local tile = Tile(positions[i]):getFieldItem() - if not tile then - Game.createItem(105, 1, Position(positions[i])) - end - end - end - return true -end - -poison:uid(25011) -poison:register() diff --git a/data-otservbr-global/scripts/quests/the_paradox_tower/movement-sacrifice_skulls.lua b/data-otservbr-global/scripts/quests/the_paradox_tower/movement-sacrifice_skulls.lua deleted file mode 100644 index c351bde5c46..00000000000 --- a/data-otservbr-global/scripts/quests/the_paradox_tower/movement-sacrifice_skulls.lua +++ /dev/null @@ -1,42 +0,0 @@ -local positions = { - { x = 32563, y = 31957, z = 1 }, - { x = 32565, y = 31957, z = 1 }, - { x = 32567, y = 31957, z = 1 }, - { x = 32569, y = 31957, z = 1 }, -} - -local sacrificeSkulls = MoveEvent() - -function sacrificeSkulls.onStepIn(creature, item, position, fromPosition) - local player = creature:getPlayer() - if not player then - return true - end - - for i = 4, #positions do - -- Check if have skulls in all positions - local tile = Tile(positions[i]):getItemById(3114) - if tile then - -- Message, only send in the first acess of the paradox tower - if player:getStorageValue(FirstParadoxAcess) < 1 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "One of the toxic salt seas in Krailos carries fresh and clean water again. The ogres' water supply is ensured for now") - player:setStorageValue(FirstParadoxAcess, 1) - end - -- Remove skulls - for skulls = 1, #positions do - local skull = Tile(positions[skulls]):getItemById(3114) - if skull then - -- Create poison fields from the positions - Game.createItem(105, 1, Position(positions[skulls])) - -- Remove skulls from the positions - skull:remove(1) - end - end - player:teleportTo({ x = 32479, y = 31923, z = 7 }) - end - end - return true -end - -sacrificeSkulls:uid(25012) -sacrificeSkulls:register() diff --git a/data-otservbr-global/scripts/quests/the_paradox_tower/movement-first_floor_stair.lua b/data-otservbr-global/scripts/quests/the_paradox_tower/movement_first_floor_stair.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_paradox_tower/movement-first_floor_stair.lua rename to data-otservbr-global/scripts/quests/the_paradox_tower/movement_first_floor_stair.lua diff --git a/data-otservbr-global/scripts/quests/the_paradox_tower/movement-last_floor_reward.lua b/data-otservbr-global/scripts/quests/the_paradox_tower/movement_last_floor_reward.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_paradox_tower/movement-last_floor_reward.lua rename to data-otservbr-global/scripts/quests/the_paradox_tower/movement_last_floor_reward.lua diff --git a/data-otservbr-global/scripts/quests/the_paradox_tower/movement_sacrifice_skulls.lua b/data-otservbr-global/scripts/quests/the_paradox_tower/movement_sacrifice_skulls.lua new file mode 100644 index 00000000000..cefc303ae07 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_paradox_tower/movement_sacrifice_skulls.lua @@ -0,0 +1,41 @@ +local positions = { + { x = 32563, y = 31957, z = 1 }, + { x = 32565, y = 31957, z = 1 }, + { x = 32567, y = 31957, z = 1 }, + { x = 32569, y = 31957, z = 1 }, +} + +local sacrificeSkulls = MoveEvent() + +function sacrificeSkulls.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return true + end + + for i = 1, #positions do + local tile = Tile(positions[i]) + if not tile or not tile:getItemById(3114) then + return true + end + end + + if player:getStorageValue(FirstParadoxAcess) < 1 then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "One of the toxic salt seas in Krailos carries fresh and clean water again. The ogres' water supply is ensured for now") + player:setStorageValue(FirstParadoxAcess, 1) + end + + for i = 1, #positions do + local skull = Tile(positions[i]):getItemById(3114) + if skull then + Game.createItem(105, 1, positions[i]) + skull:remove(1) + end + end + + player:teleportTo({ x = 32479, y = 31923, z = 7 }) + return true +end + +sacrificeSkulls:uid(25012) +sacrificeSkulls:register() diff --git a/data-otservbr-global/scripts/quests/the_paradox_tower/movement_strange_carvings_in _the_southeast.lua b/data-otservbr-global/scripts/quests/the_paradox_tower/movement_strange_carvings_in _the_southeast.lua new file mode 100644 index 00000000000..f4316250888 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_paradox_tower/movement_strange_carvings_in _the_southeast.lua @@ -0,0 +1,30 @@ +local teleportTile = MoveEvent() + +function teleportTile.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return true + end + + local specificUIDs = { 25031, 25032 } + + local specificPositions = { + { x = 32477, y = 31905, z = 7 }, + { x = 32476, y = 31906, z = 7 }, + } + + local teleportPosition = { x = 32478, y = 31908, z = 7 } + + for _, pos in ipairs(specificPositions) do + if position.x == pos.x and position.y == pos.y and position.z == pos.z and item:getId() == 599 and table.contains(specificUIDs, item.uid) then + player:teleportTo(teleportPosition) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + break + end + end + + return true +end + +teleportTile:uid(25031, 25032) +teleportTile:register() diff --git a/data-otservbr-global/scripts/quests/the_paradox_tower/movement-third_floor_ghoul.lua b/data-otservbr-global/scripts/quests/the_paradox_tower/movement_third_floor_ghoul.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_paradox_tower/movement-third_floor_ghoul.lua rename to data-otservbr-global/scripts/quests/the_paradox_tower/movement_third_floor_ghoul.lua diff --git a/data-otservbr-global/scripts/quests/the_paradox_tower/trap_in_the_tree.lua b/data-otservbr-global/scripts/quests/the_paradox_tower/trap_in_the_tree.lua new file mode 100644 index 00000000000..2e7342c7800 --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_paradox_tower/trap_in_the_tree.lua @@ -0,0 +1,23 @@ +local trap_in_the_tree = MoveEvent() + +local trapPositions = { + { x = 32497, y = 31889, z = 07 }, + { x = 32499, y = 31890, z = 07 }, + { x = 32497, y = 31890, z = 07 }, + { x = 32498, y = 31890, z = 07 }, + { x = 32496, y = 31890, z = 07 }, + { x = 32494, y = 31888, z = 07 }, + { x = 32502, y = 31890, z = 07 }, +} + +function trap_in_the_tree.onStepIn(creature, item, toPosition, fromPosition) + if creature:isPlayer() and Tile({ x = 32502, y = 31890, z = 07 }):getThingCount() == 2 then + doTargetCombatHealth(0, creature, COMBAT_EARTHDAMAGE, -200, -200) + for _, pos in ipairs(trapPositions) do + Game.createItem(2121, 1, pos) + end + end +end + +trap_in_the_tree:uid(25011) +trap_in_the_tree:register() diff --git a/data-otservbr-global/scripts/actions/quests/pits_of_inferno/bazir_maze_lever.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_bazir_maze_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/pits_of_inferno/bazir_maze_lever.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_bazir_maze_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/pits_of_inferno/bazir_mirror.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_bazir_mirror.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/pits_of_inferno/bazir_mirror.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_bazir_mirror.lua diff --git a/data-otservbr-global/scripts/actions/quests/pits_of_inferno/bazir_wrong_levers.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_bazir_wrong_levers.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/pits_of_inferno/bazir_wrong_levers.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_bazir_wrong_levers.lua diff --git a/data-otservbr-global/scripts/actions/quests/pits_of_inferno/fire_throne_lever.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_fire_throne_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/pits_of_inferno/fire_throne_lever.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_fire_throne_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/pits_of_inferno/fountain.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_fountain.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/pits_of_inferno/fountain.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_fountain.lua diff --git a/data-otservbr-global/scripts/actions/quests/pits_of_inferno/ladder_levers.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_ladder_levers.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/pits_of_inferno/ladder_levers.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_ladder_levers.lua diff --git a/data-otservbr-global/scripts/actions/quests/pits_of_inferno/levers.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_levers.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/pits_of_inferno/levers.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_levers.lua diff --git a/data-otservbr-global/scripts/actions/quests/pits_of_inferno/maze_stone.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_maze_stone.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/pits_of_inferno/maze_stone.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_maze_stone.lua diff --git a/data-otservbr-global/scripts/actions/quests/pits_of_inferno/oil.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_oil.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/pits_of_inferno/oil.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_oil.lua diff --git a/data-otservbr-global/scripts/actions/quests/pits_of_inferno/stone_lever.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_stone_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/pits_of_inferno/stone_lever.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_stone_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/pits_of_inferno/trap_lever.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_trap_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/pits_of_inferno/trap_lever.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_trap_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/pits_of_inferno/walls.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_walls.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/pits_of_inferno/walls.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/actions_walls.lua diff --git a/data-otservbr-global/scripts/movements/quests/pits_of_inferno/bazir_tile.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_bazir_tile.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/pits_of_inferno/bazir_tile.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_bazir_tile.lua diff --git a/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_check_throne.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_check_throne.lua new file mode 100644 index 00000000000..38e3b1f658e --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_check_throne.lua @@ -0,0 +1,37 @@ +local setting = { + [2090] = { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneInfernatil, value = 1 }, + [2091] = { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneTafariel, value = 1 }, + [2092] = { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneVerminor, value = 1 }, + [2093] = { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneApocalypse, value = 1 }, + [2094] = { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneBazir, value = 1 }, + [2095] = { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneAshfalor, value = 1 }, + [2096] = { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, value = 10 }, +} + +local checkThrone = MoveEvent() + +function checkThrone.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return true + end + + local thrones = setting[item.uid] + if not thrones then + return true + end + + if player:getStorageValue(thrones.storage) ~= thrones.value then + player:teleportTo(fromPosition, true) + player:say("You've not absorbed energy from this throne.", TALKTYPE_MONSTER_SAY) + end + return true +end + +checkThrone:type("stepin") + +for index, value in pairs(setting) do + checkThrone:uid(index) +end + +checkThrone:register() diff --git a/data-otservbr-global/scripts/movements/quests/pits_of_inferno/drawbridge.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_drawbridge.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/pits_of_inferno/drawbridge.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_drawbridge.lua diff --git a/data-otservbr-global/scripts/movements/quests/pits_of_inferno/fire_tile.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_fire_tile.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/pits_of_inferno/fire_tile.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_fire_tile.lua diff --git a/data-otservbr-global/scripts/movements/quests/pits_of_inferno/holy_tible_tile.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_holy_tible_tile.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/pits_of_inferno/holy_tible_tile.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_holy_tible_tile.lua diff --git a/data-otservbr-global/scripts/movements/quests/pits_of_inferno/ladder.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_ladder.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/pits_of_inferno/ladder.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_ladder.lua diff --git a/data-otservbr-global/scripts/movements/quests/pits_of_inferno/pumin_teleport.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_pumin_teleport.lua similarity index 87% rename from data-otservbr-global/scripts/movements/quests/pits_of_inferno/pumin_teleport.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_pumin_teleport.lua index efd45f2b0d4..cc98cce60b3 100644 --- a/data-otservbr-global/scripts/movements/quests/pits_of_inferno/pumin_teleport.lua +++ b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_pumin_teleport.lua @@ -6,7 +6,7 @@ function puminTeleport.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.PitsOfInferno.ThronePumin) < 50 then + if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) >= 9 then player:teleportTo(Position(32786, 32308, 15)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) else diff --git a/data-otservbr-global/scripts/movements/quests/pits_of_inferno/second_trap.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_second_trap.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/pits_of_inferno/second_trap.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_second_trap.lua diff --git a/data-otservbr-global/scripts/movements/quests/pits_of_inferno/shortcuts.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_shortcuts.lua similarity index 78% rename from data-otservbr-global/scripts/movements/quests/pits_of_inferno/shortcuts.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_shortcuts.lua index 8db4334a7f4..11bb2e086ff 100644 --- a/data-otservbr-global/scripts/movements/quests/pits_of_inferno/shortcuts.lua +++ b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_shortcuts.lua @@ -1,6 +1,6 @@ local setting = { - [8816] = Storage.PitsOfInferno.ShortcutHubDoor, - [8817] = Storage.PitsOfInferno.ShortcutLeverDoor, + [8816] = Storage.Quest.U7_9.ThePitsOfInferno.ShortcutHubDoor, + [8817] = Storage.Quest.U7_9.ThePitsOfInferno.ShortcutLeverDoor, } local shortcuts = MoveEvent() diff --git a/data-otservbr-global/scripts/movements/quests/pits_of_inferno/stone.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_stone.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/pits_of_inferno/stone.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_stone.lua diff --git a/data-otservbr-global/scripts/movements/quests/pits_of_inferno/throne.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_throne.lua similarity index 52% rename from data-otservbr-global/scripts/movements/quests/pits_of_inferno/throne.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_throne.lua index 92e1c656673..598ab72a64f 100644 --- a/data-otservbr-global/scripts/movements/quests/pits_of_inferno/throne.lua +++ b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_throne.lua @@ -1,42 +1,42 @@ local setting = { [2080] = { - storage = Storage.PitsOfInferno.ThroneInfernatil, + storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneInfernatil, text = "You have touched Infernatil's throne and absorbed some of his spirit.", effect = CONST_ME_FIREAREA, toPosition = Position(32909, 32211, 15), }, [2081] = { - storage = Storage.PitsOfInferno.ThroneTafariel, + storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneTafariel, text = "You have touched Tafariel's throne and absorbed some of his spirit.", effect = CONST_ME_MORTAREA, toPosition = Position(32761, 32243, 15), }, [2082] = { - storage = Storage.PitsOfInferno.ThroneVerminor, + storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneVerminor, text = "You have touched Verminor's throne and absorbed some of his spirit.", effect = CONST_ME_POISONAREA, toPosition = Position(32840, 32327, 15), }, [2083] = { - storage = Storage.PitsOfInferno.ThroneApocalypse, + storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneApocalypse, text = "You have touched Apocalypse's throne and absorbed some of his spirit.", effect = CONST_ME_EXPLOSIONAREA, toPosition = Position(32875, 32267, 15), }, [2084] = { - storage = Storage.PitsOfInferno.ThroneBazir, + storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneBazir, text = "You have touched Bazir's throne and absorbed some of his spirit.", effect = CONST_ME_MAGIC_GREEN, toPosition = Position(32745, 32385, 15), }, [2085] = { - storage = Storage.PitsOfInferno.ThroneAshfalor, + storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneAshfalor, text = "You have touched Ashfalor's throne and absorbed some of his spirit.", effect = CONST_ME_FIREAREA, toPosition = Position(32839, 32310, 15), }, [2086] = { - storage = Storage.PitsOfInferno.ThronePumin, + storage = Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, text = "You have touched Pumin's throne and absorbed some of his spirit.", effect = CONST_ME_MORTAREA, toPosition = Position(32785, 32279, 15), @@ -56,15 +56,30 @@ function throne.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(throne.storage) ~= 1 then - player:setStorageValue(throne.storage, 1) - player:setStorageValue(Storage.PitsOfInferno.ShortcutHubDoor, 1) - player:getPosition():sendMagicEffect(throne.effect) - player:say(throne.text, TALKTYPE_MONSTER_SAY) + -- Check specific condition for UID 2086 + if item.uid == 2086 then + if player:getStorageValue(throne.storage) == 9 then + player:setStorageValue(throne.storage, 10) + player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ShortcutHubDoor, 1) + player:getPosition():sendMagicEffect(throne.effect) + player:say(throne.text, TALKTYPE_MONSTER_SAY) + else + player:teleportTo(throne.toPosition) + player:getPosition():sendMagicEffect(CONST_ME_MORTAREA) + player:say("Begone!", TALKTYPE_MONSTER_SAY) + end else - player:teleportTo(throne.toPosition) - player:getPosition():sendMagicEffect(CONST_ME_MORTAREA) - player:say("Begone!", TALKTYPE_MONSTER_SAY) + -- Default behavior for other UIDs + if player:getStorageValue(throne.storage) ~= 1 then + player:setStorageValue(throne.storage, 1) + player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ShortcutHubDoor, 1) + player:getPosition():sendMagicEffect(throne.effect) + player:say(throne.text, TALKTYPE_MONSTER_SAY) + else + player:teleportTo(throne.toPosition) + player:getPosition():sendMagicEffect(CONST_ME_MORTAREA) + player:say("Begone!", TALKTYPE_MONSTER_SAY) + end end return true end diff --git a/data-otservbr-global/scripts/movements/quests/pits_of_inferno/tile_teleport.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_tile_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/pits_of_inferno/tile_teleport.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_tile_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/pits_of_inferno/trap.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_trap.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/pits_of_inferno/trap.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/movements_trap.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_shattered_isles/nargor_maps.lua b/data-otservbr-global/scripts/quests/the_shattered_isles_quest/action_nargor_maps.lua similarity index 72% rename from data-otservbr-global/scripts/actions/quests/the_shattered_isles/nargor_maps.lua rename to data-otservbr-global/scripts/quests/the_shattered_isles_quest/action_nargor_maps.lua index c183522c08d..1b9af9bbc50 100644 --- a/data-otservbr-global/scripts/actions/quests/the_shattered_isles/nargor_maps.lua +++ b/data-otservbr-global/scripts/quests/the_shattered_isles_quest/action_nargor_maps.lua @@ -1,14 +1,14 @@ local UniqueTable = { [40001] = { - storage = Storage.TheShatteredIsles.TavernMap1, + storage = Storage.Quest.U7_8.TheShatteredIsles.TavernMap1, message = "You have sucessfully read plan A.", }, [40002] = { - storage = Storage.TheShatteredIsles.TavernMap2, + storage = Storage.Quest.U7_8.TheShatteredIsles.TavernMap2, message = "You have sucessfully read plan B.", }, [40003] = { - storage = Storage.TheShatteredIsles.TavernMap3, + storage = Storage.Quest.U7_8.TheShatteredIsles.TavernMap3, message = "You have sucessfully read plan C.", }, } @@ -21,7 +21,7 @@ function nargorMaps.onUse(player, item, fromPosition, target, toPosition, isHotk return true end - if player:getStorageValue(Storage.TheShatteredIsles.RaysMission3) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission3) ~= 1 then return false end diff --git a/data-otservbr-global/scripts/actions/quests/the_shattered_isles/tortoise_egg_nargor.lua b/data-otservbr-global/scripts/quests/the_shattered_isles_quest/action_tortoise_egg_nargor.lua similarity index 75% rename from data-otservbr-global/scripts/actions/quests/the_shattered_isles/tortoise_egg_nargor.lua rename to data-otservbr-global/scripts/quests/the_shattered_isles_quest/action_tortoise_egg_nargor.lua index b556faeefc7..64930d6e4e4 100644 --- a/data-otservbr-global/scripts/actions/quests/the_shattered_isles/tortoise_egg_nargor.lua +++ b/data-otservbr-global/scripts/quests/the_shattered_isles_quest/action_tortoise_egg_nargor.lua @@ -14,9 +14,9 @@ function tortoiseEggNargor.onUse(player, item, fromPosition, target, toPosition, return true end - if player:getStorageValue(Storage.TheShatteredIsles.TortoiseEggNargorTime) < os.time() then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TortoiseEggNargorTime) < os.time() then player:addItem(setting.name, setting.count, true) - player:setStorageValue(Storage.TheShatteredIsles.TortoiseEggNargorTime, os.time() + 24 * 3600) + player:setStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TortoiseEggNargorTime, os.time() + 24 * 3600) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You found " .. setting.count .. " " .. setting.name .. ".") else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. getItemName(setting.itemId) .. " is empty.") diff --git a/data-otservbr-global/scripts/movements/quests/the_sharttered_isles/energy_barrier.lua b/data-otservbr-global/scripts/quests/the_shattered_isles_quest/movement_energy_barrier.lua similarity index 85% rename from data-otservbr-global/scripts/movements/quests/the_sharttered_isles/energy_barrier.lua rename to data-otservbr-global/scripts/quests/the_shattered_isles_quest/movement_energy_barrier.lua index 8ef523b6075..ce06795ec20 100644 --- a/data-otservbr-global/scripts/movements/quests/the_sharttered_isles/energy_barrier.lua +++ b/data-otservbr-global/scripts/quests/the_shattered_isles_quest/movement_energy_barrier.lua @@ -10,7 +10,7 @@ function energyBarrier.onStepIn(creature, item, position, fromPosition) if not player then return true end - if player:getStorageValue(Storage.TheShatteredIsles.TheCounterspell) ~= 4 then + if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TheCounterspell) ~= 4 then position:sendMagicEffect(CONST_ME_ENERGYHIT) position.x = position.x + 2 player:teleportTo(position) diff --git a/data-otservbr-global/scripts/movements/quests/the_sharttered_isles/teleport.lua b/data-otservbr-global/scripts/quests/the_shattered_isles_quest/movement_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_sharttered_isles/teleport.lua rename to data-otservbr-global/scripts/quests/the_shattered_isles_quest/movement_teleport.lua diff --git a/data-otservbr-global/startup/tables/chest.lua b/data-otservbr-global/startup/tables/chest.lua index 228e9ba2976..42471d5a906 100644 --- a/data-otservbr-global/startup/tables/chest.lua +++ b/data-otservbr-global/startup/tables/chest.lua @@ -21,6 +21,16 @@ storage = xxxxx }, + Example using KV: + [xxxx] = { + useKV = true, + itemId = xxxx, + itemPos = {x = xxxxx, y = xxxxx, z = x}, + container = xxxx, (it's for use reward in a container, only put the id of the container here) + reward = {{xxxx, x}}, + questName = "testkv", + } + Note: The "for use of the map" variables are only used to create the action or unique on the map during startup If the reward is an key, do not need to use "keyAction", only set the storage as same action id @@ -58,6 +68,17 @@ ChestAction = { { x = 33053, y = 31020, z = 7 }, }, }, + -- Key 5010 (dead tree black knight quest) + [5002] = { + isKey = true, + itemId = 3634, + itemPos = { + { x = 32813, y = 31964, z = 7 }, + { x = 32800, y = 31959, z = 7 }, + }, + reward = { { 2969, 1 } }, + storage = Storage.Quest.Key.ID5010, + }, } ChestUnique = { @@ -169,6 +190,102 @@ ChestUnique = { timerStorage = Storage.TheSecretLibrary.FalconBastionChestsTimer.Key0909, time = 24, -- hour }, + -- Bear Room Quest (rookgaard) key 4601 + [5013] = { + isKey = true, + itemId = 2472, + itemPos = { x = 32150, y = 32112, z = 12 }, + reward = { { 2970, 1 } }, + storage = Storage.Quest.Key.ID4601, + }, + -- Katana Quest (rookgaard) key 4603 + [5014] = { + isKey = true, + itemId = 4240, + itemPos = { x = 32176, y = 32132, z = 9 }, + reward = { { 2969, 1 } }, + storage = Storage.Quest.Key.ID4603, + }, + -- Key 3600 + [5015] = { + isKey = true, + itemId = 4285, + itemPos = { x = 32509, y = 32181, z = 13 }, + reward = { { 2969, 1 } }, + storage = Storage.Quest.Key.ID3600, + }, + -- Key 3667 + [5016] = { + isKey = true, + itemId = 3204, + itemPos = { x = 32576, y = 32216, z = 15 }, + reward = { { 2969, 1 } }, + storage = Storage.Quest.Key.ID3667, + }, + -- Key 3610 + [5017] = { + isKey = true, + itemId = 387, + itemPos = { x = 32589, y = 32100, z = 14 }, + reward = { { 2969, 1 } }, + storage = Storage.Quest.Key.ID3610, + }, + -- Key 3520 + [5018] = { + isKey = true, + itemId = 2473, + itemPos = { x = 32376, y = 31802, z = 7 }, + reward = { { 2973, 1 } }, + storage = Storage.Quest.Key.ID3520, + }, + -- Key 3301 (outlaw camp key 1) + [5019] = { + isKey = true, + itemId = 3634, + itemPos = { x = 32617, y = 32250, z = 7 }, + reward = { { 2970, 1 } }, + storage = Storage.Quest.Key.ID3301, + }, + -- Key 3302 (outlaw camp key 2) + [5020] = { + isKey = true, + itemId = 3634, + itemPos = { x = 32609, y = 32244, z = 7 }, + reward = { { 2969, 1 } }, + storage = Storage.Quest.Key.ID3302, + }, + -- Key 3303 (outlaw camp key 3) + [5021] = { + isKey = true, + itemId = 3634, + itemPos = { x = 32651, y = 32244, z = 7 }, + reward = { { 2970, 1 } }, + storage = Storage.Quest.Key.ID3303, + }, + -- Key 3304 (outlaw camp key 4) + [5022] = { + isKey = true, + itemId = 2472, + itemPos = { x = 32623, y = 32187, z = 9 }, + reward = { { 2972, 1 } }, + storage = Storage.Quest.Key.ID3304, + }, + -- Key 3008 (Draconia Quest) + [5023] = { + isKey = true, + itemId = 2435, + itemPos = { x = 32800, y = 31582, z = 2 }, + reward = { { 2969, 1 } }, + storage = Storage.Quest.Key.ID3008, + }, + -- The Pits of Inferno - Key 3700 + [5024] = { + isKey = true, + itemId = 2472, + itemPos = { x = 32842, y = 32225, z = 8 }, + reward = { { 2971, 1 } }, + storage = Storage.Quest.Key.ID3700, + }, -- To add a reward inside a bag, you need to add the variable "container = bagId" before "reward" -- Just duplicate the table and configure correctly, the scripts already register the entire table automatically -- Path: data\scripts\actions\system\quest_reward_common.lua @@ -206,10 +323,11 @@ ChestUnique = { -- Dawnport -- Legion helmet quest (dawnport) [6006] = { + useKV = true, itemId = 4240, itemPos = { x = 32143, y = 31910, z = 8 }, reward = { { 3374, 1 } }, - storage = Storage.Quest.U10_55.SanctuaryOfTheLizardGod.LegionHelmet, + questName = "legiondawnport", }, -- Dawnport quest -- Torn log book @@ -220,153 +338,163 @@ ChestUnique = { storage = Storage.Quest.U10_55.Dawnport.TornLogBook, }, -- Deeper fibula quest - -- Tower shield [6008] = { + useKV = true, itemId = 4024, itemPos = { x = 32239, y = 32471, z = 10 }, - reward = { { 3428, 1 } }, - storage = Storage.Quest.PreU6_0.DeeperFibula.Rewards.TowerShield, + reward = { { 3428, 1 } }, -- Tower shield + questName = "deeperfibula1", }, - -- Warrior helmet [6009] = { + useKV = true, itemId = 4024, itemPos = { x = 32239, y = 32478, z = 10 }, - reward = { { 3369, 1 } }, - storage = Storage.Quest.PreU6_0.DeeperFibula.Rewards.WarriorHelmet, + reward = { { 3369, 1 } }, -- Warrior helmet + questName = "deeperfibula2", }, - -- Dwarven ring [6010] = { + useKV = true, itemId = 4240, itemPos = { x = 32233, y = 32491, z = 10 }, - reward = { { 3097, 1 } }, - storage = Storage.Quest.PreU6_0.DeeperFibula.Rewards.DwarvenRing, + reward = { { 3097, 1 } }, -- Dwarven ring + questName = "deeperfibula3", }, - -- Elven aulet [6011] = { + useKV = true, itemId = 4025, itemPos = { x = 32245, y = 32492, z = 10 }, - reward = { { 3082, 1 } }, - storage = Storage.Quest.PreU6_0.DeeperFibula.Rewards.ElvenAmulet, + reward = { { 3082, 1 } }, -- Elven aulet + questName = "deeperfibula4", }, - -- Knight axe [6012] = { + useKV = true, itemId = 4240, itemPos = { x = 32256, y = 32500, z = 10 }, - reward = { { 3318, 1 } }, - storage = Storage.Quest.PreU6_0.DeeperFibula.Rewards.KnightAxe, + reward = { { 3318, 1 } }, -- Knight axe + questName = "deeperfibula5", }, -- Short sword quest -- Book [6013] = { + useKV = true, itemId = 2472, itemPos = { x = 32171, y = 32197, z = 7 }, reward = { { 2821, 1 } }, - storage = Storage.Quest.PreU6_0.ShortSword.Rewards.Book, + questName = "shortswordbook", }, -- Thais lighthouse quest -- Battle hammer [6014] = { + useKV = true, itemId = 2472, itemPos = { x = 32225, y = 32265, z = 10 }, reward = { { 3305, 1 } }, - storage = Storage.Quest.PreU6_0.ThaisLighthouse.Rewards.BattleHammer, + questName = "lighthouse1", }, -- Dark shield [6015] = { + useKV = true, itemId = 2472, itemPos = { x = 32226, y = 32265, z = 10 }, reward = { { 3421, 1 } }, - storage = Storage.Quest.PreU6_0.ThaisLighthouse.DarkShield, + questName = "lighthouse2", }, -- Studded shield quest (rookgaard) -- Banana free account area [6016] = { + useKV = true, itemId = 3639, itemPos = { x = 32172, y = 32169, z = 7 }, reward = { { 3587, 1 } }, - storage = Storage.Quest.U6_0.StuddedShield.Rewards.BananaFree, + questName = "bananafree", }, -- Banana premium account area [6017] = { + useKV = true, itemId = 3639, itemPos = { x = 31983, y = 32193, z = 5 }, reward = { { 3587, 1 } }, - storage = Storage.Quest.U6_0.StuddedShield.Rewards.BananaPremium, + questName = "bananapremium", }, - -- Explorer brooch quest (kazordoon) + -- The Explorer Society - Explorer brooch (kazordoon) [6019] = { + useKV = true, itemId = 4240, itemPos = { x = 32636, y = 31873, z = 10 }, reward = { { 4871, 1 } }, - storage = Storage.Quest.U6_1.ExplorerBrooch.Brooch, + questName = "explorerbrooch", }, -- Orc fortress quest - -- Knight axe [6020] = { + useKV = true, itemId = 2469, itemPos = { x = 32980, y = 31727, z = 9 }, - reward = { { 3318, 1 } }, - storage = Storage.Quest.U6_1.OrcFortress.Rewards.KnightAxe, + reward = { { 3318, 1 } }, -- Knight axe + questName = "orcfortress1", }, - -- Knight armor [6021] = { + useKV = true, itemId = 2469, itemPos = { x = 32981, y = 31727, z = 9 }, - reward = { { 3370, 1 } }, - storage = Storage.Quest.U6_1.OrcFortress.Rewards.KnightArmor, + reward = { { 3370, 1 } }, -- Knight armor + questName = "orcfortress2", }, - -- Fire sword [6022] = { + useKV = true, itemId = 2469, itemPos = { x = 32985, y = 31727, z = 9 }, - reward = { { 3280, 1 } }, - storage = Storage.Quest.U6_1.OrcFortress.Rewards.FireSword, + reward = { { 3280, 1 } }, -- Fire sword + questName = "orcfortress3", }, -- Draconia quest [6023] = { + useKV = true, itemId = 2472, itemPos = { x = 32803, y = 31582, z = 2 }, container = 2853, - reward = { { 3284, 1 }, { 3297, 1 } }, + reward = { { 3284, 1 }, { 3297, 1 } }, -- bag with weapons weight = 64, - storage = Storage.Quest.U6_2.Draconia.Rewards.BagWithWeapons, + questName = "draconia1", }, [6024] = { + useKV = true, itemId = 2472, itemPos = { x = 32804, y = 31582, z = 2 }, container = 2853, - reward = { { 3081, 5 }, { 3051, 1 } }, + reward = { { 3081, 5 }, { 3051, 1 } }, -- bag with amulets weight = 15.80, - storage = Storage.Quest.U6_2.Draconia.Rewards.BagWithAmulets, + questName = "draconia2", }, -- Adorned UH rune quest [6025] = { + useKV = true, itemId = 2469, itemPos = { x = 33136, y = 31601, z = 15 }, reward = { { 11603, 1 } }, - storage = Storage.Quest.U6_4.AdornedUHRune.Rewards.SilverRuneEmblem, + questName = "adoreduh", }, -- Barbarian axe quest - -- Barbarian axe [6026] = { + useKV = true, itemId = 2469, itemPos = { x = 33184, y = 31945, z = 11 }, - reward = { { 3317, 1 } }, - storage = Storage.Quest.U6_4.BarbarianAxe.Rewards.BarbarianAxe, + reward = { { 3317, 1 } }, -- Barbarian axe + questName = "barbarianaxe1", }, - -- Scimitar [6027] = { + useKV = true, itemId = 2469, itemPos = { x = 33185, y = 31945, z = 11 }, - reward = { { 3307, 1 } }, - storage = Storage.Quest.U6_4.BarbarianAxe.Rewards.Scimitar, + reward = { { 3307, 1 } }, -- Scimitar + questName = "barbarianaxe1", }, -- Dark armor quest [6028] = { + useKV = true, itemId = 4311, itemPos = { x = 33178, y = 31870, z = 12 }, reward = { { 3383, 1 } }, - storage = Storage.Quest.U6_4.DarkArmor.Rewards.Armor, + questName = "darkarmor", }, -- Demon helmet quest -- Steel boots @@ -391,176 +519,176 @@ ChestUnique = { storage = Storage.Quest.U6_4.DemonHelmet.Rewards.DemonShield, }, -- Double hero quest - -- Red gem [6032] = { + useKV = true, itemId = 2469, itemPos = { x = 33109, y = 31679, z = 13 }, - reward = { { 3039, 1 } }, - storage = Storage.Quest.U6_4.DoubleHero.Rewards.RedGem, + reward = { { 3039, 1 } }, -- Red gem + questName = "doublehero1", }, - -- Club ring [6033] = { + useKV = true, itemId = 2469, itemPos = { x = 33110, y = 31679, z = 13 }, - reward = { { 3093, 1 } }, - storage = Storage.Quest.U6_4.DoubleHero.Rewards.ClubRing, + reward = { { 3093, 1 } }, -- Club ring + questName = "doublehero2", }, -- Edron goblin quest - -- Silver amulet [6034] = { + useKV = true, itemId = 2469, itemPos = { x = 33095, y = 31800, z = 10 }, - reward = { { 3054, 200 } }, - storage = Storage.Quest.U6_4.EdronGoblin.Rewards.SilverAmulet, + reward = { { 3054, 200 } }, -- Silver amulet + questName = "edrongoblin1", }, - -- Steel shield [6035] = { + useKV = true, itemId = 2469, itemPos = { x = 33095, y = 31801, z = 10 }, - reward = { { 3409, 1 } }, - storage = Storage.Quest.U6_4.EdronGoblin.Rewards.SteelShield, + reward = { { 3409, 1 } }, -- Steel shield + questName = "edrongoblin2", }, -- Fire axe quest - -- Fire axe [6036] = { + useKV = true, itemId = 4024, itemPos = { x = 33084, y = 31650, z = 12 }, - reward = { { 3320, 1 } }, - storage = Storage.Quest.U6_4.FireAxe.Rewards.FireAxe, + reward = { { 3320, 1 } }, -- Fire axe + questName = "fireaxe2", }, - -- Ring quest - -- Time ring + -- Ring Quest [6037] = { + useKV = true, itemId = 2469, itemPos = { x = 33131, y = 31624, z = 15 }, - reward = { { 3053, 1 } }, - storage = Storage.Quest.U7_1.Ring.Rewards.TimeRing, + reward = { { 3053, 1 } }, -- Time ring + questName = "ringquest1", }, - -- Sword ring [6038] = { + useKV = true, itemId = 2469, itemPos = { x = 33134, y = 31624, z = 15 }, - reward = { { 3091, 1 } }, - storage = Storage.Quest.U7_1.Ring.Rewards.SwordRing, + reward = { { 3091, 1 } }, -- Sword ring + questName = "ringquest2", }, -- Troll cave quest - -- Garlic necklace [6039] = { + useKV = true, itemId = 2473, itemPos = { x = 33143, y = 31719, z = 10 }, - reward = { { 3083, 150 } }, - storage = Storage.Quest.U6_4.TrollCave.Rewards.GarlicNecklace, + reward = { { 3083, 150 } }, -- Garlic necklace + questName = "trollcave1", }, - -- Brass legs [6040] = { + useKV = true, itemId = 2473, itemPos = { x = 33143, y = 31721, z = 10 }, - reward = { { 3372, 1 } }, - storage = Storage.Quest.U6_4.TrollCave.Rewards.BrassLegs, + reward = { { 3372, 1 } }, -- Brass legs + questName = "trollcave1", }, -- Vampire shield quest - -- Dragon lance [6041] = { + useKV = true, itemId = 2469, itemPos = { x = 33189, y = 31688, z = 14 }, - reward = { { 3302, 1 } }, - storage = Storage.Quest.U6_4.VampireShield.Rewards.DragonLance, + reward = { { 3302, 1 } }, -- Dragon lance + questName = "vampireshield2", }, - -- Vampire shield [6042] = { + useKV = true, itemId = 2469, itemPos = { x = 33195, y = 31688, z = 14 }, - reward = { { 3434, 1 } }, - storage = Storage.Quest.U6_4.VampireShield.Rewards.VampireShield, + reward = { { 3434, 1 } }, -- Vampire shield + questName = "vampireshield3", }, - -- Weeding ring quest - -- Dragon necklace + -- Wedding Ring Quest [6043] = { + useKV = true, itemId = 2469, itemPos = { x = 33158, y = 31621, z = 15 }, - reward = { { 3085, 200 } }, - storage = Storage.Quest.U6_4.WeddingRing.Rewards.DragonNecklace, + reward = { { 3085, 200 } }, -- Dragon necklace + questName = "weddingring1", }, - -- Weeding ring [6044] = { + useKV = true, itemId = 2469, itemPos = { x = 33158, y = 31622, z = 15 }, - reward = { { 3004, 1 } }, - storage = Storage.Quest.U6_4.WeddingRing.Rewards.WeedingRing, + reward = { { 3004, 1 } }, -- Weeding ring + questName = "weddingring2", }, -- Alawars vault quest - -- White pearl [6045] = { + useKV = true, itemId = 2472, itemPos = { x = 32105, y = 31567, z = 9 }, - reward = { { 3026, 3 } }, - storage = Storage.Quest.U6_5.AlawarsVault.Rewards.WhitePearl, + reward = { { 3026, 3 } }, -- White pearl + questName = "AlawarsVault1", }, - -- Broadsword [6046] = { + useKV = true, itemId = 2472, itemPos = { x = 32109, y = 31567, z = 9 }, - reward = { { 3301, 1 } }, - storage = Storage.Quest.U6_5.AlawarsVault.Rewards.Broadsword, + reward = { { 3301, 1 } }, -- Broadsword + questName = "AlawarsVault2", }, -- Black knight quest - -- Crown armor [6047] = { + useKV = true, itemId = 3634, itemPos = { x = 32868, y = 31955, z = 11 }, - reward = { { 3381, 1 } }, - storage = Storage.Quest.U7_1.BlackKnight.Rewards.CrownArmor, + reward = { { 3381, 1 } }, -- Crown armor + questName = "Blackknight1", }, - -- Crown shield [6048] = { + useKV = true, itemId = 3634, itemPos = { x = 32880, y = 31955, z = 11 }, - reward = { { 3419, 1 } }, - storage = Storage.Quest.U7_1.BlackKnight.Rewards.CrownShield, + reward = { { 3419, 1 } }, -- Crown shield + questName = "Blackknight2", }, - -- TIme ring quest - -- Crystal ball + -- Time Ring Quest [6049] = { + useKV = true, itemId = 2472, itemPos = { x = 33038, y = 32171, z = 9 }, - reward = { { 3076, 1 } }, - storage = Storage.Quest.U7_1.TimeRing.Rewards.CrystallBall, + reward = { { 3076, 1 } }, -- Crystal ball + questName = "timering1", }, - -- Time ring [6050] = { + useKV = true, itemId = 2472, itemPos = { x = 33039, y = 32171, z = 9 }, - reward = { { 3053, 1 } }, - storage = Storage.Quest.U7_1.TimeRing.Rewards.TimeRing, + reward = { { 3053, 1 } }, -- Time ring + questName = "timering2", }, - -- Elven amulet [6051] = { + useKV = true, itemId = 2472, itemPos = { x = 33040, y = 32171, z = 9 }, - reward = { { 3082, 1 } }, - storage = Storage.Quest.U7_1.TimeRing.Rewards.ElvenAmulet, + reward = { { 3082, 50 } }, -- Elven amulet + questName = "timering3", }, -- Behemoth quest - -- Guardian halberd [6052] = { + useKV = true, itemId = 2472, itemPos = { x = 33295, y = 31658, z = 13 }, - reward = { { 3315, 1 } }, - storage = Storage.Quest.U7_2.Behemoth.GuardianHalberd, + reward = { { 3315, 1 } }, -- Guardian halberd + questName = "behemothquest2", }, - -- Demon shield [6053] = { + useKV = true, itemId = 2472, itemPos = { x = 33297, y = 31658, z = 13 }, - reward = { { 3420, 1 } }, - storage = Storage.Quest.U7_2.Behemoth.DemonShield, + reward = { { 3420, 1 } }, -- Demon shield + questName = "behemothquest3", }, - -- Golden armor [6054] = { + useKV = true, itemId = 2472, itemPos = { x = 33298, y = 31658, z = 13 }, - reward = { { 3360, 1 } }, - storage = Storage.Quest.U7_2.Behemoth.GoldenArmor, + reward = { { 3360, 1 } }, -- Golden armor + questName = "behemothquest4", }, -- Family brooch quest [6055] = { @@ -623,21 +751,23 @@ ChestUnique = { storage = Storage.Quest.PreU6_0.OrnamentedShield.Rewards.OrnamentedShield, }, [6063] = { + useKV = true, itemId = 2480, itemPos = { x = 32769, y = 32302, z = 10 }, container = 2859, reward = { { 2949, 1 }, { 3059, 1 }, { 3083, 1 }, { 3035, 5 }, { 3053, 1 } }, weight = 44, - storage = Storage.Quest.PreU6_0.OrnamentedShield.Rewards.TimeRing, + questName = "ornamentedshield", }, --[6064] EMPTY [6065] = { + useKV = true, itemId = 2472, itemPos = { x = 32644, y = 32131, z = 8 }, container = 2853, reward = { { 3033, 2 }, { 3050, 1 }, { 2953, 1 } }, weight = 44, - storage = Storage.Quest.U6_1.Panpipe.Rewards.Panpipe, + questName = "panpipe", }, [6066] = { itemId = 2469, @@ -648,34 +778,34 @@ ChestUnique = { storage = Storage.Quest.U6_4.BerserkerTreasure.Rewards.WhitePearls, }, -- Fire axe quest - -- Bag [6067] = { + useKV = true, itemId = 2472, itemPos = { x = 33078, y = 31656, z = 11 }, container = 2853, - reward = { { 3098, 1 }, { 3085, 200 }, { 3028, 7 }, { 3320, 1 } }, + reward = { { 3098, 1 }, { 3085, 200 }, { 3028, 7 }, { 3320, 1 } }, -- Bag (Ring of Healing, Dragon Necklace, 7 Small Diamonds) weight = 27, - storage = Storage.Quest.U6_4.FireAxe.Rewards.Bag, + questName = "fireaxe1", }, -- Poison daggers quest - -- Backpack reward [6068] = { + useKV = true, itemId = 2473, itemPos = { x = 33155, y = 31880, z = 11 }, container = 2854, - reward = { { 3448, 30 }, { 3299, 1 }, { 3299, 1 } }, + reward = { { 3448, 30 }, { 3299, 1 }, { 3299, 1 } }, -- Backpack (2 Poison Daggers, 30 Poison Arrows) weight = 60, - storage = Storage.Quest.U6_4.PoisonDaggers.Rewards.BackpackReward, + questName = "poisondaggers", }, -- Shaman treasure quest - -- Bag with 3 blank runes [6069] = { + useKV = true, itemId = 4024, itemPos = { x = 33127, y = 31885, z = 9 }, container = 2853, - reward = { { 3147, 3 } }, + reward = { { 3147, 3 } }, -- Bag with 3 blank runes weight = 15, - storage = Storage.Quest.U6_4.ShamanTreasure.Rewards.BlankRunes, + questName = "shamantreasure", }, -- Strong potions quest -- Green bag with 5 strong mana potions @@ -688,17 +818,16 @@ ChestUnique = { storage = Storage.Quest.U8_1.StrongPotions.Reward, }, -- Vampire shield quest - -- Bag [6071] = { + useKV = true, itemId = 2469, itemPos = { x = 33188, y = 31682, z = 14 }, container = 2853, - reward = { { 3058, 1 }, { 3027, 1 }, { 3078, 1 } }, + reward = { { 3058, 1 }, { 3027, 1 }, { 3078, 1 } }, -- Bag (Strange Symbol, Black Pearl and Mysterious Fetish) weight = 16, - storage = Storage.Quest.U6_4.VampireShield.Rewards.StrangeSymbol, + questName = "vampireshield1", }, -- [6072] empty - -- Dragon tower quest -- Backpack 1 [6073] = { @@ -721,12 +850,13 @@ ChestUnique = { -- Behemoth quest -- Bag [6075] = { + useKV = true, itemId = 2472, itemPos = { x = 33294, y = 31658, z = 13 }, container = 2853, reward = { { 3028, 3 }, { 3029, 4 }, { 3007, 1 }, { 3052, 1 }, { 3055, 1 } }, weight = 50, - storage = Storage.Quest.U7_2.Behemoth.Bag, + questName = "behemothquest1", }, -- Parchment room quest -- Bag @@ -745,43 +875,43 @@ ChestUnique = { itemId = 2472, itemPos = { x = 32774, y = 32253, z = 8 }, reward = { { 3034, 1 } }, - storage = Storage.Quest.U7_24.GiantSmithhammer.Talon, + storage = Storage.Quest.U7_6.ExplorerSociety.GiantSmithHammer.Talon, }, -- Giant smithhammer [6078] = { itemId = 2472, itemPos = { x = 32776, y = 32253, z = 8 }, reward = { { 12510, 1 } }, - storage = Storage.Quest.U7_24.GiantSmithhammer.Hammer, + storage = Storage.Quest.U7_6.ExplorerSociety.GiantSmithHammer.Hammer, }, -- 100 gold coin [6079] = { itemId = 2472, itemPos = { x = 32778, y = 32253, z = 8 }, reward = { { 3031, 100 } }, - storage = Storage.Quest.U7_24.GiantSmithhammer.GoldCoin, + storage = Storage.Quest.U7_6.ExplorerSociety.GiantSmithHammer.GoldCoin, }, -- Mad Mage room quest - -- Star amulet [6080] = { + useKV = true, itemId = 2472, itemPos = { x = 32578, y = 32195, z = 14 }, - reward = { { 3014, 1 } }, - storage = Storage.Quest.U7_24.MadMageRoom.StarAmulet, + reward = { { 3014, 1 } }, -- Star amulet + questName = "madmageroom1", }, - -- Hat of the mad [6081] = { + useKV = true, itemId = 2472, itemPos = { x = 32575, y = 32195, z = 14 }, - reward = { { 3210, 1 } }, - storage = Storage.Quest.U7_24.MadMageRoom.Hat, + reward = { { 3210, 1 } }, -- Hat of the mad + questName = "madmageroom2", }, - -- Stone skin amulet [6082] = { + useKV = true, itemId = 2472, itemPos = { x = 32572, y = 32195, z = 14 }, - reward = { { 3081, 5 } }, - storage = Storage.Quest.U7_24.MadMageRoom.StoneSkinAmulet, + reward = { { 3081, 5 } }, -- Stone skin amulet + questName = "madmageroom3", }, -- Skull of ratha quest -- Bag (white pearl, skull) @@ -791,7 +921,7 @@ ChestUnique = { container = 2853, weight = 42, reward = { { 3026, 1 }, { 3207, 1 } }, - storage = Storage.Quest.U7_24.SkullOfRatha.Bag1, + storage = Storage.Quest.U7_6.ExplorerSociety.SkullOfRatha.Bag1, }, -- Bag (wolf tooth chain/dwarven ring) [6084] = { @@ -800,7 +930,7 @@ ChestUnique = { container = 2853, weight = 42, reward = { { 3012, 1 }, { 3097, 1 } }, - storage = Storage.Quest.U7_24.SkullOfRatha.Bag2, + storage = Storage.Quest.U7_6.ExplorerSociety.SkullOfRatha.Bag2, }, -- The annihilator quest -- Demon armor @@ -998,6 +1128,852 @@ ChestUnique = { timerStorage = Storage.Quest.U11_80.TheSecretLibrary.FalconBastionChestsTimer.UndergroundBastion, time = 24, -- hour }, + -- Blood Herb Quest + [6111] = { + useKV = true, + itemId = 3634, + itemPos = { x = 32769, y = 31968, z = 7 }, + reward = { { 3734, 1 } }, + questName = "bloodherb", + }, + -- Power Bolts Quest (book) + [6112] = { + useKV = true, + itemId = 4240, + itemPos = { x = 32814, y = 32281, z = 8 }, + reward = { { 2821, 1 } }, + questName = "powerbolt2", + }, + -- Present Quest (rookgaard) + [6113] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32149, y = 32105, z = 11 }, + container = 2854, -- backpack + reward = { { 2882, 1 }, { 2856, 1 }, { 2881, 1 }, { 2905, 1 } }, -- Jug, Present Box, Cup and Plate + questName = "presentBox", + }, + -- Bear Room quest + [6114] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32146, y = 32097, z = 11 }, + container = 2853, -- bag + reward = { { 3447, 12 }, { 3031, 40 } }, -- bag: 12 arrows, 40 gold coin + questName = "bearChest1", + }, + [6115] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32144, y = 32096, z = 11 }, + reward = { { 3354, 1 } }, -- Brass Helmet + questName = "bearChest2", + }, + [6116] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32141, y = 32097, z = 11 }, + reward = { { 3358, 1 } }, -- Chain Armor + questName = "bearChest3", + }, + -- Captain Iglues Treasure Quest + [6117] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32039, y = 32121, z = 13 }, + reward = { { 3579, 1 } }, -- 2x Salmon + questName = "captainIglues", + }, + -- Combat Knife Quest + [6117] = { + useKV = true, + itemId = 2473, + itemPos = { x = 32102, y = 32235, z = 8 }, + reward = { { 3292, 1 } }, -- Combat Knife + questName = "combatknife", + }, + -- Goblin Temple Quest + [6118] = { + useKV = true, + itemId = 2472, + itemPos = { x = 31973, y = 32209, z = 12 }, + container = 2853, -- bag + reward = { { 3551, 1 }, { 1781, 5 }, { 3031, 50 } }, -- sandals, 5 small stones, 50 gold coins + questName = "goblintemple", + }, + [6119] = { + useKV = true, + itemId = 2472, + itemPos = { x = 31977, y = 32209, z = 12 }, + container = 2853, -- bag + reward = { { 3466, 1 }, { 2992, 4 }, { 2874, 1 } }, -- pan, 4 snowballs, vial of milk + questName = "goblintemple2", + }, + -- Minotaur Hell Quest + [6120] = { + useKV = true, + itemId = 2473, + itemPos = { x = 32130, y = 32066, z = 12 }, + reward = { { 3483, 1 } }, -- fishing rod + questName = "minohell1", + }, + [6121] = { + useKV = true, + itemId = 2473, + itemPos = { x = 32127, y = 32065, z = 12 }, + container = 2853, -- bag + reward = { { 3447, 10 }, { 3448, 4 } }, -- 10 arrows, 4 poison arrow + questName = "minohell2", + }, + [6121] = { + useKV = true, + itemId = 2473, + itemPos = { x = 32124, y = 32064, z = 12 }, + reward = { { 3283, 1 } }, -- carlin sword + questName = "minohell3", + }, + -- Circle Room Quest + [6122] = { + useKV = true, + itemId = 2469, + itemPos = { x = 32495, y = 31992, z = 14 }, + reward = { { 3279, 1 } }, -- war hammer + questName = "circleroom1", + }, + [6123] = { + useKV = true, + itemId = 2469, + itemPos = { x = 32497, y = 31992, z = 14 }, + reward = { { 3323, 1 } }, -- dwarven axe + questName = "circleroom2", + }, + -- Crystal Wand Quest + [6124] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32479, y = 31611, z = 15 }, + reward = { { 3068, 1 } }, -- crystal wand + questName = "crystalwand1", + }, + [6125] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32481, y = 31611, z = 15 }, + reward = { { 11609, 1 } }, -- crystal wand + questName = "crystalwand2", + }, + -- Demona Ring Quest + [6126] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32504, y = 31596, z = 14 }, + reward = { { 3049, 1 } }, -- steath ring + questName = "demonaring1", + }, + [6127] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32515, y = 31596, z = 14 }, + reward = { { 3051, 1 } }, -- energy ring + questName = "demonaring2", + }, + -- Purple Tome Quest + [6128] = { + useKV = true, + itemId = 2436, + itemPos = { x = 32424, y = 31591, z = 15 }, + reward = { { 2822, 1 } }, -- map + questName = "purpletome1", + }, + [6129] = { + useKV = true, + itemId = 2436, + itemPos = { x = 32427, y = 31591, z = 15 }, + reward = { { 2823, 1 } }, -- map + questName = "purpletome2", + }, + [6130] = { + useKV = true, + itemId = 2438, + itemPos = { x = 32421, y = 31594, z = 15 }, + reward = { { 2848, 1 } }, -- purple tome + questName = "purpletome3", + }, + -- Life Ring Quest + [6131] = { + useKV = true, + itemId = 2469, + itemPos = { x = 32443, y = 32238, z = 11 }, + container = 2853, -- bag + reward = { { 3052, 1 }, { 3085, 200 } }, -- life ring , dragon necklace + questName = "lifering", + }, + -- Noble Armor Quest + [6132] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32451, y = 32048, z = 8 }, + reward = { { 3380, 1 } }, -- noble armor + questName = "noblearmor1", + }, + [6133] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32455, y = 32048, z = 8 }, + reward = { { 3385, 1 } }, -- crown helmet + questName = "noblearmor2", + }, + -- Geomancer Quest + [6134] = { + useKV = true, + itemId = 2469, + itemPos = { x = 32456, y = 32008, z = 13 }, + container = 2853, -- bag + reward = { { 3029, 1 }, { 3028, 1 }, { 3097, 1 } }, -- small sapphire, small diamond, dwarven ring + questName = "geomancer", + }, + -- Naginata Quest + [6135] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32346, y = 32063, z = 12 }, + reward = { { 3314, 1 } }, -- naginata + questName = "naginata", + }, + -- Ghoul Room Quest + [6136] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32500, y = 32175, z = 14 }, + reward = { { 3083, 150 } }, -- garlic necklac + questName = "ghoulroom1", + }, + -- Mintwallin Cyclops Quest + [6137] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32500, y = 32177, z = 14 }, + reward = { { 3093, 1 } }, -- club ring + questName = "ghoulroom2", + }, + [6138] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32591, y = 32097, z = 14 }, + reward = { { 3028, 1 } }, -- small diamond + questName = "mintwallincyclops", + }, + -- Devil helmet Quest + [6139] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32459, y = 32144, z = 15 }, + reward = { { 3029, 4 } }, -- small sapphire + questName = "devilhemet1", + }, + [6140] = { + useKV = true, + itemId = 2480, + itemPos = { x = 32465, y = 32148, z = 15 }, + reward = { { 3356, 1 } }, -- devil helmet + questName = "devilhemet2", + }, + [6141] = { + useKV = true, + itemId = 2480, + itemPos = { x = 32466, y = 32148, z = 15 }, + reward = { { 3269, 1 } }, -- halberd + questName = "devilhemet3", + }, + -- Fanfare Quest + [6142] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32390, y = 31769, z = 9 }, + reward = { { 2955, 1 } }, -- fanfare + questName = "fanfare", + }, + -- Heaven Blossom Quest + [6143] = { + useKV = true, + itemId = 2523, + itemPos = { x = 33104, y = 32154, z = 8 }, + reward = { { 5921, 1 } }, -- heaven blossom + questName = "heavenblossom", + }, + -- Iron Ore Quest + [6144] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32532, y = 31873, z = 8 }, + reward = { { 5880, 1 } }, -- iron ore + questName = "ironore", + }, + -- Isle of the Mists Quest + [6145] = { + useKV = true, + itemId = 2469, + itemPos = { x = 32852, y = 32332, z = 7 }, + reward = { { 3032, 1 } }, -- small emerald + questName = "isleofthemists", + }, + -- Longsword Quest + [6146] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32649, y = 31969, z = 9 }, + reward = { { 3285, 1 } }, -- longsword + questName = "longsword1", + }, + [6147] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32650, y = 31969, z = 9 }, + reward = { { 3004, 1 } }, -- weeding ring + questName = "longsword2", + }, + [6148] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32651, y = 31969, z = 9 }, + container = 2853, -- bag + reward = { { 3147, 3 }, { 2989, 1 }, { 3031, 76 }, { 3463, 1 } }, -- 3 blank rune, wooden doll, 76 gold coin, mirror + questName = "longsword3", + }, + -- Minotaur Leather Quest + [6149] = { + useKV = true, + itemId = 2469, + itemPos = { x = 32302, y = 32415, z = 7 }, + reward = { { 5878, 1 } }, -- minotaur leather + questName = "minotaurleatherquest", + }, + -- Orc Shaman Quest + [6150] = { + useKV = true, + itemId = 2469, + itemPos = { x = 33089, y = 32030, z = 9 }, + container = 2853, -- bag + reward = { { 3046, 1 }, { 3092, 1 }, { 3147, 1 } }, -- magic light wand, axe ring, blank rune + questName = "orcshaman", + }, + -- Power Ring Quest + [6151] = { + useKV = true, + itemId = 2473, + itemPos = { x = 32599, y = 31776, z = 9 }, + reward = { { 3031, 1 } }, -- power ring + questName = "powerring1", + }, + [6152] = { + useKV = true, + itemId = 2473, + itemPos = { x = 32601, y = 31776, z = 9 }, + reward = { { 3056, 200 } }, -- bronze amulet + questName = "powerring2", + }, + -- Scale Armor Quest + [6153] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32357, y = 32130, z = 9 }, + container = 2853, -- bag + reward = { { 3377, 1 } }, -- scale armor + questName = "scalearmor", + }, + -- Silver Amulet Quest + [6154] = { + useKV = true, + itemId = 2469, + itemPos = { x = 32506, y = 32269, z = 9 }, + reward = { { 3054, 200 } }, -- silver amulet + questName = "silveramulet", + }, + -- Silver Brooch Quest + [6155] = { + useKV = true, + itemId = 2476, + itemPos = { x = 32775, y = 32006, z = 11 }, + container = 2853, -- bag + reward = { { 3017, 1 }, { 3030, 2 }, { 3028, 3 } }, -- Silver Brooch, 2 Small Rubies, 3 Small Diamonds + questName = "silverbrooch", + }, + -- Six Rubies Quest + [6156] = { + useKV = true, + itemId = 387, + itemPos = { x = 32371, y = 32262, z = 12 }, + reward = { { 3030, 6 } }, -- 6 small rubies + questName = "sixrubies", + }, + -- Desert Quest + [6157] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32668, y = 32069, z = 8 }, + reward = { { 3035, 100 } }, -- 100 platinum coins + questName = "desert1", + }, + [6158] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32675, y = 32069, z = 8 }, + container = 2857, -- green bag + reward = { { 3084, 250 }, { 3098, 1 }, { 3046, 1 }, { 3077, 1 } }, -- protection amulet, ring of healing, magic light wand and anhk + questName = "desert2", + }, + -- Throwing Star Quest + [6159] = { + useKV = true, + itemId = 2473, + itemPos = { x = 32522, y = 32111, z = 15 }, + reward = { { 3287, 10 } }, -- throwing star + questName = "throwingstar", + }, + -- Triangle Tower Quest + [6160] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32565, y = 32119, z = 3 }, + container = 2853, -- bag + reward = { { 3083, 150 }, { 3029, 2 }, { 3097, 1 } }, -- garlick necklace, small sapphire, dwarven ring + questName = "triangletower", + }, + -- Dragon Corpse Quest + [6161] = { + useKV = true, + itemId = 4025, + itemPos = { x = 32179, y = 32224, z = 9 }, + container = 2853, -- bag + reward = { { 3374, 1 }, { 3430, 1 } }, -- Copper Shield and Legion Helmet + questName = "dragoncorpse", + }, + -- Katana Quest (rookgaard) + [6162] = { + useKV = true, + itemId = 4240, + itemPos = { x = 32175, y = 32145, z = 11 }, + reward = { { 3367, 1 } }, -- katana + questName = "katanacorpse1", + }, + [6163] = { + useKV = true, + itemId = 4240, + itemPos = { x = 32174, y = 32149, z = 11 }, + reward = { { 3300, 1 } }, -- katana + questName = "katanacorpse2", + }, + -- Crusader Helmet Quest + [6164] = { + useKV = true, + itemId = 3990, + itemPos = { x = 32427, y = 31943, z = 14 }, + reward = { { 3391, 1 } }, -- crusader helmet + questName = "crusaderhelmet", + }, + [6165] = { + useKV = true, + itemId = 4240, + itemPos = { x = 32498, y = 31721, z = 15 }, + reward = { { 3433, 1 } }, -- griffing shield (Griffin Shield Quest) + questName = "griffinshield1", + }, + [6166] = { + useKV = true, + itemId = 4024, + itemPos = { x = 32500, y = 31721, z = 15 }, + reward = { { 3313, 1 } }, -- obsidian lance (Griffin Shield Quest) + questName = "griffinshield2", + }, + [6167] = { + useKV = true, + itemId = 4024, + itemPos = { x = 32503, y = 31724, z = 15 }, + reward = { { 3323, 1 } }, -- dwarven axe (Griffin Shield Quest) + questName = "griffinshield3", + }, + -- Iron Helmet Quest + [6168] = { + useKV = true, + itemId = 4240, + itemPos = { x = 32769, y = 32225, z = 7 }, + container = 2854, + reward = { { 3123, 1 }, { 3155, 3 }, { 3361, 1 }, { 3353, 1 }, { 3285, 1 }, { 3506, 1 } }, -- worn leather boots, sudden death rune, leather armor, iron helmet, longsword, stamped letter + questName = "ironhelmet", + }, + -- Dead Archer Quest + [6169] = { + useKV = true, + itemId = 4240, + itemPos = { x = 32514, y = 32303, z = 10 }, + container = 2853, + reward = { { 3350, 1 }, { 3448, 5 }, { 268, 1 }, { 266, 1 } }, -- bow, 5 poison arrows, mana potion, health potion + questName = "deadarcher", + }, + -- Power Bolt Quest + [6170] = { + useKV = true, + itemId = 4240, + itemPos = { x = 32816, y = 32279, z = 8 }, + container = 2853, + reward = { { 3450, 5 }, { 3449, 12 } }, -- 5 power bolt, 12 burst arrow + questName = "powerbolt1", + }, + -- Spike Sword Quest + [6171] = { + useKV = true, + itemId = 3990, + itemPos = { x = 32568, y = 32085, z = 12 }, + reward = { { 3271, 1 } }, -- 5 power bolt, 12 burst arrow + questName = "spikesword", + }, + -- Elvenbane Quest + [6172] = { + useKV = true, + itemId = 2434, + itemPos = { x = 32588, y = 31644, z = 3 }, + container = 2853, + reward = { { 3031, 100 }, { 3028, 2 } }, -- 100 gold coin, 2 small diamond + questName = "elvebanequest1", + }, + [6173] = { + useKV = true, + itemId = 2434, + itemPos = { x = 32588, y = 31645, z = 3 }, + container = 2853, + reward = { { 3059, 1 }, { 3147, 1 }, { 237, 1 } }, -- spellbook, blank rune, strong mana potion + questName = "elvebanequest2", + }, + [6174] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32590, y = 31647, z = 3 }, + reward = { { 3282, 1 } }, -- + questName = "elvebanequest3", + }, + [6175] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32591, y = 31647, z = 3 }, + reward = { { 3425, 1 } }, -- + questName = "elvebanequest4", + }, + -- Iron Hammer Quest + [6176] = { + useKV = true, + itemId = 2473, + itemPos = { x = 32434, y = 31938, z = 8 }, + reward = { { 3310, 1 } }, -- iron hammer + questName = "ironhamer", + }, + -- Plate Armor quest + [6177] = { + useKV = true, + itemId = 2474, + itemPos = { x = 33327, y = 32182, z = 7 }, + reward = { { 3357, 1 } }, -- plate armor + questName = "platearmor", + }, + -- Stealth Ring Quest + [6178] = { + useKV = true, + itemId = 1983, + itemPos = { x = 33315, y = 32277, z = 11 }, + reward = { { 3084, 250 } }, -- protection amulet + questName = "stealhring1", + }, + [6179] = { + useKV = true, + itemId = 1983, + itemPos = { x = 33315, y = 32282, z = 11 }, + reward = { { 3049, 1 } }, -- stealth ring + questName = "stealhring2", + }, + -- Steel Helmet Quest + [6180] = { + useKV = true, + itemId = 2434, + itemPos = { x = 32460, y = 31951, z = 5 }, + reward = { { 3031, 56 } }, -- 56 gold coin + questName = "steelhelmet1", + }, + [6181] = { + useKV = true, + itemId = 2469, + itemPos = { x = 32464, y = 31957, z = 5 }, + reward = { { 3031, 47 } }, -- 47 gold coin + questName = "steelhelmet2", + }, + [6182] = { + useKV = true, + itemId = 2473, + itemPos = { x = 32462, y = 31947, z = 4 }, + reward = { { 3351, 1 } }, -- steel helmet + questName = "steelhelmet3", + }, + [6183] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32467, y = 31962, z = 4 }, + reward = { { 2815, 1 } }, -- scroll + questName = "steelhelmet4", + }, + -- Battle Axe Quest + [6184] = { + useKV = true, + itemId = 4285, + itemPos = { x = 32305, y = 32254, z = 9 }, + reward = { { 3266, 1 } }, -- battle axe + questName = "battleaxe", + }, + -- Doublet Quest + [6185] = { + useKV = true, + itemId = 408, + itemPos = { x = 32084, y = 32181, z = 8 }, + reward = { { 3379, 1 } }, -- doublet + questName = "doublet", + }, + -- Honey Flower Quest + [6186] = { + useKV = true, + itemId = 9226, + itemPos = { x = 32005, y = 32139, z = 3 }, + reward = { { 2984, 1 } }, -- honey + questName = "honeyflower", + }, + -- The Medusa Quest + [6187] = { + itemId = 1983, + itemPos = { x = 33049, y = 32399, z = 10 }, + container = 2853, + weight = 105, + reward = { { 3436, 1 }, { 3567, 1 }, { 3324, 1 } }, + storage = Storage.Quest.U7_3.TheMedusaQuest, + }, + -- Serpentine Tower Quest + [6188] = { + itemId = 2472, + itemPos = { x = 33150, y = 32862, z = 7 }, + weight = 0.20, + reward = { { 3026, 1 } }, + storage = Storage.Quest.U7_3.SerpentineTower.WhitePearl, + }, + -- Elephant Tusk Quest + [6189] = { + itemId = 2472, + itemPos = { x = 32922, y = 32755, z = 7 }, + weight = 0.20, + reward = { { 3044, 2 } }, + storage = Storage.Quest.U7_5.ElephantTusk, + }, + -- The Explorer Society - Books + [6190] = { + itemId = 2434, + itemPos = { x = 32770, y = 32245, z = 8 }, + weight = 13, + reward = { { 2821, 1 } }, + storage = Storage.Quest.U7_6.ExplorerSociety.Books.Cyclops, + }, + [6191] = { + itemId = 2523, + itemPos = { x = 32786, y = 32254, z = 8 }, + weight = 13.00, + reward = { { 2821, 1 } }, + storage = Storage.Quest.U7_6.ExplorerSociety.Books.Hengis, + }, + -- Witch House Quest + [6192] = { + itemId = 2472, + itemPos = { x = 32867, y = 31909, z = 8 }, + weight = 23.30, + container = 2853, + reward = { { 3027, 2 }, { 3008, 1 }, { 3031, 100 } }, + storage = Storage.QuestChests.WitchHouseQuest, + }, + -- Simon The Beggar's Favorite Staff + [6193] = { + itemId = 2482, + itemPos = { x = 33167, y = 31600, z = 15 }, + weight = 38.00, + reward = { { 6107, 1 } }, + storage = Storage.QuestChests.SimonTheBeggarsFavoriteStaff, + }, + -- Druid Outfit Quest - Wolf Tooth Chain + [6194] = { + itemId = 2480, + itemPos = { x = 32939, y = 31776, z = 9 }, + weight = 3.30, + reward = { { 5940, 1 } }, + storage = Storage.Quest.U7_8.DruidOutfits.WolfToothChain, + }, + -- Hunter Outfits Quest - Elane Crossbow + [6195] = { + itemId = 2472, + itemPos = { x = 32369, y = 32795, z = 10 }, + weight = 40.00, + reward = { { 5947, 1 } }, + storage = Storage.Quest.U7_8.HunterOutfits.ElaneCrossbow, + }, + -- Knight Outfits Quest - Ramsay the Reckless Helmet + [6196] = { + itemId = 2472, + itemPos = { x = 32860, y = 32516, z = 11 }, + weight = 46.00, + reward = { { 5924, 1 } }, + storage = Storage.Quest.U7_8.KnightOutfits.RamsaysHelmetChest, + }, + -- Oriental Outfits Quest - Chest + [6197] = { + itemId = 2472, + itemPos = { x = 32088, y = 32780, z = 11 }, + weight = 4.50, + reward = { { 5945, 1 } }, + storage = Storage.Quest.U7_8.OrientalOutfits.CoralComb, + }, + -- The Shattered Isles Quest - Dragahs Spellbook + [6198] = { + itemId = 4240, + itemPos = { x = 32093, y = 32574, z = 8 }, + weight = 58.00, + reward = { { 6120, 1 } }, + storage = Storage.Quest.U7_8.TheShatteredIsles.DragahsSpellbook, + }, + -- Dreamer's Challenge Quest + [6199] = { + itemId = 4240, + itemPos = { x = 32860, y = 32249, z = 9 }, + weight = 150.00, + container = 2854, + reward = { { 2816, 1 }, { 3285, 1 }, { 3352, 1 }, { 3558, 1 } }, + storage = Storage.Quest.U7_9.DreamersChallenge.BPLongSword, + }, + [6200] = { + itemId = 2472, + itemPos = { x = 32850, y = 32285, z = 14 }, + weight = 13.00, + reward = { { 2821, 1 } }, + storage = Storage.Quest.U7_9.DreamersChallenge.ChestBook, + }, + [6201] = { + itemId = 2469, + itemPos = { x = 32749, y = 32341, z = 14 }, + weight = 15.30, + container = 2853, + reward = { { 6498, 1 }, { 2874, 1 }, { 3602, 1 } }, + storage = Storage.Quest.U7_9.DreamersChallenge.ChestsWine, + }, + [6202] = { + itemId = 2469, + itemPos = { x = 32751, y = 32341, z = 14 }, + weight = 15.30, + container = 2853, + reward = { { 6498, 1 }, { 2874, 1 }, { 3602, 1 } }, + storage = Storage.Quest.U7_9.DreamersChallenge.ChestsWine, + }, + [6203] = { + itemId = 2469, + itemPos = { x = 32753, y = 32341, z = 14 }, + weight = 15.30, + container = 2853, + reward = { { 6498, 1 }, { 2874, 1 }, { 3602, 1 } }, + storage = Storage.Quest.U7_9.DreamersChallenge.ChestsWine, + }, + [6204] = { + itemId = 2469, + itemPos = { x = 32755, y = 32341, z = 14 }, + weight = 15.30, + container = 2853, + reward = { { 6498, 1 }, { 2874, 1 }, { 3602, 1 } }, + storage = Storage.Quest.U7_9.DreamersChallenge.ChestsWine, + }, + [6205] = { + itemId = 2469, + itemPos = { x = 32835, y = 32223, z = 14 }, + weight = 0.30, + reward = { { 3028, 3 } }, + storage = Storage.Quest.U7_9.DreamersChallenge.Chests3SmallDiamond, + }, + -- The Pits of Inferno + [6206] = { + itemId = 2472, + itemPos = { x = 32828, y = 32340, z = 7 }, + weight = 13.00, + reward = { { 2836, 1 } }, + storage = Storage.Quest.U7_9.ThePitsOfInferno.ChestTible, + }, + [6207] = { + itemId = 5972, + itemPos = { x = 32854, y = 32325, z = 11 }, + weight = 13.00, + reward = { { 2816, 1 } }, + storage = Storage.Quest.U7_9.ThePitsOfInferno.CorpseBook, + }, + [6208] = { + itemId = 5972, + itemPos = { x = 32832, y = 32277, z = 10 }, + weight = 40.90, + container = 5926, + reward = { { 6561, 1 }, { 6299, 1 }, { 3052, 1 }, { 5021, 3 }, { 3026, 5 }, { 3035, 11 }, { 5944, 2 }, { 3160, 3 }, { 3155, 2 }, { 3147, 1 }, { 238, 1 } }, + storage = Storage.Quest.U7_9.ThePitsOfInferno.CorpsePirateBP, + }, + [6209] = { + itemId = 2472, + itemPos = { x = 32826, y = 32232, z = 11 }, + weight = 20.70, + container = 3253, + reward = { { 11605, 1 }, { 11607, 1 }, { 11609, 1 }, { 11603, 1 } }, + storage = Storage.Quest.U7_9.ThePitsOfInferno.RewardChestBP, + }, + [6210] = { + itemId = 2472, + itemPos = { x = 32824, y = 32232, z = 11 }, + weight = 10.00, + reward = { { 3035, 100 } }, + storage = Storage.Quest.U7_9.ThePitsOfInferno.RewardChestPlatinumCoins, + }, + [6211] = { + itemId = 2472, + itemPos = { x = 32819, y = 32232, z = 11 }, + weight = 10.00, + reward = { { 3249, 1 } }, + storage = Storage.Quest.U7_9.ThePitsOfInferno.RewardChestFrozenStarlight, + }, + [6212] = { + itemId = 2472, + itemPos = { x = 32814, y = 32232, z = 11 }, + weight = 8.50, + reward = { { 5791, 1 } }, + storage = Storage.Quest.U7_9.ThePitsOfInferno.RewardChestStuffed, + }, + [6213] = { + itemId = 2472, + itemPos = { x = 32812, y = 32232, z = 11 }, + weight = 8.00, + reward = { { 6529, 1 } }, + storage = Storage.Quest.U7_9.ThePitsOfInferno.RewardChestSoftBoots, + }, + [6214] = { + itemId = 2472, + itemPos = { x = 32804, y = 32229, z = 11 }, + weight = 40.00, + reward = { { 3341, 1 } }, + storage = Storage.Quest.U7_9.ThePitsOfInferno.RewardChestStaffAvengerArbalest, + }, + [6215] = { + itemId = 2472, + itemPos = { x = 32806, y = 32229, z = 11 }, + weight = 64.00, + reward = { { 6527, 1 } }, + storage = Storage.Quest.U7_9.ThePitsOfInferno.RewardChestStaffAvengerArbalest, + }, + [6216] = { + itemId = 2472, + itemPos = { x = 32808, y = 32229, z = 11 }, + weight = 95.00, + reward = { { 5803, 1 } }, + storage = Storage.Quest.U7_9.ThePitsOfInferno.RewardChestStaffAvengerArbalest, + }, -- Reward of others scrips files (varied rewards) -- The First dragon Quest -- Treasure chests (data\scripts\actions\quests\first_dragon\treasure_chests.lua) @@ -1190,4 +2166,9 @@ ChestUnique = { itemId = 2473, itemPos = { x = 32099, y = 32198, z = 9 }, }, + -- The Outlaw Camp Quest (Bright Sword Quest) + [14091] = { + itemId = 2472, + itemPos = { x = 32620, y = 32198, z = 10 }, + }, } diff --git a/data-otservbr-global/startup/tables/corpse.lua b/data-otservbr-global/startup/tables/corpse.lua index 70594adcaa4..a6ca06f7375 100644 --- a/data-otservbr-global/startup/tables/corpse.lua +++ b/data-otservbr-global/startup/tables/corpse.lua @@ -34,8 +34,4 @@ CorpseUnique = { itemId = 4285, itemPos = { x = 32211, y = 31273, z = 10 }, }, - [20004] = { - itemId = 4285, - itemPos = { x = 32305, y = 32254, z = 9 }, - }, } diff --git a/data-otservbr-global/startup/tables/create_item.lua b/data-otservbr-global/startup/tables/create_item.lua index a091701672b..2310d4e5a86 100644 --- a/data-otservbr-global/startup/tables/create_item.lua +++ b/data-otservbr-global/startup/tables/create_item.lua @@ -1,4 +1,15 @@ CreateItemOnMap = { + -- The Explorer Society - dwarven pickaxe in 6 locals + [4845] = { + itemPos = { + { x = 32506, y = 31964, z = 12 }, + { x = 32427, y = 31900, z = 12 }, + { x = 32520, y = 31929, z = 10 }, + { x = 32503, y = 31922, z = 12 }, + { x = 32447, y = 31973, z = 11 }, + { x = 32425, y = 31948, z = 12 }, + }, + }, [11402] = { itemPos = { { x = 33239, y = 31224, z = 10 } }, }, diff --git a/data-otservbr-global/startup/tables/door_key.lua b/data-otservbr-global/startup/tables/door_key.lua index f8c38941e42..01d571991ac 100644 --- a/data-otservbr-global/startup/tables/door_key.lua +++ b/data-otservbr-global/startup/tables/door_key.lua @@ -53,6 +53,14 @@ KeyDoorAction = { { x = 32676, y = 31671, z = 10 }, }, }, + -- Door of the key 3610 (devil helmet quest) + [Storage.Quest.Key.ID3610] = { + itemId = false, + itemPos = { + { x = 32462, y = 32153, z = 14 }, + { x = 32462, y = 32151, z = 15 }, + }, + }, -- Door of the key 1864 (mad mage room quest) [Storage.Quest.Key.ID3620] = { itemId = false, @@ -68,6 +76,25 @@ KeyDoorAction = { itemId = 1631, itemPos = { { x = 32578, y = 32197, z = 15 } }, }, + -- Door of the key 3667 (mintwallin cyclops quest) + [Storage.Quest.Key.ID3667] = { + itemId = 5106, + itemPos = { { x = 32592, y = 32102, z = 14 } }, + }, + -- Door of the key 3520 (carlin cemetery) + [Storage.Quest.Key.ID3520] = { + itemId = false, + itemPos = { + { x = 32400, y = 31788, z = 8 }, + { x = 32400, y = 31789, z = 8 }, + { x = 32398, y = 31804, z = 8 }, + }, + }, + -- Door of the key 3700 (The Pits of Inferno) + [Storage.Quest.Key.ID3700] = { + itemId = 1628, + itemPos = { { x = 32827, y = 32246, z = 10 } }, + }, -- Door of the key 2297 (emperor's cookies quest) [Storage.Quest.Key.ID3800] = { itemId = false, @@ -101,7 +128,7 @@ KeyDoorAction = { itemId = false, itemPos = { { x = 32190, y = 32432, z = 8 } }, }, - -- Door of the key 3496 + -- Door of the key 3980 [Storage.Quest.Key.ID3980] = { itemId = false, itemPos = { { x = 32277, y = 32420, z = 10 } }, @@ -130,6 +157,16 @@ KeyDoorAction = { itemId = false, itemPos = { { x = 33363, y = 31360, z = 3 } }, }, + -- Door of the key 4601 (bear room quest) + [Storage.Quest.Key.ID4601] = { + itemId = false, + itemPos = { { x = 32145, y = 32100, z = 11 } }, + }, + -- Door of the key 4693 (kata quest) + [Storage.Quest.Key.ID4603] = { + itemId = false, + itemPos = { { x = 32179, y = 32149, z = 10 } }, + }, [Storage.Quest.Key.ID0909] = { itemId = false, itemPos = { @@ -141,4 +178,24 @@ KeyDoorAction = { itemId = false, itemPos = { { x = 32506, y = 32175, z = 14 } }, }, + [Storage.Quest.Key.ID3142] = { -- noble armor (thais quest) + itemId = false, + itemPos = { { x = 32450, y = 32044, z = 8 } }, + }, + [Storage.Quest.Key.ID3301] = { + itemId = false, + itemPos = { { x = 32619, y = 32241, z = 8 } }, + }, + [Storage.Quest.Key.ID3302] = { + itemId = false, + itemPos = { { x = 32619, y = 32240, z = 8 } }, + }, + [Storage.Quest.Key.ID3303] = { + itemId = false, + itemPos = { { x = 32614, y = 32175, z = 9 } }, + }, + [Storage.Quest.Key.ID3304] = { + itemId = false, + itemPos = { { x = 32620, y = 32199, z = 10 } }, + }, } diff --git a/data-otservbr-global/startup/tables/door_level.lua b/data-otservbr-global/startup/tables/door_level.lua index e9253809f40..4739b040753 100644 --- a/data-otservbr-global/startup/tables/door_level.lua +++ b/data-otservbr-global/startup/tables/door_level.lua @@ -6,6 +6,13 @@ Just add new positions and it go work in the game ]] LevelDoorAction = { + -- Doors for level 20 + [1020] = { + itemId = false, + itemPos = { + { x = 32673, y = 32100, z = 8 }, + }, + }, -- Doors for level 25 [1025] = { itemId = false, @@ -20,6 +27,14 @@ LevelDoorAction = { { x = 33302, y = 31691, z = 11 }, { x = 33302, y = 31692, z = 11 }, { x = 32567, y = 31969, z = 3 }, + { x = 32479, y = 32174, z = 15 }, + }, + }, + -- Doors for level 35 + [1035] = { + itemId = false, + itemPos = { + { x = 32448, y = 32042, z = 8 }, }, }, -- Doors for level 40 @@ -27,6 +42,21 @@ LevelDoorAction = { itemId = false, itemPos = { { x = 32981, y = 31760, z = 9 }, + { x = 32353, y = 32073, z = 11 }, + { x = 32544, y = 32179, z = 14 }, + -- The Djinn War - The Efreet + { x = 33050, y = 32622, z = 6 }, + { x = 33050, y = 32623, z = 6 }, + { x = 33102, y = 32537, z = 6 }, + { x = 33103, y = 32537, z = 6 }, + }, + }, + -- Doors for level 45 + [1045] = { + itemId = false, + itemPos = { + { x = 32612, y = 32253, z = 7 }, + { x = 32602, y = 32207, z = 10 }, }, }, -- Doors for level 50 @@ -44,6 +74,7 @@ LevelDoorAction = { itemPos = { { x = 33085, y = 31650, z = 10 }, { x = 32223, y = 31869, z = 14 }, + { x = 32483, y = 31722, z = 15 }, }, }, -- Doors for level 70 diff --git a/data-otservbr-global/startup/tables/door_quest.lua b/data-otservbr-global/startup/tables/door_quest.lua index 366a6d052bb..59c667944fa 100644 --- a/data-otservbr-global/startup/tables/door_quest.lua +++ b/data-otservbr-global/startup/tables/door_quest.lua @@ -41,7 +41,7 @@ QuestDoorAction = { itemPos = { { x = 32223, y = 31890, z = 14 } }, }, -- Sams old backpack door - [Storage.SamsOldBackpackDoor] = { + [Storage.Quest.U7_5.SamsOldBackpack.SamsOldBackpackDoor] = { itemId = false, itemPos = { { x = 32455, y = 31967, z = 14 } }, }, @@ -96,48 +96,48 @@ QuestDoorAction = { itemPos = { { x = 33269, y = 32446, z = 12 } }, }, -- Beggar outfit quest door - [Storage.OutfitQuest.BeggarFirstAddonDoor] = { + [Storage.Quest.U7_8.BeggarOutfits.BeggarFirstAddonDoor] = { itemId = false, itemPos = { { x = 33165, y = 31600, z = 15 } }, }, -- The explorer society quest doors -- Mission in Dwacatra - [Storage.ExplorerSociety.DwacatraDoor] = { + [Storage.Quest.U7_6.ExplorerSociety.DwacatraDoor] = { itemId = false, itemPos = { { x = 32598, y = 31933, z = 15 } }, }, -- Mission in Chor - [Storage.ExplorerSociety.ChorurnDoor] = { + [Storage.Quest.U7_6.ExplorerSociety.ChorurnDoor] = { itemId = false, itemPos = { { x = 32957, y = 32835, z = 8 } }, }, -- Mission in Dark Pyramid - [Storage.ExplorerSociety.BonelordsDoor] = { + [Storage.Quest.U7_6.ExplorerSociety.BonelordsDoor] = { itemId = false, itemPos = { { x = 33308, y = 32280, z = 12 } }, }, -- Mission in Orc Fortress - [Storage.ExplorerSociety.OrcDoor] = { + [Storage.Quest.U7_6.ExplorerSociety.OrcDoor] = { itemId = false, itemPos = { { x = 32967, y = 31720, z = 2 } }, }, -- Mission in Hell Gate - [Storage.ExplorerSociety.ElvenDoor] = { + [Storage.Quest.U7_6.ExplorerSociety.ElvenDoor] = { itemId = false, itemPos = { { x = 32703, y = 31605, z = 14 } }, }, -- Mission in Endron - [Storage.ExplorerSociety.MemoryStoneDoor] = { + [Storage.Quest.U7_6.ExplorerSociety.MemoryStoneDoor] = { itemId = false, itemPos = { { x = 33151, y = 31640, z = 11 } }, }, -- Mission in Isle of Kings - [Storage.ExplorerSociety.BansheeDoor] = { + [Storage.Quest.U7_6.ExplorerSociety.BansheeDoor] = { itemId = false, itemPos = { { x = 32259, y = 31948, z = 14 } }, }, -- Astral Bridge from Port Hope to Northport - [Storage.ExplorerSociety.SpectralStoneDoor] = { + [Storage.Quest.U7_6.ExplorerSociety.SpectralStoneDoor] = { itemId = false, itemPos = { { x = 32665, y = 32734, z = 6 }, @@ -145,7 +145,7 @@ QuestDoorAction = { }, }, -- Astral Bridge from Svargrond to Liberty Bay - [Storage.ExplorerSociety.IceMusicDoor] = { + [Storage.Quest.U7_6.ExplorerSociety.IceMusicDoor] = { itemId = false, itemPos = { { x = 32318, y = 31137, z = 6 }, @@ -153,25 +153,25 @@ QuestDoorAction = { }, }, -- Mission in Calassa - [Storage.ExplorerSociety.CalassaDoor] = { + [Storage.Quest.U7_6.ExplorerSociety.CalassaDoor] = { itemId = false, itemPos = { { x = 31939, y = 32771, z = 13 } }, }, -- The war djin quest -- Marid faction - [Storage.DjinnWar.Faction.MaridDoor] = { + [Storage.Quest.U7_4.DjinnWar.Faction.MaridDoor] = { itemId = false, itemPos = { { x = 33106, y = 32532, z = 6 } }, }, - [Storage.DjinnWar.Faction.EfreetDoor] = { + [Storage.Quest.U7_4.DjinnWar.Faction.EfreetDoor] = { itemId = false, itemPos = { { x = 33047, y = 32626, z = 6 } }, }, - [Storage.DjinnWar.MaridFaction.DoorToLamp] = { + [Storage.Quest.U7_4.DjinnWar.MaridFaction.DoorToLamp] = { itemId = false, itemPos = { { x = 33038, y = 32632, z = 1 } }, }, - [Storage.DjinnWar.MaridFaction.DoorToEfreetTerritory] = { + [Storage.Quest.U7_4.DjinnWar.MaridFaction.DoorToEfreetTerritory] = { itemId = false, itemPos = { { x = 33034, y = 32620, z = 6 }, @@ -180,11 +180,11 @@ QuestDoorAction = { }, }, -- Efreet faction - [Storage.DjinnWar.EfreetFaction.DoorToLamp] = { + [Storage.Quest.U7_4.DjinnWar.EfreetFaction.DoorToLamp] = { itemId = false, itemPos = { { x = 33097, y = 32531, z = 1 } }, }, - [Storage.DjinnWar.EfreetFaction.DoorToMaridTerritory] = { + [Storage.Quest.U7_4.DjinnWar.EfreetFaction.DoorToMaridTerritory] = { itemId = false, itemPos = { { x = 33100, y = 32518, z = 7 }, @@ -306,25 +306,25 @@ QuestDoorAction = { itemPos = { { x = 33666, y = 31924, z = 7 } }, }, -- Outfit quest door - [Storage.OutfitQuest.HunterHatAddon] = { + [Storage.Quest.U7_8.HunterOutfits.HunterHatAddon] = { itemId = false, itemPos = { { x = 32369, y = 32796, z = 10 } }, }, - -- Ancient tombs door - [Storage.TheAncientTombs.VashresamunsDoor] = { + -- The Ancient Tombs Quest - door Vashresamuns + [Storage.Quest.U7_4.TheAncientTombs.VashresamunsDoor] = { itemId = false, itemPos = { { x = 33184, y = 32665, z = 15 } }, }, -- The ape city door - [Storage.TheApeCity.ChorDoor] = { + [Storage.Quest.U7_6.TheApeCity.ChorDoor] = { itemId = false, itemPos = { { x = 32934, y = 32886, z = 7 } }, }, - [Storage.TheApeCity.FibulaDoor] = { + [Storage.Quest.U7_6.TheApeCity.FibulaDoor] = { itemId = false, itemPos = { { x = 32182, y = 32468, z = 10 } }, }, - [Storage.TheApeCity.CasksDoor] = { + [Storage.Quest.U7_6.TheApeCity.CasksDoor] = { itemId = false, itemPos = { { x = 32861, y = 32495, z = 9 }, @@ -336,7 +336,7 @@ QuestDoorAction = { { x = 32861, y = 32507, z = 9 }, }, }, - [Storage.TheApeCity.DworcDoor] = { + [Storage.Quest.U7_6.TheApeCity.DworcDoor] = { itemId = false, itemPos = { { x = 32781, y = 32910, z = 8 } }, }, @@ -601,11 +601,11 @@ QuestDoorAction = { itemPos = { { x = 33247, y = 32534, z = 8 } }, }, -- THe shattered isles door - [Storage.TheShatteredIsles.TortoiseEggNargorDoor] = { + [Storage.Quest.U7_8.TheShatteredIsles.TortoiseEggNargorDoor] = { itemId = false, itemPos = { { x = 31934, y = 32838, z = 7 } }, }, - [Storage.TheShatteredIsles.YavernDoor] = { + [Storage.Quest.U7_8.TheShatteredIsles.YavernDoor] = { itemId = false, itemPos = { { x = 31978, y = 32856, z = 3 } }, }, @@ -644,11 +644,11 @@ QuestDoorAction = { itemPos = { { x = 32227, y = 31052, z = 7 } }, }, -- The pits of inferno door - [Storage.PitsOfInferno.ShortcutHubDoor] = { + [Storage.Quest.U7_9.ThePitsOfInferno.ShortcutHubDoor] = { itemId = false, itemPos = { { x = 32786, y = 32328, z = 6 } }, }, - [Storage.PitsOfInferno.ShortcutLeverDoor] = { + [Storage.Quest.U7_9.ThePitsOfInferno.ShortcutLeverDoor] = { itemId = false, itemPos = { { x = 32825, y = 32331, z = 11 }, @@ -743,7 +743,7 @@ QuestDoorAction = { itemId = 6260, itemPos = { { x = 32180, y = 31933, z = 11 } }, }, - [Storage.OutfitQuest.Knight.RamsaysHelmetDoor] = { + [Storage.Quest.U7_8.KnightOutfits.RamsaysHelmetDoor] = { itemId = 5122, itemPos = { { x = 32860, y = 32517, z = 11 } }, }, @@ -914,6 +914,25 @@ QuestDoorAction = { { x = 33782, y = 32576, z = 12 }, }, }, + [Storage.Quest.U7_8.DruidOutfits.DruidAmuletDoor] = { + itemId = false, + itemPos = { + { x = 32939, y = 31775, z = 9 }, + }, + }, + [Storage.Quest.U7_8.OrientalOutfits.OrientalDoor] = { + itemId = false, + itemPos = { + { x = 32084, y = 32776, z = 11 }, + }, + }, + [Storage.Quest.U7_9.NightmareOutfits.KnightwatchTowerDoor] = { + itemId = false, + itemPos = { + { x = 32815, y = 32328, z = 8 }, + { x = 32817, y = 32328, z = 8 }, + }, + }, } QuestDoorUnique = { @@ -944,4 +963,9 @@ QuestDoorUnique = { itemId = 17709, itemPos = { x = 32908, y = 32112, z = 7 }, }, + -- Katana Quest + [22006] = { + itemId = 5107, + itemPos = { x = 32177, y = 32148, z = 11 }, + }, } diff --git a/data-otservbr-global/startup/tables/item.lua b/data-otservbr-global/startup/tables/item.lua index 6aaa5f7235d..3ae486a9b1b 100644 --- a/data-otservbr-global/startup/tables/item.lua +++ b/data-otservbr-global/startup/tables/item.lua @@ -3,11 +3,333 @@ ItemAction = { --Parchment room quest -- data\scripts\quests\parchment_room\movement-parchment.lua + [102] = { -- downFloor + itemId = false, + itemPos = { + { x = 32171, y = 32439, z = 7 }, -- fibula acess + { x = 32172, y = 32439, z = 7 }, -- fibula acess + { x = 32507, y = 32176, z = 13 }, + { x = 32508, y = 32176, z = 13 }, + { x = 32353, y = 32131, z = 8 }, -- scale armor quest + { x = 32354, y = 32131, z = 8 }, -- scale armor quest + }, + }, [104] = { itemId = 2819, itemPos = { { x = 33063, y = 31624, z = 15 } }, }, - [40001] = { -- The cursed crystal skeletons + -- The Pits of Inferno Quest + [2023] = { + itemId = 1982, + itemPos = { + { x = 32791, y = 32333, z = 6 }, + }, + }, + -- The Explorer Society - Jump - Calassa + [2070] = { + itemId = 470, + itemPos = { + { x = 31914, y = 32716, z = 6 }, + { x = 31915, y = 32716, z = 6 }, + }, + }, + -- Dreamers Challenge Quest + [2245] = { + itemId = 431, + itemPos = { + { x = 32816, y = 32334, z = 9 }, + { x = 32816, y = 32335, z = 9 }, + { x = 32816, y = 32336, z = 9 }, + { x = 32816, y = 32337, z = 9 }, + { x = 32816, y = 32339, z = 9 }, + }, + }, + [2246] = { + itemId = 431, + itemPos = { + { x = 32818, y = 32332, z = 9 }, + { x = 32819, y = 32332, z = 9 }, + { x = 32820, y = 32332, z = 9 }, + { x = 32821, y = 32332, z = 9 }, + { x = 32822, y = 32332, z = 9 }, + }, + }, + -- The Pits of Inferno Quest + [4002] = { + itemId = 353, + itemPos = { + { x = 32854, y = 32326, z = 11 }, + }, + }, + -- Griffinclaw flower + [3152] = { + itemId = 5658, + itemPos = { x = 32024, y = 32830, z = 4 }, + }, + -- The Pits of Inferno Quest + [8815] = { + itemId = false, + itemPos = { + { x = 32805, y = 32319, z = 11 }, + { x = 32806, y = 32319, z = 11 }, + { x = 32806, y = 32318, z = 11 }, + { x = 32805, y = 32318, z = 11 }, + }, + }, + -- Dreamers Challenge Quest + [9049] = { + itemId = 2576, + itemPos = { + { x = 32934, y = 32282, z = 13 }, + { x = 32934, y = 32281, z = 13 }, + { x = 32933, y = 32281, z = 13 }, + { x = 32934, y = 32280, z = 13 }, + { x = 32933, y = 32280, z = 13 }, + { x = 32934, y = 32279, z = 13 }, + { x = 32933, y = 32279, z = 13 }, + { x = 32934, y = 32278, z = 13 }, + { x = 32933, y = 32278, z = 13 }, + { x = 32934, y = 32277, z = 13 }, + { x = 32933, y = 32277, z = 13 }, + { x = 32934, y = 32277, z = 13 }, + { x = 32934, y = 32276, z = 13 }, + { x = 32933, y = 32276, z = 13 }, + { x = 32934, y = 32275, z = 13 }, + { x = 32933, y = 32275, z = 13 }, + { x = 32934, y = 32274, z = 13 }, + { x = 32933, y = 32274, z = 13 }, + { x = 32934, y = 32273, z = 13 }, + { x = 32933, y = 32273, z = 13 }, + { x = 32934, y = 32272, z = 13 }, + { x = 32933, y = 32272, z = 13 }, + { x = 32934, y = 32271, z = 13 }, + { x = 32933, y = 32271, z = 13 }, + { x = 32934, y = 32270, z = 13 }, + { x = 32933, y = 32270, z = 13 }, + }, + }, + -- The Djinn War Quest - Green - Water fountain + [12105] = { + itemId = 1928, + itemPos = { + { x = 33109, y = 32530, z = 3 }, + }, + }, + -- The Ancient Tombs Quest + [12105] = { + itemId = false, + itemPos = { + { x = 33188, y = 32660, z = 15 }, + { x = 33189, y = 32660, z = 15 }, + { x = 33190, y = 32660, z = 15 }, + { x = 33191, y = 32660, z = 15 }, + { x = 33188, y = 32669, z = 15 }, + { x = 33189, y = 32669, z = 15 }, + { x = 33190, y = 32669, z = 15 }, + { x = 33191, y = 32669, z = 15 }, + }, + }, + [12107] = { + itemId = 2772, + itemPos = { + { x = 33118, y = 32761, z = 14 }, + { x = 33118, y = 32762, z = 14 }, + { x = 33118, y = 32763, z = 14 }, + }, + }, + [12107] = { + itemId = 1662, + itemPos = { + { x = 33122, y = 32765, z = 14 }, + }, + }, + -- The Shattered Isles Quest + [12585] = { + itemId = 1949, + itemPos = { + { x = 31919, y = 32600, z = 10 }, + }, + }, + -- The Pits of Inferno Quest + [16772] = { + itemId = 353, + itemPos = { + { x = 32767, y = 32358, z = 15 }, + }, + }, + [16774] = { + itemId = 2576, + itemPos = { + { x = 32741, y = 32382, z = 15 }, + }, + }, + -- Hunter Outfits Quest - piano + [33216] = { + itemId = 6123, + itemPos = { + { x = 32406, y = 32794, z = 9 }, + }, + }, + -- The Pits of Inferno Quest + [28810] = { + itemId = 353, + itemPos = { + { x = 32858, y = 32285, z = 9 }, + }, + }, + [28811] = { + itemId = 353, + itemPos = { + { x = 32836, y = 32289, z = 9 }, + }, + }, + [28812] = { + itemId = 353, + itemPos = { + { x = 32851, y = 32290, z = 9 }, + }, + }, + [28813] = { + itemId = 354, + itemPos = { + { x = 32839, y = 32292, z = 9 }, + }, + }, + [28814] = { + itemId = 353, + itemPos = { + { x = 32857, y = 32292, z = 9 }, + }, + }, + [28815] = { + itemId = 351, + itemPos = { + { x = 32844, y = 32294, z = 9 }, + }, + }, + [28816] = { + itemId = 353, + itemPos = { + { x = 32852, y = 32297, z = 9 }, + }, + }, + [28817] = { + itemId = 353, + itemPos = { + { x = 32832, y = 32299, z = 9 }, + }, + }, + [28818] = { + itemId = 353, + itemPos = { + { x = 32862, y = 32300, z = 9 }, + }, + }, + [28819] = { + itemId = 353, + itemPos = { + { x = 32855, y = 32301, z = 9 }, + }, + }, + [28820] = { + itemId = 353, + itemPos = { + { x = 32843, y = 32303, z = 9 }, + }, + }, + [28821] = { + itemId = 353, + itemPos = { + { x = 32834, y = 32307, z = 9 }, + }, + }, + [28822] = { + itemId = 353, + itemPos = { + { x = 32834, y = 32310, z = 9 }, + }, + }, + [28823] = { + itemId = 353, + itemPos = { + { x = 32862, y = 32311, z = 9 }, + }, + }, + [28824] = { + itemId = 353, + itemPos = { + { x = 32839, y = 32312, z = 9 }, + }, + }, + [28825] = { + itemId = 353, + itemPos = { + { x = 32862, y = 32313, z = 9 }, + }, + }, + [28826] = { + itemId = 353, + itemPos = { + { x = 32837, y = 32315, z = 9 }, + }, + }, + [28827] = { + itemId = 353, + itemPos = { + { x = 32843, y = 32319, z = 9 }, + }, + }, + [28828] = { + itemId = 353, + itemPos = { + { x = 32850, y = 32319, z = 9 }, + }, + }, + [28829] = { + itemId = 353, + itemPos = { + { x = 32858, y = 32324, z = 9 }, + }, + }, + [28830] = { + itemId = 353, + itemPos = { + { x = 32848, y = 32325, z = 9 }, + }, + }, + [28831] = { + itemId = 353, + itemPos = { + { x = 32858, y = 32289, z = 9 }, + }, + }, + [28832] = { + itemId = 353, + itemPos = { + { x = 32854, y = 32307, z = 9 }, + }, + }, + [28833] = { + itemId = 353, + itemPos = { + { x = 32830, y = 32308, z = 9 }, + }, + }, + [28834] = { + itemId = 353, + itemPos = { + { x = 32858, y = 32321, z = 9 }, + }, + }, + -- The Pits of Inferno + [39511] = { + itemId = 6433, + itemPos = { + { x = 32739, y = 32392, z = 14 }, + }, + }, + -- The cursed crystal skeletons + [40001] = { itemId = 27490, itemPos = { { x = 31974, y = 32907, z = 8 }, @@ -273,16 +595,375 @@ ItemAction = { { x = 33155, y = 31297, z = 3 }, }, }, + -- naginata quest + [40031] = { -- stone + itemId = 1791, + itemPos = { + { x = 32356, y = 32074, z = 10 }, + }, + }, + -- The Ancient Tombs Quest + [40032] = { + itemId = 2023, + itemPos = { + { x = 33071, y = 32637, z = 15 }, + }, + }, + [40033] = { + itemId = 2023, + itemPos = { + { x = 33074, y = 32633, z = 15 }, + }, + }, + [40034] = { + itemId = 2023, + itemPos = { + { x = 33071, y = 32629, z = 15 }, + }, + }, + [40035] = { + itemId = 2023, + itemPos = { + { x = 33077, y = 32625, z = 15 }, + }, + }, + [40036] = { + itemId = 2023, + itemPos = { + { x = 33077, y = 32621, z = 15 }, + }, + }, + [40037] = { + itemId = 2023, + itemPos = { + { x = 33071, y = 32617, z = 15 }, + }, + }, + [40038] = { + itemId = 2023, + itemPos = { + { x = 33077, y = 32613, z = 15 }, + }, + }, + [40039] = { + itemId = 2023, + itemPos = { + { x = 33071, y = 32609, z = 15 }, + }, + }, + [40040] = { + itemId = 2344, + itemPos = { + { x = 33198, y = 32876, z = 11 }, + }, + }, + -- The Ape City Quest - Casks + [40041] = { + itemId = 4848, + itemPos = { + { x = 32862, y = 32507, z = 9 }, + { x = 32862, y = 32505, z = 9 }, + { x = 32862, y = 32503, z = 9 }, + { x = 32862, y = 32501, z = 9 }, + { x = 32862, y = 32499, z = 9 }, + { x = 32862, y = 32497, z = 9 }, + { x = 32862, y = 32495, z = 9 }, + }, + }, + -- The Pits of Inferno + [50082] = { + itemId = 2576, + itemPos = { + { x = 32745, y = 32383, z = 15 }, + }, + }, + [50083] = { + itemId = 2576, + itemPos = { + { x = 32745, y = 32392, z = 15 }, + }, + }, + [50087] = { + itemId = 1949, + itemPos = { + { x = 32732, y = 32264, z = 15 }, + }, + }, + -- Dreamers Challenge Quest + [50149] = { + itemId = 1949, + itemPos = { + { x = 32840, y = 32226, z = 14 }, + }, + }, + [50150] = { + itemId = 1949, + itemPos = { + { x = 32788, y = 32227, z = 14 }, + }, + }, } ItemUnique = { + -- The Pits of Inferno Quest + [2000] = { + itemId = 599, + itemPos = { x = 32791, y = 32328, z = 10 }, + }, + [2002] = { + itemId = 431, + itemPos = { x = 32906, y = 32287, z = 12 }, + }, + [2001] = { + itemId = 599, + itemPos = { x = 32791, y = 32330, z = 10 }, + }, + [2080] = { + itemId = 5915, + itemPos = { x = 32909, y = 32207, z = 15 }, + }, + [2081] = { + itemId = 5916, + itemPos = { x = 32757, y = 32243, z = 15 }, + }, + [2082] = { + itemId = 5915, + itemPos = { x = 32840, y = 32324, z = 15 }, + }, + [2083] = { + itemId = 5915, + itemPos = { x = 32875, y = 32264, z = 15 }, + }, + [2084] = { + itemId = 5915, + itemPos = { x = 32717, y = 32381, z = 13 }, + }, + [2085] = { + itemId = 5915, + itemPos = { x = 32839, y = 32305, z = 15 }, + }, + [2086] = { + itemId = 5915, + itemPos = { x = 32785, y = 32275, z = 15 }, + }, + [2090] = { + itemId = 1482, + itemPos = { x = 32824, y = 32230, z = 12 }, + }, + [2091] = { + itemId = 1482, + itemPos = { x = 32824, y = 32229, z = 12 }, + }, + [2092] = { + itemId = 1482, + itemPos = { x = 32824, y = 32228, z = 12 }, + }, + [2093] = { + itemId = 1482, + itemPos = { x = 32824, y = 32227, z = 12 }, + }, + [2094] = { + itemId = 1482, + itemPos = { x = 32824, y = 32226, z = 12 }, + }, + [2095] = { + itemId = 1482, + itemPos = { x = 32824, y = 32225, z = 12 }, + }, + [2096] = { + itemId = 1482, + itemPos = { x = 32824, y = 32224, z = 12 }, + }, + -- Dreamers Challenge Quest + [2241] = { + itemId = 353, + itemPos = { x = 32861, y = 32239, z = 9 }, + }, + [2242] = { + itemId = 351, + itemPos = { x = 32861, y = 32236, z = 9 }, + }, + [2243] = { + itemId = 3134, + itemPos = { x = 32849, y = 32233, z = 9 }, + }, + [2244] = { + itemId = 563, + itemPos = { x = 32857, y = 32225, z = 11 }, + }, + [2250] = { + itemId = 5572, + itemPos = { x = 32915, y = 32278, z = 14 }, + }, + [2251] = { + itemId = 5590, + itemPos = { x = 32916, y = 32263, z = 14 }, + }, + [2252] = { + itemId = 5484, + itemPos = { x = 32953, y = 32277, z = 13 }, + }, + [2253] = { + itemId = 452, + itemPos = { x = 32976, y = 32271, z = 14 }, + }, + [2254] = { + itemId = 2576, + itemPos = { x = 32933, y = 32269, z = 13 }, + }, + [2255] = { + itemId = 2576, + itemPos = { x = 32934, y = 32269, z = 13 }, + }, + -- The Shattered Isles Quest - Catapult + [2273] = { + itemId = 5601, + itemPos = { x = 31978, y = 32887, z = 6 }, + }, + -- The Explorer Society - The Rune Writings + [3010] = { + itemId = 2199, + itemPos = { x = 32754, y = 32559, z = 9 }, + }, + -- Dreamers Challenge Quest + [3048] = { + itemId = 1949, + itemPos = { x = 32822, y = 32344, z = 6 }, + }, + [3049] = { + itemId = 1949, + itemPos = { x = 32815, y = 32344, z = 6 }, + }, + [3050] = { + itemId = 1949, + itemPos = { x = 32818, y = 32347, z = 6 }, + }, + [3051] = { + itemId = 1949, + itemPos = { x = 32818, y = 32347, z = 5 }, + }, + [3052] = { + itemId = 1949, + itemPos = { x = 32815, y = 32344, z = 5 }, + }, + [3053] = { + itemId = 1949, + itemPos = { x = 32822, y = 32344, z = 5 }, + }, + [3054] = { + itemId = 1949, + itemPos = { x = 32815, y = 32344, z = 4 }, + }, + [3055] = { + itemId = 1949, + itemPos = { x = 32822, y = 32344, z = 4 }, + }, + [3056] = { + itemId = 1949, + itemPos = { x = 32819, y = 32347, z = 4 }, + }, + -- The Pits of Inferno Quest + [3303] = { + itemId = 431, + itemPos = { x = 32826, y = 32273, z = 11 }, + }, + -- The Ancient Tombs Quest + [3950] = { + itemId = 1949, + itemPos = { x = 33174, y = 32694, z = 14 }, + }, + [3951] = { + itemId = 1949, + itemPos = { x = 33396, y = 32852, z = 14 }, + }, + [3952] = { + itemId = 1949, + itemPos = { x = 33191, y = 32959, z = 15 }, + }, + [3953] = { + itemId = 1949, + itemPos = { x = 33195, y = 33002, z = 14 }, + }, + [3954] = { + itemId = 1949, + itemPos = { x = 33073, y = 32781, z = 14 }, + }, + [3955] = { + itemId = 1949, + itemPos = { x = 33103, y = 32590, z = 15 }, + }, + [3956] = { + itemId = 1949, + itemPos = { x = 33116, y = 32656, z = 15 }, + }, + -- The Ape City - HolyApeHair + [4010] = { + itemId = 2753, + itemPos = { x = 32933, y = 32495, z = 7 }, + }, + -- Dreamers Challenge Quest + [9030] = { + itemId = 1949, + itemPos = { x = 32762, y = 32290, z = 14 }, + }, + -- The Ape City - HolyApeHair + [9033] = { + itemId = 2114, + itemPos = { x = 33098, y = 32816, z = 13 }, + }, + [9034] = { + itemId = 2114, + itemPos = { x = 33293, y = 32741, z = 13 }, + }, + [9035] = { + itemId = 2114, + itemPos = { x = 33073, y = 32589, z = 13 }, + }, + [9036] = { + itemId = 2114, + itemPos = { x = 33240, y = 32855, z = 13 }, + }, + [9037] = { + itemId = 2114, + itemPos = { x = 33276, y = 32552, z = 14 }, + }, + [9038] = { + itemId = 2114, + itemPos = { x = 33233, y = 32692, z = 13 }, + }, + [9039] = { + itemId = 2114, + itemPos = { x = 33135, y = 32682, z = 12 }, + }, + [9040] = { + itemId = 2114, + itemPos = { x = 33161, y = 32831, z = 10 }, + }, + -- Dreamers Challenge Quest + [9234] = { + itemId = 1949, + itemPos = { x = 32857, y = 32230, z = 11 }, + }, + -- Hydra Egg Quest + [9255] = { + itemId = 5676, + itemPos = { x = 32954, y = 32695, z = 8 }, + }, + -- The Ape City Quest + [9256] = { + itemId = 3919, + itemPos = { x = 32181, y = 32468, z = 10 }, + }, + [9257] = { + itemId = 1949, + itemPos = { x = 32839, y = 32533, z = 9 }, + }, -- Issavi town teleport [9515] = { itemId = 1949, itemPos = { x = 33926, y = 31477, z = 5 }, }, -- The shattered isles - -- data\scripts\actions\quests\the_shattered_isles\nargor_maps.lua [40001] = { itemId = 6118, itemPos = { x = 31978, y = 32828, z = 2 }, @@ -430,20 +1111,17 @@ ItemUnique = { itemPos = { x = 33874, y = 31433, z = 9 }, }, -- Explorer Society Quest - -- Path: data\scripts\actions\quests\explorer_society\findings.lua -- Lizard Urn (Chor) [40041] = { itemId = 2904, itemPos = { x = 32957, y = 32834, z = 8 }, }, -- Frozen Dragon (Okolnir) - -- Path: data\scripts\actions\quests\explorer_society\dragon.lua [40042] = { itemId = 7295, itemPos = { x = 32321, y = 31455, z = 9 }, }, -- Icicles for Ice Music (Camp / Hrodmir) - -- Path: data\scripts\actions\quests\explorer_society\resonance.lua [40043] = { itemId = 6966, itemPos = { x = 32078, y = 31217, z = 7 }, @@ -648,4 +1326,117 @@ ItemUnique = { itemId = 4077, itemPos = { x = 31978, y = 32184, z = 10 }, }, + -- The Ancient Tombs Quest + [40083] = { + itemId = 1949, + itemPos = { x = 33073, y = 32603, z = 15 }, + }, + [40084] = { + itemId = 1949, + itemPos = { x = 33183, y = 32757, z = 15 }, + }, + [40085] = { + itemId = 1949, + itemPos = { x = 33238, y = 32644, z = 14 }, + }, + [40086] = { + itemId = 1949, + itemPos = { x = 33109, y = 33009, z = 14 }, + }, + [40087] = { + itemId = 1949, + itemPos = { x = 33206, y = 32982, z = 14 }, + }, + [40088] = { + itemId = 1949, + itemPos = { x = 33130, y = 32736, z = 14 }, + }, + [40089] = { + itemId = 1949, + itemPos = { x = 33120, y = 32811, z = 15 }, + }, + [40090] = { + itemId = 1949, + itemPos = { x = 33117, y = 32627, z = 15 }, + }, + [40091] = { + itemId = 1949, + itemPos = { x = 33178, y = 32664, z = 15 }, + }, + -- The Ape City Quest - The Large Amphoras + [40092] = { + itemId = 4995, + itemPos = { x = 32792, y = 32527, z = 10 }, + }, + [40093] = { + itemId = 4995, + itemPos = { x = 32823, y = 32525, z = 10 }, + }, + [40094] = { + itemId = 4995, + itemPos = { x = 32876, y = 32584, z = 10 }, + }, + [40095] = { + itemId = 4995, + itemPos = { x = 32744, y = 32586, z = 10 }, + }, + -- Druid Outfits Quest - Ceirons Waterskin + [40096] = { + itemId = 5662, + itemPos = { x = 33024, y = 32672, z = 6 }, + }, + -- The Ancient Tombs Quest + [50135] = { + itemId = 1949, + itemPos = { x = 33393, y = 32802, z = 14 }, + }, + [50136] = { + itemId = 419, + itemPos = { x = 33362, y = 32811, z = 14 }, + }, + [50137] = { + itemId = 1949, + itemPos = { x = 33083, y = 32569, z = 13 }, + }, + [50138] = { + itemId = 1949, + itemPos = { x = 33179, y = 32890, z = 11 }, + }, + [50139] = { + itemId = 1959, + itemPos = { x = 33252, y = 32703, z = 15 }, + }, + [50140] = { + itemId = 1959, + itemPos = { x = 33270, y = 32667, z = 15 }, + }, + [50141] = { + itemId = 1959, + itemPos = { x = 33245, y = 32686, z = 15 }, + }, + [50142] = { + itemId = 1959, + itemPos = { x = 33275, y = 32685, z = 14 }, + }, + [50143] = { + itemId = 1959, + itemPos = { x = 33279, y = 32682, z = 14 }, + }, + [50144] = { + itemId = 1959, + itemPos = { x = 33263, y = 32681, z = 14 }, + }, + [50145] = { + itemId = 1959, + itemPos = { x = 33269, y = 32698, z = 14 }, + }, + [50146] = { + itemId = 1949, + itemPos = { x = 33263, y = 32668, z = 13 }, + }, + -- Dreamers Challenge Quest + [50147] = { + itemId = 1949, + itemPos = { x = 32826, y = 32347, z = 9 }, + }, } diff --git a/data-otservbr-global/startup/tables/lever.lua b/data-otservbr-global/startup/tables/lever.lua index ad4a6edc940..1c8f95fe246 100644 --- a/data-otservbr-global/startup/tables/lever.lua +++ b/data-otservbr-global/startup/tables/lever.lua @@ -1,6 +1,81 @@ -- Look README.md for see the reserved action/unique numbers LeverAction = { + -- The Pits of Inferno Quest + [4001] = { + itemId = 431, + itemPos = { + { x = 32848, y = 32277, z = 9 }, + }, + }, + [7799] = { + itemId = 431, + itemPos = { + { x = 32842, y = 32274, z = 9 }, + { x = 32842, y = 32275, z = 9 }, + { x = 32842, y = 32276, z = 9 }, + }, + }, + -- Dreamer's Challenge Quest + [8033] = { + itemId = 2772, + itemPos = { + { x = 32836, y = 32278, z = 14 }, + }, + }, + -- The Ancient Tombs Quest + [12121] = { + itemId = 2772, + itemPos = { + { x = 33358, y = 32701, z = 14 }, + { x = 33349, y = 32680, z = 14 }, + { x = 33305, y = 32734, z = 14 }, + { x = 33357, y = 32749, z = 14 }, + { x = 33368, y = 32763, z = 14 }, + { x = 33382, y = 32786, z = 14 }, + { x = 33338, y = 32702, z = 14 }, + { x = 33320, y = 32682, z = 14 }, + }, + }, + [12122] = { + itemId = 2772, + itemPos = { + { x = 33027, y = 32530, z = 13 }, + { x = 33006, y = 32563, z = 13 }, + { x = 33123, y = 32599, z = 13 }, + { x = 33028, y = 32588, z = 13 }, + { x = 33147, y = 32524, z = 13 }, + { x = 33104, y = 32514, z = 13 }, + { x = 33055, y = 32487, z = 13 }, + { x = 33036, y = 32507, z = 13 }, + { x = 33089, y = 32514, z = 13 }, + { x = 33077, y = 32507, z = 13 }, + { x = 33130, y = 32489, z = 13 }, + }, + }, + [12123] = { + itemId = 2772, + itemPos = { + { x = 33183, y = 32884, z = 11 }, + { x = 33181, y = 32889, z = 11 }, + { x = 33175, y = 32884, z = 11 }, + { x = 33176, y = 32880, z = 11 }, + { x = 33182, y = 32880, z = 11 }, + { x = 33176, y = 32889, z = 11 }, + }, + }, + -- The Ape City Quest - levers + [12129] = { + itemId = 2772, + itemPos = { + { x = 32891, y = 32590, z = 11 }, + { x = 32843, y = 32649, z = 11 }, + { x = 32808, y = 32613, z = 11 }, + { x = 32775, y = 32583, z = 11 }, + { x = 32756, y = 32494, z = 11 }, + { x = 32799, y = 32556, z = 11 }, + }, + }, -- Dawnport bridge lever -- Path: data\scripts\actions\dawnport\lever.lua [30001] = { @@ -51,9 +126,186 @@ LeverAction = { { x = 32601, y = 31421, z = 9 }, }, }, + [30006] = { -- bear room quest stone + itemId = false, + itemPos = { + { x = 32148, y = 32105, z = 11 }, + }, + }, + [30007] = { -- life ring bridge lever + itemId = false, + itemPos = { + { x = 32414, y = 32252, z = 10 }, + { x = 32413, y = 32230, z = 10 }, + }, + }, + [30008] = { -- devil helmet lever + itemId = false, + itemPos = { + { x = 32600, y = 32105, z = 14 }, + }, + }, + -- The Pits of Inferno Quest + [50160] = { + itemId = 2772, + itemPos = { + { x = 32853, y = 32318, z = 9 }, + }, + }, } LeverUnique = { + -- The Pits of Inferno + [1037] = { + itemId = 2772, + itemPos = { x = 32800, y = 32339, z = 11 }, + }, + -- The Ape City Quest - levers + [1040] = { + itemId = 2772, + itemPos = { x = 32862, y = 32557, z = 11 }, + }, + [1041] = { + itemId = 2772, + itemPos = { x = 32862, y = 32555, z = 11 }, + }, + -- Dreamers Challenge Quest + [2004] = { + itemId = 2772, + itemPos = { x = 32873, y = 32263, z = 14 }, + }, + -- The Pits of Inferno Quest + [2025] = { + itemId = 2772, + itemPos = { x = 32820, y = 32321, z = 10 }, + }, + [2026] = { + itemId = 2772, + itemPos = { x = 32820, y = 32345, z = 10 }, + }, + [2027] = { + itemId = 2772, + itemPos = { x = 32847, y = 32339, z = 10 }, + }, + [2028] = { + itemId = 2772, + itemPos = { x = 32847, y = 32327, z = 10 }, + }, + [2050] = { + itemId = 2772, + itemPos = { x = 32874, y = 32334, z = 12 }, + }, + [2051] = { + itemId = 2772, + itemPos = { x = 32891, y = 32328, z = 14 }, + }, + [2052] = { + itemId = 2772, + itemPos = { x = 32843, y = 32352, z = 14 }, + }, + [2053] = { + itemId = 2772, + itemPos = { x = 32889, y = 32349, z = 15 }, + }, + [2054] = { + itemId = 2772, + itemPos = { x = 32887, y = 32330, z = 12 }, + }, + [2055] = { + itemId = 2772, + itemPos = { x = 32846, y = 32318, z = 12 }, + }, + [2056] = { + itemId = 2772, + itemPos = { x = 32887, y = 32355, z = 13 }, + }, + [2057] = { + itemId = 2772, + itemPos = { x = 32853, y = 32359, z = 14 }, + }, + [2058] = { + itemId = 2772, + itemPos = { x = 32843, y = 32359, z = 12 }, + }, + [2059] = { + itemId = 2772, + itemPos = { x = 32847, y = 32332, z = 13 }, + }, + [2060] = { + itemId = 2772, + itemPos = { x = 32886, y = 32337, z = 13 }, + }, + [2061] = { + itemId = 2772, + itemPos = { x = 32874, y = 32365, z = 13 }, + }, + [2062] = { + itemId = 2772, + itemPos = { x = 32850, y = 32366, z = 13 }, + }, + [2063] = { + itemId = 2772, + itemPos = { x = 32859, y = 32364, z = 13 }, + }, + [2064] = { + itemId = 2772, + itemPos = { x = 32874, y = 32354, z = 14 }, + }, + [2065] = { + itemId = 2772, + itemPos = { x = 32848, y = 32335, z = 12 }, + }, + -- Dreamers Challenge Quest + [2246] = { + itemId = 2772, + itemPos = { x = 32763, y = 32291, z = 14 }, + }, + [2247] = { + itemId = 2772, + itemPos = { x = 32761, y = 32291, z = 14 }, + }, + [2248] = { + itemId = 2772, + itemPos = { x = 32763, y = 32289, z = 14 }, + }, + [2249] = { + itemId = 2772, + itemPos = { x = 32761, y = 32289, z = 14 }, + }, + [2272] = { + itemId = 2772, + itemPos = { x = 32838, y = 32263, z = 14 }, + }, + -- Dreamers Challenge Quest + [3041] = { + itemId = 2772, + itemPos = { x = 32837, y = 32221, z = 14 }, + }, + [3042] = { + itemId = 2772, + itemPos = { x = 32836, y = 32229, z = 14 }, + }, + [3043] = { + itemId = 2772, + itemPos = { x = 32833, y = 32224, z = 14 }, + }, + -- The Pits of Inferno Quest + [3300] = { + itemId = 2772, + itemPos = { x = 32850, y = 32268, z = 10 }, + }, + [3301] = { + itemId = 2772, + itemPos = { x = 32862, y = 32312, z = 11 }, + }, + [3302] = { + itemId = 2772, + itemPos = { x = 32851, y = 32308, z = 11 }, + }, + [3304] = { + itemId = 2772, + itemPos = { x = 32826, y = 32263, z = 11 }, + }, -- Dark trails quest (The Ravager lever) -- Path: data\scripts\actions\quests\dark_trails\lever_the_ravager.lua [30001] = { @@ -190,6 +442,31 @@ LeverUnique = { itemId = 2772, itemPos = { x = 32478, y = 31904, z = 3 }, }, + -- The Pits of Inferno Quest + [50095] = { + itemId = 2772, + itemPos = { x = 32815, y = 32333, z = 15 }, + }, + [50097] = { + itemId = 2772, + itemPos = { x = 32811, y = 32357, z = 15 }, + }, + [50098] = { + itemId = 2772, + itemPos = { x = 32803, y = 32353, z = 15 }, + }, + [50104] = { + itemId = 2772, + itemPos = { x = 32821, y = 32341, z = 13 }, + }, + [50105] = { + itemId = 2772, + itemPos = { x = 32821, y = 32346, z = 13 }, + }, + [50106] = { + itemId = 2772, + itemPos = { x = 32915, y = 32215, z = 15 }, + }, [Storage.ThaisExhibition.FriendshipAmulet] = { itemId = 2772, itemPos = { x = 32399, y = 32209, z = 9 }, @@ -298,4 +575,39 @@ LeverUnique = { itemId = 2772, itemPos = { x = 32440, y = 32191, z = 10 }, }, + -- Path: data\scripts\rookgaard\katana_quest\katana_quest_lever.lua + [30029] = { + itemId = 2772, + itemPos = { x = 32182, y = 32145, z = 11 }, + }, + -- Path: data-otservbr-global\scripts\actions\quests\desert_dungeon_quest\desert_dungeon_lever.lua + [30030] = { + itemId = 2772, + itemPos = { x = 32673, y = 32086, z = 8 }, + }, + -- Path: data-otservbr-global/scripts/actions/quests/the_outlaw_camp/oven.lua + [30031] = { + itemId = 2772, + itemPos = { x = 32614, y = 32173, z = 9 }, + }, + -- Path: data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_switch.lua + [30032] = { + itemId = 2772, + itemPos = { x = 32594, y = 32212, z = 9 }, + }, + -- Path: data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_burn.lua + [30033] = { + itemId = 2772, + itemPos = { x = 32616, y = 32222, z = 10 }, + }, + -- Path: data-otservbr-global/scripts/actions/quests/others/triangle_tower_lever.lua + [30034] = { + itemId = 2772, + itemPos = { x = 32573, y = 32121, z = 7 }, + }, + -- Path: data\scripts\quests\draconia\action-lever.lua + [30035] = { + itemId = 2772, + itemPos = { x = 32792, y = 31579, z = 7 }, + }, } diff --git a/data-otservbr-global/startup/tables/teleport.lua b/data-otservbr-global/startup/tables/teleport.lua index b82d39b585e..51a6bf3a85e 100644 --- a/data-otservbr-global/startup/tables/teleport.lua +++ b/data-otservbr-global/startup/tables/teleport.lua @@ -157,10 +157,10 @@ TeleportUnique = { -- Quests teleports -- Deeper fibula quest teleport -- Entrance - [38001] = { + [38001] = { -- "left portal" to go back itemId = 1949, itemPos = { x = 32208, y = 32433, z = 10 }, - destination = { x = 32281, y = 32389, z = 10 }, + destination = { x = 32167, y = 32438, z = 9 }, effect = CONST_ME_TELEPORT, }, -- Exit diff --git a/data-otservbr-global/startup/tables/tile.lua b/data-otservbr-global/startup/tables/tile.lua index 6e5cb605c24..546bc66ef65 100644 --- a/data-otservbr-global/startup/tables/tile.lua +++ b/data-otservbr-global/startup/tables/tile.lua @@ -1,6 +1,13 @@ -- Look README.md for see the reserved action/unique numbers TileAction = { + -- The Ape City Quest + [12124] = { + itemId = 419, + itemPos = { + { x = 33305, y = 32861, z = 13 }, + }, + }, -- Cure poison tiles at dawnport outpost entrances -- Tiles data\scripts\movements\others\dawnport_tiles.lua [20001] = { @@ -1099,8 +1106,8 @@ TileUnique = { }, -- The paradox tower quest [25011] = { - itemId = 354, - itemPos = { x = 32497, y = 31889, z = 7 }, + itemId = 353, + itemPos = { x = 32497, y = 31888, z = 7 }, }, [25012] = { itemId = 10145, @@ -1154,19 +1161,19 @@ TileUnique = { -- Path: data\scripts\actions\quests\the_rookie_guard\mission05_web_terror.lua -- Spider lair entrance hole [25022] = { - itemId = 12728, + itemId = 385, itemPos = { x = 32051, y = 32110, z = 7 }, }, -- Spider queen chamber hole [25023] = { - itemId = 12728, + itemId = 385, itemPos = { x = 32018, y = 32098, z = 11 }, }, -- The Rookie Guard Quest - Mission 06: Run Like a Wolf -- Path: data\scripts\actions\quests\the_rookie_guard\mission06_run_like_wolf.lua -- War wolf den entrance hole [25024] = { - itemId = 12728, + itemId = 385, itemPos = { x = 32138, y = 32132, z = 7 }, }, -- War wolf den fall tile @@ -1188,9 +1195,39 @@ TileUnique = { -- Path: data\scripts\actions\quests\the_rookie_guard\mission09_rock_troll.lua -- Troll caves dug tunnel hole [25028] = { - itemId = 12728, + itemId = 385, itemPos = { x = 32059, y = 32135, z = 9 }, }, + -- Mintwallin Quest (Devil Helmet Quest) + [25030] = { + itemId = 431, + itemPos = { x = 32468, y = 32119, z = 14 }, + }, + -- The Paradox Tower Quest + [25031] = { + itemId = 599, + itemPos = { x = 32477, y = 31905, z = 7 }, + }, + [25032] = { + itemId = 599, + itemPos = { x = 32476, y = 31906, z = 7 }, + }, + [25034] = { + itemId = 599, + itemPos = { x = 32486, y = 31927, z = 7 }, + }, + [25035] = { + itemId = 599, + itemPos = { x = 32487, y = 31927, z = 7 }, + }, + [25036] = { + itemId = 599, + itemPos = { x = 32486, y = 31928, z = 7 }, + }, + [25037] = { + itemId = 599, + itemPos = { x = 32487, y = 31928, z = 7 }, + }, -- Remove/create item on stepIn -- Reserved uniques range from 29001/30000 diff --git a/data-otservbr-global/startup/tables/tile_pick.lua b/data-otservbr-global/startup/tables/tile_pick.lua index f5eceea7e9a..f208306ed30 100644 --- a/data-otservbr-global/startup/tables/tile_pick.lua +++ b/data-otservbr-global/startup/tables/tile_pick.lua @@ -14,6 +14,15 @@ TilePickAction = { { x = 32204, y = 31887, z = 14 }, { x = 32165, y = 31890, z = 14 }, { x = 32162, y = 31921, z = 13 }, + { x = 32149, y = 32110, z = 11 }, + { x = 32302, y = 32257, z = 8 }, -- Battle Axe Quest + { x = 32437, y = 32239, z = 10 }, -- Life Ring Quest + { x = 32775, y = 32012, z = 10 }, + { x = 32595, y = 32068, z = 9 }, + { x = 32580, y = 32103, z = 11 }, + { x = 32517, y = 32107, z = 14 }, + -- The Explorer Society + { x = 32295, y = 31441, z = 8 }, }, }, } diff --git a/data-otservbr-global/startup/tables/writeable.lua b/data-otservbr-global/startup/tables/writeable.lua index 5c555f51c82..9b903cd1133 100644 --- a/data-otservbr-global/startup/tables/writeable.lua +++ b/data-otservbr-global/startup/tables/writeable.lua @@ -860,4 +860,60 @@ Not mine! itemPos = { x = 32205, y = 32883, z = 7 }, text = "DANGER. Quara sighted below. Experienced adventurers only! Do not swim into a water channel unless you are prepared to meet your death!", }, + -- The Ancient Tombs Quest + [17] = { + itemId = 2023, + itemPos = { x = 33071, y = 32637, z = 15 }, + text = "endless", + }, + [18] = { + itemId = 2023, + itemPos = { x = 33074, y = 32633, z = 15 }, + text = "pale-faced", + }, + [19] = { + itemId = 2023, + itemPos = { x = 33071, y = 32629, z = 15 }, + text = "deceased", + }, + [20] = { + itemId = 2023, + itemPos = { x = 33077, y = 32625, z = 15 }, + text = "unholy", + }, + [21] = { + itemId = 2023, + itemPos = { x = 33077, y = 32621, z = 15 }, + text = "doomed", + }, + [22] = { + itemId = 2023, + itemPos = { x = 33071, y = 32617, z = 15 }, + text = "righteous", + }, + [23] = { + itemId = 2023, + itemPos = { x = 33077, y = 32613, z = 15 }, + text = "sharpened", + }, + [24] = { + itemId = 2023, + itemPos = { x = 33071, y = 32609, z = 15 }, + text = "mortal", + }, + -- Dreamers Challenge Quest + [25] = { + itemId = 1982, + itemPos = { x = 32761, y = 32290, z = 14 }, + text = "Pull us and let the fun begin!", + }, + -- The Pits of Inferno Quest + [26] = { + itemId = 2015, + itemPos = { x = 32855, y = 32334, z = 12 }, + text = [[ +Emergency Exit + +Will only work if the way is blocked]], + }, } diff --git a/data/libs/core/global_storage.lua b/data/libs/core/global_storage.lua index cfca535dc4b..9c69322c6fd 100644 --- a/data/libs/core/global_storage.lua +++ b/data/libs/core/global_storage.lua @@ -26,5 +26,90 @@ Global = { FamiliarSummonEvent10 = 30054, FamiliarSummonEvent60 = 30055, CobraFlask = 30056, + + -- Reserved storage from 64000 - 64099 + TibiaDrome = { + -- General Upgrades + BestiaryBetterment = { + TimeLeft = 64000, + LastActivatedAt = 64001, + }, + CharmUpgrade = { + TimeLeft = 64002, + LastActivatedAt = 64003, + }, + KooldownAid = { + LastActivatedAt = 64005, + }, + StaminaExtension = { + LastActivatedAt = 64007, + }, + StrikeEnhancement = { + TimeLeft = 64008, + LastActivatedAt = 64009, + }, + WealthDuplex = { + TimeLeft = 64010, + LastActivatedAt = 64011, + }, + -- Resilience + FireResilience = { + TimeLeft = 64012, + LastActivatedAt = 64013, + }, + IceResilience = { + TimeLeft = 64014, + LastActivatedAt = 64015, + }, + EarthResilience = { + TimeLeft = 64016, + LastActivatedAt = 64017, + }, + EnergyResilience = { + TimeLeft = 64018, + LastActivatedAt = 64019, + }, + HolyResilience = { + TimeLeft = 64020, + LastActivatedAt = 64021, + }, + DeathResilience = { + TimeLeft = 64022, + LastActivatedAt = 64023, + }, + PhysicalResilience = { + TimeLeft = 64024, + LastActivatedAt = 64025, + }, + -- Amplifications + FireAmplification = { + TimeLeft = 64026, + LastActivatedAt = 64027, + }, + IceAmplification = { + TimeLeft = 64028, + LastActivatedAt = 64029, + }, + EarthAmplification = { + TimeLeft = 64030, + LastActivatedAt = 64031, + }, + EnergyAmplification = { + TimeLeft = 64032, + LastActivatedAt = 64033, + }, + HolyAmplification = { + TimeLeft = 64034, + LastActivatedAt = 64035, + }, + DeathAmplification = { + TimeLeft = 64036, + LastActivatedAt = 64037, + }, + PhysicalAmplification = { + TimeLeft = 64038, + LastActivatedAt = 64039, + }, + }, }, } diff --git a/data/libs/functions/player.lua b/data/libs/functions/player.lua index 03e88d7ccca..b0c74afeaa6 100644 --- a/data/libs/functions/player.lua +++ b/data/libs/functions/player.lua @@ -973,7 +973,7 @@ end function Player:canGetReward(rewardId, questName) if self:questKV(questName):get("completed") then - self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The box is empty.") + self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "It is empty.") return false end diff --git a/data/libs/systems/hireling.lua b/data/libs/systems/hireling.lua index 30134cd7cd0..75005a1adfc 100644 --- a/data/libs/systems/hireling.lua +++ b/data/libs/systems/hireling.lua @@ -312,7 +312,7 @@ function Hireling:save() sql = sql .. " WHERE `id`=" .. tostring(self.id) - db.query(sql) + return db.query(sql) end function Hireling:spawn() @@ -390,7 +390,7 @@ function SaveHirelings() local failedCount = 0 for _, hireling in ipairs(HIRELINGS) do - local success = hireling:save() + local success = hireling:save() or false if not success then failedCount = failedCount + 1 diff --git a/data/npclib/npc_system/custom_modules.lua b/data/npclib/npc_system/custom_modules.lua index f1438d39d64..a1e339d1878 100644 --- a/data/npclib/npc_system/custom_modules.lua +++ b/data/npclib/npc_system/custom_modules.lua @@ -82,6 +82,13 @@ function KeywordHandler:addGreetKeyword(keys, parameters, condition, action) return self:addKeyword(localKeys, GreetModule.greet, parameters, condition, action) end +-- Function adapted to be able to create a single call to the NPC and per function +function KeywordHandler:addCustomGreetKeyword(keys, callbackFunction, parameters, condition, action) + local localKeys = keys + localKeys.callback = FocusModule.messageMatcherDefault + return self:addKeyword(localKeys, callbackFunction, parameters, condition, action) +end + -- Adds a keyword which acts as a farewell word function KeywordHandler:addFarewellKeyword(keys, parameters, condition, action) local localKeys = keys diff --git a/data/npclib/npc_system/npc_handler.lua b/data/npclib/npc_system/npc_handler.lua index 31aaa88faaf..7de4172faaa 100644 --- a/data/npclib/npc_system/npc_handler.lua +++ b/data/npclib/npc_system/npc_handler.lua @@ -595,6 +595,7 @@ if NpcHandler == nil then events = nil end + -- From now on, when you have several messages and inside brackets, use the tag |PLAYERNAME| recognition will be possible. function NpcHandler:doNPCTalkALot(msgs, delay, npc, player) local playerId = player:getId() if self:getEventDelayedSay(playerId) then @@ -613,13 +614,18 @@ if NpcHandler == nil then self.eventDelayedSay[playerId] = {} local ret = {} + local parseInfo = { + [TAG_PLAYERNAME] = player:getName(), + } + for messagesTable, messageString in pairs(msgs) do self.eventDelayedSay[playerId][messagesTable] = {} if delay ~= nil and delay > 1 then self.talkDelay = delay end -- The "self.talkDelayTimeForOutgoingMessages * 1000" = Interval for sending subsequent messages from the first - npc:sayWithDelay(npcUniqueId, msgs[messagesTable], TALKTYPE_PRIVATE_NP, ((messagesTable - 1) * self.talkDelay + self.talkDelayTimeForOutgoingMessages * 1000), self.eventDelayedSay[playerId][messagesTable], playerUniqueId) + local parsedMessage = self:parseMessage(msgs[messagesTable], parseInfo, player, messageString) + npc:sayWithDelay(npcUniqueId, parsedMessage, TALKTYPE_PRIVATE_NP, ((messagesTable - 1) * self.talkDelay + self.talkDelayTimeForOutgoingMessages * 1000), self.eventDelayedSay[playerId][messagesTable], playerUniqueId) ret[#ret + 1] = self.eventDelayedSay[playerId][messagesTable] end return ret diff --git a/data/scripts/actions/items/cobra_flask.lua b/data/scripts/actions/items/cobra_flask.lua index ddeecf8ec4f..095a8c39a96 100644 --- a/data/scripts/actions/items/cobra_flask.lua +++ b/data/scripts/actions/items/cobra_flask.lua @@ -28,3 +28,15 @@ end cobraFlask:id(31296) cobraFlask:register() + +local cobraFlask = Action() + +function cobraFlask.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if table.contains({ 4188, 4189, 4190 }, target:getId()) then + item:transform(31296) + end + return true +end + +cobraFlask:id(31297) +cobraFlask:register() diff --git a/data/scripts/actions/tools/crowbar.lua b/data/scripts/actions/tools/crowbar.lua deleted file mode 100644 index c3352cdb976..00000000000 --- a/data/scripts/actions/tools/crowbar.lua +++ /dev/null @@ -1,8 +0,0 @@ -local crowbar = Action() - -function crowbar.onUse(player, item, fromPosition, target, toPosition, isHotkey) - return onUseCrowbar(player, item, fromPosition, target, toPosition, isHotkey) -end - -crowbar:id(3304) -crowbar:register() diff --git a/data/scripts/globalevents/server_initialization.lua b/data/scripts/globalevents/server_initialization.lua index 97478582fc8..df29660d373 100644 --- a/data/scripts/globalevents/server_initialization.lua +++ b/data/scripts/globalevents/server_initialization.lua @@ -39,7 +39,7 @@ local function processHouseAuctions() local lastBid = Result.getNumber(resultId, "last_bid") if balance >= lastBid then db.query("UPDATE `players` SET `balance` = " .. (balance - lastBid) .. " WHERE `id` = " .. highestBidder) - house:setOwnerGuid(highestBidder) + house:setHouseOwner(highestBidder) end db.asyncQuery("UPDATE `houses` SET `last_bid` = 0, `bid_end` = 0, `highest_bidder` = 0, `bid` = 0 " .. "WHERE `id` = " .. house:getId()) diff --git a/data/scripts/lib/register_actions.lua b/data/scripts/lib/register_actions.lua index 25d23f1926d..e5d6688b167 100644 --- a/data/scripts/lib/register_actions.lua +++ b/data/scripts/lib/register_actions.lua @@ -451,7 +451,7 @@ function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey) player:addItem(21395, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You dig up sand and sea shells.") elseif rand > 95 then - player:addItem(3976, math.random(1, 10)) + player:addItem(3492, math.random(1, 10)) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You dig up some worms. But you are confident that you'll find the amulet here, somewhere.") end toPosition:sendMagicEffect(CONST_ME_POFF) @@ -762,7 +762,7 @@ function onUsePick(player, item, fromPosition, target, toPosition, isHotkey) end target:transform(3141) toPosition:sendMagicEffect(CONST_ME_SMOKE) - elseif target.actionid == 50058 then + elseif target.actionid == 40031 then -- naginata quest local stoneStorage = Game.getStorageValue(GlobalStorage.NaginataStone) if stoneStorage ~= 5 then diff --git a/data/scripts/runes/magic_wall.lua b/data/scripts/runes/magic_wall.lua index 9ccfbb2a833..b411fddd3a1 100644 --- a/data/scripts/runes/magic_wall.lua +++ b/data/scripts/runes/magic_wall.lua @@ -1,11 +1,15 @@ -function onCreateMagicWall(creature, tile) +function onCreateMagicWall(creature, position) + local tile = Tile(position) + if tile and tile:getTopCreature() and not tile:getTopCreature():isPlayer() then + return false + end local magicWall if Game.getWorldType() == WORLD_TYPE_NO_PVP then magicWall = ITEM_MAGICWALL_SAFE else magicWall = ITEM_MAGICWALL end - local item = Game.createItem(magicWall, 1, tile) + local item = Game.createItem(magicWall, 1, position) item:setDuration(16, 24) end diff --git a/data/scripts/runes/wild_growth.lua b/data/scripts/runes/wild_growth.lua index 71d2d4a662b..08feb66aa0a 100644 --- a/data/scripts/runes/wild_growth.lua +++ b/data/scripts/runes/wild_growth.lua @@ -1,11 +1,15 @@ -function onCreateWildGrowth(creature, tile) +function onCreateWildGrowth(creature, position) + local tile = Tile(position) + if tile and tile:getTopCreature() and not tile:getTopCreature():isPlayer() then + return false + end local wildGrowth if Game.getWorldType() == WORLD_TYPE_NO_PVP then wildGrowth = ITEM_WILDGROWTH_SAFE else wildGrowth = ITEM_WILDGROWTH end - local item = Game.createItem(wildGrowth, 1, tile) + local item = Game.createItem(wildGrowth, 1, position) item:setDuration(30, 60) end diff --git a/data-otservbr-global/scripts/actions/tibiadrome/concoctions.lua b/data/scripts/systems/concoctions.lua similarity index 94% rename from data-otservbr-global/scripts/actions/tibiadrome/concoctions.lua rename to data/scripts/systems/concoctions.lua index fe17dfef06b..6449df9974c 100644 --- a/data-otservbr-global/scripts/actions/tibiadrome/concoctions.lua +++ b/data/scripts/systems/concoctions.lua @@ -40,8 +40,8 @@ local configs = { for concoctionKey, concoctionId in pairs(Concoction.Ids) do Concoction.new({ id = concoctionId, - timeLeftStorage = Storage.TibiaDrome[concoctionKey].TimeLeft, - lastActivatedAtStorage = Storage.TibiaDrome[concoctionKey].LastActivatedAt, + timeLeftStorage = Global.Storage.TibiaDrome[concoctionKey].TimeLeft, + lastActivatedAtStorage = Global.Storage.TibiaDrome[concoctionKey].LastActivatedAt, config = configs[concoctionId] or {}, }):register() end diff --git a/data/scripts/talkactions/gm/looktype.lua b/data/scripts/talkactions/gm/looktype.lua index 28662a54f93..30a9957ee38 100644 --- a/data/scripts/talkactions/gm/looktype.lua +++ b/data/scripts/talkactions/gm/looktype.lua @@ -373,15 +373,22 @@ function looktype.onSay(player, words, param) return true end - local lookType = tonumber(param) - if lookType >= 0 and lookType < 1469 and not table.contains(invalidTypes, lookType) then - local playerOutfit = player:getOutfit() - playerOutfit.lookType = lookType - player:setOutfit(playerOutfit) + -- Test if supplied parameter is actually a numerical value to ensure there is no nil value passed. + if param:match("%d") then + local lookType = tonumber(param) + if lookType >= 0 and lookType < 1469 and not table.contains(invalidTypes, lookType) then + local playerOutfit = player:getOutfit() + playerOutfit.lookType = lookType + player:setOutfit(playerOutfit) + else + player:sendCancelMessage("A look type with that id does not exist.") + end + return true else - player:sendCancelMessage("A look type with that id does not exist.") + -- return message if supplied param is not numerical. + player:sendCancelMessage("Looktype must be a numerical value.") + return true end - return true end looktype:separator(" ") diff --git a/data/scripts/talkactions/god/inbox_command.lua b/data/scripts/talkactions/god/inbox_command.lua index a080a237027..e4de2af4a81 100644 --- a/data/scripts/talkactions/god/inbox_command.lua +++ b/data/scripts/talkactions/god/inbox_command.lua @@ -32,5 +32,6 @@ function inboxCommand.onSay(player, words, param) end inboxCommand:separator(" ") +inboxCommand:setDescription("[Usage]: /inbox {PlayerName},{add|remove},{itemId}") inboxCommand:groupType("god") inboxCommand:register() diff --git a/data/scripts/talkactions/god/manage_kv.lua b/data/scripts/talkactions/god/manage_kv.lua index d4c7f104c10..4d11a32d943 100644 --- a/data/scripts/talkactions/god/manage_kv.lua +++ b/data/scripts/talkactions/god/manage_kv.lua @@ -16,7 +16,7 @@ get:register() local set = TalkAction("/setkv") function set.onSay(player, words, param) - local key, value = string.splitFirst(param, " ") + local key, value = string.splitFirst(param, ",") -- With a space some KV's are not able to be edited due to spaces within the key names, changed to a comma (,) to overcome this issue value = load("return " .. value)() kv.set(key, value) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "kv[" .. key .. "] = " .. PrettyString(value)) diff --git a/data/scripts/talkactions/player/commands.lua b/data/scripts/talkactions/player/commands.lua index 8d374f47742..2ad2ec23bfa 100644 --- a/data/scripts/talkactions/player/commands.lua +++ b/data/scripts/talkactions/player/commands.lua @@ -4,12 +4,20 @@ function commands.onSay(player, words, param) local allTalkActions = Game.getTalkActions() local playerGroupId = player:getGroup():getId() - local text = "Available commands:\n" + local text = "Available commands:\n\n" for _, talkaction in pairs(allTalkActions) do if talkaction:getGroupType() ~= 0 then if talkaction:getGroupType() <= playerGroupId then - text = text .. talkaction:getName() .. "\n" + text = text .. talkaction:getName() + + description = talkaction:getDescription() + + if description ~= "" then + text = text .. " " .. talkaction:getDescription() + end + + text = text .. "\n\n" end end end @@ -19,5 +27,6 @@ function commands.onSay(player, words, param) return true end +commands:setDescription("[Usage]: !commands to see each command with its description") commands:groupType("normal") commands:register() diff --git a/docker/Dockerfile.dev b/docker/Dockerfile.dev index 4cd63334d5e..e04fd469064 100644 --- a/docker/Dockerfile.dev +++ b/docker/Dockerfile.dev @@ -11,12 +11,13 @@ RUN --mount=type=cache,target=/var/cache/apt \ WORKDIR /opt COPY vcpkg.json /opt -RUN vcpkgCommitId=$(grep '.builtin-baseline' vcpkg.json | awk -F: '{print $2}' | tr -d '," ') \ - && echo "vcpkg commit ID: $vcpkgCommitId" \ - && git clone https://github.com/Microsoft/vcpkg.git \ - && cd vcpkg \ - && git checkout "$vcpkgCommitId" \ - && ./bootstrap-vcpkg.sh +RUN vcpkgCommitId=$(grep '.builtin-baseline' vcpkg.json | awk -F: '{print $2}' | tr -d '," ' | tr -d '\r\n') \ + && echo "vcpkg commit ID: '$vcpkgCommitId'" \ + && git clone https://github.com/microsoft/vcpkg.git \ + && cd vcpkg \ + && git fetch origin \ + && git checkout "$vcpkgCommitId" \ + && ./bootstrap-vcpkg.sh WORKDIR /opt/vcpkg COPY vcpkg.json /opt/vcpkg/ diff --git a/qodana.sarif.json b/qodana.sarif.json new file mode 100644 index 00000000000..afc2ec4974d --- /dev/null +++ b/qodana.sarif.json @@ -0,0 +1,184891 @@ +{ + "$schema": "https://raw.githubusercontent.com/schemastore/schemastore/master/src/schemas/json/sarif-2.1.0-rtm.5.json", + "version": "2.1.0", + "runs": [ + { + "tool": { + "driver": { + "name": "CL", + "fullName": "Qodana", + "version": "241.18034.45", + "rules": [ + { + "id": "ArrayIndexOutOfBounds", + "shortDescription": { + "text": "Array Index Out Of Bounds" + }, + "fullDescription": { + "text": "Reports array or pointer variable access expressions where index may be out of bounds of an array or allocated buffer. Example: 'void foo() {\n int buffer[100];\n\n for (int i = 0; i <= 100; i ++)\n buffer[i] = 0; // buffer overflow when i is equal to 100\n }' New in 2022.2", + "markdown": "Reports array or pointer variable access expressions where index may be out of bounds of an array or allocated buffer.\n\n**Example:**\n\n\n void foo() {\n int buffer[100];\n\n for (int i = 0; i <= 100; i ++)\n buffer[i] = 0; // buffer overflow when i is equal to 100\n }\n\nNew in 2022.2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "ArrayIndexOutOfBounds", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnconstrainedVariableType", + "shortDescription": { + "text": "Unconstrained variable type" + }, + "fullDescription": { + "text": "Reports cases where an expression constrained by a concept is assigned to a variable declared as 'auto' and suggests adding a type constraint. Example: 'template\n concept Foo = true;\n\n Foo auto func() { return true; }\n\n void bar() {\n auto f = func(); //warn here to add constraint 'Foo'\n }'", + "markdown": "Reports cases where an expression constrained by a concept is assigned to a variable declared as `auto` and suggests adding a type constraint.\n\n**Example:**\n\n\n template\n concept Foo = true;\n\n Foo auto func() { return true; }\n\n void bar() {\n auto f = func(); //warn here to add constraint 'Foo'\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UnconstrainedVariableType", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/General", + "index": 28, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ConstantConditionsOC", + "shortDescription": { + "text": "Constant condition" + }, + "fullDescription": { + "text": "Reports conditions that are always 'true' or 'false' and expressions whose value is statically proven to be constant. Example: 'void process(State current) {\n current = State::Started;\n\n if (current == State::Stopped) {\n //code\n }\n //code\n }'", + "markdown": "Reports conditions that are always `true` or `false` and expressions whose value is statically proven to be constant.\n\n**Example:**\n\n\n void process(State current) {\n current = State::Started;\n\n if (current == State::Stopped) {\n //code\n }\n //code\n }\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "ConstantConditionsOC", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnusedLocalVariable", + "shortDescription": { + "text": "Unused Local Variable" + }, + "fullDescription": { + "text": "Reports the local variables that are declared but never accessed for reading. Such declarations and assignment can be removed safely.", + "markdown": "Reports the local variables that are declared but never accessed for reading. Such declarations and assignment can be removed safely." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "UnusedLocalVariable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCInconsistentNaming", + "shortDescription": { + "text": "Inconsistent Naming" + }, + "fullDescription": { + "text": "Reports the names that don't match the naming convention for that kind of symbol. Learn More", + "markdown": "Reports the names that don't match the naming convention for that kind of symbol.\n\n[Learn More](https://www.jetbrains.com/help/clion/naming-conventions.html)" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "OCInconsistentNaming", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/General", + "index": 28, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PreprocessorComment", + "shortDescription": { + "text": "Preprocessor directive comment" + }, + "fullDescription": { + "text": "Reports the mismatches between the preprocessor '#endif' comments and macro names. Example: '#ifndef _UTILS_H\n #define _UTILS_H\n\n #endif //_UTILS'", + "markdown": "Reports the mismatches between the preprocessor `#endif` comments and macro names.\n\n**Example:**\n\n\n #ifndef _UTILS_H\n #define _UTILS_H\n\n #endif //_UTILS\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PreprocessorComment", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/General", + "index": 28, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "VirtualCallInCtorOrDtor", + "shortDescription": { + "text": "Virtual call from constructor or destructor" + }, + "fullDescription": { + "text": "Reports virtual member function calls from constructors or destructors. Since construction starts with the base class and moves to the derived classes, the resources of the derived class are not yet initialized. Destruction is performed in reverse order, so calling a virtual function can lead to accessing the resources that have already been destroyed. Example: 'class Test {\n public:\n void virtual setUp();\n\n Test() {\n setUp();\n }\n };'", + "markdown": "Reports virtual member function calls from constructors or destructors. Since construction starts with the base class and moves to the derived classes, the resources of the derived class are not yet initialized. Destruction is performed in reverse order, so calling a virtual function can lead to accessing the resources that have already been destroyed.\n\n**Example:**\n\n\n class Test {\n public:\n void virtual setUp();\n\n Test() {\n setUp();\n }\n };\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "VirtualCallInCtorOrDtor", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/General", + "index": 28, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "EmptyDeclOrStmt", + "shortDescription": { + "text": "Empty declaration or statement" + }, + "fullDescription": { + "text": "Reports empty declarations and statements that can be removed safely. Example: 'void foo() {\n //code\n }; // redundant empty declaration'", + "markdown": "Reports empty declarations and statements that can be removed safely.\n\n**Example:**\n\n\n void foo() {\n //code\n }; // redundant empty declaration\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "EmptyDeclOrStmt", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/General", + "index": 28, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedGlobalDeclaration", + "shortDescription": { + "text": "Unused Global Declaration" + }, + "fullDescription": { + "text": "Reports the global function and variable declarations that are never used and can be removed safely.", + "markdown": "Reports the global function and variable declarations that are never used and can be removed safely." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "OCUnusedGlobalDeclaration", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Unused code", + "index": 55, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HidingNonVirtualFunction", + "shortDescription": { + "text": "Hiding non-virtual function" + }, + "fullDescription": { + "text": "Reports the functions that hide non-virtual functions with the same signature declared in the base class. Example: class Base {\n public:\n void operate() {}\n};\n\nclass Derived : public Base {\n public:\n void operate() {}\n}", + "markdown": "Reports the functions that hide non-virtual functions with the same signature declared in the base class.\n\nExample:\n\n```\nclass Base {\n public:\n void operate() {}\n};\n\nclass Derived : public Base {\n public:\n void operate() {}\n}\n```" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "HidingNonVirtualFunction", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Functions", + "index": 56, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LoopDoesntUseConditionVariable", + "shortDescription": { + "text": "Loop condition isn't updated inside the loop" + }, + "fullDescription": { + "text": "Reports the loop conditions that are not updated inside the loop. This can indicate code defects and cause infinite loops at runtime. Example: 'int i = 0, j = 0;\n while (i < 10) {\n ++j;\n }'", + "markdown": "Reports the loop conditions that are not updated inside the loop. This can indicate code defects and cause infinite loops at runtime.\n\n**Example:**\n\n\n int i = 0, j = 0;\n while (i < 10) {\n ++j;\n }\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "LoopDoesntUseConditionVariable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MemoryLeak", + "shortDescription": { + "text": "Memory Leak" + }, + "fullDescription": { + "text": "Reports the allocations of memory (either 'new' operator or 'malloc()' function) that were not released before they become non-accessible. Example: 'class MyClass {\n int* leakedField = new int;\n };\n\n void foo() {\n MyClass* c = new MyClass;\n delete c;\n }'", + "markdown": "Reports the allocations of memory (either `new` operator or `malloc()` function) that were not released before they become non-accessible.\n\n**Example:**\n\n\n class MyClass {\n int* leakedField = new int;\n };\n\n void foo() {\n MyClass* c = new MyClass;\n delete c;\n }\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "MemoryLeak", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedInstanceVariable", + "shortDescription": { + "text": "Unused Instance Variable" + }, + "fullDescription": { + "text": "Reports the instance variables that are never accessed or written.", + "markdown": "Reports the instance variables that are never accessed or written." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedInstanceVariable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Objective-C/Unused code", + "index": 60, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnreachableCode", + "shortDescription": { + "text": "Unreachable Code" + }, + "fullDescription": { + "text": "Reports the code pieces that are never executed in any control flow and can be removed safely.", + "markdown": "Reports the code pieces that are never executed in any control flow and can be removed safely." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "UnreachableCode", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedMethod", + "shortDescription": { + "text": "Unused Method" + }, + "fullDescription": { + "text": "Reports the methods that are never called, for example, in send message expressions, '@selector' expressions, and other places like XIB files.", + "markdown": "Reports the methods that are never called, for example, in send message expressions, `@selector` expressions, and other places like XIB files." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedMethod", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Objective-C/Unused code", + "index": 60, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LocalValueEscapesScope", + "shortDescription": { + "text": "Local Value Escapes Scope" + }, + "fullDescription": { + "text": "Reports the references to local values that escape the function Example: 'int *escapeLocalScope() {\n int lv = 100;\n return &lv;\n }'", + "markdown": "Reports the references to local values that escape the function\n\n**Example:**\n\n\n int *escapeLocalScope() {\n int lv = 100;\n return &lv;\n }\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "LocalValueEscapesScope", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedMacro", + "shortDescription": { + "text": "Unused Macro" + }, + "fullDescription": { + "text": "Reports the macro definitions that are never used and can be removed safely.", + "markdown": "Reports the macro definitions that are never used and can be removed safely." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedMacro", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Unused code", + "index": 55, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedConcept", + "shortDescription": { + "text": "Unused Concept" + }, + "fullDescription": { + "text": "Reports the concepts that are never used and can be removed safely.", + "markdown": "Reports the concepts that are never used and can be removed safely." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedConcept", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Unused code", + "index": 55, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCDFA", + "shortDescription": { + "text": "Context-sensitive analysis" + }, + "fullDescription": { + "text": "Reports the issues found by the context-sensitive data flow analyser. Such as: \"Constant condition\", \"Dangling pointer\", \"Null dereference\", \"Unreachable code\", and so on.", + "markdown": "Reports the issues found by the context-sensitive data flow analyser. Such as: \"Constant condition\", \"Dangling pointer\", \"Null dereference\", \"Unreachable code\", and so on." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCDFA", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Clazy", + "shortDescription": { + "text": "Clazy" + }, + "fullDescription": { + "text": "Reports the Qt-related compiler warnings, ranging from unneeded memory allocations to the misused API.", + "markdown": "Reports the Qt-related compiler warnings, ranging from unneeded memory allocations to the misused API." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "Clazy", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Static Analysis Tools", + "index": 70, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "EndlessLoop", + "shortDescription": { + "text": "Endless Loop" + }, + "fullDescription": { + "text": "Reports the 'for', 'while', 'do while', and 'goto' statements that exit only by throwing an exception. Even though such statements may be correct, they often indicate code errors.", + "markdown": "Reports the `for`, `while`, `do while`, and `goto` statements that exit only by throwing an exception. Even though such statements may be correct, they often indicate code errors." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "EndlessLoop", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Simplify", + "shortDescription": { + "text": "Simplifiable statement" + }, + "fullDescription": { + "text": "Reports the statements that can be simplified, such as constant conditions, identical if branches, redundant boolean expressions, and others. Use the checkboxes below to control the analysis options: Simplify \"if (true)\", \"while(false)\": suggest replacing the 'if'/'while' statement with a boolean literal. Simplify \"condition == true\": suggest replacing equality statements with boolean literals. Simplify \"condition1 ? true : condition2;\": suggest simplifying ternary operators where one of the expressions is a boolean literal. Simplify \"if (condition1) return true; return condition2;\": suggest simplifying 'if' where a boolean literal is returned if the condition is true and another condition is returned otherwise.", + "markdown": "Reports the statements that can be simplified, such as constant conditions, identical if branches, redundant boolean expressions, and others. Use the checkboxes below to control the analysis options:\n\n* **Simplify \"if (true)\", \"while(false)\"** : suggest replacing the `if`/`while` statement with a boolean literal.\n* **Simplify \"condition == true\"**: suggest replacing equality statements with boolean literals.\n* **Simplify \"condition1 ? true : condition2;\"**: suggest simplifying ternary operators where one of the expressions is a boolean literal.\n* **Simplify \"if (condition1) return true; return condition2;\"** : suggest simplifying `if` where a boolean literal is returned if the condition is true and another condition is returned otherwise." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "Simplify", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/General", + "index": 28, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedIncludeDirective", + "shortDescription": { + "text": "Unused Include Directive" + }, + "fullDescription": { + "text": "Reports the include directives that are not used or not required and can be removed safely. Detect completely unused An include directive is considered unused if declarations from it are never used within the translation unit. Detect not directly used An include directive is considered unused if declarations from it are not used in the file directly. This works best with the \"Include What You Use\" policy. Detect not required Detects the minimal set of include directives for the file to be compilable. All other #include directives are considered unused. Use the checkbox below to run inspection in header files.", + "markdown": "Reports the include directives that are not used or not required and can be removed safely.\n\n**Detect completely unused**\n: An include directive is considered unused if declarations from it are never used within the translation unit.\n\n**Detect not directly used**\n: An include directive is considered unused if declarations from it are not used in the file directly. This works best with the \"Include What You Use\" policy.\n\n**Detect not required**\n: Detects the minimal set of include directives for the file to be compilable. All other #include directives are considered unused.\n\nUse the checkbox below to run inspection in header files." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedIncludeDirective", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Unused code", + "index": 55, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedProperty", + "shortDescription": { + "text": "Unused Property" + }, + "fullDescription": { + "text": "Reports the properties that are never accessed or written, neither in qualified expressions nor in accessor method calls.", + "markdown": "Reports the properties that are never accessed or written, neither in qualified expressions nor in accessor method calls." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedProperty", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Objective-C/Unused code", + "index": 60, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ConstantFunctionResult", + "shortDescription": { + "text": "Constant Function Result" + }, + "fullDescription": { + "text": "Reports the functions where the return value is always the same constant.", + "markdown": "Reports the functions where the return value is always the same constant." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "ConstantFunctionResult", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnusedValue", + "shortDescription": { + "text": "Unused Value" + }, + "fullDescription": { + "text": "Reports the variable values that are never used after being assigned. This can happen in the following cases: the variable is never read after the assignment the value is overwritten by another assignment before it is accessed for reading the variable initializer is redundant (for one of the above two reasons) the variable itself is never used. Example: 'class C {\n int field;\n\n void foo() {\n field = unused_value;\n }\n\n void bar() {\n use(field);\n foo();\n }\n };' Use the checkbox below to have this inspection ignore variable initializers.", + "markdown": "Reports the variable values that are never used after being assigned. This can happen in the following cases:\n\n* the variable is never read after the assignment\n* the value is overwritten by another assignment before it is accessed for reading\n* the variable initializer is redundant (for one of the above two reasons)\n* the variable itself is never used.\n\n**Example:**\n\n\n class C {\n int field;\n\n void foo() {\n field = unused_value;\n }\n\n void bar() {\n use(field);\n foo();\n }\n };\n\nUse the checkbox below to have this inspection ignore variable initializers." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "UnusedValue", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ConstantParameter", + "shortDescription": { + "text": "Constant Parameter" + }, + "fullDescription": { + "text": "Reports function parameters that always have the same value.", + "markdown": "Reports function parameters that always have the same value." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "ConstantParameter", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedTypeAlias", + "shortDescription": { + "text": "Unused Type Alias" + }, + "fullDescription": { + "text": "Reports the statements that are never used and can be removed safely.", + "markdown": "Reports the statements that are never used and can be removed safely." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedTypeAlias", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Unused code", + "index": 55, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ArgumentSelectionDefects", + "shortDescription": { + "text": "Argument selection defect" + }, + "fullDescription": { + "text": "Reports mismatches between the argument identifier name and the formal parameter name. This can help detect programming errors, for example, when you accidentally switch the arguments of the same type. The original research paper can be found here. Example: 'const User* get_User(int64_t company_id, int64_t user_id) {\n return new User{company_id, user_id, \"foo\"};\n }\n\n void call_User(int64_t company_id, int64_t user_id) {\n const User* user = get_User(user_id, company_id); // potential issue here\n //...\n }' Use the checkbox below to inspect arguments with names shorter than three symbols. Learn More.", + "markdown": "Reports mismatches between the argument identifier name and the formal parameter name. This can help detect programming errors, for example, when you accidentally switch the arguments of the same type. The original research paper can be found [here](https://static.googleusercontent.com/media/research.google.com/ru//pubs/archive/46317.pdf).\n\n**Example:**\n\n\n const User* get_User(int64_t company_id, int64_t user_id) {\n return new User{company_id, user_id, \"foo\"};\n }\n\n void call_User(int64_t company_id, int64_t user_id) {\n const User* user = get_User(user_id, company_id); // potential issue here\n //...\n }\n\nUse the checkbox below to inspect arguments with names shorter than three symbols.\n\n[Learn More.](https://www.jetbrains.com/help/clion/argument-selection-defects-inspection.html)" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ArgumentSelectionDefects", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/General", + "index": 28, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Misra", + "shortDescription": { + "text": "MISRA" + }, + "fullDescription": { + "text": "Reports various issues defined by the MISRA C 2012 and MISRA C++ 2008 guidelines. The list of currently supported checks is here.", + "markdown": "Reports various issues defined by the MISRA C 2012 and MISRA C++ 2008 guidelines.\n\nThe list of currently supported checks is [here](https://youtrack.jetbrains.com/articles/CPP-A-191430682/MISRA-checks-supported-in-CLion)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "Misra", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Static Analysis Tools", + "index": 70, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NotImplementedFunctions", + "shortDescription": { + "text": "Not Implemented Functions" + }, + "fullDescription": { + "text": "Reports the functions that were declared in a class but have no implementations. Example: class Test {\n public:\n void setUp();\n};", + "markdown": "Reports the functions that were declared in a class but have no implementations.\n\n**Example:**\n\n```\nclass Test {\n public:\n void setUp();\n};\n```" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "NotImplementedFunctions", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Functions", + "index": 56, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnusedParameter", + "shortDescription": { + "text": "Unused Parameter" + }, + "fullDescription": { + "text": "Reports the parameters that are declared but never accessed for reading and can be removed safely.", + "markdown": "Reports the parameters that are declared but never accessed for reading and can be removed safely." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "UnusedParameter", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnreachableCallsOfFunction", + "shortDescription": { + "text": "Unreachable Calls Of Function" + }, + "fullDescription": { + "text": "Reports the functions which calls are never used. Such functions are also never executed.", + "markdown": "Reports the functions which calls are never used. Such functions are also never executed." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "UnreachableCallsOfFunction", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedClass", + "shortDescription": { + "text": "Unused Class" + }, + "fullDescription": { + "text": "Reports Objective-C classes and protocols that are never used.", + "markdown": "Reports Objective-C classes and protocols that are never used." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedClass", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Objective-C/Unused code", + "index": 60, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ClangdErrorsAndWarnings", + "shortDescription": { + "text": "Clangd errors and warnings" + }, + "fullDescription": { + "text": "Reports C/C++ errors and warnings from clangd.", + "markdown": "Reports C/C++ errors and warnings from clangd. " + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ClangdErrorsAndWarnings", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/General", + "index": 28, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedTemplateParameter", + "shortDescription": { + "text": "Unused Template Parameter" + }, + "fullDescription": { + "text": "Reports the template parameters that are never used and can be removed safely.", + "markdown": "Reports the template parameters that are never used and can be removed safely." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedTemplateParameter", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Unused code", + "index": 55, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedStruct", + "shortDescription": { + "text": "Unused Struct" + }, + "fullDescription": { + "text": "Reports the classes and structures that are never used and can be removed safely.", + "markdown": "Reports the classes and structures that are never used and can be removed safely." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedStruct", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Unused code", + "index": 55, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NotInitializedField", + "shortDescription": { + "text": "Not Initialized Field" + }, + "fullDescription": { + "text": "Reports the fields that may have not been initialized before their usage. Initialization and usage may be in different functions.", + "markdown": "Reports the fields that may have not been initialized before their usage. Initialization and usage may be in different functions." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "NotInitializedField", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DanglingPointer", + "shortDescription": { + "text": "Dangling Pointer" + }, + "fullDescription": { + "text": "Reports the usages of the pointers that refer to the memory already deleted by the 'delete' operator or the 'free(void* ptr)' function. Example: 'void process() {\n for(node *pt = head; pt != nullptr; pt = pt->next) {\n delete pt;\n }\n }'", + "markdown": "Reports the usages of the pointers that refer to the memory already deleted by the `delete` operator or the `free(void* ptr)` function.\n\n**Example:**\n\n\n void process() {\n for(node *pt = head; pt != nullptr; pt = pt->next) {\n delete pt;\n }\n }\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "DanglingPointer", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ClangTidy", + "shortDescription": { + "text": "Clang-Tidy" + }, + "fullDescription": { + "text": "Reports various issues related to The C++ Core Guidelines, Modernize, Readability and Performance. CLion's default configuration is described here. For more information, visit the official Clang-Tidy page. Use the checkbox below to have this inspection ignore the IDE settings and use a list of checks specified in the .clang-tidy file if any exist.", + "markdown": "Reports various issues related to The C++ Core Guidelines, Modernize, Readability and Performance. \nCLion's default configuration is described [here](https://youtrack.jetbrains.com/articles/CPP-A-90276519/Clang-Tidy-in-CLion:-default-configuration). \nFor more information, visit the official [Clang-Tidy](https://clang.llvm.org/extra/clang-tidy/) page.\n\nUse the checkbox below to have this inspection ignore the IDE settings and use a list of checks specified in the **.clang-tidy** file if any exist." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "ClangTidy", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Static Analysis Tools", + "index": 70, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "InfiniteRecursion", + "shortDescription": { + "text": "Infinite Recursion" + }, + "fullDescription": { + "text": "Reports methods and functions with infinite recursion. Example: 'int factorial(int n) {\n return n * factorial(n - 1);\n }'", + "markdown": "Reports methods and functions with infinite recursion.\n\n**Example:**\n\n\n int factorial(int n) {\n return n * factorial(n - 1);\n }\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "InfiniteRecursion", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NullDereference", + "shortDescription": { + "text": "Null Dereference" + }, + "fullDescription": { + "text": "Reports dereferences of the pointers that may contain 'nullptr'. Example: 'using namespace std;\n void process(string *a, string b) {\n if (a != nullptr || a->length()) {\n a = &b;\n }\n }'", + "markdown": "Reports dereferences of the pointers that may contain `nullptr`.\n\n**Example:**\n\n\n using namespace std;\n void process(string *a, string b) {\n if (a != nullptr || a->length()) {\n a = &b;\n }\n }\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "NullDereference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "taxa": [ + { + "id": "Python", + "name": "Python" + }, + { + "id": "JavaScript and TypeScript", + "name": "JavaScript and TypeScript" + }, + { + "id": "JavaScript and TypeScript/Control flow issues", + "name": "Control flow issues", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Angular", + "name": "Angular" + }, + { + "id": "PostCSS", + "name": "PostCSS" + }, + { + "id": "XPath", + "name": "XPath" + }, + { + "id": "Sass_SCSS", + "name": "Sass/SCSS" + }, + { + "id": "Shell script", + "name": "Shell script" + }, + { + "id": "JavaScript and TypeScript/Unit testing", + "name": "Unit testing", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Makefile", + "name": "Makefile" + }, + { + "id": "CMake", + "name": "CMake" + }, + { + "id": "CMake/General", + "name": "General", + "relationships": [ + { + "target": { + "id": "CMake", + "index": 10, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSON and JSON5", + "name": "JSON and JSON5" + }, + { + "id": "C_C++", + "name": "C/C++" + }, + { + "id": "C_C++/Data Flow Analysis", + "name": "Data Flow Analysis", + "relationships": [ + { + "target": { + "id": "C_C++", + "index": 13, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MongoJS", + "name": "MongoJS" + }, + { + "id": "JavaScript and TypeScript/General", + "name": "General", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Code style issues", + "name": "Code style issues", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MySQL", + "name": "MySQL" + }, + { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "name": "Potentially undesirable code constructs", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Flow type checker", + "name": "Flow type checker", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Markdown", + "name": "Markdown" + }, + { + "id": "JavaScript and TypeScript/Probable bugs", + "name": "Probable bugs", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HTTP Client", + "name": "HTTP Client" + }, + { + "id": "Devicetree", + "name": "Devicetree" + }, + { + "id": "HTML", + "name": "HTML" + }, + { + "id": "JavaScript and TypeScript/Unused symbols", + "name": "Unused symbols", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Data flow", + "name": "Data flow", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "C_C++/General", + "name": "General", + "relationships": [ + { + "target": { + "id": "C_C++", + "index": 13, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Bitwise operation issues", + "name": "Bitwise operation issues", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/ES2015 migration aids", + "name": "ES2015 migration aids", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "General", + "name": "General" + }, + { + "id": "HTML/Accessibility", + "name": "Accessibility", + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/React", + "name": "React", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/TypeScript", + "name": "TypeScript", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Validity issues", + "name": "Validity issues", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Docker-compose", + "name": "Docker-compose" + }, + { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "name": "Potentially confusing code constructs", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CSS", + "name": "CSS" + }, + { + "id": "CSS/Invalid elements", + "name": "Invalid elements", + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Dockerfile", + "name": "Dockerfile" + }, + { + "id": "SQL", + "name": "SQL" + }, + { + "id": "JavaScript and TypeScript/Try statement issues", + "name": "Try statement issues", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Structural search", + "name": "Structural search" + }, + { + "id": "JavaScript and TypeScript/Function metrics", + "name": "Function metrics", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAML", + "name": "YAML" + }, + { + "id": "Requirements", + "name": "Requirements" + }, + { + "id": "XML", + "name": "XML" + }, + { + "id": "JavaScript and TypeScript/Assignment issues", + "name": "Assignment issues", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CSS/Code style issues", + "name": "Code style issues", + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Less", + "name": "Less" + }, + { + "id": "RegExp", + "name": "RegExp" + }, + { + "id": "Vue", + "name": "Vue" + }, + { + "id": "JavaScript and TypeScript/Node.js", + "name": "Node.js", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XSLT", + "name": "XSLT" + }, + { + "id": "C_C++/Unused code", + "name": "Unused code", + "relationships": [ + { + "target": { + "id": "C_C++", + "index": 13, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "C_C++/Functions", + "name": "Functions", + "relationships": [ + { + "target": { + "id": "C_C++", + "index": 13, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Imports and dependencies", + "name": "Imports and dependencies", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RELAX NG", + "name": "RELAX NG" + }, + { + "id": "Objective-C", + "name": "Objective-C" + }, + { + "id": "Objective-C/Unused code", + "name": "Unused code", + "relationships": [ + { + "target": { + "id": "Objective-C", + "index": 59, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CSS/Probable bugs", + "name": "Probable bugs", + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Naming conventions", + "name": "Naming conventions", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Switch statement issues", + "name": "Switch statement issues", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/DOM issues", + "name": "DOM issues", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Async code and promises", + "name": "Async code and promises", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Code quality tools", + "name": "Code quality tools", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Code Coverage", + "name": "Code Coverage" + }, + { + "id": "Proofreading", + "name": "Proofreading" + }, + { + "id": "GitHub actions", + "name": "GitHub actions" + }, + { + "id": "C_C++/Static Analysis Tools", + "name": "Static Analysis Tools", + "relationships": [ + { + "target": { + "id": "C_C++", + "index": 13, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CSS/Code quality tools", + "name": "Code quality tools", + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PostgreSQL", + "name": "PostgreSQL" + }, + { + "id": "SQL server", + "name": "SQL server" + }, + { + "id": "ReST", + "name": "ReST" + }, + { + "id": "JSONPath", + "name": "JSONPath" + }, + { + "id": "Qodana", + "name": "Qodana" + }, + { + "id": "Security", + "name": "Security" + }, + { + "id": "Oracle", + "name": "Oracle" + }, + { + "id": "Internationalization", + "name": "Internationalization" + }, + { + "id": "TOML", + "name": "TOML" + }, + { + "id": "Version control", + "name": "Version control" + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + "extensions": [ + { + "name": "PythonCore", + "version": "241.18034.45", + "rules": [ + { + "id": "PyPandasSeriesToListInspection", + "shortDescription": { + "text": "Method Series.to_list() is recommended" + }, + "fullDescription": { + "text": "Reports redundant 'list' in 'list(Series.values)' statement for pandas and polars libraries. Such 'Series' values extraction can be replaced with the 'to_list()' function call. Example: list(df['column'].values)\n When the quick-fix is applied, the code changes to: df['column'].to_list()", + "markdown": "Reports redundant `list` in `list(Series.values)` statement for pandas and polars libraries.\nSuch `Series` values extraction can be replaced with the `to_list()` function call.\n\n**Example:**\n\n```\nlist(df['column'].values)\n```\n\nWhen the quick-fix is applied, the code changes to:\n\n```\ndf['column'].to_list()\n```" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyPackages", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PySetFunctionToLiteralInspection", + "shortDescription": { + "text": "Function call can be replaced with set literal" + }, + "fullDescription": { + "text": "Reports calls to the 'set' function that can be replaced with the 'set' literal. Example: 'def do_mult(a, b):\n c = a * b\n return set([c, a, b])' When the quick-fix is applied, the code changes to: 'def do_mult(a, b):\n c = a * b\n return {c, a, b}'", + "markdown": "Reports calls to the `set` function that can be replaced with\nthe `set` literal.\n\n**Example:**\n\n\n def do_mult(a, b):\n c = a * b\n return set([c, a, b])\n\nWhen the quick-fix is applied, the code changes to:\n\n\n def do_mult(a, b):\n c = a * b\n return {c, a, b}\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PySetFunctionToLiteral", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyOverridesInspection", + "shortDescription": { + "text": "Invalid usages of @override decorator" + }, + "fullDescription": { + "text": "Reports when a method decorated with @override doesn't have a matching method in its ancestor classes Example: 'from typing import override\n\nclass Parent:\n def foo(self) -> int:\n return 1\n\n def bar(self, x: str) -> str:\n return x\n\nclass Child(Parent):\n @override\n def foo(self) -> int:\n return 2\n\n @override # Missing super method for override function\n def baz(self) -> int:\n return 1'", + "markdown": "Reports when a method decorated with @override doesn't have a matching method in its ancestor classes\n\n**Example:**\n\n\n from typing import override\n\n class Parent:\n def foo(self) -> int:\n return 1\n\n def bar(self, x: str) -> str:\n return x\n\n class Child(Parent):\n @override\n def foo(self) -> int:\n return 2\n\n @override # Missing super method for override function\n def baz(self) -> int:\n return 1\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyOverrides", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyInitNewSignatureInspection", + "shortDescription": { + "text": "Incompatible signatures of __new__ and __init__" + }, + "fullDescription": { + "text": "Reports incompatible signatures of the '__new__' and '__init__' methods. Example: 'class MyClass(object):\n def __new__(cls, arg1):\n return super().__new__(cls)\n\n def __init__(self):\n pass' If the '__new__' and '__init__' have different arguments, then the 'MyClass' cannot be instantiated. As a fix, the IDE offers to apply the Change Signature refactoring.", + "markdown": "Reports incompatible signatures of the `__new__` and `__init__` methods.\n\n**Example:**\n\n\n class MyClass(object):\n def __new__(cls, arg1):\n return super().__new__(cls)\n\n def __init__(self):\n pass\n\nIf the `__new__` and `__init__` have different arguments, then the `MyClass`\ncannot be instantiated.\n\nAs a fix, the IDE offers to apply the Change Signature refactoring." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyInitNewSignature", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyMissingConstructorInspection", + "shortDescription": { + "text": "Missed call to '__init__' of the super class" + }, + "fullDescription": { + "text": "Reports cases when a call to the 'super' constructor in a class is missed. Example: 'class Fruit:\n def __init__(self):\n pass\n\n\nclass Pear(Fruit):\n def __init__(self):\n pass' The 'Pear' class should have a 'super' call in the '__init__' method. When the quick-fix is applied, the code changes to: 'class Fruit:\n def __init__(self):\n pass\n\n\nclass Pear(Fruit):\n def __init__(self):\n super().__init__()'", + "markdown": "Reports cases when a call to the `super` constructor in a class is missed.\n\n**Example:**\n\n\n class Fruit:\n def __init__(self):\n pass\n\n\n class Pear(Fruit):\n def __init__(self):\n pass\n\nThe `Pear` class should have a `super` call in the `__init__`\nmethod.\n\nWhen the quick-fix is applied, the code changes to:\n\n\n class Fruit:\n def __init__(self):\n pass\n\n\n class Pear(Fruit):\n def __init__(self):\n super().__init__()\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyMissingConstructor", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PySimplifyBooleanCheckInspection", + "shortDescription": { + "text": "Redundant boolean variable check" + }, + "fullDescription": { + "text": "Reports equality comparison with a boolean literal. Example: 'def func(s):\n if s.isdigit() == True:\n return int(s)' With the quick-fix applied, the code fragment will be simplified to: 'def func(s):\n if s.isdigit():\n return int(s)'", + "markdown": "Reports equality comparison with a boolean literal.\n\n**Example:**\n\n\n def func(s):\n if s.isdigit() == True:\n return int(s)\n\nWith the quick-fix applied, the code fragment will be simplified to:\n\n\n def func(s):\n if s.isdigit():\n return int(s)\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PySimplifyBooleanCheck", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyCallingNonCallableInspection", + "shortDescription": { + "text": "Attempt to call a non-callable object" + }, + "fullDescription": { + "text": "Reports a problem when you are trying to call objects that are not callable, like, for example, properties: Example: 'class Record:\n @property\n def as_json(self):\n\njson = Record().as_json()'", + "markdown": "Reports a problem when you are trying\nto call objects that are not callable, like, for example, properties:\n\n**Example:**\n\n\n class Record:\n @property\n def as_json(self):\n\n json = Record().as_json()\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyCallingNonCallable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyUnreachableCodeInspection", + "shortDescription": { + "text": "Unreachable code" + }, + "fullDescription": { + "text": "Reports code fragments that cannot be normally reached. Example: 'if True:\n print('Yes')\nelse:\n print('No')' As a fix, you might want to check and modify the algorithm to ensure it implements the expected logic.", + "markdown": "Reports code fragments that cannot be normally reached.\n\n**Example:**\n\n\n if True:\n print('Yes')\n else:\n print('No')\n\nAs a fix, you might want to check and modify the algorithm to ensure it implements\nthe expected logic." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyUnreachableCode", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyChainedComparisonsInspection", + "shortDescription": { + "text": "Too complex chained comparisons" + }, + "fullDescription": { + "text": "Reports chained comparisons that can be simplified. Example: 'def do_comparison(x):\n xmin = 10\n xmax = 100\n if x >= xmin and x <= xmax:\n pass' The IDE offers to simplify 'if x >= xmin and x <= xmax'. When the quick-fix is applied, the code changes to: 'def do_comparison(x):\n xmin = 10\n xmax = 100\n if xmin <= x <= xmax:\n pass'", + "markdown": "Reports chained comparisons that can be simplified.\n\n**Example:**\n\n\n def do_comparison(x):\n xmin = 10\n xmax = 100\n if x >= xmin and x <= xmax:\n pass\n\nThe IDE offers to simplify `if x >= xmin and x <= xmax`.\nWhen the quick-fix is applied, the code changes to:\n\n\n def do_comparison(x):\n xmin = 10\n xmax = 100\n if xmin <= x <= xmax:\n pass\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyChainedComparisons", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyCompatibilityInspection", + "shortDescription": { + "text": "Code is incompatible with specific Python versions" + }, + "fullDescription": { + "text": "Reports incompatibility with the specified versions of Python. Enable this inspection if you need your code to be compatible with a range of Python versions, for example, if you are building a library. To define the range of the inspected Python versions, select the corresponding checkboxes in the Options section. For more information about the Python versions supported by the IDE, see the web help.", + "markdown": "Reports incompatibility with the specified versions of Python.\nEnable this inspection if you need your code to be compatible with a range of Python versions, for example,\nif you are building a library.\n\nTo define the range of the inspected Python versions, select the corresponding checkboxes in the **Options**\nsection.\n\nFor more information about the Python versions supported by the IDE, see the\n[web help](https://www.jetbrains.com/help/pycharm/python.html#support)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PyCompatibility", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyGlobalUndefinedInspection", + "shortDescription": { + "text": "Global variable is not defined at the module level" + }, + "fullDescription": { + "text": "Reports problems when a variable defined through the 'global' statement is not defined in the module scope. Example: 'def foo():\n global bar\n print(bar)\n\nfoo()' As a fix, you can move the global variable declaration: 'global bar\n\n\ndef foo():\n print(bar)'", + "markdown": "Reports problems when a variable defined through the `global`\nstatement is not defined in the module scope.\n\n**Example:**\n\n\n def foo():\n global bar\n print(bar)\n\n foo()\n\nAs a fix, you can move the global variable declaration:\n\n\n global bar\n\n\n def foo():\n print(bar)\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyGlobalUndefined", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnsatisfiedRequirementInspection", + "shortDescription": { + "text": "Requirement is not satisfied" + }, + "fullDescription": { + "text": "Reports packages mentioned in requirements files (for example, 'requirements.txt', or 'dependencies' section in 'pyproject.toml' files) but not installed, or imported but not mentioned in requirements files.", + "markdown": "Reports packages mentioned in requirements files (for example, `requirements.txt`, or `dependencies` section in `pyproject.toml` files) but not installed,\nor imported but not mentioned in requirements files." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UnsatisfiedRequirement", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Requirements", + "index": 46, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyProtocolInspection", + "shortDescription": { + "text": "Invalid protocol definitions and usages" + }, + "fullDescription": { + "text": "Reports invalid definitions and usages of protocols introduced in PEP-544. Example: 'from typing import Protocol\n\n\nclass MyProtocol(Protocol):\n def method(self, p: int) -> str:\n pass\n\n\nclass MyClass(MyProtocol):\n def method(self, p: str) -> int: # Type of 'method' is not compatible with 'MyProtocol'\n pass\n\n\nclass MyAnotherProtocol(MyClass, Protocol): # All bases of a protocol must be protocols\n pass'", + "markdown": "Reports invalid definitions and usages of protocols introduced in\n[PEP-544](https://www.python.org/dev/peps/pep-0544/).\n\n**Example:**\n\n\n from typing import Protocol\n\n\n class MyProtocol(Protocol):\n def method(self, p: int) -> str:\n pass\n\n\n class MyClass(MyProtocol):\n def method(self, p: str) -> int: # Type of 'method' is not compatible with 'MyProtocol'\n pass\n\n\n class MyAnotherProtocol(MyClass, Protocol): # All bases of a protocol must be protocols\n pass\n\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyProtocol", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyTypeHintsInspection", + "shortDescription": { + "text": "Invalid type hints definitions and usages" + }, + "fullDescription": { + "text": "Reports invalid usages of type hints. Example: 'from typing import TypeVar\n\nT0 = TypeVar('T1') # Argument of 'TypeVar' must be 'T0'\n\n\ndef b(p: int) -> int: # Type specified both in a comment and annotation\n # type: (int) -> int\n pass\n\n\ndef c(p1, p2): # Type signature has too many arguments\n # type: (int) -> int\n pass' Available quick-fixes offer various actions. You can rename, remove, or move problematic elements. You can also manually modify type declarations to ensure no warning is shown.", + "markdown": "Reports invalid usages of type hints.\n\n**Example:**\n\n\n from typing import TypeVar\n\n T0 = TypeVar('T1') # Argument of 'TypeVar' must be 'T0'\n\n\n def b(p: int) -> int: # Type specified both in a comment and annotation\n # type: (int) -> int\n pass\n\n\n def c(p1, p2): # Type signature has too many arguments\n # type: (int) -> int\n pass\n\nAvailable quick-fixes offer various actions. You can rename, remove, or move problematic elements. You can also manually modify type declarations to ensure no warning is shown." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyTypeHints", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyMethodMayBeStaticInspection", + "shortDescription": { + "text": "Method is not declared static" + }, + "fullDescription": { + "text": "Reports any methods that do not require a class instance creation and can be made static. Example: 'class MyClass(object):\n def my_method(self, x):\n print(x)' If a Make function from method quick-fix is applied, the code changes to: 'def my_method(x):\n print(x)\n\n\nclass MyClass(object):\n pass' If you select the Make method static quick-fix, the '@staticmethod' decorator is added: 'class MyClass(object):\n @staticmethod\n def my_method(x):\n print(x)'", + "markdown": "Reports any methods that do not require a class instance creation and can be\nmade static.\n\n**Example:**\n\n\n class MyClass(object):\n def my_method(self, x):\n print(x)\n\nIf a **Make function from method** quick-fix is applied, the code changes to:\n\n\n def my_method(x):\n print(x)\n\n\n class MyClass(object):\n pass\n\nIf you select the **Make method static** quick-fix, the `@staticmethod` decorator is added:\n\n\n class MyClass(object):\n @staticmethod\n def my_method(x):\n print(x)\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyMethodMayBeStatic", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyDictCreationInspection", + "shortDescription": { + "text": "Dictionary creation can be rewritten by dictionary literal" + }, + "fullDescription": { + "text": "Reports situations when you can rewrite dictionary creation by using a dictionary literal. This approach brings performance improvements. Example: 'dic = {}\ndic['var'] = 1' When the quick-fix is applied, the code changes to: 'dic = {'var': 1}'", + "markdown": "Reports situations when you can rewrite dictionary creation\nby using a dictionary literal.\n\nThis approach brings performance improvements.\n\n**Example:**\n\n\n dic = {}\n dic['var'] = 1\n\nWhen the quick-fix is applied, the code changes to:\n\n\n dic = {'var': 1}\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyDictCreation", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyStringFormatInspection", + "shortDescription": { + "text": "Errors in string formatting operations" + }, + "fullDescription": { + "text": "Reports errors in string formatting operations. Example 1: '\"Hello {1}\".format(\"people\")' Example 2: 'def bar():\n return 1\n\n\n\"%s %s\" % bar()' As a fix, you need to rewrite string formatting fragments to adhere to the formatting syntax.", + "markdown": "Reports errors in string formatting operations.\n\n**Example 1:**\n\n\n \"Hello {1}\".format(\"people\")\n\n**Example 2:**\n\n\n def bar():\n return 1\n\n\n \"%s %s\" % bar()\n\nAs a fix, you need to rewrite string formatting fragments to\nadhere to the [formatting syntax](https://docs.python.org/3/library/string.html#format-string-syntax)." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyStringFormat", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyExceptionInheritInspection", + "shortDescription": { + "text": "Exceptions do not inherit from standard 'Exception' class" + }, + "fullDescription": { + "text": "Reports cases when a custom exception class is raised but does not inherit from the builtin Exception class. Example: 'class A:\n pass\n\n\ndef me_exception():\n raise A()' The proposed quick-fix changes the code to: 'class A(Exception):\n pass\n\n\ndef me_exception():\n raise A()'", + "markdown": "Reports cases when a custom exception class is\nraised but does not inherit from the\n[builtin Exception class](https://docs.python.org/3/library/exceptions.html).\n\n**Example:**\n\n\n class A:\n pass\n\n\n def me_exception():\n raise A()\n\nThe proposed quick-fix changes the code to:\n\n\n class A(Exception):\n pass\n\n\n def me_exception():\n raise A()\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyExceptionInherit", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyAssignmentToLoopOrWithParameterInspection", + "shortDescription": { + "text": "Assignments to 'for' loop or 'with' statement parameter" + }, + "fullDescription": { + "text": "Reports the cases when you rewrite a loop variable with an inner loop. Example: 'for i in range(5):\n for i in range(20, 25):\n print(\"Inner\", i)\n print(\"Outer\", i)' It also warns you if a variable declared in the 'with' statement is redeclared inside the statement body: 'with open(\"file\") as f:\n f.read()\n with open(\"file\") as f:'", + "markdown": "Reports the cases when you rewrite a loop variable with an inner loop.\n\n**Example:**\n\n\n for i in range(5):\n for i in range(20, 25):\n print(\"Inner\", i)\n print(\"Outer\", i)\n \nIt also warns you if a variable declared in the `with` statement is redeclared inside the statement body:\n\n\n with open(\"file\") as f:\n f.read()\n with open(\"file\") as f:\n \n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyAssignmentToLoopOrWithParameter", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PySuperArgumentsInspection", + "shortDescription": { + "text": "Wrong arguments to call super" + }, + "fullDescription": { + "text": "Reports cases when any call to 'super(A, B)' does not meet the following requirements: 'B' is an instance of 'A' 'B' a subclass of 'A' Example: 'class Figure:\n def color(self):\n pass\n\n\nclass Rectangle(Figure):\n def color(self):\n pass\n\n\nclass Square(Figure):\n def color(self):\n return super(Rectangle, self).color() # Square is not an instance or subclass of Rectangle' As a fix, you can make the 'Square' an instance of the 'Rectangle' class.", + "markdown": "Reports cases when any call to `super(A, B)` does not meet the\nfollowing requirements:\n\n* `B` is an instance of `A`\n* `B` a subclass of `A`\n\n**Example:**\n\n\n class Figure:\n def color(self):\n pass\n\n\n class Rectangle(Figure):\n def color(self):\n pass\n\n\n class Square(Figure):\n def color(self):\n return super(Rectangle, self).color() # Square is not an instance or subclass of Rectangle\n\nAs a fix, you can make the `Square` an instance of the `Rectangle` class." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PySuperArguments", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyNonAsciiCharInspection", + "shortDescription": { + "text": "File contains non-ASCII character" + }, + "fullDescription": { + "text": "Reports cases in Python 2 when a file contains non-ASCII characters and does not have an encoding declaration at the top. Example: 'class A(object):\n# №5\n def __init__(self):\n pass' In this example, the IDE reports a non-ASCII symbol in a comment and a lack of encoding declaration. Apply the proposed quick-fix to add a missing encoding declaration: '# coding=utf-8\nclass A(object)\n# №5\n def __init__(self):\n pass'", + "markdown": "Reports cases in Python 2 when a file contains non-ASCII characters and does not\nhave an encoding declaration at the top.\n\n**Example:**\n\n\n class A(object):\n # №5\n def __init__(self):\n pass\n\nIn this example, the IDE reports a non-ASCII symbol in a comment and a lack of encoding\ndeclaration. Apply the proposed quick-fix to add a missing encoding declaration:\n\n\n # coding=utf-8\n class A(object)\n # №5\n def __init__(self):\n pass\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyNonAsciiChar", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyAbstractClassInspection", + "shortDescription": { + "text": "Class must implement all abstract methods" + }, + "fullDescription": { + "text": "Reports cases when not all abstract properties or methods are defined in a subclass. Example: 'from abc import abstractmethod, ABC\n\n\nclass Figure(ABC):\n\n @abstractmethod\n def do_figure(self):\n pass\n\n\nclass Triangle(Figure):\n def do_triangle(self):\n pass' When the quick-fix is applied, the IDE implements an abstract method for the 'Triangle' class: 'from abc import abstractmethod, ABC\n\n\nclass Figure(ABC):\n\n @abstractmethod\n def do_figure(self):\n pass\n\n\nclass Triangle(Figure):\n def do_figure(self):\n pass\n\n def do_triangle(self):\n pass'", + "markdown": "Reports cases when not all abstract properties or methods are defined in\na subclass.\n\n**Example:**\n\n\n from abc import abstractmethod, ABC\n\n\n class Figure(ABC):\n\n @abstractmethod\n def do_figure(self):\n pass\n\n\n class Triangle(Figure):\n def do_triangle(self):\n pass\n\nWhen the quick-fix is applied, the IDE implements an abstract method for the `Triangle` class:\n\n\n from abc import abstractmethod, ABC\n\n\n class Figure(ABC):\n\n @abstractmethod\n def do_figure(self):\n pass\n\n\n class Triangle(Figure):\n def do_figure(self):\n pass\n\n def do_triangle(self):\n pass\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyAbstractClass", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyOldStyleClassesInspection", + "shortDescription": { + "text": "Old-style class contains new-style class features" + }, + "fullDescription": { + "text": "Reports occurrences of new-style class features in old-style classes. The inspection highlights '__slots__', '__getattribute__', and 'super()' inside old-style classes.", + "markdown": "Reports occurrences of\n[new-style class features](https://www.python.org/doc/newstyle/)\nin old-style classes. The inspection highlights\n`__slots__`, `__getattribute__`, and `super()`\ninside old-style classes." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyOldStyleClasses", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyBroadExceptionInspection", + "shortDescription": { + "text": "Unclear exception clauses" + }, + "fullDescription": { + "text": "Reports exception clauses that do not provide specific information about the problem. Example: Clauses that do not specify an exception class Clauses that are specified as 'Exception'", + "markdown": "Reports exception clauses that do not provide specific information\nabout the problem.\n\n**Example:**\n\n* Clauses that do not specify an exception class\n* Clauses that are specified as `Exception`" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyBroadException", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyTypeCheckerInspection", + "shortDescription": { + "text": "Incorrect type" + }, + "fullDescription": { + "text": "Reports type errors in function call expressions, targets, and return values. In a dynamically typed language, this is possible in a limited number of cases. Types of function parameters can be specified in docstrings or in Python 3 function annotations. Example: 'def foo() -> int:\n return \"abc\" # Expected int, got str\n\n\na: str\na = foo() # Expected str, got int' With the quick-fix, you can modify the problematic types: 'def foo() -> str:\n return \"abc\"\n\n\na: str\na = foo()'", + "markdown": "Reports type errors in function call expressions, targets, and return values. In a dynamically typed language, this is possible in a limited number of cases.\n\nTypes of function parameters can be specified in\ndocstrings or in Python 3 function annotations.\n\n**Example:**\n\n\n def foo() -> int:\n return \"abc\" # Expected int, got str\n\n\n a: str\n a = foo() # Expected str, got int\n\nWith the quick-fix, you can modify the problematic types:\n\n\n def foo() -> str:\n return \"abc\"\n\n\n a: str\n a = foo()\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyTypeChecker", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyByteLiteralInspection", + "shortDescription": { + "text": "A byte literal contains a non-ASCII character" + }, + "fullDescription": { + "text": "Reports characters in byte literals that are outside ASCII range. Example: 's = b'№5''", + "markdown": "Reports characters in byte literals that are outside ASCII range.\n\n**Example:**\n\n\n s = b'№5'\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyByteLiteral", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyAugmentAssignmentInspection", + "shortDescription": { + "text": "Assignment can be replaced with augmented assignment" + }, + "fullDescription": { + "text": "Reports assignments that can be replaced with augmented assignments. Example: 'a = 23\nb = 3\na = a + b' After the quick-fix is applied, the code changes to: 'a = 23\nb = 3\na += b'", + "markdown": "Reports assignments that can be replaced with augmented assignments.\n\n**Example:**\n\n\n a = 23\n b = 3\n a = a + b\n\nAfter the quick-fix is applied, the code changes to:\n\n\n a = 23\n b = 3\n a += b\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "PyAugmentAssignment", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyDeprecationInspection", + "shortDescription": { + "text": "Deprecated function, class, or module" + }, + "fullDescription": { + "text": "Reports usages of Python functions, or methods that are marked as deprecated and raise the 'DeprecationWarning' or 'PendingDeprecationWarning' warning. Also, this inspection highlights usages of 'abc.abstractstaticmethod', 'abc.abstractproperty', and 'abc.abstractclassmethod' decorators. Example: 'class Foo:\n @property\n def bar(self):\n import warnings\n warnings.warn(\"this is deprecated\", DeprecationWarning, 2)\n return 5\n\n\nfoo = Foo()\nprint(foo.bar)'", + "markdown": "Reports usages of Python functions, or methods that are marked as\ndeprecated and raise the `DeprecationWarning` or `PendingDeprecationWarning` warning.\n\nAlso, this inspection highlights usages of `abc.abstractstaticmethod`, `abc.abstractproperty`, and `abc.abstractclassmethod`\ndecorators.\n\n**Example:**\n\n\n class Foo:\n @property\n def bar(self):\n import warnings\n warnings.warn(\"this is deprecated\", DeprecationWarning, 2)\n return 5\n\n\n foo = Foo()\n print(foo.bar)\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyDeprecation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyUnnecessaryBackslashInspection", + "shortDescription": { + "text": "Unnecessary backslash" + }, + "fullDescription": { + "text": "Reports backslashes in places where line continuation is implicit inside '()', '[]', and '{}'. Example: 'a = ('first', \\\n 'second', 'third')' When the quick-fix is applied, the redundant backslash is deleted.", + "markdown": "Reports backslashes in places where line continuation is implicit inside `()`,\n`[]`, and `{}`.\n\n**Example:**\n\n\n a = ('first', \\\n 'second', 'third')\n\nWhen the quick-fix is applied, the redundant backslash is deleted." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyUnnecessaryBackslash", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyShadowingNamesInspection", + "shortDescription": { + "text": "Shadowing names from outer scopes" + }, + "fullDescription": { + "text": "Reports shadowing names defined in outer scopes. Example: 'def outer(p):\n def inner(p):\n pass' As a quick-fix, the IDE offers to remove a parameter or rename it.", + "markdown": "Reports shadowing names defined in outer scopes.\n\n**Example:**\n\n\n def outer(p):\n def inner(p):\n pass\n\nAs a quick-fix, the IDE offers to remove a parameter or rename it." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyShadowingNames", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyFinalInspection", + "shortDescription": { + "text": "Invalid usages of final classes, methods, and variables" + }, + "fullDescription": { + "text": "Reports invalid usages of final classes, methods and variables. Example: 'from typing import final\n\n\n@final\nclass A:\n def a_method(self):\n pass\n\n\nclass B(A):\n def a_method(self):\n pass'", + "markdown": "Reports invalid usages of final classes,\nmethods and variables.\n\n**Example:**\n\n\n from typing import final\n\n\n @final\n class A:\n def a_method(self):\n pass\n\n\n class B(A):\n def a_method(self):\n pass\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyFinal", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PySingleQuotedDocstringInspection", + "shortDescription": { + "text": "Single quoted docstring" + }, + "fullDescription": { + "text": "Reports docstrings that do not adhere to the triple double-quoted string format. Example: 'def calc(self, balance=0):\n 'param: balance'\n self.balance = balance' When the quick-fix is applied, the code changes to: 'def calc(self, balance=0):\n \"\"\"param: balance\"\"\"\n self.balance = balance'", + "markdown": "Reports docstrings that do not adhere to the triple double-quoted string format.\n\n**Example:**\n\n\n def calc(self, balance=0):\n 'param: balance'\n self.balance = balance\n\nWhen the quick-fix is applied, the code changes to:\n\n\n def calc(self, balance=0):\n \"\"\"param: balance\"\"\"\n self.balance = balance\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PySingleQuotedDocstring", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyUnusedLocalInspection", + "shortDescription": { + "text": "Unused local symbols" + }, + "fullDescription": { + "text": "Reports local variables, parameters, and functions that are locally defined, but not used name in a function.", + "markdown": "Reports local variables, parameters, and functions that are locally defined, but not used name in a function." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyUnusedLocal", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyReturnFromInitInspection", + "shortDescription": { + "text": "__init__ method that returns a value" + }, + "fullDescription": { + "text": "Reports occurrences of 'return' statements with a return value inside '__init__' methods of classes. Example: 'class Sum:\n def __init__(self, a, b):\n self.a = a\n self.b = b\n self.sum = a + b\n return self.sum' A constructor should not return any value. The '__init__' method should only initialize the values of instance members for news objects. As a quick-fix, the IDE offers to remove the 'return' statement.", + "markdown": "Reports occurrences of `return` statements with a return value inside\n`__init__` methods of classes.\n\n**Example:**\n\n\n class Sum:\n def __init__(self, a, b):\n self.a = a\n self.b = b\n self.sum = a + b\n return self.sum\n\nA constructor should not return any value. The `__init__` method should\nonly initialize the values of instance members for news objects.\n\nAs a quick-fix, the IDE offers to remove the `return` statement." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyReturnFromInit", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyMissingOrEmptyDocstringInspection", + "shortDescription": { + "text": "Missing or empty docstring" + }, + "fullDescription": { + "text": "Reports missing and empty docstrings. Example of a missing docstring 'def demo(a):\n c = a ** 2' Example of an empty docstring 'def demo(a):\n \"\"\"\n \"\"\"\n c = a ** 2' When the quick-fix is applied, the code fragments change to: 'def demo(a):\n \"\"\"\n\n :param a:\n \"\"\"\n c = a ** 2' You need to provide some details about the parameter in the generated template.", + "markdown": "Reports missing and empty docstrings.\n\n**Example of a missing docstring**\n\n\n def demo(a):\n c = a ** 2\n\n**Example of an empty docstring**\n\n\n def demo(a):\n \"\"\"\n \"\"\"\n c = a ** 2\n\nWhen the quick-fix is applied, the code fragments change to:\n\n\n def demo(a):\n \"\"\"\n\n :param a:\n \"\"\"\n c = a ** 2\n\nYou need to provide some details about the parameter in the generated template." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "PyMissingOrEmptyDocstring", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyPep8NamingInspection", + "shortDescription": { + "text": "PEP 8 naming convention violation" + }, + "fullDescription": { + "text": "Reports violations of the PEP8 naming conventions. Example: 'class mammalia(object):\n extremities = 4\n\n def feeds(self):\n print(\"milk\")' In this code fragment, IDE offers to rename 'mammalia' to 'Mammalia'. When the quick-fix is applied, the code change to: 'class Mammalia(object):\n extremities = 4\n\n def feeds(self):\n print(\"milk\")'", + "markdown": "Reports violations of the\n[PEP8](https://www.python.org/dev/peps/pep-0008/) naming conventions.\n\n**Example:**\n\n\n class mammalia(object):\n extremities = 4\n\n def feeds(self):\n print(\"milk\")\n\nIn this code fragment, IDE offers to rename `mammalia` to `Mammalia`.\nWhen the quick-fix is applied, the code change to:\n\n\n class Mammalia(object):\n extremities = 4\n\n def feeds(self):\n print(\"milk\")\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyPep8Naming", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyDictDuplicateKeysInspection", + "shortDescription": { + "text": "Dictionary contains duplicate keys" + }, + "fullDescription": { + "text": "Reports using the same value as the dictionary key twice. Example: 'dic = {\"a\": [1, 2], \"a\": [3, 4]}'", + "markdown": "Reports using the same value as the dictionary key twice.\n\n**Example:**\n\n\n dic = {\"a\": [1, 2], \"a\": [3, 4]}\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyDictDuplicateKeys", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyNoneFunctionAssignmentInspection", + "shortDescription": { + "text": "Assigning function calls that don't return anything" + }, + "fullDescription": { + "text": "Reports cases when an assignment is done on a function that does not return anything. This inspection is similar to pylint inspection E1111. Example: 'def just_print():\n print(\"Hello!\")\n\n\naction = just_print()' As a quick-fix, the IDE offers to remove the assignment.", + "markdown": "Reports cases when an assignment is done on a function that does not return anything.\nThis inspection is similar to [pylint inspection E1111](https://docs.pylint.org/en/1.6.0/features.html#id6).\n\n**Example:**\n\n\n def just_print():\n print(\"Hello!\")\n\n\n action = just_print()\n\nAs a quick-fix, the IDE offers to remove the assignment." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyNoneFunctionAssignment", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyStatementEffectInspection", + "shortDescription": { + "text": "Statement has no effect" + }, + "fullDescription": { + "text": "Reports statements that have no effect. Example: 'class Car:\n def __init__(self, speed=0):\n self.speed = speed\n self.time # has no effect\n\n2 + 3 # has no effect' In this example, you can either add a field 'time' to the 'Car' class or introduce variables for the problematic statements.", + "markdown": "Reports statements that have no effect.\n\n**Example:**\n\n\n class Car:\n def __init__(self, speed=0):\n self.speed = speed\n self.time # has no effect\n\n 2 + 3 # has no effect\n\nIn this example, you can either add a field `time` to the `Car` class or\nintroduce variables for the problematic statements." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyStatementEffect", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyMandatoryEncodingInspection", + "shortDescription": { + "text": "No encoding specified for file" + }, + "fullDescription": { + "text": "Reports a missing encoding comment in Python 2. Example: 'class Book(object):\n def __init__(self):\n pass' When the quick-fix is applied, the missing comment is added: '# coding=utf-8\nclass Book(object):\n def __init__(self):\n pass'", + "markdown": "Reports a missing encoding comment in Python 2.\n\n**Example:**\n\n\n class Book(object):\n def __init__(self):\n pass\n\nWhen the quick-fix is applied, the missing comment is added:\n\n\n # coding=utf-8\n class Book(object):\n def __init__(self):\n pass\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PyMandatoryEncoding", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyInconsistentIndentationInspection", + "shortDescription": { + "text": "Inconsistent indentation" + }, + "fullDescription": { + "text": "Reports inconsistent indentation in Python source files when, for example, you use a mixture of tabs and spaces in your code.", + "markdown": "Reports inconsistent indentation in Python source files when, for example,\nyou use a mixture of tabs and spaces in your code." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyInconsistentIndentation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyAttributeOutsideInitInspection", + "shortDescription": { + "text": "An instance attribute is defined outside `__init__`" + }, + "fullDescription": { + "text": "Reports a problem when instance attribute definition is outside '__init__' method. Example: 'class Book:\n def __init__(self):\n self.author = 'Mark Twain'\n\n def release(self):\n self.year = '1889'' When the quick-fix is applied, the code sample changes to: 'class Book:\n def __init__(self):\n self.year = '1889'\n self.author = 'Mark Twain'\n\n def release(self):\n pass'", + "markdown": "Reports a problem when instance attribute definition is outside `__init__` method.\n\n**Example:**\n\n\n class Book:\n def __init__(self):\n self.author = 'Mark Twain'\n\n def release(self):\n self.year = '1889'\n\n\nWhen the quick-fix is applied, the code sample changes to:\n\n\n class Book:\n def __init__(self):\n self.year = '1889'\n self.author = 'Mark Twain'\n\n def release(self):\n pass\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyAttributeOutsideInit", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyTypedDictInspection", + "shortDescription": { + "text": "Invalid TypedDict definition and usages" + }, + "fullDescription": { + "text": "Reports invalid definition and usage of TypedDict. Example: 'from typing import TypedDict\n\n\nclass Movie(TypedDict):\n name: str\n year: int\n rate: int = 10 # Right-hand side values are not supported\n\n def method(self): # Invalid statement in TypedDict\n pass\n\n\nm = Movie(name=\"name\", year=1000, rate=9)\nprint(m[\"director\"]) # There is no the 'director' key in 'Movie'\ndel m[\"name\"] # The 'name' key cannot be deleted\nm[\"year\"] = \"1001\" # Expected 'int', got 'str''", + "markdown": "Reports invalid definition and usage of\n[TypedDict](https://www.python.org/dev/peps/pep-0589/).\n\n**Example:**\n\n\n from typing import TypedDict\n\n\n class Movie(TypedDict):\n name: str\n year: int\n rate: int = 10 # Right-hand side values are not supported\n\n def method(self): # Invalid statement in TypedDict\n pass\n\n\n m = Movie(name=\"name\", year=1000, rate=9)\n print(m[\"director\"]) # There is no the 'director' key in 'Movie'\n del m[\"name\"] # The 'name' key cannot be deleted\n m[\"year\"] = \"1001\" # Expected 'int', got 'str'\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyTypedDict", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyPep8Inspection", + "shortDescription": { + "text": "PEP 8 coding style violation" + }, + "fullDescription": { + "text": "Reports violations of the PEP 8 coding style guide by running the bundled pycodestyle.py tool.", + "markdown": "Reports violations of the [PEP 8 coding style guide](https://www.python.org/dev/peps/pep-0008/) by running the bundled [pycodestyle.py](https://github.com/PyCQA/pycodestyle) tool." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyPep8", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyMissingTypeHintsInspection", + "shortDescription": { + "text": "Missing type hinting for function definition" + }, + "fullDescription": { + "text": "Reports missing type hints for function declaration in one of the two formats: parameter annotations or a type comment. Select the Only when types are known checkbox if you want the inspection check the types collected from runtime or inferred.", + "markdown": "Reports missing type hints for function declaration in\none of the two formats: parameter annotations or a type comment.\n\nSelect the **Only when types are known** checkbox if you want the inspection check\nthe types collected from runtime or inferred." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "PyMissingTypeHints", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyTupleItemAssignmentInspection", + "shortDescription": { + "text": "Tuple item assignment is prohibited" + }, + "fullDescription": { + "text": "Reports assignments to a tuple item. Example: 't = ('red', 'blue', 'green', 'white')\nt[3] = 'black'' A quick-fix offers to replace the tuple with a list.", + "markdown": "Reports assignments to a tuple item.\n\n**Example:**\n\n\n t = ('red', 'blue', 'green', 'white')\n t[3] = 'black'\n\nA quick-fix offers to replace the tuple with a list." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyTupleItemAssignment", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyDunderSlotsInspection", + "shortDescription": { + "text": "Invalid usages of classes with '__slots__' definitions" + }, + "fullDescription": { + "text": "Reports invalid usages of a class with '__slots__' definitions. Example: 'class Foo:\n __slots__ = ['foo', 'bar']\n\n\nfoo = Foo()\nfoo.baz = 'spam''", + "markdown": "Reports invalid usages of a class with `__slots__` definitions.\n\n**Example:**\n\n\n class Foo:\n __slots__ = ['foo', 'bar']\n\n\n foo = Foo()\n foo.baz = 'spam'\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyDunderSlots", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyDefaultArgumentInspection", + "shortDescription": { + "text": "The default argument is mutable" + }, + "fullDescription": { + "text": "Reports a problem when a mutable value as a list or dictionary is detected in a default value for an argument. Default argument values are evaluated only once at function definition time, which means that modifying the default value of the argument will affect all subsequent calls of that function. Example: 'def func(s, cache={}):\n cache[s] = None' When the quick-fix is applied, the code changes to: 'def func(s, cache=None):\n if cache is None:\n cache = {}\n cache[s] = None'", + "markdown": "Reports a problem when a mutable value as a list or dictionary is detected in a default value for\nan argument. \n\nDefault argument values are evaluated only once at function definition time,\nwhich means that modifying the\ndefault value of the argument will affect all subsequent calls of that function.\n\n**Example:**\n\n\n def func(s, cache={}):\n cache[s] = None\n\nWhen the quick-fix is applied, the code changes to:\n\n\n def func(s, cache=None):\n if cache is None:\n cache = {}\n cache[s] = None\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyDefaultArgument", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyTestUnpassedFixtureInspection", + "shortDescription": { + "text": "Fixture is not requested by test functions" + }, + "fullDescription": { + "text": "Reports if a fixture is used without being passed to test function parameters or to '@pytest.mark.usefixtures' decorator", + "markdown": "Reports if a fixture is used without being passed to test function parameters or to `@pytest.mark.usefixtures` decorator" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyTestUnpassedFixture", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyShadowingBuiltinsInspection", + "shortDescription": { + "text": "Shadowing built-in names" + }, + "fullDescription": { + "text": "Reports shadowing built-in names, such as 'len' or 'list'. Example: 'def len(a, b, c):\n d = a + b + c\n return d' In this code fragment, the 'len' built-in name is used. The IDE offers to apply the Rename refactoring as a fix.", + "markdown": "Reports shadowing built-in names, such as `len` or `list`.\n\n**Example:**\n\n\n def len(a, b, c):\n d = a + b + c\n return d\n\nIn this code fragment, the `len` built-in name is used. The IDE offers to\napply the Rename refactoring as a fix." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyShadowingBuiltins", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyMethodOverridingInspection", + "shortDescription": { + "text": "Method signature does not match signature of overridden method" + }, + "fullDescription": { + "text": "Reports inconsistencies in overriding method signatures. Example: 'class Book:\n def add_title(self):\n pass\n\n\nclass Novel(Book):\n def add_title(self, text):\n pass' Parameters of the 'add_title' method in the 'Novel' class do not match the method signature specified in the 'Book' class. As a fix, the IDE offers to apply the Change Signature refactoring.", + "markdown": "Reports inconsistencies in overriding method signatures.\n\n**Example:**\n\n\n class Book:\n def add_title(self):\n pass\n\n\n class Novel(Book):\n def add_title(self, text):\n pass\n\nParameters of the `add_title` method in the `Novel` class do not match the method\nsignature specified in the `Book` class. As a fix, the IDE offers to apply the Change Signature\nrefactoring." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyMethodOverriding", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PoetryPackageVersionsInspection", + "shortDescription": { + "text": "Poetry package versions" + }, + "fullDescription": { + "text": "Reports outdated versions of packages in '[tool.poetry.dependencies]' and '[tool.poetry.dev-dependencies]' sections of 'pyproject.toml'.", + "markdown": "Reports outdated versions of packages in `[tool.poetry.dependencies]` and `[tool.poetry.dev-dependencies]`\nsections of `pyproject.toml`." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PoetryPackageVersions", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyTestParametrizedInspection", + "shortDescription": { + "text": "Incorrect arguments in @pytest.mark.parametrize" + }, + "fullDescription": { + "text": "Reports functions that are decorated with @pytest.mark.parametrize but do not have arguments to accept parameters of the decorator.", + "markdown": "Reports functions that are decorated with [@pytest.mark.parametrize](https://docs.pytest.org/en/stable/parametrize.html) but do not have arguments to accept\nparameters of the decorator." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyTestParametrized", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyDecoratorInspection", + "shortDescription": { + "text": "Class-specific decorator is used outside the class" + }, + "fullDescription": { + "text": "Reports usages of '@classmethod' or '@staticmethod' decorators in methods outside a class. Example: 'class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\n@classmethod\ndef change_state(self):\n pass' The 'change_state' method should not use the '@classmethod' decorator or it should be moved to the 'State' class declaration. If you apply the 'Remove decorator' action, the code changes to: 'class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\ndef change_state(self):\n pass'", + "markdown": "Reports usages of `@classmethod` or `@staticmethod` decorators\nin methods outside a class.\n\n**Example:**\n\n\n class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\n @classmethod\n def change_state(self):\n pass\n\nThe `change_state` method should not use the `@classmethod` decorator or it should be\nmoved to the `State` class declaration.\n\nIf you apply the `Remove decorator` action, the code changes to:\n\n\n class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\n def change_state(self):\n pass\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyDecorator", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyAsyncCallInspection", + "shortDescription": { + "text": "Missing `await` syntax in coroutine calls" + }, + "fullDescription": { + "text": "Reports coroutines that were called without using the 'await' syntax. Example: 'async def bar():\n pass\n\n\nasync def foo():\n bar()' After the quick-fix is applied, the code changes to: 'async def bar():\n pass\n\n\nasync def foo():\n await bar()'", + "markdown": "Reports coroutines that were called\nwithout using the `await` syntax.\n\n**Example:**\n\n\n async def bar():\n pass\n\n\n async def foo():\n bar()\n\nAfter the quick-fix is applied, the code changes to:\n\n\n async def bar():\n pass\n\n\n async def foo():\n await bar()\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyAsyncCall", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RestRoleInspection", + "shortDescription": { + "text": "Role is not defined" + }, + "fullDescription": { + "text": "Reports undefined roles in reStructuredText files. Example: '.. role:: custom\n.. role:: newcustom(emphasis)\n\nAn example of using :custom:`interpreted text`\nAn example of using :newcustom:`interpreted text`\nAn example of using :emphasis:`interpreted text`\n\n\nSome text using undefined role :undef:`interpreted text`'", + "markdown": "Reports undefined roles in reStructuredText files.\n\n**Example:**\n\n\n .. role:: custom\n .. role:: newcustom(emphasis)\n\n An example of using :custom:`interpreted text`\n An example of using :newcustom:`interpreted text`\n An example of using :emphasis:`interpreted text`\n\n\n Some text using undefined role :undef:`interpreted text`\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RestRoleInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "ReST", + "index": 74, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CommandLineInspection", + "shortDescription": { + "text": "Incorrect CLI syntax" + }, + "fullDescription": { + "text": "Reports the problems if the arguments of the command you type in the console are not in the proper order. The inspection also verifies that option names and arguments are correct. Do not disable the inspection if you are going to use command-line interfaces like manage.py in Django.", + "markdown": "Reports the problems if the arguments of the command you type in the console are not in the proper order. The inspection also verifies\nthat option names and arguments are correct.\n\nDo not disable the inspection if you are going to use command-line interfaces like [manage.py in Django](https://www.jetbrains.com/help/pycharm/running-manage-py.html)." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "CommandLineInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyComparisonWithNoneInspection", + "shortDescription": { + "text": "Using equality operators to compare with None" + }, + "fullDescription": { + "text": "Reports comparisons with 'None'. That type of comparisons should always be done with 'is' or 'is not', never the equality operators. Example: 'a = 2\n\n\nif a == None:\n print(\"Success\")' Once the quick-fix is applied, the code changes to: 'a = 2\n\n\nif a is None:\n print(\"Success\")'", + "markdown": "Reports comparisons with `None`. That type of comparisons\nshould always be done with `is` or `is not`, never\nthe equality operators.\n\n**Example:**\n\n\n a = 2\n\n\n if a == None:\n print(\"Success\")\n\nOnce the quick-fix is applied, the code changes to:\n\n\n a = 2\n\n\n if a is None:\n print(\"Success\")\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyComparisonWithNone", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyMethodParametersInspection", + "shortDescription": { + "text": "Improper first parameter" + }, + "fullDescription": { + "text": "Reports methods that lack the first parameter that is usually named 'self'. Example: 'class Movie:\n\n def show():\n pass' When the quick-fix is applied, the code changes to: 'class Movie:\n\n def show(self):\n pass' The inspection also reports naming issues in class methods. Example: 'class Movie:\n @classmethod\n def show(abc):\n pass' Since the first parameter of a class method should be 'cls', the IDE provides a quick-fix to rename it.", + "markdown": "Reports methods that lack the first parameter that is usually\nnamed `self`.\n\n**Example:**\n\n\n class Movie:\n\n def show():\n pass\n\nWhen the quick-fix is applied, the code changes to:\n\n\n class Movie:\n\n def show(self):\n pass\n\nThe inspection also reports naming issues in class methods.\n\n**Example:**\n\n\n class Movie:\n @classmethod\n def show(abc):\n pass\n\nSince the first parameter of a class method should be `cls`, the IDE provides a quick-fix\nto rename it." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyMethodParameters", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyDocstringTypesInspection", + "shortDescription": { + "text": "Type in docstring does not match inferred type" + }, + "fullDescription": { + "text": "Reports types in docstring that do not match dynamically inferred types.", + "markdown": "Reports types in docstring that do not match dynamically inferred types." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyDocstringTypes", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyMethodFirstArgAssignmentInspection", + "shortDescription": { + "text": "First argument of the method is reassigned" + }, + "fullDescription": { + "text": "Reports cases when the first parameter, such as 'self' or 'cls', is reassigned in a method. Because in most cases, there are no objectives in such reassignment, the IDE indicates an error. Example: 'class Account:\n def calc(self, balance):\n if balance == 0:\n self = balance\n return self' As a fix, you might want to check and modify the algorithm to ensure that reassignment is needed. If everything is correct, you can invoke intention actions for this code and opt to ignore the warning.", + "markdown": "Reports cases when the first parameter,\nsuch as `self` or `cls`, is reassigned in a method.\nBecause in most cases, there are no objectives in such reassignment, the\nIDE indicates an error.\n\n**Example:**\n\n\n class Account:\n def calc(self, balance):\n if balance == 0:\n self = balance\n return self\n\nAs a fix, you might want to check and modify the algorithm to ensure that reassignment is needed. If everything is correct,\nyou can invoke intention actions for this code and opt to ignore the warning." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyMethodFirstArgAssignment", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyNewStyleGenericSyntaxInspection", + "shortDescription": { + "text": "Invalid usage of new-style type parameters and type aliases" + }, + "fullDescription": { + "text": "Reports invalid usage of PEP 695 type parameter syntax Finds the following problems in function and class definitions and new-style type alias statements: Extending typing.Generic in new-style generic classes Extending parameterized typing.Protocol in new-style generic classes Using generic upper bounds and constraints with type parameters for ParamSpec and TypeVarTuple Mixing traditional and new-style type variables Using traditional type variables in new-style type aliases Examples: 'from typing import Generic\n\n class Example[T](Generic[T]): ... # Classes with type parameter list should not extend 'Generic'' 'class Example[T: (list[S], str)]: ... # Generic types are not allowed inside constraints and bounds of type parameters' 'from typing import TypeVar\n\n K = TypeVar(\"K\")\n\n class ClassC[V]:\n def method2[M](self, a: M, b: K) -> M | K: ... # Mixing traditional and new-style TypeVars is not allowed'", + "markdown": "Reports invalid usage of [PEP 695](https://www.python.org/dev/peps/pep-0695/) type parameter syntax\n\n\nFinds the following problems in function and class definitions and new-style type alias statements:\n\n* Extending typing.Generic in new-style generic classes\n* Extending parameterized typing.Protocol in new-style generic classes\n* Using generic upper bounds and constraints with type parameters for ParamSpec and TypeVarTuple\n* Mixing traditional and new-style type variables\n* Using traditional type variables in new-style type aliases\n\n\nExamples:\n\n\n from typing import Generic\n\n class Example[T](Generic[T]): ... # Classes with type parameter list should not extend 'Generic'\n\n\n class Example[T: (list[S], str)]: ... # Generic types are not allowed inside constraints and bounds of type parameters\n\n\n from typing import TypeVar\n\n K = TypeVar(\"K\")\n\n class ClassC[V]:\n def method2[M](self, a: M, b: K) -> M | K: ... # Mixing traditional and new-style TypeVars is not allowed\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyNewStyleGenericSyntax", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyTupleAssignmentBalanceInspection", + "shortDescription": { + "text": "Tuple assignment balance is incorrect" + }, + "fullDescription": { + "text": "Reports cases when the number of expressions on the right-hand side and targets on the left-hand side are not the same. Example: 't = ('red', 'blue', 'green', 'white')\n(c1, c2, c3) = t' As a quick-fix, you can modify the highlighted code fragment to restore the tuple balance.", + "markdown": "Reports cases when the number of expressions on the right-hand side\nand targets on the left-hand side are not the same.\n\n**Example:**\n\n\n t = ('red', 'blue', 'green', 'white')\n (c1, c2, c3) = t\n\nAs a quick-fix, you can modify the highlighted code fragment to restore the tuple\nbalance." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyTupleAssignmentBalance", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyClassHasNoInitInspection", + "shortDescription": { + "text": "Class has no `__init__` method" + }, + "fullDescription": { + "text": "Reports cases in Python 2 when a class has no '__init__' method, neither its parent classes. Example: 'class Book():\n pass' The quick-fix adds the '__init__' method: 'class Book():\n def __init__(self):\n pass'", + "markdown": "Reports cases in Python 2 when a class has no `__init__` method, neither its parent\nclasses.\n\n**Example:**\n\n\n class Book():\n pass\n\nThe quick-fix adds the `__init__` method:\n\n\n class Book():\n def __init__(self):\n pass\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyClassHasNoInit", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyArgumentEqualDefaultInspection", + "shortDescription": { + "text": "The function argument is equal to the default parameter value" + }, + "fullDescription": { + "text": "Reports a problem when an argument passed to the function is equal to the default parameter value. This inspection is disabled by default to avoid performance degradation. Example: 'def my_function(a: int = 2):\n print(a)\n\n\nmy_function(2)'", + "markdown": "Reports a problem when an argument\npassed to the function is equal to the default parameter value.\n\nThis inspection is disabled by default to avoid performance degradation.\n\n**Example:**\n\n\n def my_function(a: int = 2):\n print(a)\n\n\n my_function(2)\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "PyArgumentEqualDefault", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyClassVarInspection", + "shortDescription": { + "text": "Invalid usage of ClassVar variables" + }, + "fullDescription": { + "text": "Reports invalid usages of ClassVar annotations. Example: 'from typing import ClassVar\n\n\nclass Cat:\n color: ClassVar[str] = \"white\"\n weight: int\n\n def __init__(self, weight: int):\n self.weight = weight\n\n\nCat.color = \"black\" # OK\nmy_cat = Cat(5)\nmy_cat.color = \"gray\" # Error, setting class variable on instance'", + "markdown": "Reports invalid usages of [ClassVar](https://docs.python.org/3/library/typing.html#typing.ClassVar) annotations.\n\n**Example:**\n\n\n from typing import ClassVar\n\n\n class Cat:\n color: ClassVar[str] = \"white\"\n weight: int\n\n def __init__(self, weight: int):\n self.weight = weight\n\n\n Cat.color = \"black\" # OK\n my_cat = Cat(5)\n my_cat.color = \"gray\" # Error, setting class variable on instance\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyClassVar", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyFromFutureImportInspection", + "shortDescription": { + "text": "Improper position of from __future__ import" + }, + "fullDescription": { + "text": "Reports 'from __future__ import' statements that are used not at the beginning of a file. Example: 'a = 1\nfrom __future__ import print_function\nprint()' When the quick-fix is applied, the code changes to: 'from __future__ import print_function\n\na = 1\nprint()'", + "markdown": "Reports `from __future__ import`\nstatements that are used not at\nthe beginning of a file.\n\n**Example:**\n\n\n a = 1\n from __future__ import print_function\n print()\n\nWhen the quick-fix is applied, the code changes to:\n\n\n from __future__ import print_function\n\n a = 1\n print()\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyFromFutureImport", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyUnresolvedReferencesInspection", + "shortDescription": { + "text": "Unresolved references" + }, + "fullDescription": { + "text": "Reports references in your code that cannot be resolved. In a dynamically typed language, this is possible in a limited number of cases. If a reference type is unknown, then its attributes are not highlighted as unresolved even if you know that they should be: 'def print_string(s):\n print(s.abc())' In this code fragment 's' is always a string and 'abc' should be highlighted as unresolved. However, 's' type is inferred as 'Any' and no warning is reported. The IDE provides quick-fix actions to add missing references on-the-fly.", + "markdown": "Reports references in your code that cannot be resolved.\n\nIn a dynamically typed language, this is possible in a limited number of cases.\n\nIf a reference type is unknown, then its attributes are not highlighted as unresolved even if you know that they should be:\n\n\n def print_string(s):\n print(s.abc())\n\nIn this code fragment `s` is always a string and `abc` should be highlighted as unresolved. However, `s`\ntype is inferred as `Any` and no warning is reported.\n\nThe IDE provides quick-fix actions to add missing references on-the-fly." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PyUnresolvedReferences", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyPackageRequirementsInspection", + "shortDescription": { + "text": "Unsatisfied package requirements" + }, + "fullDescription": { + "text": "Reports packages mentioned in requirements files (for example, 'requirements.txt' or 'Pipfile') but not installed, or imported but not mentioned in requirements files. The IDE shows a quick-fix banner so that you can install the missing packages in one click.", + "markdown": "Reports packages mentioned in requirements files (for example, `requirements.txt` or `Pipfile`) but not installed,\nor imported but not mentioned in requirements files.\n\n\nThe IDE shows a quick-fix banner so that you can install the missing packages in one click." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyPackageRequirements", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyTrailingSemicolonInspection", + "shortDescription": { + "text": "Prohibited trailing semicolon in a statement" + }, + "fullDescription": { + "text": "Reports trailing semicolons in statements. Example: 'def my_func(a):\n c = a ** 2;\n return c' IDE provides a quick-fix that removes a trailing semicolon. When you apply it, the code changes to: 'def my_func(a):\n c = a ** 2\n return c'", + "markdown": "Reports trailing semicolons in statements.\n\n**Example:**\n\n\n def my_func(a):\n c = a ** 2;\n return c\n\nIDE provides a quick-fix that removes a trailing semicolon. When you\napply it, the code changes to:\n\n\n def my_func(a):\n c = a ** 2\n return c\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyTrailingSemicolon", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyRedundantParenthesesInspection", + "shortDescription": { + "text": "Redundant parentheses" + }, + "fullDescription": { + "text": "Reports about redundant parentheses in expressions. The IDE provides the quick-fix action to remove the redundant parentheses.", + "markdown": "Reports about redundant parentheses in expressions.\n\nThe IDE provides the quick-fix action to remove the redundant parentheses." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyRedundantParentheses", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyArgumentListInspection", + "shortDescription": { + "text": "Incorrect call arguments" + }, + "fullDescription": { + "text": "Reports discrepancies between declared parameters and actual arguments, as well as incorrect arguments, for example, duplicate named arguments, and incorrect argument order. Example: 'class Foo:\n def __call__(self, p1: int, *, p2: str = \"%\"):\n return p2 * p1\n\n\nbar = Foo()\nbar.__call__() # unfilled parameter\nbar(5, \"#\") # unexpected argument' The correct code fragment looks at follows: 'class Foo:\n def __call__(self, p1: int, *, p2: str = \"%\"):\n return p2 * p1\n\n\nbar = Foo()\nbar.__call__(5)\nbar(5, p2=\"#\")'", + "markdown": "Reports discrepancies between declared parameters and actual arguments, as well as\nincorrect arguments, for example, duplicate named arguments, and incorrect argument order.\n\n**Example:**\n\n\n class Foo:\n def __call__(self, p1: int, *, p2: str = \"%\"):\n return p2 * p1\n\n\n bar = Foo()\n bar.__call__() # unfilled parameter\n bar(5, \"#\") # unexpected argument\n\nThe correct code fragment looks at follows:\n\n\n class Foo:\n def __call__(self, p1: int, *, p2: str = \"%\"):\n return p2 * p1\n\n\n bar = Foo()\n bar.__call__(5)\n bar(5, p2=\"#\")\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyArgumentList", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyInterpreterInspection", + "shortDescription": { + "text": "An invalid interpreter" + }, + "fullDescription": { + "text": "Reports problems if there is no Python interpreter configured for the project or if the interpreter is invalid. Without a properly configured interpreter, you cannot execute your Python scripts and benefit from some Python code insight features. The IDE provides quick access to the interpreter settings.", + "markdown": "Reports problems if there is no Python interpreter configured for the project or if the interpreter is invalid. Without a properly\nconfigured interpreter, you cannot execute your Python scripts and benefit from some Python code insight features.\n\nThe IDE provides quick access to the interpreter settings." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PyInterpreter", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyPropertyAccessInspection", + "shortDescription": { + "text": "Inappropriate access to properties" + }, + "fullDescription": { + "text": "Reports cases when properties are accessed inappropriately: Read-only properties are set Write-only properties are read Non-deletable properties are deleted Example: 'class MyClass:\n @property\n def read_only(self): return None\n\n def __write_only_setter(self, value): pass\n\n write_only = property(None, __write_only_setter)\n\n\na = MyClass()\na.read_only = 10 # property cannot be set\ndel a.read_only # property cannot be deleted\nprint(a.write_only) # property cannot be read'", + "markdown": "Reports cases when properties are accessed inappropriately:\n\n* Read-only properties are set\n* Write-only properties are read\n* Non-deletable properties are deleted\n\n**Example:**\n\n\n class MyClass:\n @property\n def read_only(self): return None\n\n def __write_only_setter(self, value): pass\n\n write_only = property(None, __write_only_setter)\n\n\n a = MyClass()\n a.read_only = 10 # property cannot be set\n del a.read_only # property cannot be deleted\n print(a.write_only) # property cannot be read\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyPropertyAccess", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyStubPackagesAdvertiser", + "shortDescription": { + "text": "Stub packages advertiser" + }, + "fullDescription": { + "text": "Reports availability of stub packages. Stub package is a package that contains type information for the corresponding runtime package. Using stub packages ensures better coding assistance for the corresponding python package.", + "markdown": "Reports availability of stub packages.\n\n\n[Stub package](https://www.python.org/dev/peps/pep-0561/) is a package that contains type information for the corresponding\nruntime package.\n\nUsing stub packages ensures better coding assistance for the corresponding python package." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyStubPackagesAdvertiser", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyRelativeImportInspection", + "shortDescription": { + "text": "Suspicious relative imports" + }, + "fullDescription": { + "text": "Reports usages of relative imports inside plain directories, for example, directories neither containing '__init__.py' nor explicitly marked as namespace packages.", + "markdown": "Reports usages of relative imports inside plain directories, for example, directories neither containing `__init__.py` nor\nexplicitly marked as namespace packages." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyPackages", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyRedeclarationInspection", + "shortDescription": { + "text": "Redeclared names without usages" + }, + "fullDescription": { + "text": "Reports unconditional redeclarations of names without being used in between. Example: 'def x(): pass\n\n\nx = 2' It applies to function and class declarations, and top-level assignments. When the warning is shown, you can try a recommended action, for example, you might be prompted to rename the variable.", + "markdown": "Reports unconditional redeclarations of names without being used in between.\n\n**Example:**\n\n\n def x(): pass\n\n\n x = 2\n\nIt applies to function and class declarations, and top-level assignments.\n\nWhen the warning is shown, you can try a recommended action, for example, you might be prompted to\nrename the variable." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyRedeclaration", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyProtectedMemberInspection", + "shortDescription": { + "text": "Accessing a protected member of a class or a module" + }, + "fullDescription": { + "text": "Reports cases when a protected member is accessed outside the class, a descendant of the class where it is defined, or a module. Example: 'class Foo:\n def _protected_method(self):\n pass\n\n\nclass Bar(Foo):\n def public_method(self):\n self._protected_method()\n\n\nfoo = Foo()\nfoo._protected_method() # Access to a protected method'", + "markdown": "Reports cases when a protected member is accessed outside the class,\na descendant of the class where it is defined, or a module.\n\n**Example:**\n\n\n class Foo:\n def _protected_method(self):\n pass\n\n\n class Bar(Foo):\n def public_method(self):\n self._protected_method()\n\n\n foo = Foo()\n foo._protected_method() # Access to a protected method\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyProtectedMember", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyStubPackagesCompatibilityInspection", + "shortDescription": { + "text": "Incompatible stub packages" + }, + "fullDescription": { + "text": "Reports stub packages that do not support the version of the corresponding runtime package. A stub package contains type information for some runtime package.", + "markdown": "Reports stub packages that do not support the version of the corresponding runtime package.\n\nA [stub package](https://www.python.org/dev/peps/pep-0561/) contains type information for some runtime package." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyStubPackagesCompatibility", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyUnboundLocalVariableInspection", + "shortDescription": { + "text": "Unbound local variables" + }, + "fullDescription": { + "text": "Reports local variables referenced before assignment. Example: 'x = 0\nif x > 10:\n b = 3\nprint(b)' The IDE reports a problem for 'print(b)'. A possible fix is: 'x = 0\nif x > 10:\n b = 3\n print(b)'", + "markdown": "Reports local variables referenced before assignment.\n\n**Example:**\n\n\n x = 0\n if x > 10:\n b = 3\n print(b)\n\nThe IDE reports a problem for `print(b)`. A possible fix is:\n\n\n x = 0\n if x > 10:\n b = 3\n print(b)\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyUnboundLocalVariable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyNamedTupleInspection", + "shortDescription": { + "text": "Invalid definition of 'typing.NamedTuple'" + }, + "fullDescription": { + "text": "Reports invalid definition of a typing.NamedTuple. Example: 'import typing\n\n\nclass FullName(typing.NamedTuple):\n first: str\n last: str = \"\"\n middle: str' As a fix, place the field with the default value after the fields without default values: 'import typing\n\n\nclass FullName(typing.NamedTuple):\n first: str\n middle: str\n last: str = \"\"'", + "markdown": "Reports invalid definition of a\n[typing.NamedTuple](https://docs.python.org/3/library/typing.html#typing.NamedTuple).\n\n**Example:**\n\n\n import typing\n\n\n class FullName(typing.NamedTuple):\n first: str\n last: str = \"\"\n middle: str\n\nAs a fix, place the field with the default value after the fields without default values:\n\n\n import typing\n\n\n class FullName(typing.NamedTuple):\n first: str\n middle: str\n last: str = \"\"\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyNamedTuple", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyNestedDecoratorsInspection", + "shortDescription": { + "text": "Problematic nesting of decorators" + }, + "fullDescription": { + "text": "Reports problems with nesting decorators. The inspection highlights the cases when 'classmethod' or 'staticmethod' is applied before another decorator. Example: 'def innocent(f):\n return f\n\n\nclass A:\n @innocent # Decorator will not receive a callable it may expect\n @classmethod\n def f2(cls):\n pass\n\n @innocent # Decorator will not receive a callable it may expect\n @staticmethod\n def f1():\n pass' As a quick-fix, the IDE offers to remove the decorator.", + "markdown": "Reports problems with nesting decorators. The inspection highlights the cases when `classmethod` or `staticmethod`\nis applied before another decorator.\n\n**Example:**\n\n\n def innocent(f):\n return f\n\n\n class A:\n @innocent # Decorator will not receive a callable it may expect\n @classmethod\n def f2(cls):\n pass\n\n @innocent # Decorator will not receive a callable it may expect\n @staticmethod\n def f1():\n pass\n\nAs a quick-fix, the IDE offers to remove the decorator." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyNestedDecorators", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyOverloadsInspection", + "shortDescription": { + "text": "Overloads in regular Python files" + }, + "fullDescription": { + "text": "Reports cases when overloads in regular Python files are placed after the implementation or when their signatures are not compatible with the implementation. Example: 'from typing import overload\n\n\n@overload\ndef foo(p1, p2): # Overload signature is not compatible with the implementation\n pass\n\n\n@overload\ndef foo(p1): # Overload signature is not compatible with the implementation\n pass\n\n\ndef foo(p1, p2, p3):\n print(p1, p2, p3)'", + "markdown": "Reports cases when overloads in regular Python files are placed after the implementation or when their signatures are\nnot compatible with the implementation.\n\n**Example:**\n\n\n from typing import overload\n\n\n @overload\n def foo(p1, p2): # Overload signature is not compatible with the implementation\n pass\n\n\n @overload\n def foo(p1): # Overload signature is not compatible with the implementation\n pass\n\n\n def foo(p1, p2, p3):\n print(p1, p2, p3)\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyOverloads", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyExceptClausesOrderInspection", + "shortDescription": { + "text": "Wrong order of 'except' clauses" + }, + "fullDescription": { + "text": "Reports cases when 'except' clauses are not in the proper order, from the more specific to the more generic, or one exception class is caught twice. If you do not fix the order, some exceptions may not be caught by the most specific handler. Example: 'try:\n call()\nexcept ValueError:\n pass\nexcept UnicodeError:\n pass' The IDE recommends moving the clause up. When the quick-fix is applied, the code changes to: 'try:\n call()\nexcept UnicodeError:\n pass\nexcept ValueError:\n pass'", + "markdown": "Reports cases when `except` clauses are not in the proper order,\nfrom the more specific to the more generic, or one exception class is caught twice.\n\n\nIf you do not fix the order, some exceptions may not be caught by the most specific handler.\n\n**Example:**\n\n\n try:\n call()\n except ValueError:\n pass\n except UnicodeError:\n pass\n\nThe IDE recommends moving the clause up. When the quick-fix is applied, the code changes to:\n\n\n try:\n call()\n except UnicodeError:\n pass\n except ValueError:\n pass\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyExceptClausesOrder", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyDataclassInspection", + "shortDescription": { + "text": "Invalid definition and usage of Data Classes" + }, + "fullDescription": { + "text": "Reports invalid definitions and usages of classes created with 'dataclasses' or 'attr' modules. Example: 'import dataclasses\n\n\n@dataclasses.dataclass\nclass FullName:\n first: str\n middle: str = \"\"\n last: str'", + "markdown": "Reports invalid definitions and usages of classes created with\n`dataclasses` or `attr` modules.\n\n**Example:**\n\n\n import dataclasses\n\n\n @dataclasses.dataclass\n class FullName:\n first: str\n middle: str = \"\"\n last: str\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyDataclass", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyClassicStyleClassInspection", + "shortDescription": { + "text": "Classic style class usage" + }, + "fullDescription": { + "text": "Reports classic style classes usage. This inspection applies only to Python 2. Example: 'class A:\n pass' With quick-fixes provided by the IDE, this code fragment changes to: 'class A(object):\n def __init__(self):\n pass'", + "markdown": "Reports [classic style classes](https://docs.python.org/2/reference/datamodel.html#new-style-and-classic-classes) usage. This inspection applies only to Python 2.\n\n**Example:**\n\n\n class A:\n pass\n\nWith quick-fixes provided by the IDE, this code fragment changes to:\n\n\n class A(object):\n def __init__(self):\n pass\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PyClassicStyleClass", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyPropertyDefinitionInspection", + "shortDescription": { + "text": "Incorrect property definition" + }, + "fullDescription": { + "text": "Reports problems with the arguments of 'property()' and functions annotated with '@property'. 'class C:\n @property\n def abc(self): # Getter should return or yield something\n pass\n\n @abc.setter\n def foo(self, value): # Names of function and decorator don't match\n pass\n\n @abc.setter\n def abc(self, v1, v2): # Setter signature should be (self, value)\n pass\n\n @abc.deleter\n def abc(self, v1): # Delete signature should be (self)\n pass' A quick-fix offers to update parameters.", + "markdown": "Reports problems with the arguments of `property()` and functions\nannotated with `@property`.\n\n\n class C:\n @property\n def abc(self): # Getter should return or yield something\n pass\n\n @abc.setter\n def foo(self, value): # Names of function and decorator don't match\n pass\n\n @abc.setter\n def abc(self, v1, v2): # Setter signature should be (self, value)\n pass\n\n @abc.deleter\n def abc(self, v1): # Delete signature should be (self)\n pass\n\nA quick-fix offers to update parameters." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyPropertyDefinition", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyIncorrectDocstringInspection", + "shortDescription": { + "text": "Incorrect docstring" + }, + "fullDescription": { + "text": "Reports mismatched parameters in a docstring. For example, 'b' is highlighted, because there is no such a parameter in the 'add' function. 'def add(a, c):\n \"\"\"\n @param a:\n @param b:\n @return:\n \"\"\"\n pass' The inspection does not warn you of missing parameters if none of them is mentioned in a docstring: 'def mult(a, c):\n \"\"\"\n @return:\n \"\"\"\n pass'", + "markdown": "Reports mismatched parameters in a docstring. For example, `b` is highlighted, because there is no\nsuch a parameter in the `add` function.\n\n\n def add(a, c):\n \"\"\"\n @param a:\n @param b:\n @return:\n \"\"\"\n pass\n\nThe inspection does not warn you of missing parameters if none of them is mentioned in a docstring:\n\n\n def mult(a, c):\n \"\"\"\n @return:\n \"\"\"\n pass\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyIncorrectDocstring", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyListCreationInspection", + "shortDescription": { + "text": "Non-optimal list declaration" + }, + "fullDescription": { + "text": "Reports cases when a list declaration can be rewritten with a list literal. This ensures better performance of your application. Example: 'l = [1]\nl.append(2)' When the quick-fix is applied, the code changes to: 'l = [1, 2]'", + "markdown": "Reports cases when a list declaration\ncan be rewritten with a list literal.\n\nThis ensures better performance of your application.\n\n**Example:**\n\n\n l = [1]\n l.append(2)\n\nWhen the quick-fix is applied, the code changes to:\n\n\n l = [1, 2]\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyListCreation", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "JavaScript", + "version": "241.18034.45", + "rules": [ + { + "id": "ConstantConditionalExpressionJS", + "shortDescription": { + "text": "Constant conditional expression" + }, + "fullDescription": { + "text": "Reports a conditional expression in the format 'true? result1: result2' or 'false? result1: result2. Suggests simplifying the expression.'", + "markdown": "Reports a conditional expression in the format `true? result1: result2` or `false? result1: result2``.\nSuggests simplifying the expression.\n`" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "ConstantConditionalExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSTestFailedLine", + "shortDescription": { + "text": "Highlight failure line in test code" + }, + "fullDescription": { + "text": "Reports a failed method call or an assertion in a test.", + "markdown": "Reports a failed method call or an assertion in a test." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSTestFailedLine", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Unit testing", + "index": 8, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSValidateJSDoc", + "shortDescription": { + "text": "Syntax errors and unresolved references in JSDoc" + }, + "fullDescription": { + "text": "Reports a syntax discrepancy in a documentation comment.", + "markdown": "Reports a syntax discrepancy in a documentation comment." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSValidateJSDoc", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NonBlockStatementBodyJS", + "shortDescription": { + "text": "Statement body without braces" + }, + "fullDescription": { + "text": "Reports a 'if', 'while', 'for', or 'with' statements whose body is not a block statement. Using code block in statement bodies is usually safer for downstream maintenance.", + "markdown": "Reports a `if`, `while`, `for`, or `with` statements whose body is not a block statement. Using code block in statement bodies is usually safer for downstream maintenance." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NonBlockStatementBodyJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code style issues", + "index": 17, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "IfStatementWithTooManyBranchesJS", + "shortDescription": { + "text": "'if' statement with too many branches" + }, + "fullDescription": { + "text": "Reports an 'if' statement with too many branches. Such statements may be confusing, and often indicate inadequate levels of design abstraction. Use the field below to specify the maximum number of branches expected.", + "markdown": "Reports an `if` statement with too many branches. Such statements may be confusing, and often indicate inadequate levels of design abstraction.\n\n\nUse the field below to specify the maximum number of branches expected." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "IfStatementWithTooManyBranchesJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "BreakStatementJS", + "shortDescription": { + "text": "'break' statement" + }, + "fullDescription": { + "text": "Reports a 'break' statements. Ignores 'break' statements that end case blocks.", + "markdown": "Reports a `break` statements. Ignores `break` statements that end case blocks." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "BreakStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 19, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FlowJSConfig", + "shortDescription": { + "text": "Missing .flowconfig" + }, + "fullDescription": { + "text": "Reports a JavaScript file with a '@flow' flag that doesn't have an associated '.flowconfig' file in the project.", + "markdown": "Reports a JavaScript file with a `@flow` flag that doesn't have an associated `.flowconfig` file in the project." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FlowJSConfig", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Flow type checker", + "index": 20, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSPotentiallyInvalidUsageOfClassThis", + "shortDescription": { + "text": "Potentially invalid reference to 'this' of a class from closure" + }, + "fullDescription": { + "text": "Reports an attempt to reference a member of an ECMAScript class via the 'this.' qualifier in a nested function that is not a lambda. 'this' in a nested function that is not a lambda is the function's own 'this' and doesn't relate to the outer class.", + "markdown": "Reports an attempt to reference a member of an ECMAScript class via the `this.` qualifier in a nested function that is not a lambda. \n`this` in a nested function that is not a lambda is the function's own `this` and doesn't relate to the outer class." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSPotentiallyInvalidUsageOfClassThis", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DebuggerStatementJS", + "shortDescription": { + "text": "'debugger' statement" + }, + "fullDescription": { + "text": "Reports a 'debugger' statement used for interaction with the Javascript debuggers. Such statements should not appear in production code.", + "markdown": "Reports a `debugger` statement used for interaction with the Javascript debuggers. Such statements should not appear in production code." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "DebuggerStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 19, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUnusedAssignment", + "shortDescription": { + "text": "Unused assignment" + }, + "fullDescription": { + "text": "Reports a variable whose value is never used after assignment. Suggests removing the unused variable to shorten the code and to avoid redundant allocations. The following cases are reported: A variable is never read after assignment. The value of a variable is always overwritten with another assignment before the variable is read next time. The initializer of a variable is redundant (for one of the above-mentioned reasons).", + "markdown": "Reports a variable whose value is never used after assignment. \nSuggests removing the unused variable to shorten the code and to avoid redundant allocations.\n\nThe following cases are reported:\n\n* A variable is never read after assignment.\n* The value of a variable is always overwritten with another assignment before the variable is read next time.\n* The initializer of a variable is redundant (for one of the above-mentioned reasons)." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "JSUnusedAssignment", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Unused symbols", + "index": 26, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FlowJSError", + "shortDescription": { + "text": "Flow type checker" + }, + "fullDescription": { + "text": "Reports errors from Flow.", + "markdown": "Reports errors from [Flow](https://flowtype.org/)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "FlowJSError", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Flow type checker", + "index": 20, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ReuseOfLocalVariableJS", + "shortDescription": { + "text": "Reuse of local variable" + }, + "fullDescription": { + "text": "Reports reusing a local variable and overwriting its value with a new value that is not related to the original variable usage. Reusing a local variable in this way may be confusing because the intended semantics of the local variable may vary with each usage. It may also cause bugs, if code changes result in values that were expected to be overwritten while they are actually live. It is good practices to keep variable lifetimes as short as possible, and not reuse local variables for the sake of brevity.", + "markdown": "Reports reusing a local variable and overwriting its value with a new value that is not related to the original variable usage. Reusing a local variable in this way may be confusing because the intended semantics of the local variable may vary with each usage. It may also cause bugs, if code changes result in values that were expected to be overwritten while they are actually live. It is good practices to keep variable lifetimes as short as possible, and not reuse local variables for the sake of brevity." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ReuseOfLocalVariableJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Data flow", + "index": 27, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ShiftOutOfRangeJS", + "shortDescription": { + "text": "Shift operation by possibly wrong constant" + }, + "fullDescription": { + "text": "Reports a shift operation where the second operand is a constant outside the reasonable range, for example, an integer shift operation outside the range '0..31', shifting by negative or overly large values.", + "markdown": "Reports a shift operation where the second operand is a constant outside the reasonable range, for example, an integer shift operation outside the range `0..31`, shifting by negative or overly large values." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ShiftOutOfRangeJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Bitwise operation issues", + "index": 29, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSClosureCompilerSyntax", + "shortDescription": { + "text": "Incorrect usage of JSDoc tags" + }, + "fullDescription": { + "text": "Reports warnings implied by Google Closure Compiler annotations including correct use of '@abstract', '@interface', and '@implements' tags.", + "markdown": "Reports warnings implied by *Google Closure Compiler* annotations including correct use of `@abstract`, `@interface`, and `@implements` tags." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSClosureCompilerSyntax", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnnecessaryContinueJS", + "shortDescription": { + "text": "Unnecessary 'continue' statement" + }, + "fullDescription": { + "text": "Reports an unnecessary 'continue' statement at the end of a loop. Suggests removing such statements.", + "markdown": "Reports an unnecessary `continue` statement at the end of a loop. Suggests removing such statements." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "UnnecessaryContinueJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ConvertLetToConst", + "shortDescription": { + "text": "'let' is used instead of 'const'" + }, + "fullDescription": { + "text": "Reports a 'let' declaration that can be made 'const'.", + "markdown": "Reports a `let` declaration that can be made `const`. " + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ConvertLetToConst", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/ES2015 migration aids", + "index": 30, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSXDomNesting", + "shortDescription": { + "text": "Invalid DOM element nesting" + }, + "fullDescription": { + "text": "Detects HTML elements in JSX files which are not nested properly according to the DOM specification. React reports runtime warnings on incorrectly nested elements.", + "markdown": "Detects HTML elements in JSX files which are not nested properly according to the DOM specification. React reports runtime warnings on incorrectly nested elements." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSXDomNesting", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/React", + "index": 33, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptValidateTypes", + "shortDescription": { + "text": "Type mismatch" + }, + "fullDescription": { + "text": "Reports a parameter, return value, or assigned expression of incorrect type.", + "markdown": "Reports a parameter, return value, or assigned expression of incorrect type." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "TypeScriptValidateTypes", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "BadExpressionStatementJS", + "shortDescription": { + "text": "Expression statement which is not assignment or call" + }, + "fullDescription": { + "text": "Reports an expression statement that is neither an assignment nor a call. Such statements usually indicate an error.", + "markdown": "Reports an expression statement that is neither an assignment nor a call. Such statements usually indicate an error." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "BadExpressionStatementJS", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Validity issues", + "index": 35, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ConfusingFloatingPointLiteralJS", + "shortDescription": { + "text": "Confusing floating point literal" + }, + "fullDescription": { + "text": "Reports any floating point number that does not have a decimal point, or any numbers before the decimal point, or and numbers after the decimal point. Such literals may be confusing, and violate several coding standards.", + "markdown": "Reports any floating point number that does not have a decimal point, or any numbers before the decimal point, or and numbers after the decimal point. Such literals may be confusing, and violate several coding standards." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ConfusingFloatingPointLiteralJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "BreakStatementWithLabelJS", + "shortDescription": { + "text": "'break' statement with label" + }, + "fullDescription": { + "text": "Reports a labeled 'break' statement.", + "markdown": "Reports a labeled `break` statement." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "BreakStatementWithLabelJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 19, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ContinueOrBreakFromFinallyBlockJS", + "shortDescription": { + "text": "'continue' or 'break' inside 'finally' block" + }, + "fullDescription": { + "text": "Reports a 'break' or 'continue' statement inside a 'finally' block. Such statements are very confusing, may hide exceptions, and complicate debugging.", + "markdown": "Reports a `break` or `continue` statement inside a `finally` block. Such statements are very confusing, may hide exceptions, and complicate debugging." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ContinueOrBreakFromFinallyBlockJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Try statement issues", + "index": 42, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "StatementsPerFunctionJS", + "shortDescription": { + "text": "Overly long function" + }, + "fullDescription": { + "text": "Reports an overly long function. Function length is calculated by counting up the number of non-empty statements in the function. Functions that are too long are error-prone and difficult to test. Use the field below to specify the maximum acceptable number of statements in a function.", + "markdown": "Reports an overly long function. Function length is calculated by counting up the number of non-empty statements in the function. Functions that are too long are error-prone and difficult to test.\n\n\nUse the field below to specify the maximum acceptable number of statements in a function." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionTooLongJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Function metrics", + "index": 44, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnnecessaryLocalVariableJS", + "shortDescription": { + "text": "Redundant local variable" + }, + "fullDescription": { + "text": "Reports an unnecessary local variable that does not make a function more comprehensible: a local variable that is immediately returned a local variable that is immediately assigned to another variable and is not used anymore a local variable that always has the same value as another local variable or parameter. Use the checkbox below to have this inspection ignore variables that are immediately returned or thrown. Some coding styles suggest using such variables for clarity and ease of debugging.", + "markdown": "Reports an unnecessary local variable that does not make a function more comprehensible:\n\n* a local variable that is immediately returned\n* a local variable that is immediately assigned to another variable and is not used anymore\n* a local variable that always has the same value as another local variable or parameter.\n\n\nUse the checkbox below to have this inspection ignore variables that are immediately\nreturned or thrown. Some coding styles suggest using such variables for clarity and\nease of debugging." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UnnecessaryLocalVariableJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Data flow", + "index": 27, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSMethodCanBeStatic", + "shortDescription": { + "text": "Method can be made 'static'" + }, + "fullDescription": { + "text": "Reports a class method that can be safely made 'static'. A method can be 'static' if it does not reference any of its class' non-static methods and non-static fields and is not overridden in a subclass. Use the first checkbox below to inspect only 'private' methods.", + "markdown": "Reports a class method that can be safely made `static`. A method can be `static` if it does not reference any of its class' non-static methods and non-static fields and is not overridden in a subclass.\n\n\nUse the first checkbox below to inspect only `private` methods." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSMethodCanBeStatic", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSDeclarationsAtScopeStart", + "shortDescription": { + "text": "'var' declared not at the beginning of a function" + }, + "fullDescription": { + "text": "Checks that declarations of local variables declared with var are at the top of a function scope. By default, variable declarations are always moved (\"hoisted\") invisibly to the top of their containing scope when the code is executed. Therefore, declaring them at the top of the scope helps represent this behavior in the code.", + "markdown": "Checks that declarations of local variables declared with **var** are at the top of a function scope. \n\nBy default, variable declarations are always moved (\"hoisted\") invisibly to the top of their containing scope when the code is executed. Therefore, declaring them at the top of the scope helps represent this behavior in the code." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSDeclarationsAtScopeStart", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code style issues", + "index": 17, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ContinueStatementWithLabelJS", + "shortDescription": { + "text": "'continue' statement with label" + }, + "fullDescription": { + "text": "Reports a labeled 'continue' statement.", + "markdown": "Reports a labeled `continue` statement." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ContinueStatementWithLabelJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 19, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSObjectNullOrUndefined", + "shortDescription": { + "text": "Object is 'null' or 'undefined'" + }, + "fullDescription": { + "text": "Reports an error caused by invoking a method, accessing a property, or calling a function on an object that is 'undefined' or 'null'.", + "markdown": "Reports an error caused by invoking a method, accessing a property, or calling a function on an object that is `undefined` or `null`." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "JSObjectNullOrUndefined", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptMissingConfigOption", + "shortDescription": { + "text": "Missing tsconfig.json option " + }, + "fullDescription": { + "text": "Reports a usage that requires an explicit option in 'tsconfig.json'. For example, to use JSX in '.tsx' files, 'tsconfig.json' must contain '\"jsx\"' property.", + "markdown": "Reports a usage that requires an explicit option in `tsconfig.json`. For example, to use JSX in `.tsx` files, `tsconfig.json` must contain `\"jsx\"` property." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TypeScriptMissingConfigOption", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSXUnresolvedComponent", + "shortDescription": { + "text": "Unresolved JSX component" + }, + "fullDescription": { + "text": "Reports an unresolved reference to a JSX component. Suggests adding a missing import statement if the referenced component is defined in the project or its dependencies or creating a new component with this name. The template for a new component can be modified in Editor | File and Code Templates.", + "markdown": "Reports an unresolved reference to a JSX component. Suggests adding a missing import statement if the referenced component is defined in the project or its dependencies or creating a new component with this name.\n\nThe template for a new component can be modified in Editor \\| File and Code Templates." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSXUnresolvedComponent", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnnecessaryLabelOnBreakStatementJS", + "shortDescription": { + "text": "Unnecessary label on 'break' statement" + }, + "fullDescription": { + "text": "Reports a labeled 'break' statement whose labels may be removed without changing the flow of control.", + "markdown": "Reports a labeled `break` statement whose labels may be removed without changing the flow of control." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "UnnecessaryLabelOnBreakStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ShorthandObjectProperty", + "shortDescription": { + "text": "Property can be replaced with shorthand" + }, + "fullDescription": { + "text": "Reports an object property that can be converted to ES6 shorthand style and provides a quick-fix to do it. Example: 'var obj = {foo:foo}' After applying the quick-fix the code looks as follows: 'var obj = {foo}'", + "markdown": "Reports an object property that can be converted to ES6 shorthand style and provides a quick-fix to do it.\n\nExample:\n\n\n var obj = {foo:foo}\n\nAfter applying the quick-fix the code looks as follows:\n\n\n var obj = {foo}\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ShorthandObjectProperty", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ContinueStatementJS", + "shortDescription": { + "text": "'continue' statement" + }, + "fullDescription": { + "text": "Reports a 'continue' statement.", + "markdown": "Reports a `continue` statement." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ContinueStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 19, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AssignmentToForLoopParameterJS", + "shortDescription": { + "text": "Assignment to 'for' loop parameter" + }, + "fullDescription": { + "text": "Reports an assignment to a variable declared as a 'for' loop parameter. Although occasionally intended, this construct can be extremely confusing, and is often a result of an error.", + "markdown": "Reports an assignment to a variable declared as a `for` loop parameter. Although occasionally intended, this construct can be extremely confusing, and is often a result of an error." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AssignmentToForLoopParameterJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Assignment issues", + "index": 48, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSPotentiallyInvalidConstructorUsage", + "shortDescription": { + "text": "Potentially invalid constructor usage" + }, + "fullDescription": { + "text": "Reports a usage of a potentially invalid constructor function, for example: a function that is not a constructor after 'new', using a constructor's prototype or calling a constructor without 'new'. A constructor function is assumed to have an upper case name (optional) or have an explicit JSDoc '@constructor' tag.", + "markdown": "Reports a usage of a potentially invalid constructor function, for example: a function that is not a constructor after `new`, using a constructor's prototype or calling a constructor without `new`. A constructor function is assumed to have an upper case name (optional) or have an explicit JSDoc `@constructor` tag." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSPotentiallyInvalidConstructorUsage", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PointlessArithmeticExpressionJS", + "shortDescription": { + "text": "Pointless arithmetic expression" + }, + "fullDescription": { + "text": "Reports an arithmetic expression that include adding or subtracting zero, multiplying by zero or one, division by one, and shift by zero. Such expressions may result from not fully completed automated refactoring.", + "markdown": "Reports an arithmetic expression that include adding or subtracting zero, multiplying by zero or one, division by one, and shift by zero. Such expressions may result from not fully completed automated refactoring." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PointlessArithmeticExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NodeCoreCodingAssistance", + "shortDescription": { + "text": "Unresolved Node.js APIs" + }, + "fullDescription": { + "text": "Suggests configuring coding assistance for Node.js, for example, 'require' and/or core modules ('path', 'http', 'fs', etc.). See https://nodejs.org/api/ for the complete list.", + "markdown": "Suggests configuring coding assistance for Node.js, for example, `require` and/or core modules ('path', 'http', 'fs', etc.).\n\n\nSee for the complete list." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NodeCoreCodingAssistance", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Node.js", + "index": 53, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUndeclaredVariable", + "shortDescription": { + "text": "Implicitly declared global JavaScript variable" + }, + "fullDescription": { + "text": "Reports an implicit declaration of a global variable. Example: 'var aaa = 1; // good\n bbb = 2; // bad, if bbb is not declared with 'var' somewhere'", + "markdown": "Reports an implicit declaration of a global variable.\n\nExample:\n\n\n var aaa = 1; // good\n bbb = 2; // bad, if bbb is not declared with 'var' somewhere\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSUndeclaredVariable", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DivideByZeroJS", + "shortDescription": { + "text": "Division by zero" + }, + "fullDescription": { + "text": "Reports division by zero or a remainder by zero.", + "markdown": "Reports division by zero or a remainder by zero." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "DivideByZeroJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSPrimitiveTypeWrapperUsage", + "shortDescription": { + "text": "Primitive type object wrapper used" + }, + "fullDescription": { + "text": "Reports an improper usage of a wrapper for primitive types or a property of a primitive type being modified, as in the latter case the assigned value will be lost.", + "markdown": "Reports an improper usage of a wrapper for primitive types or a property of a primitive type being modified, as in the latter case the assigned value will be lost." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSPrimitiveTypeWrapperUsage", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptSmartCast", + "shortDescription": { + "text": "Narrowed type" + }, + "fullDescription": { + "text": "Reports a usage of a variable where the variable type is narrowed by a type guard. Note that severity level doesn't affect this inspection.", + "markdown": "Reports a usage of a variable where the variable type is narrowed by a type guard. Note that severity level doesn't affect this inspection." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TypeScriptSmartCast", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ConvertIndexedForToForOf", + "shortDescription": { + "text": "Indexed 'for' is used instead of 'for..of'" + }, + "fullDescription": { + "text": "Reports an indexed 'for' loop used on an array. Suggests replacing it with a 'for..of' loop. 'for..of' loops are introduced in ECMAScript 6 and iterate over 'iterable' objects.", + "markdown": "Reports an indexed [for](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) loop used on an array. Suggests replacing it with a [for..of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) loop. \n`for..of` loops are introduced in ECMAScript 6 and iterate over `iterable` objects." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ConvertIndexedForToForOf", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/ES2015 migration aids", + "index": 30, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSLastCommaInArrayLiteral", + "shortDescription": { + "text": "Unneeded last comma in array literal" + }, + "fullDescription": { + "text": "Reports a usage of a trailing comma in an array literal. The warning is reported only when the JavaScript language version is set to ECMAScript 5.1. Although trailing commas in arrays are allowed by the specification, some browsers may throw an error when a trailing comma is used. You can configure formatting options for trailing commas in Code Style | JavaScript or TypeScript | Punctuation.", + "markdown": "Reports a usage of a trailing comma in an array literal.\n\nThe warning is reported only when the JavaScript language version is set to ECMAScript 5.1.\n\nAlthough trailing commas in arrays are allowed by the specification, some browsers may throw an error when a trailing comma is used.\n\nYou can configure formatting options for trailing commas in **Code Style** \\| **JavaScript** or **TypeScript** \\| **Punctuation**." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSLastCommaInArrayLiteral", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ConditionalExpressionJS", + "shortDescription": { + "text": "Conditional expression" + }, + "fullDescription": { + "text": "Reports a ternary conditional expression. Some coding standards prohibit such expressions in favor of explicit 'if' statements.", + "markdown": "Reports a ternary conditional expression. Some coding standards prohibit such expressions in favor of explicit `if` statements." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ConditionalExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 19, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ConvertVarToLetConst", + "shortDescription": { + "text": "'var' is used instead of 'let' or 'const'" + }, + "fullDescription": { + "text": "Reports a 'var' declaration that is used instead of 'let' or 'const'. Both 'let' and 'const' are block-scoped and behave more strictly. Suggests replacing all 'var' declarations with 'let' or 'const' declarations, depending on the semantics of a particular value. The declarations may be moved to the top of the function or placed before the first usage of the variable to avoid Reference errors. Select the 'Conservatively convert var with Fix all action' option to prevent any changes in these complex cases when using the 'Fix all' action.", + "markdown": "Reports a `var` declaration that is used instead of `let` or `const`. \nBoth `let` and `const` are block-scoped and behave more strictly. \n\nSuggests replacing all `var` declarations with `let` or `const` declarations, depending on the semantics of a particular value. The declarations may be moved to the top of the function or placed before the first usage of the variable to avoid Reference errors. \nSelect the 'Conservatively convert var with Fix all action' option to prevent any changes in these complex cases when using the 'Fix all' action." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ConvertVarToLetConst", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/ES2015 migration aids", + "index": 30, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSReferencingMutableVariableFromClosure", + "shortDescription": { + "text": "Referencing mutable variable from closure" + }, + "fullDescription": { + "text": "Reports access to outer mutable variables from functions. Example: 'for (var i = 1; i <= 3; i++) {\n setTimeout(function() {\n console.log(i); // bad\n }, 0);\n }'", + "markdown": "Reports access to outer mutable variables from functions.\n\nExample:\n\n\n for (var i = 1; i <= 3; i++) {\n setTimeout(function() {\n console.log(i); // bad\n }, 0);\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSReferencingMutableVariableFromClosure", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PointlessBooleanExpressionJS", + "shortDescription": { + "text": "Pointless statement or boolean expression" + }, + "fullDescription": { + "text": "Reports a pointless or pointlessly complicated boolean expression or statement. Example: 'let a = !(false && x);\n let b = false || x;' After the quick fix is applied the result looks like: 'let a = true;\n let b = x;'", + "markdown": "Reports a pointless or pointlessly complicated boolean expression or statement.\n\nExample:\n\n\n let a = !(false && x);\n let b = false || x;\n\nAfter the quick fix is applied the result looks like:\n\n\n let a = true;\n let b = x;\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PointlessBooleanExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DynamicallyGeneratedCodeJS", + "shortDescription": { + "text": "Execution of dynamically generated code" + }, + "fullDescription": { + "text": "Reports a call of the 'eval()', 'setTimeout()', or 'setInterval()' function or an allocation of a 'Function' object. These functions are used to execute arbitrary strings of JavaScript text, which often dynamically generated. This can be very confusing, and may be a security risk. Ignores the cases when a callback function is provided to these methods statically, without code generation.", + "markdown": "Reports a call of the `eval()`, `setTimeout()`, or `setInterval()` function or an allocation of a `Function` object. These functions are used to execute arbitrary strings of JavaScript text, which often dynamically generated. This can be very confusing, and may be a security risk. \n\nIgnores the cases when a callback function is provided to these methods statically, without code generation." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "DynamicallyGeneratedCodeJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NegatedConditionalExpressionJS", + "shortDescription": { + "text": "Negated conditional expression" + }, + "fullDescription": { + "text": "Reports a conditional expression whose condition is negated. Suggests flipping the order of branches in the conditional expression to increase the clarity of the statement. Example: '!condition ? 2 : 1'", + "markdown": "Reports a conditional expression whose condition is negated. Suggests flipping the order of branches in the conditional expression to increase the clarity of the statement. Example: `!condition ? 2 : 1`" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NegatedConditionalExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUrlImportUsage", + "shortDescription": { + "text": "URL import is used" + }, + "fullDescription": { + "text": "Checks used URL imports in the JavaScript language. Suggests downloading the module for the specified remote URL. Such association enables the IDE to provide proper code completion and navigation. URLs in import specifiers are supported only for ECMAScript modules in the JavaScript language.", + "markdown": "Checks used URL imports in the JavaScript language. Suggests downloading the module for the specified remote URL. Such association enables the IDE to provide proper code completion and navigation. \n\nURLs in import specifiers are supported only for ECMAScript modules in the JavaScript language." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSUrlImportUsage", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Imports and dependencies", + "index": 57, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnnecessaryLabelOnContinueStatementJS", + "shortDescription": { + "text": "Unnecessary label on 'continue' statement" + }, + "fullDescription": { + "text": "Reports a labeled 'continue' statement whose labels may be removed without changing the flow of control.", + "markdown": "Reports a labeled `continue` statement whose labels may be removed without changing the flow of control." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "UnnecessaryLabelOnContinueStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ChainedEqualityJS", + "shortDescription": { + "text": "Chained equality" + }, + "fullDescription": { + "text": "Reports a chained equality comparison (i.e. 'a==b==c'). Such comparisons are confusing.", + "markdown": "Reports a chained equality comparison (i.e. `a==b==c`). Such comparisons are confusing." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ChainedEqualityComparisonsJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code style issues", + "index": 17, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SillyAssignmentJS", + "shortDescription": { + "text": "Variable is assigned to itself" + }, + "fullDescription": { + "text": "Reports an assignment in the form 'x = x'.", + "markdown": "Reports an assignment in the form `x = x`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SillyAssignmentJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Assignment issues", + "index": 48, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSPotentiallyInvalidTargetOfIndexedPropertyAccess", + "shortDescription": { + "text": "Possibly incorrect target of indexed property access" + }, + "fullDescription": { + "text": "Reports a potentially invalid indexed property access, for example, 'Array[1]'.", + "markdown": "Reports a potentially invalid indexed property access, for example, `Array[1]`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSPotentiallyInvalidTargetOfIndexedPropertyAccess", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSAccessibilityCheck", + "shortDescription": { + "text": "Inaccessible @private and @protected members referenced" + }, + "fullDescription": { + "text": "Reports a reference to a JavaScript member that is marked with a '@private' or '@protected' tag but does not comply with visibility rules that these tags imply.", + "markdown": "Reports a reference to a JavaScript member that is marked with a `@private` or `@protected` tag but does not comply with visibility rules that these tags imply." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "JSAccessibilityCheck", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ConvertRequireIntoImport", + "shortDescription": { + "text": "'require()' is used instead of 'import'" + }, + "fullDescription": { + "text": "Reports a 'require()' statement. Suggests converting it to a 'require()' call with an 'import' statement. Enable 'Convert require() inside inner scopes with Fix all action' to convert all 'require()' calls inside the nested functions and statements when using the 'Fix all' action. Please note that converting 'require()' statements inside inner scopes to 'import' statements may cause changes in the semantics of the code. Import statements are static module dependencies and are hoisted, which means that they are moved to the top of the current module. 'require()' calls load modules dynamically. They can be executed conditionally, and their scope is defined by the expression in which they are used. Clear the 'Convert require() inside inner scopes with Fix all action' checkbox to prevent any changes in these complex cases when using the 'Fix all' action.", + "markdown": "Reports a `require()` statement. Suggests converting it to a `require()` call with an `import` statement. \n\nEnable 'Convert require() inside inner scopes with Fix all action' to convert all `require()` calls inside the nested functions and statements when using the 'Fix all' action. \n\nPlease note that converting `require()` statements inside inner scopes to `import` statements may cause changes in the semantics of the code. Import statements are static module dependencies and are hoisted, which means that they are moved to the top of the current module. `require()` calls load modules dynamically. They can be executed conditionally, and their scope is defined by the expression in which they are used. \nClear the 'Convert require() inside inner scopes with Fix all action' checkbox to prevent any changes in these complex cases when using the 'Fix all' action." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ConvertRequireIntoImport", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/ES2015 migration aids", + "index": 30, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FunctionWithMultipleLoopsJS", + "shortDescription": { + "text": "Function with multiple loops" + }, + "fullDescription": { + "text": "Reports a function with multiple loop statements.", + "markdown": "Reports a function with multiple loop statements." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionWithMultipleLoopsJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Function metrics", + "index": 44, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LabeledStatementJS", + "shortDescription": { + "text": "Labeled statement" + }, + "fullDescription": { + "text": "Reports a labeled statement.", + "markdown": "Reports a labeled statement." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LabeledStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 19, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnusedCatchParameterJS", + "shortDescription": { + "text": "Unused 'catch' parameter" + }, + "fullDescription": { + "text": "Reports a 'catch' parameter that is not used in the corresponding block. The 'catch' parameters named 'ignore' or 'ignored' are ignored. Use the checkbox below to disable this inspection for 'catch' blocks with comments.", + "markdown": "Reports a `catch` parameter that is not used in the corresponding block. The `catch` parameters named `ignore` or `ignored` are ignored.\n\n\nUse the checkbox below to disable this inspection for `catch`\nblocks with comments." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UnusedCatchParameterJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Try statement issues", + "index": 42, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NpmUsedModulesInstalled", + "shortDescription": { + "text": "Missing module dependency" + }, + "fullDescription": { + "text": "Reports a module from a 'require()' call or an 'import' statement that is not installed or is not listed in package.json dependencies. Suggests installing the module and/or including it into package.json. For 'require()' calls, works only in the files from the scope of Node.js Core JavaScript library.", + "markdown": "Reports a module from a `require()` call or an `import` statement that is not installed or is not listed in package.json dependencies.\n\nSuggests installing the module and/or including it into package.json.\n\nFor `require()` calls, works only in the files from the scope of *Node.js Core* JavaScript library." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "NpmUsedModulesInstalled", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Imports and dependencies", + "index": 57, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "WithStatementJS", + "shortDescription": { + "text": "'with' statement" + }, + "fullDescription": { + "text": "Reports a 'with' statements. Such statements result in potentially confusing implicit bindings, and may behave strangely in setting new variables.", + "markdown": "Reports a `with` statements. Such statements result in potentially confusing implicit bindings, and may behave strangely in setting new variables." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "WithStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 19, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptCheckImport", + "shortDescription": { + "text": "Unresolved imported name" + }, + "fullDescription": { + "text": "Reports an unresolved name or binding in an 'import' declaration in TypeScript code.", + "markdown": "Reports an unresolved name or binding in an `import` declaration in TypeScript code." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "TypeScriptCheckImport", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSConstantReassignment", + "shortDescription": { + "text": "Attempt to assign to const or readonly variable" + }, + "fullDescription": { + "text": "Reports reassigning a value to a constant or a readonly variable.", + "markdown": "Reports reassigning a value to a constant or a readonly variable." + }, + "defaultConfiguration": { + "enabled": true, + "level": "error", + "parameters": { + "suppressToolId": "JSConstantReassignment", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Validity issues", + "index": 35, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MagicNumberJS", + "shortDescription": { + "text": "Magic number" + }, + "fullDescription": { + "text": "Reports a \"magic number\" that is a numeric literal used without being named by a constant declaration. Magic numbers can result in code whose intention is unclear, and may result in errors if a magic number is changed in one code location but remains unchanged in another. The numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 1000, 0.0 and 1.0 are ignored.", + "markdown": "Reports a \"magic number\" that is a numeric literal used without being named by a constant declaration. Magic numbers can result in code whose intention is unclear, and may result in errors if a magic number is changed in one code location but remains unchanged in another. The numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 1000, 0.0 and 1.0 are ignored." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MagicNumberJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FunctionNamingConventionJS", + "shortDescription": { + "text": "Function naming convention" + }, + "fullDescription": { + "text": "Reports a function whose name is too short, too long, or does not follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length, and a regular expression for function names. Use the standard 'java.util.regex' format for regular expressions.", + "markdown": "Reports a function whose name is too short, too long, or does not follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length, and a regular expression\nfor function names. Use the standard `java.util.regex` format for regular expressions." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionNamingConventionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Naming conventions", + "index": 62, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSXSyntaxUsed", + "shortDescription": { + "text": "JSX syntax used" + }, + "fullDescription": { + "text": "Reports a usage of a JSX tag in JavaScript code.", + "markdown": "Reports a usage of a JSX tag in JavaScript code." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "JSXSyntaxUsed", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSJoinVariableDeclarationAndAssignment", + "shortDescription": { + "text": "Variable declaration can be merged with the first assignment to the variable" + }, + "fullDescription": { + "text": "Reports a variable that is declared without an initializer and is used much further in the code or in a single nested scope. Suggests moving the variable closer to its usages and joining it with the initializer expression.", + "markdown": "Reports a variable that is declared without an initializer and is used much further in the code or in a single nested scope. Suggests moving the variable closer to its usages and joining it with the initializer expression." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSJoinVariableDeclarationAndAssignment", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSRedundantSwitchStatement", + "shortDescription": { + "text": "'switch' statement is redundant and can be replaced" + }, + "fullDescription": { + "text": "Reports a 'switch' statement with an empty body, or with only one 'case' branch, or with a 'default' branch only.", + "markdown": "Reports a `switch` statement with an empty body, or with only one `case` branch, or with a `default` branch only." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "JSRedundantSwitchStatement", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Switch statement issues", + "index": 63, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptLibrary", + "shortDescription": { + "text": "Missing global library" + }, + "fullDescription": { + "text": "Reports a TypeScript library file that is required for a symbol but is not listed under the 'lib' compiler option in 'tsconfig.json'.", + "markdown": "Reports a TypeScript library file that is required for a symbol but is not listed under the `lib` compiler option in `tsconfig.json`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "TypeScriptLibrary", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptMissingAugmentationImport", + "shortDescription": { + "text": "Missing augmentation import" + }, + "fullDescription": { + "text": "Reports a usage from augmentation module without an explicit import.", + "markdown": "Reports a usage from [augmentation module](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation) without an explicit import." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptMissingAugmentationImport", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUnusedGlobalSymbols", + "shortDescription": { + "text": "Unused global symbol" + }, + "fullDescription": { + "text": "Reports an unused globally accessible public function, variable, class, or property.", + "markdown": "Reports an unused globally accessible public function, variable, class, or property." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "JSUnusedGlobalSymbols", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Unused symbols", + "index": 26, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ConvertModuleExportToExport", + "shortDescription": { + "text": "'module.exports' is used instead of 'export'" + }, + "fullDescription": { + "text": "Reports a 'module.export' statement. Suggests replacing it with an 'export' or 'export default' statement. Please note that the quick-fix for converting 'module.export' into 'export' is not available for 'module.export' inside functions or statements because 'export' statements can only be at the top level of a module.", + "markdown": "Reports a `module.export` statement. Suggests replacing it with an `export` or `export default` statement. \n\nPlease note that the quick-fix for converting `module.export` into `export` is not available for `module.export` inside functions or statements because `export` statements can only be at the top level of a module." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ConvertModuleExportToExport", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/ES2015 migration aids", + "index": 30, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DocumentWriteJS", + "shortDescription": { + "text": "Call to 'document.write()'" + }, + "fullDescription": { + "text": "Reports a method call to 'document.write()' or 'document.writeln()'. Most usages of such calls are performed better with explicit DOM calls, such as 'getElementByID()' and 'createElement()'. Additionally, the 'write()' and 'writeln()' calls will not work with XML DOMs, including DOMs for XHTML if viewed as XML. This can result in difficulty to point out bugs.", + "markdown": "Reports a method call to `document.write()` or `document.writeln()`. Most usages of such calls are performed better with explicit DOM calls, such as `getElementByID()` and `createElement()`. Additionally, the `write()` and `writeln()` calls will not work with XML DOMs, including DOMs for XHTML if viewed as XML. This can result in difficulty to point out bugs." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "DocumentWriteJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/DOM issues", + "index": 64, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AnonymousFunctionJS", + "shortDescription": { + "text": "Anonymous function" + }, + "fullDescription": { + "text": "Reports an anonymous function. An explicit name of a function expression may be helpful for debugging. Ignores function expressions without names if they have a 'name' property specified in the ECMAScript 6 standard. For example, 'var bar = function() {};' is not reported.", + "markdown": "Reports an anonymous function. An explicit name of a function expression may be helpful for debugging. Ignores function expressions without names if they have a `name` property specified in the ECMAScript 6 standard. For example, `var bar = function() {};` is not reported." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AnonymousFunctionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 19, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "BlockStatementJS", + "shortDescription": { + "text": "Unnecessary block statement" + }, + "fullDescription": { + "text": "Reports a block statement that is not used as the body of 'if', 'for', 'while', 'do', 'with', or 'try' statements, or as the body of a function declaration. Starting from ECMAScript 6, JavaScript blocks introduce new scopes for 'let' and 'const' variables, but still free-standing block statements may be confusing and result in subtle bugs when used with 'var' variables.", + "markdown": "Reports a block statement that is not used as the body of `if`, `for`, `while`, `do`, `with`, or `try` statements, or as the body of a function declaration. Starting from ECMAScript 6, JavaScript blocks introduce new scopes for `let` and `const` variables, but still free-standing block statements may be confusing and result in subtle bugs when used with `var` variables." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "BlockStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ObjectAllocationIgnoredJS", + "shortDescription": { + "text": "Result of object allocation ignored" + }, + "fullDescription": { + "text": "Reports object allocation where the result of the allocated object is ignored, for example, 'new Error();' as a statement, without any assignment. Such allocation expressions may indicate an odd object initialization strategy.", + "markdown": "Reports object allocation where the result of the allocated object is ignored, for example, `new Error();` as a statement, without any assignment. Such allocation expressions may indicate an odd object initialization strategy." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ObjectAllocationIgnored", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "InfiniteRecursionJS", + "shortDescription": { + "text": "Infinite recursion" + }, + "fullDescription": { + "text": "Reports a function which must either recurse infinitely or throw an exception. Such functions may not return normally.", + "markdown": "Reports a function which must either recurse infinitely or throw an exception. Such functions may not return normally." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "InfiniteRecursionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NestedConditionalExpressionJS", + "shortDescription": { + "text": "Nested conditional expression" + }, + "fullDescription": { + "text": "Reports a ternary conditional expression within another ternary condition. Such nested conditionals may be extremely confusing, and best replaced by more explicit conditional logic.", + "markdown": "Reports a ternary conditional expression within another ternary condition. Such nested conditionals may be extremely confusing, and best replaced by more explicit conditional logic." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NestedConditionalExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSTypeOfValues", + "shortDescription": { + "text": "'typeof' comparison with non-standard value" + }, + "fullDescription": { + "text": "Reports a comparison of a 'typeof' expression with a literal string which is not one of the standard types: 'undefined', 'object', 'boolean', 'number', 'string', 'function', or 'symbol'. Such comparisons always return 'false'.", + "markdown": "Reports a comparison of a `typeof` expression with a literal string which is not one of the standard types: `undefined`, `object`, `boolean`, `number`, `string`, `function`, or `symbol`. Such comparisons always return `false`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSTypeOfValues", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "IncompatibleMaskJS", + "shortDescription": { + "text": "Incompatible bitwise mask operation" + }, + "fullDescription": { + "text": "Reports a bitwise mask expression which for sure evaluates to 'true' or 'false'. Expressions are of the form '(var & constant1) == constant2' or '(var | constant1) == constant2', where 'constant1' and 'constant2' are incompatible bitmask constants. Example: '// Incompatible mask: as the last byte in mask is zero,\n// something like 0x1200 would be possible, but not 0x1234\nif ((mask & 0xFF00) == 0x1234) {...}'", + "markdown": "Reports a bitwise mask expression which for sure evaluates to `true` or `false`. Expressions are of the form `(var & constant1) == constant2` or `(var | constant1) == constant2`, where `constant1` and `constant2` are incompatible bitmask constants.\n\nExample:\n\n\n // Incompatible mask: as the last byte in mask is zero,\n // something like 0x1200 would be possible, but not 0x1234\n if ((mask & 0xFF00) == 0x1234) {...}\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "IncompatibleBitwiseMaskOperation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Bitwise operation issues", + "index": 29, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6PossiblyAsyncFunction", + "shortDescription": { + "text": "'await' in non-async function" + }, + "fullDescription": { + "text": "Reports a usage of 'await' in a function that was possibly intended to be async but is actually missing the 'async' modifier. Although 'await' can be used as an identifier, it is likely that it was intended to be used as an operator, so the containing function should be made 'async'.", + "markdown": "Reports a usage of `await` in a function that was possibly intended to be async but is actually missing the `async` modifier. Although `await` can be used as an identifier, it is likely that it was intended to be used as an operator, so the containing function should be made `async`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6PossiblyAsyncFunction", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Async code and promises", + "index": 65, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TextLabelInSwitchStatementJS", + "shortDescription": { + "text": "Text label in 'switch' statement" + }, + "fullDescription": { + "text": "Reports a labeled statement inside a 'switch' statement, which often results from a typo. Example: 'switch(x)\n {\n case 1:\n case2: //typo!\n case 3:\n break;\n }'", + "markdown": "Reports a labeled statement inside a `switch` statement, which often results from a typo.\n\nExample:\n\n\n switch(x)\n {\n case 1:\n case2: //typo!\n case 3:\n break;\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TextLabelInSwitchStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Switch statement issues", + "index": 63, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "EmptyCatchBlockJS", + "shortDescription": { + "text": "Empty 'catch' block" + }, + "fullDescription": { + "text": "Reports an empty 'catch' block. This indicates that errors are simply ignored instead of handling them. Any comment in a 'catch' block mutes the inspection.", + "markdown": "Reports an empty `catch` block. This indicates that errors are simply ignored instead of handling them. \n\nAny comment in a `catch` block mutes the inspection." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "EmptyCatchBlockJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Try statement issues", + "index": 42, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSHint", + "shortDescription": { + "text": "JSHint" + }, + "fullDescription": { + "text": "Reports a problem detected by the JSHint linter.", + "markdown": "Reports a problem detected by the [JSHint](https://jshint.com/) linter." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "JSHint", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code quality tools", + "index": 66, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FlowJSFlagCommentPlacement", + "shortDescription": { + "text": "Misplaced @flow flag" + }, + "fullDescription": { + "text": "Reports a '@flow' flag comment that is not located at the top of a file.", + "markdown": "Reports a `@flow` flag comment that is not located at the top of a file." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FlowJSFlagCommentPlacement", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Flow type checker", + "index": 20, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Eslint", + "shortDescription": { + "text": "ESLint" + }, + "fullDescription": { + "text": "Reports a discrepancy detected by the ESLint linter. The highlighting is based on the rule severity specified in the ESLint configuration file for each individual rule. Clear the 'Use rule severity from the configuration file' checkbox to use the severity configured in this inspection for all ESLint rules.", + "markdown": "Reports a discrepancy detected by the [ESLint](https://eslint.org) linter. \n\nThe highlighting is based on the rule severity specified in the [ESLint configuration file](https://eslint.org/docs/user-guide/configuring) for each individual rule. \n\nClear the 'Use rule severity from the configuration file' checkbox to use the severity configured in this inspection for all ESLint rules." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "Eslint", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code quality tools", + "index": 66, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSDuplicatedDeclaration", + "shortDescription": { + "text": "Duplicate declaration" + }, + "fullDescription": { + "text": "Reports multiple declarations in a scope.", + "markdown": "Reports multiple declarations in a scope." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSDuplicatedDeclaration", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSEqualityComparisonWithCoercion.TS", + "shortDescription": { + "text": "Equality operator may cause type coercion" + }, + "fullDescription": { + "text": "Reports a usage of equality operators may cause unexpected type coercions. Suggests replacing '==' or '!=' equality operators with type-safe '===' or '!==' operators. Depending on the option selected, one of the following cases will be reported: All usages of '==' and '!=' operators. All usages except comparison with null. Some code styles allow using 'x == null' as a replacement for 'x === null || x === undefined'. Only suspicious expressions, such as: '==' or '!=' comparisons with '0', '''', 'null', 'true', 'false', or 'undefined'.", + "markdown": "Reports a usage of equality operators may cause unexpected type coercions. Suggests replacing `==` or `!=` equality operators with type-safe `===` or `!==` operators.\n\nDepending on the option selected, one of the following cases will be reported:\n\n* All usages of `==` and `!=` operators.\n* All usages except comparison with null. Some code styles allow using `x == null` as a replacement for `x === null || x === undefined`.\n* Only suspicious expressions, such as: `==` or `!=` comparisons with `0`, `''`, `null`, `true`, `false`, or `undefined`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "EqualityComparisonWithCoercionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSOctalInteger", + "shortDescription": { + "text": "Octal integer" + }, + "fullDescription": { + "text": "Reports a deprecated octal integer literal prefixed with '0' instead of '0o'. Such literals are not allowed in modern ECMAScript code, and using them in the strict mode is an error. To force this inspection for ES5 and ES3 language levels, select the 'Warn about obsolete octal literals in ES5- code' checkbox below.", + "markdown": "Reports a deprecated octal integer literal prefixed with `0` instead of `0o`. \nSuch literals are not allowed in modern ECMAScript code, and using them in the strict mode is an error. \nTo force this inspection for ES5 and ES3 language levels, select the 'Warn about obsolete octal literals in ES5- code' checkbox below." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "JSOctalInteger", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Validity issues", + "index": 35, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ExceptionCaughtLocallyJS", + "shortDescription": { + "text": "Exception used for local control-flow" + }, + "fullDescription": { + "text": "Reports a 'throw' statement whose exceptions are always caught by the containing 'try' statement. Using 'throw' statements as a 'goto' to change the local flow of control is confusing.", + "markdown": "Reports a `throw` statement whose exceptions are always caught by the containing `try` statement. Using `throw` statements as a `goto` to change the local flow of control is confusing." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ExceptionCaughtLocallyJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Try statement issues", + "index": 42, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ThrowFromFinallyBlockJS", + "shortDescription": { + "text": "'throw' inside 'finally' block" + }, + "fullDescription": { + "text": "Reports s 'throw' statement inside a 'finally' block. Such 'throw' statements may mask exceptions thrown, and complicate debugging.", + "markdown": "Reports s `throw` statement inside a `finally` block. Such `throw` statements may mask exceptions thrown, and complicate debugging." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ThrowInsideFinallyBlockJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Try statement issues", + "index": 42, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptValidateGenericTypes", + "shortDescription": { + "text": "Incorrect generic type argument" + }, + "fullDescription": { + "text": "Reports an invalid type argument in a function, interface, or class declaration.", + "markdown": "Reports an invalid type argument in a function, interface, or class declaration." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "TypeScriptValidateGenericTypes", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CyclomaticComplexityJS", + "shortDescription": { + "text": "Overly complex function" + }, + "fullDescription": { + "text": "Reports a function with too many branching points in a function (too high cyclomatic complexity). Such functions may be confusing and hard to test. Use the field provided below to specify the maximum acceptable cyclomatic complexity for a function.", + "markdown": "Reports a function with too many branching points in a function (too high cyclomatic complexity). Such functions may be confusing and hard to test.\n\n\nUse the field provided below to specify the maximum acceptable cyclomatic complexity for a function." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "OverlyComplexFunctionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Function metrics", + "index": 44, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSMismatchedCollectionQueryUpdate", + "shortDescription": { + "text": "Mismatched query and update of collection" + }, + "fullDescription": { + "text": "Reports a collection of fields or variables whose contents are either queried and not updated or updated and not queried. Such mismatched queries and updates are pointless and may indicate either dead code or a typographical error. Query methods are automatically detected, based on whether they return something, or a callback is passed to them. Use the table below to specify which methods are update methods.", + "markdown": "Reports a collection of fields or variables whose contents are either queried and not updated or updated and not queried. Such mismatched queries and updates are pointless and may indicate either dead code or a typographical error.\n\n\nQuery methods are automatically detected, based on whether they return something, or a callback is passed to them.\nUse the table below to specify which methods are update methods." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSMismatchedCollectionQueryUpdate", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PackageJsonMismatchedDependency", + "shortDescription": { + "text": "Mismatched dependencies in package.json" + }, + "fullDescription": { + "text": "Reports a dependency from package.json that is not installed or doesn't match the specified version range.", + "markdown": "Reports a dependency from package.json that is not installed or doesn't match the specified [version range](https://docs.npmjs.com/about-semantic-versioning)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PackageJsonMismatchedDependency", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Imports and dependencies", + "index": 57, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSPotentiallyInvalidUsageOfThis", + "shortDescription": { + "text": "Potentially invalid reference to 'this' from closure" + }, + "fullDescription": { + "text": "Reports a 'this' in closure that is used for referencing properties of outer context. Example: 'function Outer() {\n this.outerProp = 1;\n function inner() {\n // bad, because 'outerProp' of Outer\n // won't be updated here\n // on calling 'new Outer()' as may be expected\n this.outerProp = 2;\n }\n inner();\n}'", + "markdown": "Reports a `this` in closure that is used for referencing properties of outer context.\n\nExample:\n\n\n function Outer() {\n this.outerProp = 1;\n function inner() {\n // bad, because 'outerProp' of Outer\n // won't be updated here\n // on calling 'new Outer()' as may be expected\n this.outerProp = 2;\n }\n inner();\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSPotentiallyInvalidUsageOfThis", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSMissingSwitchDefault", + "shortDescription": { + "text": "'switch' statement has no 'default' branch" + }, + "fullDescription": { + "text": "Reports a 'switch' statement without a 'default' clause when some possible values are not enumerated.", + "markdown": "Reports a `switch` statement without a `default` clause when some possible values are not enumerated." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "JSMissingSwitchDefault", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Switch statement issues", + "index": 63, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSXNamespaceValidation", + "shortDescription": { + "text": "Missing JSX namespace" + }, + "fullDescription": { + "text": "Reports a usage of a JSX construction without importing namespace. Having the namespace in the file scope ensures proper code compilation.", + "markdown": "Reports a usage of a JSX construction without importing namespace. Having the namespace in the file scope ensures proper code compilation." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSXNamespaceValidation", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Imports and dependencies", + "index": 57, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUnresolvedLibraryURL", + "shortDescription": { + "text": "Missed locally stored library for HTTP link" + }, + "fullDescription": { + "text": "Reports a URL of an external JavaScript library that is not associated with any locally stored file. Suggests downloading the library. Such association enables the IDE to provide proper code completion and navigation.", + "markdown": "Reports a URL of an external JavaScript library that is not associated with any locally stored file. Suggests downloading the library. Such association enables the IDE to provide proper code completion and navigation." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSUnresolvedLibraryURL", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6PreferShortImport", + "shortDescription": { + "text": "Import can be shortened" + }, + "fullDescription": { + "text": "Reports an ES6 import whose 'from' part can be shortened. Suggests importing the parent directory.", + "markdown": "Reports an ES6 import whose `from` part can be shortened. Suggests importing the parent directory." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ES6PreferShortImport", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PointlessBitwiseExpressionJS", + "shortDescription": { + "text": "Bitwise expression can be simplified" + }, + "fullDescription": { + "text": "Reports an expression that includes 'and' with zero, 'or' by zero, or shifting by zero. Such expressions may result from not fully completed automated refactorings.", + "markdown": "Reports an expression that includes `and` with zero, `or` by zero, or shifting by zero. Such expressions may result from not fully completed automated refactorings." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PointlessBitwiseExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Bitwise operation issues", + "index": 29, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "InfiniteLoopJS", + "shortDescription": { + "text": "Infinite loop statement" + }, + "fullDescription": { + "text": "Reports a 'for', 'while', or 'do' statement which can only exit by throwing an exception. Such statements often indicate coding errors.", + "markdown": "Reports a `for`, `while`, or `do` statement which can only exit by throwing an exception. Such statements often indicate coding errors." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "InfiniteLoopJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSStringConcatenationToES6Template", + "shortDescription": { + "text": "String concatenation is used instead of template literal" + }, + "fullDescription": { + "text": "Reports a string concatenation. Suggests replacing it with a template literal Example '\"result: \" + a + \".\"' After applying the quick-fix the code looks as follows: '`result: ${a}.`'", + "markdown": "Reports a string concatenation. Suggests replacing it with a [template literal](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)\n\nExample\n\n \"result: \" + a + \".\" \n\nAfter applying the quick-fix the code looks as follows:\n\n `result: ${a}.` \n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSStringConcatenationToES6Template", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/ES2015 migration aids", + "index": 30, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSArrowFunctionBracesCanBeRemoved", + "shortDescription": { + "text": "Redundant braces around arrow function body" + }, + "fullDescription": { + "text": "Reports an arrow function whose body only consists of braces and exactly one statement. Suggests converting to concise syntax without braces. 'let incrementer = (x) => {return x + 1};' After the quick-fix is applied, the code fragment looks as follows: 'let incrementer = (x) => x + 1;'", + "markdown": "Reports an arrow function whose body only consists of braces and exactly one statement. Suggests converting to concise syntax without braces.\n\n\n let incrementer = (x) => {return x + 1};\n\nAfter the quick-fix is applied, the code fragment looks as follows:\n\n\n let incrementer = (x) => x + 1;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSArrowFunctionBracesCanBeRemoved", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code style issues", + "index": 17, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ReplaceAssignmentWithOperatorAssignmentJS", + "shortDescription": { + "text": "Assignment could be replaced with operator assignment" + }, + "fullDescription": { + "text": "Reports an assignment operation that can be replaced by an operator assignment to make your code shorter and probably clearer. Example: 'x = x + 3;'\n 'x = x / 3;'\n After the quick fix is applied the result looks like: 'x += 3;'\n 'x /= 3;'", + "markdown": "Reports an assignment operation that can be replaced by an operator assignment to make your code shorter and probably clearer.\n\n\nExample:\n\n x = x + 3;\n x = x / 3;\n\nAfter the quick fix is applied the result looks like:\n\n x += 3;\n x /= 3;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AssignmentReplaceableWithOperatorAssignmentJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Assignment issues", + "index": 48, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSFileReferences", + "shortDescription": { + "text": "Unresolved file reference" + }, + "fullDescription": { + "text": "Reports an unresolved file reference in a JavaScript file, including CommonJS and AMD modules references.", + "markdown": "Reports an unresolved file reference in a JavaScript file, including CommonJS and AMD modules references." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSFileReferences", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FunctionWithInconsistentReturnsJS", + "shortDescription": { + "text": "Function with inconsistent returns" + }, + "fullDescription": { + "text": "Reports a function that returns a value in some cases while in other cases no value is returned. This usually indicates an error. Example: 'function foo() {\n if (true)\n return 3;\n return;\n}'", + "markdown": "Reports a function that returns a value in some cases while in other cases no value is returned. This usually indicates an error.\n\nExample:\n\n\n function foo() {\n if (true)\n return 3;\n return;\n }\n\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionWithInconsistentReturnsJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Validity issues", + "index": 35, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "EmptyTryBlockJS", + "shortDescription": { + "text": "Empty 'try' block" + }, + "fullDescription": { + "text": "Reports an empty 'try' block, which usually indicates an error.", + "markdown": "Reports an empty `try` block, which usually indicates an error." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "EmptyTryBlockJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Try statement issues", + "index": 42, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ClassMemberInitializationOrder", + "shortDescription": { + "text": "Use of possibly unassigned property in a static initializer" + }, + "fullDescription": { + "text": "Reports a class member initializer which references another non-hoisted class member while the latter may be not initialized yet. Initialization of class members happens consequently for fields, so a field cannot reference another field that is declared later.", + "markdown": "Reports a class member initializer which references another non-hoisted class member while the latter may be not initialized yet. \n\nInitialization of class members happens consequently for fields, so a field cannot reference another field that is declared later." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ES6ClassMemberInitializationOrder", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ReservedWordUsedAsNameJS", + "shortDescription": { + "text": "Reserved word used as name" + }, + "fullDescription": { + "text": "Reports a JavaScript reserved word used as a name. The JavaScript specification reserves a number of words which are currently not used as keywords. Using those words as identifiers may result in broken code if later versions of JavaScript start using them as keywords.", + "markdown": "Reports a JavaScript reserved word used as a name. The JavaScript specification reserves a number of words which are currently not used as keywords. Using those words as identifiers may result in broken code if later versions of JavaScript start using them as keywords." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ReservedWordAsName", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Validity issues", + "index": 35, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSClassNamingConvention", + "shortDescription": { + "text": "Class naming convention" + }, + "fullDescription": { + "text": "Reports a class or a function that is annotated with a JSDoc '@constructor' or '@class' tag whose names are too short, too long, or do not follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length, and a regular expression expected for classes names. Use the standard 'java.util.regex' format for regular expressions.", + "markdown": "Reports a class or a function that is annotated with a JSDoc `@constructor` or `@class` tag whose names are too short, too long, or do not follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length, and a regular expression\nexpected for classes names. Use the standard `java.util.regex` format for regular expressions." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSClassNamingConvention", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Naming conventions", + "index": 62, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NestedFunctionJS", + "shortDescription": { + "text": "Nested function" + }, + "fullDescription": { + "text": "Reports a function nested inside another function. Although JavaScript allows functions to be nested, such constructs may be confusing. Use the checkbox below to ignore anonymous nested functions.", + "markdown": "Reports a function nested inside another function. Although JavaScript allows functions to be nested, such constructs may be confusing.\n\n\nUse the checkbox below to ignore anonymous nested functions." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NestedFunctionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XHTMLIncompatabilitiesJS", + "shortDescription": { + "text": "Incompatible XHTML usages" + }, + "fullDescription": { + "text": "Reports common JavaScript DOM patterns which may present problems with XHTML documents. In particular, the patterns detected will behave completely differently depending on whether the document is loaded as XML or HTML. This can result in subtle bugs where script behaviour is dependent on the MIME-type of the document, rather than its content. Patterns detected include document.body, document.images, document.applets, document.links, document.forms, and document.anchors.", + "markdown": "Reports common JavaScript DOM patterns which may present problems with XHTML documents. In particular, the patterns detected will behave completely differently depending on whether the document is loaded as XML or HTML. This can result in subtle bugs where script behaviour is dependent on the MIME-type of the document, rather than its content. Patterns detected include **document.body** , **document.images** , **document.applets** , **document.links** , **document.forms** , and **document.anchors**." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XHTMLIncompatabilitiesJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/DOM issues", + "index": 64, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "IncrementDecrementResultUsedJS", + "shortDescription": { + "text": "Result of increment or decrement used" + }, + "fullDescription": { + "text": "Reports an increment ('++') or decrement ('--') expression where the result of the assignment is used in a containing expression. Such assignments can result in confusion due to the order of operations, as evaluation of the assignment may affect the outer expression in unexpected ways. Example: 'var a = b++'", + "markdown": "Reports an increment (`++`) or decrement (`--`) expression where the result of the assignment is used in a containing expression. Such assignments can result in confusion due to the order of operations, as evaluation of the assignment may affect the outer expression in unexpected ways. Example: `var a = b++`" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "IncrementDecrementResultUsedJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SuspiciousTypeOfGuard", + "shortDescription": { + "text": "Unsound type guard check" + }, + "fullDescription": { + "text": "Reports a 'typeof' or 'instanceof' unsound type guard check. The 'typeof x' type guard can be unsound in one of the following two cases: 'typeof x' never corresponds to the specified value (for example, 'typeof x === 'number'' when 'x' is of the type 'string | boolean') 'typeof x' always corresponds to the specified value (for example, 'typeof x === 'string'' when 'x' is of the type 'string') The 'x instanceof A' type guard can be unsound in one of the following two cases: The type of 'x' is not related to 'A' The type of 'x' is 'A' or a subtype of 'A'", + "markdown": "Reports a `typeof` or `instanceof` unsound type guard check. The `typeof x` type guard can be unsound in one of the following two cases:\n\n* `typeof x` never corresponds to the specified value (for example, `typeof x === 'number'` when `x` is of the type 'string \\| boolean')\n* `typeof x` always corresponds to the specified value (for example, `typeof x === 'string'` when `x` is of the type 'string')\n\nThe `x instanceof A` type guard can be unsound in one of the following two cases:\n\n* The type of `x` is not related to `A`\n* The type of `x` is `A` or a subtype of `A`" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "SuspiciousTypeOfGuard", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptJSXUnresolvedComponent", + "shortDescription": { + "text": "Unresolved JSX component" + }, + "fullDescription": { + "text": "Reports an unresolved reference to a JSX component. Suggests adding an import statement if the referenced component is defined in the project or its dependencies or creating a new component with the specified name. The template for a new component can be modified in Editor | File and Code Templates.", + "markdown": "Reports an unresolved reference to a JSX component. Suggests adding an import statement if the referenced component is defined in the project or its dependencies or creating a new component with the specified name.\n\nThe template for a new component can be modified in Editor \\| File and Code Templates." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptJSXUnresolvedComponent", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptFieldCanBeMadeReadonly", + "shortDescription": { + "text": "Field can be readonly" + }, + "fullDescription": { + "text": "Reports a private field that can be made readonly (for example, if the field is assigned only in the constructor).", + "markdown": "Reports a private field that can be made readonly (for example, if the field is assigned only in the constructor)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptFieldCanBeMadeReadonly", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6DestructuringVariablesMerge", + "shortDescription": { + "text": "Destructuring properties with the same key" + }, + "fullDescription": { + "text": "Reports multiple destructuring properties with identical keys. Suggests merging the properties.", + "markdown": "Reports multiple destructuring properties with identical keys. Suggests merging the properties." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6DestructuringVariablesMerge", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LoopStatementThatDoesntLoopJS", + "shortDescription": { + "text": "Loop statement that doesn't loop" + }, + "fullDescription": { + "text": "Reports a 'for', 'while', or 'do' statement whose bodies are guaranteed to execute at most once. Normally, this indicates an error.", + "markdown": "Reports a `for`, `while`, or `do` statement whose bodies are guaranteed to execute at most once. Normally, this indicates an error." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "LoopStatementThatDoesntLoopJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NegatedIfStatementJS", + "shortDescription": { + "text": "Negated 'if' statement" + }, + "fullDescription": { + "text": "Reports if statements which have an else branch and a negated condition. Flipping the order of the if and else branches will usually increase the clarity of such statements.", + "markdown": "Reports **if** statements which have an **else** branch and a negated condition. Flipping the order of the **if** and **else** branches will usually increase the clarity of such statements." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NegatedIfStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSNonASCIINames", + "shortDescription": { + "text": "Identifiers with non-ASCII symbols" + }, + "fullDescription": { + "text": "Reports a non-ASCII symbol in a name. If the 'Allow only ASCII names' option is selected, reports all names that contain non-ASCII symbols. Otherwise reports all names that contain both ASCII and non-ASCII symbols.", + "markdown": "Reports a non-ASCII symbol in a name. \n\nIf the 'Allow only ASCII names' option is selected, reports all names that contain non-ASCII symbols. \nOtherwise reports all names that contain both ASCII and non-ASCII symbols." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSNonASCIINames", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Naming conventions", + "index": 62, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptRedundantGenericType", + "shortDescription": { + "text": "Redundant type arguments" + }, + "fullDescription": { + "text": "Reports a type argument that is equal to the default one and can be removed. Example: 'type Foo = T;\nlet z: Foo;'", + "markdown": "Reports a type argument that is equal to the default one and can be removed.\n\n\nExample:\n\n\n type Foo = T;\n let z: Foo;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptRedundantGenericType", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptUMDGlobal", + "shortDescription": { + "text": "Referenced UMD global variable" + }, + "fullDescription": { + "text": "Reports a usage of a Universal Module Definition (UMD) global variable if the current file is a module (ECMAScript or CommonJS). Referencing UMD variables without explicit imports can lead to a runtime error if the library isn't included implicitly.", + "markdown": "Reports a usage of a Universal Module Definition (UMD) global variable if the current file is a module (ECMAScript or CommonJS). Referencing UMD variables without explicit imports can lead to a runtime error if the library isn't included implicitly." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptUMDGlobal", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnnecessaryReturnJS", + "shortDescription": { + "text": "Unnecessary 'return' statement" + }, + "fullDescription": { + "text": "Reports an unnecessary 'return' statement, that is, a 'return' statement that returns no value and occurs just before the function would have \"fallen through\" the bottom. These statements may be safely removed.", + "markdown": "Reports an unnecessary `return` statement, that is, a `return` statement that returns no value and occurs just before the function would have \"fallen through\" the bottom. These statements may be safely removed." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "UnnecessaryReturnStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ConditionalExpressionWithIdenticalBranchesJS", + "shortDescription": { + "text": "Conditional expression with identical branches" + }, + "fullDescription": { + "text": "Reports a ternary conditional expression with identical 'then' and 'else' branches.", + "markdown": "Reports a ternary conditional expression with identical `then` and `else` branches." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "ConditionalExpressionWithIdenticalBranchesJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSAnnotator", + "shortDescription": { + "text": "ECMAScript specification is not followed" + }, + "fullDescription": { + "text": "Reports basic syntax issues and inconsistencies with language specification, such as invalid usages of keywords, usages of incompatible numeric format, or multiple parameters to getters/setters. Generally, such errors must always be reported and shouldn't be disabled. But in some cases, such as issues due to the dynamic nature of JavaScript, the use of not yet supported language features, or bugs in IDE's checker, it may be handy to disable reporting these very basic errors.", + "markdown": "Reports basic syntax issues and inconsistencies with language specification, such as invalid usages of keywords, usages of incompatible numeric format, or multiple parameters to getters/setters. \nGenerally, such errors must always be reported and shouldn't be disabled. But in some cases, such as issues due to the dynamic nature of JavaScript, the use of not yet supported language features, or bugs in IDE's checker, it may be handy to disable reporting these very basic errors." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "JSAnnotator", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUnfilteredForInLoop", + "shortDescription": { + "text": "Unfiltered for..in loop" + }, + "fullDescription": { + "text": "Reports unfiltered 'for-in' loops. The use of this construct results in processing not only own properties of an object but properties from its prototype as well. It may be unexpected in some specific cases, for example, in utility methods that copy or modify all properties or when 'Object''s prototype may be incorrectly modified. For example, the following code will print 42 and myMethod: 'Object.prototype.myMethod = function myMethod() {};\nlet a = { foo: 42 };\nfor (let i in a) {\n console.log(a[i]);\n}' Suggests replacing the whole loop with a 'Object.keys()' method or adding a 'hasOwnProperty()' check. After applying the quick-fix the code looks as follows: 'for (let i in a) {\n if (a.hasOwnProperty(i)) {\n console.log(a[i]);\n }\n}'", + "markdown": "Reports unfiltered `for-in` loops. \n\nThe use of this construct results in processing not only own properties of an object but properties from its prototype as well. It may be unexpected in some specific cases, for example, in utility methods that copy or modify all properties or when `Object`'s prototype may be incorrectly modified. For example, the following code will print **42** and **myMethod** : \n\n\n Object.prototype.myMethod = function myMethod() {};\n let a = { foo: 42 };\n for (let i in a) {\n console.log(a[i]);\n }\n\nSuggests replacing the whole loop with a `Object.keys()` method or adding a `hasOwnProperty()` check. After applying the quick-fix the code looks as follows:\n\n\n for (let i in a) {\n if (a.hasOwnProperty(i)) {\n console.log(a[i]);\n }\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSUnfilteredForInLoop", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSIncompatibleTypesComparison", + "shortDescription": { + "text": "Comparison of expressions having incompatible types" + }, + "fullDescription": { + "text": "Reports a comparison with operands of incompatible types or an operand with a type without possible common values.", + "markdown": "Reports a comparison with operands of incompatible types or an operand with a type without possible common values." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSIncompatibleTypesComparison", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSLastCommaInObjectLiteral", + "shortDescription": { + "text": "Unneeded last comma in object literal" + }, + "fullDescription": { + "text": "Reports usages of a trailing comma in object literals. The warning is reported only when the JavaScript language version is set to ECMAScript 5.1. Trailing commas in object literals are allowed by the specification, however, some browsers might throw an error when a trailing comma is used. You can configure formatting options for trailing commas in Code Style | JavaScript or TypeScript | Punctuation.", + "markdown": "Reports usages of a trailing comma in object literals.\n\nThe warning is reported only when the JavaScript language version is set to ECMAScript 5.1.\n\nTrailing commas in object literals are allowed by the specification, however, some browsers might throw an error when a trailing comma is used.\n\nYou can configure formatting options for trailing commas in **Code Style** \\| **JavaScript** or **TypeScript** \\| **Punctuation**." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSLastCommaInObjectLiteral", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSFunctionExpressionToArrowFunction", + "shortDescription": { + "text": "Function expression is used instead of arrow function" + }, + "fullDescription": { + "text": "Reports a function expression. Suggests converting it to an arrow function. Example: 'arr.map(function(el) {return el + 1})' After applying the quick-fix the code looks as follows: 'arr.map(el => el + 1)'", + "markdown": "Reports a [function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/function) expression. Suggests converting it to an [arrow function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions).\n\nExample:\n\n arr.map(function(el) {return el + 1})\n\nAfter applying the quick-fix the code looks as follows:\n\n arr.map(el => el + 1)\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSFunctionExpressionToArrowFunction", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/ES2015 migration aids", + "index": 30, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6TopLevelAwaitExpression", + "shortDescription": { + "text": "Top-level 'await' expression" + }, + "fullDescription": { + "text": "Reports a usage of a top-level 'await' expression. While the new 'top-level async' proposal is on its way, using 'await' outside async functions is not allowed.", + "markdown": "Reports a usage of a top-level `await` expression. While the new 'top-level async' proposal is on its way, using `await` outside async functions is not allowed." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "ES6TopLevelAwaitExpression", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Async code and promises", + "index": 65, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6MissingAwait", + "shortDescription": { + "text": "Missing await for an async function call" + }, + "fullDescription": { + "text": "Reports an 'async' function call without an expected 'await' prefix inside an 'async' function. Such call returns a 'Promise' and control flow is continued immediately. Example: 'async function bar() { /* ... */ }\nasync function foo() {\n bar(); // bad\n}' After the quick-fix is applied, the 'await' prefix is added: 'async function bar() { /* ... */ }\nasync function foo() {\n await bar(); // good\n}' When the 'Report for promises in return statements' checkbox is selected, also suggests adding 'await' in return statements. While this is generally not necessary, it gives two main benefits. You won't forget to add 'await' when surrounding your code with 'try-catch'. An explicit 'await' helps V8 runtime to provide async stack traces.", + "markdown": "Reports an `async` function call without an expected `await` prefix inside an `async` function. Such call returns a `Promise` and control flow is continued immediately.\n\nExample:\n\n\n async function bar() { /* ... */ }\n async function foo() {\n bar(); // bad\n }\n\n\nAfter the quick-fix is applied, the `await` prefix is added:\n\n\n async function bar() { /* ... */ }\n async function foo() {\n await bar(); // good\n }\n\nWhen the 'Report for promises in return statements' checkbox is selected, also suggests adding `await` in return statements. \nWhile this is generally not necessary, it gives two main benefits. \n\n* You won't forget to add `await` when surrounding your code with `try-catch`.\n* An explicit `await` helps V8 runtime to provide [async stack traces](https://bit.ly/v8-zero-cost-async-stack-traces)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6MissingAwait", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Async code and promises", + "index": 65, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TailRecursionJS", + "shortDescription": { + "text": "Tail recursion" + }, + "fullDescription": { + "text": "Reports a tail recursion, that is, when a function calls itself as its last action before returning. A tail recursion can always be replaced by looping, which will be considerably faster. Some JavaScript engines perform this optimization, while others do not. Thus, tail recursive solutions may have considerably different performance characteristics in different environments.", + "markdown": "Reports a tail recursion, that is, when a function calls itself as its last action before returning. A tail recursion can always be replaced by looping, which will be considerably faster. Some JavaScript engines perform this optimization, while others do not. Thus, tail recursive solutions may have considerably different performance characteristics in different environments." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "TailRecursionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ConvertToForOf", + "shortDescription": { + "text": "'for..in' is used instead of 'for..of'" + }, + "fullDescription": { + "text": "Reports a usage of a 'for..in' loop on an array. Suggests replacing it with a 'for..of' loop. 'for..of' loops, which are introduced in ECMAScript 6, iterate over 'iterable' objects. For arrays, this structure is preferable to 'for..in', because it works only with array values but not with array object's properties.", + "markdown": "Reports a usage of a [for..in](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) loop on an array. Suggests replacing it with a [for..of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) loop. \n`for..of` loops, which are introduced in ECMAScript 6, iterate over `iterable` objects. For arrays, this structure is preferable to `for..in`, because it works only with array values but not with array object's properties." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ConvertToForOf", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/ES2015 migration aids", + "index": 30, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FlowJSCoverage", + "shortDescription": { + "text": "Code is not covered by Flow" + }, + "fullDescription": { + "text": "Reports JavaScript code fragments that are not covered by the Flow type checker. To use this inspection, configure the Flow executable in Settings | Languages & Frameworks | JavaScript.", + "markdown": "Reports JavaScript code fragments that are not covered by the Flow type checker. To use this inspection, configure the Flow executable in [Settings \\| Languages \\& Frameworks \\| JavaScript](settings://Settings.JavaScript)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "FlowJSCoverage", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Flow type checker", + "index": 20, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ParameterNamingConventionJS", + "shortDescription": { + "text": "Function parameter naming convention" + }, + "fullDescription": { + "text": "Reports a function parameter whose name is too short, too long, or doesn't follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length and regular expression expected for local variables names. Use the standard 'java.util.regex' format regular expressions.", + "markdown": "Reports a function parameter whose name is too short, too long, or doesn't follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length and regular expression\nexpected for local variables names. Use the standard `java.util.regex` format regular expressions." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ParameterNamingConventionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Naming conventions", + "index": 62, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUndefinedPropertyAssignment", + "shortDescription": { + "text": "Undefined property assignment" + }, + "fullDescription": { + "text": "Reports an assignment to a property that is not defined in the type of a variable. Example: '/**\n * @type {{ property1: string, property2: number }}\n */\nlet myVariable = create();\n\nmyVariable.newProperty = 3; // bad'", + "markdown": "Reports an assignment to a property that is not defined in the type of a variable.\n\nExample:\n\n\n /**\n * @type {{ property1: string, property2: number }}\n */\n let myVariable = create();\n\n myVariable.newProperty = 3; // bad\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSUndefinedPropertyAssignment", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code style issues", + "index": 17, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "StandardJS", + "shortDescription": { + "text": "Standard code style" + }, + "fullDescription": { + "text": "Reports a discrepancy detected by the JavaScript Standard Style linter. The highlighting severity in the editor is based on the severity level the linter reports.", + "markdown": "Reports a discrepancy detected by the [JavaScript Standard Style](https://standardjs.com/) linter. \n\nThe highlighting severity in the editor is based on the severity level the linter reports." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "StandardJS", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code quality tools", + "index": 66, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ParametersPerFunctionJS", + "shortDescription": { + "text": "Function with too many parameters" + }, + "fullDescription": { + "text": "Reports a function with too many parameters. Such functions often indicate problems with design. Use the field below to specify the maximum acceptable number of parameters for a function.", + "markdown": "Reports a function with too many parameters. Such functions often indicate problems with design.\n\n\nUse the field below to specify the maximum acceptable number of parameters for a function." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "OverlyComplexFunctionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Function metrics", + "index": 44, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ThisExpressionReferencesGlobalObjectJS", + "shortDescription": { + "text": "'this' expression which references the global object" + }, + "fullDescription": { + "text": "Reports a 'this' expression outside an object literal or a constructor body. Such 'this' expressions reference the top-level \"global\" JavaScript object, but are mostly useless.", + "markdown": "Reports a `this` expression outside an object literal or a constructor body. Such `this` expressions reference the top-level \"global\" JavaScript object, but are mostly useless." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "ThisExpressionReferencesGlobalObjectJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Validity issues", + "index": 35, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NestedAssignmentJS", + "shortDescription": { + "text": "Nested assignment" + }, + "fullDescription": { + "text": "Reports an assignment expression nested inside another expression, for example, 'a = b = 1'. Such expressions may be confusing and violate the general design principle that a given construct should do precisely one thing.", + "markdown": "Reports an assignment expression nested inside another expression, for example, `a = b = 1`. Such expressions may be confusing and violate the general design principle that a given construct should do precisely one thing." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NestedAssignmentJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Assignment issues", + "index": 48, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DefaultNotLastCaseInSwitchJS", + "shortDescription": { + "text": "'default' not last case in 'switch'" + }, + "fullDescription": { + "text": "Reports a 'switch' statement where the 'default' case comes before another case instead of being the very last case, which may cause confusion.", + "markdown": "Reports a `switch` statement where the `default` case comes before another case instead of being the very last case, which may cause confusion." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "DefaultNotLastCaseInSwitchJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Switch statement issues", + "index": 63, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ConfusingPlusesOrMinusesJS", + "shortDescription": { + "text": "Confusing sequence of '+' or '-'" + }, + "fullDescription": { + "text": "Reports a suspicious combination of '+' or '-' characters in JavaScript code (for example, 'a+++b'. Such sequences are confusing, and their semantics may change through changes in the whitespace.", + "markdown": "Reports a suspicious combination of `+` or `-` characters in JavaScript code (for example, `a+++b`. Such sequences are confusing, and their semantics may change through changes in the whitespace." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ConfusingPlusesOrMinusesJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSDeprecatedSymbols", + "shortDescription": { + "text": "Deprecated symbol used" + }, + "fullDescription": { + "text": "Reports a usage of a deprecated function variable.", + "markdown": "Reports a usage of a deprecated function variable." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "JSDeprecatedSymbols", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LocalVariableNamingConventionJS", + "shortDescription": { + "text": "Local variable naming convention" + }, + "fullDescription": { + "text": "Reports a local variable whose name is too short, too long, or doesn't follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length, and a regular expression expected for local variables names. Use the standard 'java.util.regex' format regular expressions.", + "markdown": "Reports a local variable whose name is too short, too long, or doesn't follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length, and a regular expression\nexpected for local variables names. Use the standard `java.util.regex` format regular expressions." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LocalVariableNamingConventionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Naming conventions", + "index": 62, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "EmptyFinallyBlockJS", + "shortDescription": { + "text": "Empty 'finally' block" + }, + "fullDescription": { + "text": "Reports an empty 'finally' block, which usually indicates an error.", + "markdown": "Reports an empty `finally` block, which usually indicates an error." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "EmptyFinallyBlockJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Try statement issues", + "index": 42, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSCommentMatchesSignature", + "shortDescription": { + "text": "Mismatched JSDoc and function signature" + }, + "fullDescription": { + "text": "Reports mismatch between the names and the number of parameters within a JSDoc comment and the actual parameters of a function. Suggests updating parameters in JSDoc comment. Example: '/**\n * @param height Height in pixels\n */\nfunction sq(height, width) {} // width is not documented' After the quick-fix is applied: '/**\n * @param height Height in pixels\n * @param width\n */\nfunction sq(height, width) {}'", + "markdown": "Reports mismatch between the names and the number of parameters within a JSDoc comment and the actual parameters of a function. Suggests updating parameters in JSDoc comment.\n\n**Example:**\n\n\n /**\n * @param height Height in pixels\n */\n function sq(height, width) {} // width is not documented\n\nAfter the quick-fix is applied:\n\n\n /**\n * @param height Height in pixels\n * @param width\n */\n function sq(height, width) {}\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSCommentMatchesSignature", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UpdateDependencyToLatestVersion", + "shortDescription": { + "text": "Update package.json dependencies to latest versions" + }, + "fullDescription": { + "text": "Suggests to upgrade your package.json dependencies to the latest versions, ignoring specified versions.", + "markdown": "Suggests to upgrade your package.json dependencies to the latest versions, ignoring specified versions." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "UpdateDependencyToLatestVersion", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Imports and dependencies", + "index": 57, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptConfig", + "shortDescription": { + "text": "Inconsistent tsconfig.json properties" + }, + "fullDescription": { + "text": "Reports inconsistency of a 'paths', 'checkJs', or 'extends' property in a tsconfig.json file. The 'checkJs' property requires 'allowJs'. The 'extends' property should be a valid file reference.", + "markdown": "Reports inconsistency of a `paths`, `checkJs`, or `extends` property in a tsconfig.json file. \nThe `checkJs` property requires `allowJs`. \nThe `extends` property should be a valid file reference." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TypeScriptConfig", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSSuspiciousNameCombination", + "shortDescription": { + "text": "Suspicious variable/parameter name combination" + }, + "fullDescription": { + "text": "Reports an assignment or a function call where the name of the target variable or the function parameter does not match the name of the value assigned to it. Example: 'var x = 0;\n var y = x;' or 'var x = 0, y = 0;\n var rc = new Rectangle(y, x, 20, 20);' Here the inspection guesses that 'x' and 'y' are mixed up. Specify the names that should not be used together. An error is reported if a parameter name or an assignment target name contains words from one group while the name of the assigned or passed variable contains words from another group.", + "markdown": "Reports an assignment or a function call where the name of the target variable or the function parameter does not match the name of the value assigned to it.\n\nExample:\n\n\n var x = 0;\n var y = x;\n\nor\n\n\n var x = 0, y = 0;\n var rc = new Rectangle(y, x, 20, 20);\n\nHere the inspection guesses that `x` and `y` are mixed up.\n\nSpecify the names that should not be used together. An error is reported\nif a parameter name or an assignment target name contains words from one group while the name of the assigned or passed\nvariable contains words from another group." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSSuspiciousNameCombination", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUnresolvedExtXType", + "shortDescription": { + "text": "Unresolved Ext JS xtype" + }, + "fullDescription": { + "text": "Reports an Ext JS 'xtype' reference that doesn't have a corresponding class.", + "markdown": "Reports an Ext JS `xtype` reference that doesn't have a corresponding class." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSUnresolvedExtXType", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ForLoopThatDoesntUseLoopVariableJS", + "shortDescription": { + "text": "'for' loop where update or condition does not use loop variable" + }, + "fullDescription": { + "text": "Reports a 'for' loop where the condition or update does not use the 'for' loop variable.", + "markdown": "Reports a `for` loop where the condition or update does not use the `for` loop variable." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ForLoopThatDoesntUseLoopVariableJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptAbstractClassConstructorCanBeMadeProtected", + "shortDescription": { + "text": "Abstract class constructor can be made protected" + }, + "fullDescription": { + "text": "Reports a public constructor of an abstract class and suggests making it protected (because it is useless to have it public).", + "markdown": "Reports a public constructor of an abstract class and suggests making it protected (because it is useless to have it public)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptAbstractClassConstructorCanBeMadeProtected", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FunctionWithMultipleReturnPointsJS", + "shortDescription": { + "text": "Function with multiple return points" + }, + "fullDescription": { + "text": "Reports a function with multiple return points. Such functions are hard to understand and maintain.", + "markdown": "Reports a function with multiple return points. Such functions are hard to understand and maintain." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionWithMultipleReturnPointsJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Function metrics", + "index": 44, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSIgnoredPromiseFromCall", + "shortDescription": { + "text": "Result of method call returning a promise is ignored" + }, + "fullDescription": { + "text": "Reports a function call that returns a 'Promise' that is not used later. Such calls are usually unintended and indicate an error.", + "markdown": "Reports a function call that returns a `Promise` that is not used later. Such calls are usually unintended and indicate an error." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSIgnoredPromiseFromCall", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Async code and promises", + "index": 65, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ThreeNegationsPerFunctionJS", + "shortDescription": { + "text": "Function with more than three negations" + }, + "fullDescription": { + "text": "Reports a function with three or more negation operations ('!' or '!='). Such functions may be unnecessarily confusing.", + "markdown": "Reports a function with three or more negation operations (`!` or `!=`). Such functions may be unnecessarily confusing." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionWithMoreThanThreeNegationsJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Function metrics", + "index": 44, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSRemoveUnnecessaryParentheses", + "shortDescription": { + "text": "Unnecessary parentheses" + }, + "fullDescription": { + "text": "Reports redundant parentheses. In expressions: 'var x = ((1) + 2) + 3' In arrow function argument lists: 'var incrementer = (x) => x + 1' In TypeScript and Flow type declarations: 'type Card = (Suit & Rank) | (Suit & Number)'", + "markdown": "Reports redundant parentheses.\n\nIn expressions:\n\n var x = ((1) + 2) + 3\n\nIn arrow function argument lists:\n\n var incrementer = (x) => x + 1\n\nIn TypeScript and Flow type declarations:\n\n type Card = (Suit & Rank) | (Suit & Number)\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSRemoveUnnecessaryParentheses", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code style issues", + "index": 17, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OverlyComplexBooleanExpressionJS", + "shortDescription": { + "text": "Overly complex boolean expression" + }, + "fullDescription": { + "text": "Reports a boolean expression with too many terms. Such expressions may be confusing and bug-prone. Use the field below to specify the maximum number of terms allowed in an arithmetic expression.", + "markdown": "Reports a boolean expression with too many terms. Such expressions may be confusing and bug-prone.\n\n\nUse the field below to specify the maximum number of terms allowed in an arithmetic expression." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "OverlyComplexBooleanExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OverlyComplexArithmeticExpressionJS", + "shortDescription": { + "text": "Overly complex arithmetic expression" + }, + "fullDescription": { + "text": "Reports an arithmetic expression with too many terms. Such expressions may be confusing and bug-prone. Use the field below to specify the maximum number of terms allowed in an arithmetic expression.", + "markdown": "Reports an arithmetic expression with too many terms. Such expressions may be confusing and bug-prone.\n\n\nUse the field below to specify the maximum number of terms allowed in an arithmetic expression." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "OverlyComplexArithmeticExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6RedundantNestingInTemplateLiteral", + "shortDescription": { + "text": "Redundant nesting in template literal" + }, + "fullDescription": { + "text": "Reports nested instances of a string or a template literal. Suggests inlining the nested instances into the containing template string. Example: 'let a = `Hello, ${`Brave ${\"New\"}`} ${\"World\"}!`' After applying the quick-fix the code looks as follows: 'let a = `Hello, Brave New World!`'", + "markdown": "Reports nested instances of a string or a template literal. Suggests inlining the nested instances into the containing template string.\n\nExample:\n\n\n let a = `Hello, ${`Brave ${\"New\"}`} ${\"World\"}!`\n\nAfter applying the quick-fix the code looks as follows:\n\n\n let a = `Hello, Brave New World!`\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6RedundantNestingInTemplateLiteral", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "StringLiteralBreaksHTMLJS", + "shortDescription": { + "text": "String literal which breaks HTML parsing" + }, + "fullDescription": { + "text": "Reports a string literal that contains a '' or multiple components matched on any other element.", + "markdown": "Reports a component that is matched on an embedded template element `` or multiple components matched on any other element." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularAmbiguousComponentTag", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularUndefinedModuleExport", + "shortDescription": { + "text": "Undefined export from Angular module" + }, + "fullDescription": { + "text": "Reports an export of an undeclared or unimported component, directive, or pipes from an Angular module.", + "markdown": "Reports an export of an undeclared or unimported component, directive, or pipes from an Angular module." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularUndefinedModuleExport", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularInvalidI18nAttribute", + "shortDescription": { + "text": "Invalid i18n attribute" + }, + "fullDescription": { + "text": "Reports a problem with a 'i18n-*' attribute.", + "markdown": "Reports a problem with a `i18n-*` attribute." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AngularInvalidI18nAttribute", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularForBlockNonIterableVar", + "shortDescription": { + "text": "Non-iterable type in @for block" + }, + "fullDescription": { + "text": "Reports that the type of variable to iterate over does not have '[Symbol.iterator]()' method, which returns an iterator.", + "markdown": "Reports that the type of variable to iterate over does not have `[Symbol.iterator]()` method, which returns an iterator." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularForBlockNonIterableVar", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularIncorrectTemplateDefinition", + "shortDescription": { + "text": "Incorrect component template definition" + }, + "fullDescription": { + "text": "Reports a component that doesn’t have an associated template or uses both 'template' and 'templateUrl' properties.", + "markdown": "Reports a component that doesn't have an associated template or uses both `template` and `templateUrl` properties." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularIncorrectTemplateDefinition", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularNonStandaloneComponentImports", + "shortDescription": { + "text": "Invalid usage of imports in non-standalone components" + }, + "fullDescription": { + "text": "Reports usages of imports property in non-standalone component decorators. Imports can be used only in standalone components.", + "markdown": "Reports usages of imports property in non-standalone component decorators. Imports can be used only in standalone components." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularNonStandaloneComponentImports", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularMissingOrInvalidDeclarationInModule", + "shortDescription": { + "text": "Missing or invalid component, directive or pipe declaration in a module" + }, + "fullDescription": { + "text": "Reports a non-standalone Angular component, directive, or pipe that is not declared in any module or is declared in multiple modules.", + "markdown": "Reports a non-standalone Angular component, directive, or pipe that is not declared in any module or is declared in multiple modules." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularMissingOrInvalidDeclarationInModule", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularInvalidAnimationTriggerAssignment", + "shortDescription": { + "text": "Invalid animation trigger assignment" + }, + "fullDescription": { + "text": "Reports an invalid assignment of an animation trigger. To attach an animation to an element, use '[@triggerName]=\"expression\"' or an attribute without a value '@triggerName'.", + "markdown": "Reports an invalid assignment of an animation trigger. To attach an animation to an element, use `[@triggerName]=\"expression\"` or an attribute without a value `@triggerName`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularInvalidAnimationTriggerAssignment", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularInvalidEntryComponent", + "shortDescription": { + "text": "Invalid entry component" + }, + "fullDescription": { + "text": "Reports an invalid Angular component specified in the module’s 'bootstrap' or 'entryComponents' property.", + "markdown": "Reports an invalid Angular component specified in the module's `bootstrap` or `entryComponents` property." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularInvalidEntryComponent", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularRecursiveModuleImportExport", + "shortDescription": { + "text": "Recursive import or export of an Angular module or a standalone component" + }, + "fullDescription": { + "text": "Reports a cyclic dependency between Angular modules or standalone components.", + "markdown": "Reports a cyclic dependency between Angular modules or standalone components." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularRecursiveModuleImportExport", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularInvalidSelector", + "shortDescription": { + "text": "Missing or invalid selector" + }, + "fullDescription": { + "text": "Reports an invalid 'selector' property of a component or directive.", + "markdown": "Reports an invalid `selector` property of a component or directive." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularInvalidSelector", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularBindingTypeMismatch", + "shortDescription": { + "text": "Invalid binding type" + }, + "fullDescription": { + "text": "Reports a mismatch between actual and expected directive binding type.", + "markdown": "Reports a mismatch between actual and expected directive binding type." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularBindingTypeMismatch", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularNonEmptyNgContent", + "shortDescription": { + "text": "Content inside tag" + }, + "fullDescription": { + "text": "Reports a text or tag occurrence inside a '' tag used for content projection.", + "markdown": "Reports a text or tag occurrence inside a `` tag used for content projection." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularNonEmptyNgContent", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularMissingRequiredDirectiveInputBinding", + "shortDescription": { + "text": "Missing required directive input" + }, + "fullDescription": { + "text": "Reports a missing binding for a required directive input.", + "markdown": "Reports a missing binding for a required directive input." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularMissingRequiredDirectiveInputBinding", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularInsecureBindingToEvent", + "shortDescription": { + "text": "Insecure binding to event" + }, + "fullDescription": { + "text": "Reports a binding to an event property or attribute, for example, '[onclick]' or '[attr.onclick]' instead of '(click)'.", + "markdown": "Reports a binding to an event property or attribute, for example, `[onclick]` or `[attr.onclick]` instead of `(click)`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AngularInsecureBindingToEvent", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.intellij.plugins.postcss", + "version": "241.18034.45", + "rules": [ + { + "id": "PostCssCustomSelector", + "shortDescription": { + "text": "Invalid custom selector" + }, + "fullDescription": { + "text": "Reports a syntax error in PostCSS Custom Selector. Example: '@custom-selector :--heading h1, h2, h3;'", + "markdown": "Reports a syntax error in [PostCSS Custom Selector](https://github.com/postcss/postcss-custom-selectors).\n\nExample:\n\n\n @custom-selector :--heading h1, h2, h3;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "PostCssCustomSelector", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "PostCSS", + "index": 4, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PostCssUnresolvedModuleValueReference", + "shortDescription": { + "text": "Unresolved CSS module value" + }, + "fullDescription": { + "text": "Reports an unresolved reference to a CSS Module Value ('@value' declaration). Example: '@value foo from unknown;'", + "markdown": "Reports an unresolved reference to a [CSS Module Value](https://github.com/css-modules/postcss-modules-values) (`@value` declaration).\n\nExample:\n\n\n @value foo from unknown;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "PostCssUnresolvedModuleValueReference", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "PostCSS", + "index": 4, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PostCssNesting", + "shortDescription": { + "text": "Invalid nested rule" + }, + "fullDescription": { + "text": "Reports a nested style rule whose syntax doesn't comply with the PostCSS Nested or the PostCSS Nesting specification. Example: '.phone {\n &_title {}\n}'", + "markdown": "Reports a nested style rule whose syntax doesn't comply with the [PostCSS Nested](https://github.com/postcss/postcss-nested) or the [PostCSS Nesting](https://github.com/csstools/postcss-nesting) specification.\n\nExample:\n\n\n .phone {\n &_title {}\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PostCssNesting", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "PostCSS", + "index": 4, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PostCssCustomMedia", + "shortDescription": { + "text": "Invalid custom media" + }, + "fullDescription": { + "text": "Reports a syntax error in a PostCSS Custom Media query. Example: '@custom-media --small-viewport (max-width: 30em);'", + "markdown": "Reports a syntax error in a [PostCSS Custom Media](https://github.com/postcss/postcss-custom-media) query.\n\nExample:\n\n\n @custom-media --small-viewport (max-width: 30em);\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "PostCssCustomMedia", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "PostCSS", + "index": 4, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PostCssMediaRange", + "shortDescription": { + "text": "Invalid media query range" + }, + "fullDescription": { + "text": "Checks range context syntax, which may alternatively be used for media features with a 'range' type. Example: '@media screen and (500px <= width <= 1200px) {}'", + "markdown": "Checks [range context](https://github.com/postcss/postcss-media-minmax) syntax, which may alternatively be used for media features with a 'range' type.\n\nExample:\n\n\n @media screen and (500px <= width <= 1200px) {}\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "PostCssMediaRange", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "PostCSS", + "index": 4, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "XPathView", + "version": "241.18034.45", + "rules": [ + { + "id": "IndexZeroUsage", + "shortDescription": { + "text": "XPath predicate with index 0" + }, + "fullDescription": { + "text": "Reports usages of '0' in a predicate index or in a comparison with the function 'position()'. Such usage is almost always a bug because in XPath, the index starts at '1', not at '0'. Example: '//someelement[position() = 0]' or '//something[0]'", + "markdown": "Reports usages of `0` in a predicate index or in a comparison with the function `position()`. Such usage is almost always a bug because in XPath, the index starts at `1`, *not* at `0`.\n\n**Example:**\n\n\n //someelement[position() = 0] or //something[0]\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "IndexZeroUsage", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XPath", + "index": 5, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckNodeTest", + "shortDescription": { + "text": "Unknown element or attribute name" + }, + "fullDescription": { + "text": "Reports names of elements or attributes that are used in an XPath-expression but are missing in the associated XML files and are not defined in the referenced schemas. Such names are often the result of typos and would otherwise probably only be discovered at runtime. Example: '' If the 'h' is bound to the XHTML namespace, the inspection will report this part of the 'match' expression as an unknown element name because the correct name of the element is \"textarea\".", + "markdown": "Reports names of elements or attributes that are used in an XPath-expression but are missing in the associated XML files and are not defined in the referenced schemas. Such names are often the result of typos and would otherwise probably only be discovered at runtime.\n\n**Example:**\n\n\n \n\n\nIf the `h` is bound to the XHTML namespace, the inspection will report this part of the `match` expression as an\nunknown element name because the correct name of the element is \"textarea\"." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CheckNodeTest", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XPath", + "index": 5, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XsltUnusedDeclaration", + "shortDescription": { + "text": "Unused variable or parameter" + }, + "fullDescription": { + "text": "Reports local variables and parameters that are never used.", + "markdown": "Reports local variables and parameters that are never used." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XsltUnusedDeclaration", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XSLT", + "index": 54, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XsltDeclarations", + "shortDescription": { + "text": "Incorrect declaration" + }, + "fullDescription": { + "text": "Reports duplicate declarations and illegal identifiers in XSLT variables, parameters, and named templates:", + "markdown": "Reports duplicate declarations and illegal identifiers in XSLT variables, parameters, and named templates:" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XsltDeclarations", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XSLT", + "index": 54, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XsltVariableShadowing", + "shortDescription": { + "text": "Shadowed variable" + }, + "fullDescription": { + "text": "Reports shadowed XSLT variables.", + "markdown": "Reports shadowed XSLT variables." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XsltVariableShadowing", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XSLT", + "index": 54, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HardwiredNamespacePrefix", + "shortDescription": { + "text": "Hardcoded namespace prefix" + }, + "fullDescription": { + "text": "Reports comparisons of the 'name()' function with a string that contains a colon (':'). Such usages usually indicate a hardcoded namespace prefix in the comparison. As a result, the code will break when run against XML that uses another prefix for the same namespace. Example: '...'", + "markdown": "Reports comparisons of the `name()` function with a string that contains a colon (`:`). Such usages usually indicate a hardcoded namespace prefix in the comparison. As a result, the code will break when run against XML that uses another prefix for the same namespace.\n\n**Example:**\n\n\n ...\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HardwiredNamespacePrefix", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XPath", + "index": 5, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RedundantTypeConversion", + "shortDescription": { + "text": "Redundant type conversion" + }, + "fullDescription": { + "text": "Reports unnecessary type conversions. Type conversions are unnecessary when the argument type of a 'string()', 'number()', or 'boolean()' function is already the same as the function's return type or if the expected expression type is 'any'. Suggests removing the unnecessary conversion.", + "markdown": "Reports unnecessary type conversions. Type conversions are unnecessary when the argument type of a `string()`, `number()`, or `boolean()` function is already the same as the function's return type or if the expected expression type is `any`. Suggests removing the unnecessary conversion." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RedundantTypeConversion", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XPath", + "index": 5, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XsltTemplateInvocation", + "shortDescription": { + "text": "Incorrect template invocation" + }, + "fullDescription": { + "text": "Reports missing arguments, passing arguments that are not declared, and passing arguments for parameters more than once in named XSLT template invocations. Parameters declared with a default value are optional and will not be reported as missing.", + "markdown": "Reports missing arguments, passing arguments that are not declared, and passing arguments for parameters more than once in named XSLT template invocations.\n\n\nParameters declared with a default value are optional and will not be reported as missing." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XsltTemplateInvocation", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XSLT", + "index": 54, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ImplicitTypeConversion", + "shortDescription": { + "text": "Implicit type conversion" + }, + "fullDescription": { + "text": "Reports implicit conversions between the predefined XPath-types 'STRING', 'NUMBER', 'BOOLEAN', and 'NODESET'. Helps to write XSLT scripts that are more expressive about types and prevents subtle bugs: Example: '' is not the same as '' The first test checks whether the element \"foo\" exists ('count(foo) > 0)'; the latter one however is only true if the element actually contains any text ('string-length(foo) > 0'). Suggests making the type conversion more explicit. Use the following options to configure the inspection: Enable or disable implicit conversions between certain types Always report explicit conversions that do not result in the actually expected type, for example, '' Ignore conversion from 'NODESET' to 'BOOLEAN' by using the 'string()' function as a shortcut for writing 'string-length() > 0'.", + "markdown": "Reports implicit conversions between the predefined XPath-types `STRING`, `NUMBER`, `BOOLEAN`, and `NODESET`. Helps to write XSLT scripts that are more expressive about types and prevents subtle bugs:\n\n**Example:**\n\n\n \n\nis not the same as\n\n\n \n\n\nThe first test checks whether the element \"foo\" exists (`count(foo) > 0)`; the latter one however is only\ntrue if the element actually contains any text (`string-length(foo) > 0`). Suggests making\nthe type conversion more explicit.\n\n\nUse the following options to configure the inspection:\n\n* Enable or disable implicit conversions between certain types\n* Always report explicit conversions that do not result in the actually expected type, for example, ``\n* Ignore conversion from `NODESET` to `BOOLEAN` by using the `string()` function as a shortcut for writing `string-length() > 0`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ImplicitTypeConversion", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XPath", + "index": 5, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.jetbrains.plugins.sass", + "version": "241.18034.45", + "rules": [ + { + "id": "SassScssUnresolvedMixin", + "shortDescription": { + "text": "Unresolved mixin" + }, + "fullDescription": { + "text": "Reports an unresolved Sass/SCSS mixin reference. Example: '* {\n @include unknown-mixin;\n}'", + "markdown": "Reports an unresolved [Sass/SCSS mixin](https://sass-lang.com/documentation/at-rules/mixin) reference.\n\n**Example:**\n\n\n * {\n @include unknown-mixin;\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SassScssUnresolvedMixin", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Sass_SCSS", + "index": 6, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SassScssResolvedByNameOnly", + "shortDescription": { + "text": "Missing import" + }, + "fullDescription": { + "text": "Reports a reference to a variable, mixin, or function that is declared in another file but this file isn't explicitly imported in the current file. Example: '* {\n margin: $var-in-other-file;\n}'", + "markdown": "Reports a reference to a variable, mixin, or function that is declared in another file but this file isn't explicitly [imported](https://sass-lang.com/documentation/at-rules/import) in the current file.\n\n**Example:**\n\n\n * {\n margin: $var-in-other-file;\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "SassScssResolvedByNameOnly", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Sass_SCSS", + "index": 6, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SassScssUnresolvedPlaceholderSelector", + "shortDescription": { + "text": "Unresolved placeholder selector" + }, + "fullDescription": { + "text": "Reports an unresolved Sass/SCSS placeholder selector reference. Example: '* {\n @extend %unknown-placeholder-selector;\n}'", + "markdown": "Reports an unresolved [Sass/SCSS placeholder selector](https://sass-lang.com/documentation/variables) reference.\n\n**Example:**\n\n\n * {\n @extend %unknown-placeholder-selector;\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SassScssUnresolvedPlaceholderSelector", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Sass_SCSS", + "index": 6, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SassScssUnresolvedVariable", + "shortDescription": { + "text": "Unresolved variable" + }, + "fullDescription": { + "text": "Reports an unresolved Sass/SCSS variable reference. Example: '* {\n margin: $unknown-var;\n}'", + "markdown": "Reports an unresolved [Sass/SCSS variable](https://sass-lang.com/documentation/variables) reference.\n\n**Example:**\n\n\n * {\n margin: $unknown-var;\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SassScssUnresolvedVariable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Sass_SCSS", + "index": 6, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.jetbrains.sh", + "version": "241.18034.45", + "rules": [ + { + "id": "ShellCheck", + "shortDescription": { + "text": "ShellCheck" + }, + "fullDescription": { + "text": "Reports shell script bugs detected by the integrated ShellCheck static analysis tool.", + "markdown": "Reports shell script bugs detected by the integrated [ShellCheck](https://github.com/koalaman/shellcheck) static analysis tool." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "ShellCheck", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Shell script", + "index": 7, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "name.kropp.intellij.makefile", + "version": "241.18034.45", + "rules": [ + { + "id": "MakefileUnresolvedPrerequisite", + "shortDescription": { + "text": "Unresolved prerequisite" + }, + "fullDescription": { + "text": "Reports unresolved target prerequisites", + "markdown": "Reports unresolved target prerequisites" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "MakefileUnresolvedPrerequisite", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Makefile", + "index": 9, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij.clion", + "version": "241.18034.45", + "rules": [ + { + "id": "CMakeMismatchedCommandArguments", + "shortDescription": { + "text": "Mismatched command arguments" + }, + "fullDescription": { + "text": "Reports mismatched arguments in opening- and closing commands. Example: 'if (A)\nendif (B)'", + "markdown": "Reports mismatched arguments in opening- and closing commands.\n\n**Example:**\n\n\n if (A)\n endif (B)\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CMakeMismatchedCommandArguments", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CMake/General", + "index": 11, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CMakeDeprecatedCommands", + "shortDescription": { + "text": "Deprecated command used" + }, + "fullDescription": { + "text": "Reports a usage of a deprecated command.", + "markdown": "Reports a usage of a deprecated command." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "CMakeDeprecatedCommands", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CMake/General", + "index": 11, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCGlobalDFAInspection", + "shortDescription": { + "text": "Interprocedural analysis" + }, + "fullDescription": { + "text": "Interprocedural summary-based static code analysis", + "markdown": "Interprocedural summary-based static code analysis" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCGlobalDFAInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "Karma", + "version": "241.18034.45", + "rules": [ + { + "id": "KarmaConfigFile", + "shortDescription": { + "text": "Invalid Karma configuration file" + }, + "fullDescription": { + "text": "Reports a potential error in a file path ('basePath', 'files') for a Karma configuration file, for example, 'karma.conf.js'.", + "markdown": "Reports a potential error in a file path ('basePath', 'files') for a Karma configuration file, for example, `karma.conf.js`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "KarmaConfigFile", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Unit testing", + "index": 8, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij", + "version": "241.18034.45", + "rules": [ + { + "id": "JsonSchemaDeprecation", + "shortDescription": { + "text": "Deprecated JSON property" + }, + "fullDescription": { + "text": "Reports a deprecated property in a JSON file. Note that deprecation mechanism is not defined in the JSON Schema specification yet, and this inspection uses a non-standard extension 'deprecationMessage'.", + "markdown": "Reports a deprecated property in a JSON file. \nNote that deprecation mechanism is not defined in the JSON Schema specification yet, and this inspection uses a non-standard extension 'deprecationMessage'." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JsonSchemaDeprecation", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JSON and JSON5", + "index": 12, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JsonSchemaRefReference", + "shortDescription": { + "text": "Unresolved '$ref' and '$schema' references" + }, + "fullDescription": { + "text": "Reports an unresolved '$ref' or '$schema' path in a JSON schema.", + "markdown": "Reports an unresolved `$ref` or `$schema` path in a JSON schema. " + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsonSchemaRefReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JSON and JSON5", + "index": 12, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlUnknownBooleanAttribute", + "shortDescription": { + "text": "Incorrect boolean attribute" + }, + "fullDescription": { + "text": "Reports an HTML non-boolean attribute without a value. Suggests configuring attributes that should not be reported.", + "markdown": "Reports an HTML non-boolean attribute without a value. Suggests configuring attributes that should not be reported." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlUnknownBooleanAttribute", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DuplicatedCode", + "shortDescription": { + "text": "Duplicated code fragment" + }, + "fullDescription": { + "text": "Reports duplicated blocks of code from the selected scope: the same file or the entire project. The inspection features quick-fixes that help you to set the size of detected duplicates, navigate to repetitive code fragments, and compare them in a tool window. The inspection options allow you to select the scope of the reported duplicated fragments and set the initial size for the duplicated language constructs. You can also configure the constructs that you want to anonymize in File | Settings | Editor | Duplicates.", + "markdown": "Reports duplicated blocks of code from the selected scope: the same file or the entire project.\n\nThe inspection features quick-fixes that help you to set the size of detected duplicates, navigate to repetitive code fragments, and compare them in a tool window.\n\nThe inspection options allow you to select the scope of the reported duplicated fragments and set the initial size for the duplicated language constructs.\n\nYou can also configure the constructs that you want to anonymize in [File \\| Settings \\| Editor \\| Duplicates](settings://duplicates.index)." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "DuplicatedCode", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "InconsistentLineSeparators", + "shortDescription": { + "text": "Inconsistent line separators" + }, + "fullDescription": { + "text": "Reports files with line separators different from the ones that are specified in the project's settings. For example, the inspection will be triggered if you set the line separator to '\\n' in Settings | Editor | Code Style | Line separator, while the file you are editing uses '\\r\\n' as a line separator. The inspection also warns you about mixed line separators within a file.", + "markdown": "Reports files with line separators different from the ones that are specified in the project's settings.\n\nFor example, the inspection will be triggered if you set the line separator to `\\n` in\n[Settings \\| Editor \\| Code Style \\| Line separator](settings://preferences.sourceCode?Line%20separator),\nwhile the file you are editing uses `\\r\\n` as a line separator.\n\nThe inspection also warns you about mixed line separators within a file." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "InconsistentLineSeparators", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RedundantSuppression", + "shortDescription": { + "text": "Redundant suppression" + }, + "fullDescription": { + "text": "Reports usages of the following elements that can be safely removed because the inspection they affect is no longer applicable in this context: '@SuppressWarning' annotation, or '// noinspection' line comment, or '/** noinspection */' JavaDoc comment Example: 'public class C {\n // symbol is already private,\n // but annotation is still around\n @SuppressWarnings({\"WeakerAccess\"})\n private boolean CONST = true;\n void f() {\n CONST = false;\n }\n}'", + "markdown": "Reports usages of the following elements that can be safely removed because the inspection they affect is no longer applicable in this context:\n\n* `@SuppressWarning` annotation, or\n* `// noinspection` line comment, or\n* `/** noinspection */` JavaDoc comment\n\nExample:\n\n\n public class C {\n // symbol is already private,\n // but annotation is still around\n @SuppressWarnings({\"WeakerAccess\"})\n private boolean CONST = true;\n void f() {\n CONST = false;\n }\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RedundantSuppression", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ProblematicWhitespace", + "shortDescription": { + "text": "Problematic whitespace" + }, + "fullDescription": { + "text": "Reports the following problems: Tabs used for indentation when the code style is configured to use only spaces. Spaces used for indentation when the code style is configured to use only tabs. Spaces used for indentation and tabs used for alignment when the code style is configured to use smart tabs.", + "markdown": "Reports the following problems:\n\n* Tabs used for indentation when the code style is configured to use only spaces.\n* Spaces used for indentation when the code style is configured to use only tabs.\n* Spaces used for indentation and tabs used for alignment when the code style is configured to use smart tabs." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ProblematicWhitespace", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlUnknownTarget", + "shortDescription": { + "text": "Unresolved file in a link" + }, + "fullDescription": { + "text": "Reports an unresolved file in a link.", + "markdown": "Reports an unresolved file in a link." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlUnknownTarget", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SSBasedInspection", + "shortDescription": { + "text": "Structural search inspection" + }, + "fullDescription": { + "text": "Allows configuring Structural Search/Structural Replace templates that you can apply to the file you are editing. All matches will be highlighted and marked with the template name that you have configured. If you configure the Structural Replace pattern as well, the corresponding replace option will be available as a quick-fix.", + "markdown": "Allows configuring **Structural Search/Structural Replace** templates that you can apply to the file you are editing.\n\nAll matches will be highlighted and marked with the template name that you have configured.\nIf you configure the **Structural Replace** pattern as well, the corresponding replace option will be available as a quick-fix." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SSBasedInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Structural search", + "index": 43, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LongLine", + "shortDescription": { + "text": "Line is longer than allowed by code style" + }, + "fullDescription": { + "text": "Reports lines that are longer than the Hard wrap at parameter specified in Settings | Editor | Code Style | General.", + "markdown": "Reports lines that are longer than the **Hard wrap at** parameter specified in [Settings \\| Editor \\| Code Style \\| General](settings://preferences.sourceCode?Hard%20wrap%20at)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LongLine", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlWrongRootElement", + "shortDescription": { + "text": "Wrong root element" + }, + "fullDescription": { + "text": "Reports a root tag name different from the name specified in the '' tag.", + "markdown": "Reports a root tag name different from the name specified in the `` tag." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XmlWrongRootElement", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckValidXmlInScriptTagBody", + "shortDescription": { + "text": "Malformed content of 'script' tag" + }, + "fullDescription": { + "text": "Reports contents of 'script' tags that are invalid XML. Example: '' After the quick-fix is applied: ''", + "markdown": "Reports contents of `script` tags that are invalid XML. \n\n**Example:**\n\n\n \n\nAfter the quick-fix is applied:\n\n\n \n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CheckValidXmlInScriptTagBody", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpSuspiciousBackref", + "shortDescription": { + "text": "Suspicious back reference" + }, + "fullDescription": { + "text": "Reports back references that will not be resolvable at runtime. This means that the back reference can never match anything. A back reference will not be resolvable when the group is defined after the back reference, or if the group is defined in a different branch of an alternation. Example of a group defined after its back reference: '\\1(abc)' Example of a group and a back reference in different branches: 'a(b)c|(xy)\\1z' New in 2022.1", + "markdown": "Reports back references that will not be resolvable at runtime. This means that the back reference can never match anything. A back reference will not be resolvable when the group is defined after the back reference, or if the group is defined in a different branch of an alternation.\n\n**Example of a group defined after its back reference:**\n\n\n \\1(abc)\n\n**Example of a group and a back reference in different branches:**\n\n\n a(b)c|(xy)\\1z\n\nNew in 2022.1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpSuspiciousBackref", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpSingleCharAlternation", + "shortDescription": { + "text": "Single character alternation" + }, + "fullDescription": { + "text": "Reports single char alternation in a RegExp. It is simpler to use a character class instead. This may also provide better matching performance. Example: 'a|b|c|d' After the quick-fix is applied: '[abcd]' New in 2017.1", + "markdown": "Reports single char alternation in a RegExp. It is simpler to use a character class instead. This may also provide better matching performance.\n\n**Example:**\n\n\n a|b|c|d\n\nAfter the quick-fix is applied:\n\n\n [abcd]\n\n\nNew in 2017.1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpSingleCharAlternation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlUnknownAttribute", + "shortDescription": { + "text": "Unknown attribute" + }, + "fullDescription": { + "text": "Reports an unknown HTML attribute. Suggests configuring attributes that should not be reported.", + "markdown": "Reports an unknown HTML attribute. Suggests configuring attributes that should not be reported." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlUnknownAttribute", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckTagEmptyBody", + "shortDescription": { + "text": "Empty element content" + }, + "fullDescription": { + "text": "Reports XML elements without contents. Example: '\n \n ' After the quick-fix is applied: '\n \n '", + "markdown": "Reports XML elements without contents.\n\n**Example:**\n\n\n \n \n \n\nAfter the quick-fix is applied:\n\n\n \n \n \n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CheckTagEmptyBody", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpRedundantEscape", + "shortDescription": { + "text": "Redundant character escape" + }, + "fullDescription": { + "text": "Reports redundant character escape sequences that can be replaced with unescaped characters preserving the meaning. Many escape sequences that are necessary outside of a character class are redundant inside square brackets '[]' of a character class. Although unescaped opening curly braces '{' outside of character classes are allowed in some dialects (JavaScript, Python, and so on), it can cause confusion and make the pattern less portable, because there are dialects that require escaping curly braces as characters. For this reason the inspection does not report escaped opening curly braces. Example: '\\-\\;[\\.]' After the quick-fix is applied: '-;[.]' The Ignore escaped closing brackets '}' and ']' option specifies whether to report '\\}' and '\\]' outside of a character class when they are allowed to be unescaped by the RegExp dialect. New in 2017.3", + "markdown": "Reports redundant character escape sequences that can be replaced with unescaped characters preserving the meaning. Many escape sequences that are necessary outside of a character class are redundant inside square brackets `[]` of a character class.\n\n\nAlthough unescaped opening curly braces `{` outside of character classes are allowed in some dialects (JavaScript, Python, and so on),\nit can cause confusion and make the pattern less portable, because there are dialects that require escaping curly braces as characters.\nFor this reason the inspection does not report escaped opening curly braces.\n\n**Example:**\n\n\n \\-\\;[\\.]\n\nAfter the quick-fix is applied:\n\n\n -;[.]\n\n\nThe **Ignore escaped closing brackets '}' and '\\]'** option specifies whether to report `\\}` and `\\]` outside of a character class\nwhen they are allowed to be unescaped by the RegExp dialect.\n\nNew in 2017.3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpRedundantEscape", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnresolvedReference", + "shortDescription": { + "text": "Unresolved reference" + }, + "fullDescription": { + "text": "Reports an unresolved reference to a named pattern ('define') in RELAX-NG files that use XML syntax. Suggests creating the referenced 'define' element.", + "markdown": "Reports an unresolved reference to a named pattern (`define`) in RELAX-NG files that use XML syntax. Suggests creating the referenced `define` element." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "UnresolvedReference", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "RELAX NG", + "index": 58, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlMissingClosingTag", + "shortDescription": { + "text": "Missing closing tag" + }, + "fullDescription": { + "text": "Reports an HTML element without a closing tag. Some coding styles require that HTML elements have closing tags even where this is optional. Example: '\n \n

Behold!\n \n ' After the quick-fix is applied: '\n \n

Behold!

\n \n '", + "markdown": "Reports an HTML element without a closing tag. Some coding styles require that HTML elements have closing tags even where this is optional.\n\n**Example:**\n\n\n \n \n

Behold!\n \n \n\nAfter the quick-fix is applied:\n\n\n \n \n

Behold!

\n \n \n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HtmlMissingClosingTag", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CustomRegExpInspection", + "shortDescription": { + "text": "Custom RegExp inspection" + }, + "fullDescription": { + "text": "Custom Regex Inspection", + "markdown": "Custom Regex Inspection" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "CustomRegExpInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "IncorrectFormatting", + "shortDescription": { + "text": "Incorrect formatting" + }, + "fullDescription": { + "text": "Reports formatting issues that appear if your code doesn't follow your project's code style settings. This inspection is not compatible with languages that require third-party formatters for code formatting, for example, Go or C with CLangFormat enabled.", + "markdown": "Reports formatting issues that appear if your code doesn't\nfollow your project's code style settings.\n\n\nThis inspection is not compatible with languages that require\nthird-party formatters for code formatting, for example, Go or\nC with CLangFormat enabled." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "IncorrectFormatting", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlExtraClosingTag", + "shortDescription": { + "text": "Redundant closing tag" + }, + "fullDescription": { + "text": "Reports redundant closing tags on empty elements, for example, 'img' or 'br'. Example: '\n \n

\n \n ' After the quick-fix is applied: '\n \n
\n \n '", + "markdown": "Reports redundant closing tags on empty elements, for example, `img` or `br`.\n\n**Example:**\n\n\n \n \n

\n \n \n\nAfter the quick-fix is applied:\n\n\n \n \n
\n \n \n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlExtraClosingTag", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlUnknownAnchorTarget", + "shortDescription": { + "text": "Unresolved fragment in a link" + }, + "fullDescription": { + "text": "Reports an unresolved last part of an URL after the '#' sign.", + "markdown": "Reports an unresolved last part of an URL after the `#` sign." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlUnknownAnchorTarget", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpUnexpectedAnchor", + "shortDescription": { + "text": "Begin or end anchor in unexpected position" + }, + "fullDescription": { + "text": "Reports '^' or '\\A' anchors not at the beginning of the pattern and '$', '\\Z' or '\\z' anchors not at the end of the pattern. In the wrong position these RegExp anchors prevent the pattern from matching anything. In case of the '^' and '$' anchors, most likely the literal character was meant and the escape forgotten. Example: '(Price $10)' New in 2018.1", + "markdown": "Reports `^` or `\\A` anchors not at the beginning of the pattern and `$`, `\\Z` or `\\z` anchors not at the end of the pattern. In the wrong position these RegExp anchors prevent the pattern from matching anything. In case of the `^` and `$` anchors, most likely the literal character was meant and the escape forgotten.\n\n**Example:**\n\n\n (Price $10)\n\n\nNew in 2018.1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpUnexpectedAnchor", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SpellCheckingInspection", + "shortDescription": { + "text": "Typo" + }, + "fullDescription": { + "text": "Reports typos and misspellings in your code, comments, and literals and fixes them with one click.", + "markdown": "Reports typos and misspellings in your code, comments, and literals and fixes them with one click." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "SpellCheckingInspection", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "Proofreading", + "index": 68, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckXmlFileWithXercesValidator", + "shortDescription": { + "text": "Failed external validation" + }, + "fullDescription": { + "text": "Reports a discrepancy in an XML file with the specified DTD or schema detected by the Xerces validator.", + "markdown": "Reports a discrepancy in an XML file with the specified DTD or schema detected by the Xerces validator." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CheckXmlFileWithXercesValidator", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlUnknownTag", + "shortDescription": { + "text": "Unknown tag" + }, + "fullDescription": { + "text": "Reports an unknown HTML tag. Suggests configuring tags that should not be reported.", + "markdown": "Reports an unknown HTML tag. Suggests configuring tags that should not be reported." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlUnknownTag", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpEscapedMetaCharacter", + "shortDescription": { + "text": "Escaped meta character" + }, + "fullDescription": { + "text": "Reports escaped meta characters. Some RegExp coding styles specify that meta characters should be placed inside a character class, to make the regular expression easier to understand. This inspection does not warn about the meta character '[', ']' and '^', because those would need additional escaping inside a character class. Example: '\\d+\\.\\d+' After the quick-fix is applied: '\\d+[.]\\d+' New in 2017.1", + "markdown": "Reports escaped meta characters. Some RegExp coding styles specify that meta characters should be placed inside a character class, to make the regular expression easier to understand. This inspection does not warn about the meta character `[`, `]` and `^`, because those would need additional escaping inside a character class.\n\n**Example:**\n\n\n \\d+\\.\\d+\n\nAfter the quick-fix is applied:\n\n\n \\d+[.]\\d+\n\nNew in 2017.1" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "RegExpEscapedMetaCharacter", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlHighlighting", + "shortDescription": { + "text": "XML highlighting" + }, + "fullDescription": { + "text": "Reports XML validation problems in the results of a batch code inspection.", + "markdown": "Reports XML validation problems in the results of a batch code inspection." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XmlHighlighting", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlDuplicatedId", + "shortDescription": { + "text": "Duplicate 'id' attribute" + }, + "fullDescription": { + "text": "Reports a duplicate 'id' attribute in XML.", + "markdown": "Reports a duplicate `id` attribute in XML." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XmlDuplicatedId", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpDuplicateCharacterInClass", + "shortDescription": { + "text": "Duplicate character in character class" + }, + "fullDescription": { + "text": "Reports duplicate characters inside a RegExp character class. Duplicate characters are unnecessary and can be removed without changing the semantics of the regex. Example: '[aabc]' After the quick-fix is applied: '[abc]'", + "markdown": "Reports duplicate characters inside a RegExp character class. Duplicate characters are unnecessary and can be removed without changing the semantics of the regex.\n\n**Example:**\n\n\n [aabc]\n\nAfter the quick-fix is applied:\n\n\n [abc]\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpDuplicateCharacterInClass", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlInvalidId", + "shortDescription": { + "text": "Unresolved 'id' reference" + }, + "fullDescription": { + "text": "Reports an unresolved 'id' reference in XML.", + "markdown": "Reports an unresolved `id` reference in XML." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XmlInvalidId", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlUnboundNsPrefix", + "shortDescription": { + "text": "Unbound namespace prefix" + }, + "fullDescription": { + "text": "Reports an unbound namespace prefix in XML.", + "markdown": "Reports an unbound namespace prefix in XML." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XmlUnboundNsPrefix", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RequiredAttributes", + "shortDescription": { + "text": "Missing required attribute" + }, + "fullDescription": { + "text": "Reports a missing mandatory attribute in an XML/HTML tag. Suggests configuring attributes that should not be reported.", + "markdown": "Reports a missing mandatory attribute in an XML/HTML tag. Suggests configuring attributes that should not be reported." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RequiredAttributes", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ReassignedToPlainText", + "shortDescription": { + "text": "Reassigned to plain text" + }, + "fullDescription": { + "text": "Reports files that were explicitly re-assigned to Plain Text File Type. This association is unnecessary because the platform auto-detects text files by content automatically. You can dismiss this warning by removing the file type association in Settings | Editor | File Types | Text.", + "markdown": "Reports files that were explicitly re-assigned to Plain Text File Type. This association is unnecessary because the platform auto-detects text files by content automatically.\n\nYou can dismiss this warning by removing the file type association\nin **Settings \\| Editor \\| File Types \\| Text**." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ReassignedToPlainText", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlUnusedNamespaceDeclaration", + "shortDescription": { + "text": "Unused schema declaration" + }, + "fullDescription": { + "text": "Reports an unused namespace declaration or location hint in XML.", + "markdown": "Reports an unused namespace declaration or location hint in XML." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XmlUnusedNamespaceDeclaration", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpRedundantClassElement", + "shortDescription": { + "text": "Redundant '\\d', '[:digit:]', or '\\D' class elements" + }, + "fullDescription": { + "text": "Reports redundant '\\d' or '[:digit:]' that are used in one class with '\\w' or '[:word:]' ('\\D' with '\\W') and can be removed. Example: '[\\w\\d]' After the quick-fix is applied: '[\\w]' New in 2022.2", + "markdown": "Reports redundant `\\d` or `[:digit:]` that are used in one class with `\\w` or `[:word:]` (`\\D` with `\\W`) and can be removed.\n\n**Example:**\n\n\n [\\w\\d]\n\nAfter the quick-fix is applied:\n\n\n [\\w]\n\nNew in 2022.2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "RegExpRedundantClassElement", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpSimplifiable", + "shortDescription": { + "text": "Regular expression can be simplified" + }, + "fullDescription": { + "text": "Reports regular expressions that can be simplified. Example: '[a] xx* [ah-hz]' After the quick-fix is applied: 'a x+ [ahz]' New in 2022.1", + "markdown": "Reports regular expressions that can be simplified.\n\n**Example:**\n\n\n [a] xx* [ah-hz]\n\nAfter the quick-fix is applied:\n\n\n a x+ [ahz]\n\nNew in 2022.1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "RegExpSimplifiable", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpEmptyAlternationBranch", + "shortDescription": { + "text": "Empty branch in alternation" + }, + "fullDescription": { + "text": "Reports empty branches in a RegExp alternation. An empty branch will only match the empty string, and in most cases that is not what is desired. This inspection will not report a single empty branch at the start or the end of an alternation. Example: '(alpha||bravo)' After the quick-fix is applied: '(alpha|bravo)' New in 2017.2", + "markdown": "Reports empty branches in a RegExp alternation. An empty branch will only match the empty string, and in most cases that is not what is desired. This inspection will not report a single empty branch at the start or the end of an alternation.\n\n**Example:**\n\n\n (alpha||bravo)\n\nAfter the quick-fix is applied:\n\n\n (alpha|bravo)\n\nNew in 2017.2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpEmptyAlternationBranch", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Annotator", + "shortDescription": { + "text": "Annotator" + }, + "fullDescription": { + "text": "Reports issues essential to this file (e.g., syntax errors) in the result of a batch code inspection run. These issues are usually always highlighted in the editor and can't be configured, unlike inspections. These options control the scope of checks performed by this inspection: Option \"Report syntax errors\": report parser-related issues. Option \"Report issues from language-specific annotators\": report issues found by annotators configured for the relevant language. See Custom Language Support: Annotators for details. Option \"Report other highlighting problems\": report issues specific to the language of the current file (e.g., type mismatches or unreported exceptions). See Custom Language Support: Highlighting for details.", + "markdown": "Reports issues essential to this file (e.g., syntax errors) in the result of a batch code inspection run. These issues are usually always highlighted in the editor and can't be configured, unlike inspections. These options control the scope of checks performed by this inspection:\n\n* Option \"**Report syntax errors**\": report parser-related issues.\n* Option \"**Report issues from language-specific annotators** \": report issues found by annotators configured for the relevant language. See [Custom Language Support: Annotators](https://plugins.jetbrains.com/docs/intellij/annotator.html) for details.\n* Option \"**Report other highlighting problems** \": report issues specific to the language of the current file (e.g., type mismatches or unreported exceptions). See [Custom Language Support: Highlighting](https://plugins.jetbrains.com/docs/intellij/syntax-highlighting-and-error-highlighting.html#semantic-highlighting) for details." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "Annotator", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlPathReference", + "shortDescription": { + "text": "Unresolved file reference" + }, + "fullDescription": { + "text": "Reports an unresolved file reference in XML.", + "markdown": "Reports an unresolved file reference in XML." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XmlPathReference", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpUnnecessaryNonCapturingGroup", + "shortDescription": { + "text": "Unnecessary non-capturing group" + }, + "fullDescription": { + "text": "Reports unnecessary non-capturing groups, which have no influence on the match result. Example: 'Everybody be cool, (?:this) is a robbery!' After the quick-fix is applied: 'Everybody be cool, this is a robbery!' New in 2021.1", + "markdown": "Reports unnecessary non-capturing groups, which have no influence on the match result.\n\n**Example:**\n\n\n Everybody be cool, (?:this) is a robbery!\n\nAfter the quick-fix is applied:\n\n\n Everybody be cool, this is a robbery!\n\nNew in 2021.1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpUnnecessaryNonCapturingGroup", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TodoComment", + "shortDescription": { + "text": "TODO comment" + }, + "fullDescription": { + "text": "Reports TODO comments in your code. You can configure the format for TODO comments in Settings | Editor | TODO. Enable the Only warn on TODO comments without any details option to only warn on empty TODO comments, that don't provide any description on the task that should be done. Disable to report all TODO comments.", + "markdown": "Reports **TODO** comments in your code.\n\nYou can configure the format for **TODO** comments in [Settings \\| Editor \\| TODO](settings://preferences.toDoOptions).\n\nEnable the **Only warn on TODO comments without any details** option to only warn on empty TODO comments, that\ndon't provide any description on the task that should be done. Disable to report all TODO comments." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TodoComment", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Json5StandardCompliance", + "shortDescription": { + "text": "Compliance with JSON5 standard" + }, + "fullDescription": { + "text": "Reports inconsistency with the language specification in a JSON5 file.", + "markdown": "Reports inconsistency with [the language specification](http://json5.org) in a JSON5 file." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "Json5StandardCompliance", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JSON and JSON5", + "index": 12, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JsonDuplicatePropertyKeys", + "shortDescription": { + "text": "Duplicate keys in object literals" + }, + "fullDescription": { + "text": "Reports a duplicate key in an object literal.", + "markdown": "Reports a duplicate key in an object literal." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsonDuplicatePropertyKeys", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JSON and JSON5", + "index": 12, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlDeprecatedElement", + "shortDescription": { + "text": "Deprecated symbol" + }, + "fullDescription": { + "text": "Reports a deprecated XML element or attribute. Symbols can be marked by XML comment or documentation tag with text 'deprecated'.", + "markdown": "Reports a deprecated XML element or attribute.\n\nSymbols can be marked by XML comment or documentation tag with text 'deprecated'." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XmlDeprecatedElement", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpRedundantNestedCharacterClass", + "shortDescription": { + "text": "Redundant nested character class" + }, + "fullDescription": { + "text": "Reports unnecessary nested character classes. Example: '[a-c[x-z]]' After the quick-fix is applied: '[a-cx-z]' New in 2020.2", + "markdown": "Reports unnecessary nested character classes.\n\n**Example:**\n\n\n [a-c[x-z]]\n\nAfter the quick-fix is applied:\n\n\n [a-cx-z]\n\nNew in 2020.2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpRedundantNestedCharacterClass", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlWrongAttributeValue", + "shortDescription": { + "text": "Wrong attribute value" + }, + "fullDescription": { + "text": "Reports an incorrect HTML attribute value.", + "markdown": "Reports an incorrect HTML attribute value." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlWrongAttributeValue", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlDefaultAttributeValue", + "shortDescription": { + "text": "Redundant attribute with default value" + }, + "fullDescription": { + "text": "Reports a redundant assignment of the default value to an XML attribute.", + "markdown": "Reports a redundant assignment of the default value to an XML attribute." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XmlDefaultAttributeValue", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpOctalEscape", + "shortDescription": { + "text": "Octal escape" + }, + "fullDescription": { + "text": "Reports octal escapes, which are easily confused with back references. Use hexadecimal escapes to avoid confusion. Example: '\\07' After the quick-fix is applied: '\\x07' New in 2017.1", + "markdown": "Reports octal escapes, which are easily confused with back references. Use hexadecimal escapes to avoid confusion.\n\n**Example:**\n\n\n \\07\n\nAfter the quick-fix is applied:\n\n\n \\x07\n\nNew in 2017.1" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "RegExpOctalEscape", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnusedDefine", + "shortDescription": { + "text": "Unused define" + }, + "fullDescription": { + "text": "Reports an unused named pattern ('define') in a RELAX-NG file (XML or Compact Syntax). 'define' elements that are used through an include in another file are ignored.", + "markdown": "Reports an unused named pattern (`define`) in a RELAX-NG file (XML or Compact Syntax). `define` elements that are used through an include in another file are ignored." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UnusedDefine", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RELAX NG", + "index": 58, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JsonSchemaCompliance", + "shortDescription": { + "text": "Compliance with JSON schema" + }, + "fullDescription": { + "text": "Reports inconsistence between a JSON file and the JSON schema that is assigned to it.", + "markdown": "Reports inconsistence between a JSON file and the [JSON schema](https://json-schema.org) that is assigned to it. " + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsonSchemaCompliance", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JSON and JSON5", + "index": 12, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "EmptyDirectory", + "shortDescription": { + "text": "Empty directory" + }, + "fullDescription": { + "text": "Reports empty directories. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor. Use the Only report empty directories located under a source folder option to have only directories under source roots reported.", + "markdown": "Reports empty directories.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor.\n\nUse the **Only report empty directories located under a source folder** option to have only directories under source\nroots reported." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "EmptyDirectory", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpAnonymousGroup", + "shortDescription": { + "text": "Anonymous capturing group or numeric back reference" + }, + "fullDescription": { + "text": "Reports anonymous capturing groups and numeric back references in a RegExp. These are only reported when the RegExp dialect supports named group and named group references. Named groups and named back references improve code readability and are recommended to use instead. When a capture is not needed, matching can be more performant and use less memory by using a non-capturing group, i.e. '(?:xxx)' instead of '(xxx)'. Example: '(\\d\\d\\d\\d)\\1' A better regex pattern could look like this: '(?\\d\\d\\d\\d)\\k' New in 2017.2", + "markdown": "Reports anonymous capturing groups and numeric back references in a RegExp. These are only reported when the RegExp dialect supports named group and named group references. Named groups and named back references improve code readability and are recommended to use instead. When a capture is not needed, matching can be more performant and use less memory by using a non-capturing group, i.e. `(?:xxx)` instead of `(xxx)`.\n\n**Example:**\n\n\n (\\d\\d\\d\\d)\\1\n\nA better regex pattern could look like this:\n\n\n (?\\d\\d\\d\\d)\\k\n\nNew in 2017.2" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpAnonymousGroup", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckDtdRefs", + "shortDescription": { + "text": "Unresolved DTD reference" + }, + "fullDescription": { + "text": "Reports inconsistency in a DTD-specific reference, for example, in a reference to an XML entity or to a DTD element declaration. Works in DTD an XML files.", + "markdown": "Reports inconsistency in a DTD-specific reference, for example, in a reference to an XML entity or to a DTD element declaration. Works in DTD an XML files." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CheckDtdRefs", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NonAsciiCharacters", + "shortDescription": { + "text": "Non-ASCII characters" + }, + "fullDescription": { + "text": "Reports code elements that use non-ASCII symbols in an unusual context. Example: Non-ASCII characters used in identifiers, strings, or comments. Identifiers written in different languages, such as 'myСollection' with the letter 'C' written in Cyrillic. Comments or strings containing Unicode symbols, such as long dashes and arrows.", + "markdown": "Reports code elements that use non-ASCII symbols in an unusual context.\n\nExample:\n\n* Non-ASCII characters used in identifiers, strings, or comments.\n* Identifiers written in different languages, such as `my`**С**`ollection` with the letter **C** written in Cyrillic.\n* Comments or strings containing Unicode symbols, such as long dashes and arrows." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NonAsciiCharacters", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Internationalization", + "index": 79, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlUnresolvedReference", + "shortDescription": { + "text": "Unresolved references" + }, + "fullDescription": { + "text": "Reports an unresolved references in XML.", + "markdown": "Reports an unresolved references in XML." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XmlUnresolvedReference", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LossyEncoding", + "shortDescription": { + "text": "Lossy encoding" + }, + "fullDescription": { + "text": "Reports characters that cannot be displayed because of the current document encoding. Examples: If you type international characters in a document with the US-ASCII charset, some characters will be lost on save. If you load a UTF-8-encoded file using the ISO-8859-1 one-byte charset, some characters will be displayed incorrectly. You can fix this by changing the file encoding either by specifying the encoding directly in the file, e.g. by editing 'encoding=' attribute in the XML prolog of XML file, or by changing the corresponding options in Settings | Editor | File Encodings.", + "markdown": "Reports characters that cannot be displayed because of the current document encoding.\n\nExamples:\n\n* If you type international characters in a document with the **US-ASCII** charset, some characters will be lost on save.\n* If you load a **UTF-8** -encoded file using the **ISO-8859-1** one-byte charset, some characters will be displayed incorrectly.\n\nYou can fix this by changing the file encoding\neither by specifying the encoding directly in the file, e.g. by editing `encoding=` attribute in the XML prolog of XML file,\nor by changing the corresponding options in **Settings \\| Editor \\| File Encodings**." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LossyEncoding", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Internationalization", + "index": 79, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpRepeatedSpace", + "shortDescription": { + "text": "Consecutive spaces" + }, + "fullDescription": { + "text": "Reports multiple consecutive spaces in a RegExp. Because spaces are not visible by default, it can be hard to see how many spaces are required. The RegExp can be made more clear by replacing the consecutive spaces with a single space and a counted quantifier. Example: '( )' After the quick-fix is applied: '( {5})' New in 2017.1", + "markdown": "Reports multiple consecutive spaces in a RegExp. Because spaces are not visible by default, it can be hard to see how many spaces are required. The RegExp can be made more clear by replacing the consecutive spaces with a single space and a counted quantifier.\n\n**Example:**\n\n\n ( )\n\nAfter the quick-fix is applied:\n\n\n ( {5})\n\n\nNew in 2017.1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpRepeatedSpace", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpDuplicateAlternationBranch", + "shortDescription": { + "text": "Duplicate branch in alternation" + }, + "fullDescription": { + "text": "Reports duplicate branches in a RegExp alternation. Duplicate branches slow down matching and obscure the intent of the expression. Example: '(alpha|bravo|charlie|alpha)' After the quick-fix is applied: '(alpha|bravo|charlie)' New in 2017.1", + "markdown": "Reports duplicate branches in a RegExp alternation. Duplicate branches slow down matching and obscure the intent of the expression.\n\n**Example:**\n\n\n (alpha|bravo|charlie|alpha)\n\nAfter the quick-fix is applied:\n\n\n (alpha|bravo|charlie)\n\nNew in 2017.1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpDuplicateAlternationBranch", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "IgnoreFileDuplicateEntry", + "shortDescription": { + "text": "Ignore file duplicates" + }, + "fullDescription": { + "text": "Reports duplicate entries (patterns) in the ignore file (e.g. .gitignore, .hgignore). Duplicate entries in these files are redundant and can be removed. Example: '# Output directories\n /out/\n /target/\n /out/'", + "markdown": "Reports duplicate entries (patterns) in the ignore file (e.g. .gitignore, .hgignore). Duplicate entries in these files are redundant and can be removed.\n\nExample:\n\n\n # Output directories\n /out/\n /target/\n /out/\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "IgnoreFileDuplicateEntry", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Version control", + "index": 81, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JsonStandardCompliance", + "shortDescription": { + "text": "Compliance with JSON standard" + }, + "fullDescription": { + "text": "Reports the following discrepancies of a JSON file with the language specification: A line or block comment (configurable). Multiple top-level values (expect for JSON Lines files, configurable for others). A trailing comma in an object or array (configurable). A single quoted string. A property key is a not a double quoted strings. A NaN or Infinity/-Infinity numeric value as a floating point literal (configurable).", + "markdown": "Reports the following discrepancies of a JSON file with [the language specification](https://tools.ietf.org/html/rfc7159):\n\n* A line or block comment (configurable).\n* Multiple top-level values (expect for JSON Lines files, configurable for others).\n* A trailing comma in an object or array (configurable).\n* A single quoted string.\n* A property key is a not a double quoted strings.\n* A NaN or Infinity/-Infinity numeric value as a floating point literal (configurable)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "JsonStandardCompliance", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JSON and JSON5", + "index": 12, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckEmptyScriptTag", + "shortDescription": { + "text": "Empty tag" + }, + "fullDescription": { + "text": "Reports empty tags that do not work in some browsers. Example: '\n \n '", + "markdown": "Reports empty tags that do not work in some browsers.\n\n**Example:**\n\n\n \n \n \n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CheckEmptyScriptTag", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij.database", + "version": "241.18034.45", + "rules": [ + { + "id": "MongoJSSideEffectsInspection", + "shortDescription": { + "text": "Statement with side effects" + }, + "fullDescription": { + "text": "Reports statements that can cause side effects while the data source is in read-only mode. For more information about enabling read-only mode, see Enable read-only mode for a connection in the IDE documentation. The Disable read-only mode quick-fix turns off the read-only mode for the respective data source. Example: 'db.my_collection.insertOne()'", + "markdown": "Reports statements that can cause side effects while the data source is in read-only mode.\n\nFor more information about enabling read-only mode, see\n[Enable\nread-only mode for a connection in the IDE documentation](https://www.jetbrains.com/help/datagrip/configuring-database-connections.html#enable-read-only-mode-for-a-connection).\n\nThe **Disable read-only mode** quick-fix turns off the read-only mode for the respective data source.\n\nExample:\n\n\n db.my_collection.insertOne()\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MongoJSSideEffects", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "MongoJS", + "index": 15, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MysqlLoadDataPathInspection", + "shortDescription": { + "text": "LOAD statement path" + }, + "fullDescription": { + "text": "Reports paths that start with the tilde character in LOAD statements. Example (MySQL): 'CREATE TABLE table_name (id int);\nLOAD DATA LOCAL INFILE '~/Documents/some_file.txt'\nINTO TABLE table_name FIELDS TERMINATED BY ',' LINES TERMINATED BY '\\n'\nIGNORE 1 LINES;' Instead of the tilde character, use a full path to the file.", + "markdown": "Reports paths that start with the tilde character in LOAD statements.\n\nExample (MySQL):\n\n CREATE TABLE table_name (id int);\n LOAD DATA LOCAL INFILE '~/Documents/some_file.txt'\n INTO TABLE table_name FIELDS TERMINATED BY ',' LINES TERMINATED BY '\\n'\n IGNORE 1 LINES;\n\nInstead of the tilde character, use a full path to the file." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MysqlLoadDataPath", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "MySQL", + "index": 18, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MongoJSExtSideEffectsInspection", + "shortDescription": { + "text": "Statement with side effects" + }, + "fullDescription": { + "text": "Reports statements that may cause side effects while the data source is in read-only mode. The quick-fix turns off the read-only mode for the respective data source. Example: 'db.my_collection.insertOne()'", + "markdown": "Reports statements that may cause side effects while the data source is in read-only mode.\n\nThe quick-fix turns off the read-only mode for the respective data source.\n\nExample:\n\n\n db.my_collection.insertOne()\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MongoJSSideEffects", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "MongoJS", + "index": 15, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MysqlSpaceAfterFunctionNameInspection", + "shortDescription": { + "text": "Whitespace between the function name and the open parenthesis" + }, + "fullDescription": { + "text": "Reports any whitespace in a function call between the function name and the open parenthesis, which is not supported by default. Example (MySQL): 'SELECT MAX (qty) FROM orders;'", + "markdown": "Reports any whitespace in a function call between the function name and the open parenthesis, which is not supported by default.\n\nExample (MySQL):\n\n SELECT MAX (qty) FROM orders;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "MysqlSpaceAfterFunctionName", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "MySQL", + "index": 18, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlMissingReturnInspection", + "shortDescription": { + "text": "Missing return statement" + }, + "fullDescription": { + "text": "Reports functions that have no RETURN statements. Example (Oracle): 'CREATE FUNCTION foo RETURN int AS\nBEGIN\nEND;' The 'foo' function must return the integer value but the function body returns nothing. To fix the error, add a RETURN statement (for example, 'return 1;'). 'CREATE FUNCTION foo RETURN int AS\nBEGIN\n RETURN 1;\nEND;'", + "markdown": "Reports functions that have no RETURN statements.\n\nExample (Oracle):\n\n CREATE FUNCTION foo RETURN int AS\n BEGIN\n END;\n\nThe `foo` function must return the integer value but the function body returns nothing. To fix the error,\nadd a RETURN statement (for example, `return 1;`).\n\n CREATE FUNCTION foo RETURN int AS\n BEGIN\n RETURN 1;\n END;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "SqlMissingReturn", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlUnusedSubqueryItemInspection", + "shortDescription": { + "text": "Unused subquery item" + }, + "fullDescription": { + "text": "Reports columns, aliases, and other subquery items that are not referenced in the outer query expression. Example (PostgreSQL): 'CREATE TABLE for_subquery(id INT);\nSELECT a, q FROM (SELECT 1 AS a, 10 AS b, 2 + 3 AS q, id\n FROM for_subquery) x;' We reference 'a' and 'q' aliases from a subquery. But the 'b' alias and the 'id' column are not referenced in the outer SELECT statement. Therefore, 'b' and 'id' are grayed out.", + "markdown": "Reports columns, aliases, and other subquery items that are not referenced in the outer query expression.\n\nExample (PostgreSQL):\n\n CREATE TABLE for_subquery(id INT);\n SELECT a, q FROM (SELECT 1 AS a, 10 AS b, 2 + 3 AS q, id\n FROM for_subquery) x;\n\nWe reference `a` and `q` aliases from a subquery. But the `b` alias and the `id` column are\nnot referenced in the outer SELECT statement. Therefore, `b` and `id` are grayed out." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlUnused", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlCaseVsIfInspection", + "shortDescription": { + "text": "Using CASE instead of conditional function and vice versa" + }, + "fullDescription": { + "text": "Reports situations when CASE and IF are interchangeable. Example (MySQL): 'SELECT CASE\nWHEN C1 IS NULL THEN 1\nELSE 0\nEND\nFROM dual;' To keep your code short, you can replace the CASE structure with IF. You can do that by applying the Replace with 'IF' call intention action. The example code will look as follows: 'SELECT IF(C1 IS NULL, 1, 0)\nFROM dual;' To revert IF to CASE, click IF and apply the Replace with CASE expression intention action.", + "markdown": "Reports situations when CASE and IF are interchangeable.\n\nExample (MySQL):\n\n SELECT CASE\n WHEN C1 IS NULL THEN 1\n ELSE 0\n END\n FROM dual;\n\nTo keep your code short, you can replace the CASE structure with IF. You can do that by applying the **Replace with 'IF' call**\nintention action. The example code will look as follows:\n\n SELECT IF(C1 IS NULL, 1, 0)\n FROM dual;\n\nTo revert IF to CASE, click IF and apply the **Replace with CASE expression** intention action." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlCaseVsIf", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlShouldBeInGroupByInspection", + "shortDescription": { + "text": "Column should be in group by clause" + }, + "fullDescription": { + "text": "Reports columns that are not in the GROUP BY clause or inside an aggregate function call. Example (Microsoft SQL Server): 'CREATE TABLE t1 (a INT, b INT);\nSELECT a, b FROM t1 GROUP BY a;' If you run the SELECT query, you will receive an error because Microsoft SQL Server expects the 'b' column in GROUP BY or used inside an aggregate function. The following two examples will fix the error. 'SELECT a, b FROM t1 GROUP BY a, b;\nSELECT a, max(b) max_b FROM t1 GROUP BY a;'", + "markdown": "Reports columns that are not in the GROUP BY clause or inside an aggregate function call.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE t1 (a INT, b INT);\n SELECT a, b FROM t1 GROUP BY a;\n\nIf you run the SELECT query, you will receive an error because Microsoft SQL Server expects the `b` column in GROUP BY or used\ninside an aggregate function. The following two examples will fix the error.\n\n SELECT a, b FROM t1 GROUP BY a, b;\n SELECT a, max(b) max_b FROM t1 GROUP BY a;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlShouldBeInGroupBy", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlAutoIncrementDuplicateInspection", + "shortDescription": { + "text": "Auto-increment duplicate" + }, + "fullDescription": { + "text": "Reports tables that contain two columns with an automatic increment. In MySQL, Microsoft SQL Server, and Db2 dialects, a table can have only one field with a auto-increment option, and this field must be a key. Example (MySQL): 'CREATE TABLE my_table\n(\n id INT AUTO_INCREMENT,\n c2 INT AUTO_INCREMENT,\n);' The AUTO_INCREMENT constraint for 'c2' will be highlighted as 'c1' already has this constraint. To fix the warning, you can make 'id' a primary key and delete AUTO_INCREMENT for 'c2'. 'CREATE TABLE my_table\n(\n id INT AUTO_INCREMENT PRIMARY KEY,\n c2 INT,\n);'", + "markdown": "Reports tables that contain two columns with an automatic increment. In MySQL, Microsoft SQL Server, and Db2 dialects, a table can have only one field with a auto-increment option, and this field must be a key.\n\nExample (MySQL):\n\n CREATE TABLE my_table\n (\n id INT AUTO_INCREMENT,\n c2 INT AUTO_INCREMENT,\n );\n\nThe AUTO_INCREMENT constraint for `c2` will be highlighted as `c1` already has this constraint. To fix the warning,\nyou can make `id` a primary key and delete AUTO_INCREMENT for `c2`.\n\n CREATE TABLE my_table\n (\n id INT AUTO_INCREMENT PRIMARY KEY,\n c2 INT,\n );\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlAutoIncrementDuplicate", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlStringLengthExceededInspection", + "shortDescription": { + "text": "Implicit string truncation" + }, + "fullDescription": { + "text": "Reports variables that exceed the defined length in characters. Example (Microsoft SQL Server): 'CREATE PROCEDURE test() AS\nBEGIN\nDECLARE myVarOk VARCHAR(5) = 'abcde';\nDECLARE myVarExceeded VARCHAR(5) = 'abcde12345';\n\nSET myVarOk = 'xyz';\nSET myVarExceeded = '123456789';\nEND;' The 'myVarExceeded' variable is defined as 'VARCHAR(5)' but both assigned values (''abcde12345'' and ''123456789'') exceed this limitation. You can truncate assigned values or increase the defined length. To increase the length, use the Increase type length quick-fix. After the quick-fix is applied: 'CREATE PROCEDURE test() AS\nBEGIN\nDECLARE myVarOk VARCHAR(5) = 'abcde';\nDECLARE myVarExceeded VARCHAR(10) = 'abcde12345';\n\nSET myVarOk = 'xyz';\nSET myVarExceeded = '123456789';\nEND;'", + "markdown": "Reports variables that exceed the defined length in characters.\n\nExample (Microsoft SQL Server):\n\n CREATE PROCEDURE test() AS\n BEGIN\n DECLARE myVarOk VARCHAR(5) = 'abcde';\n DECLARE myVarExceeded VARCHAR(5) = 'abcde12345';\n\n SET myVarOk = 'xyz';\n SET myVarExceeded = '123456789';\n END;\n\nThe `myVarExceeded` variable is defined as `VARCHAR(5)` but both assigned values (`'abcde12345'` and\n`'123456789'`) exceed this limitation. You can truncate assigned values or increase the defined length.\nTo increase the length, use the **Increase type length** quick-fix.\n\nAfter the quick-fix is applied:\n\n CREATE PROCEDURE test() AS\n BEGIN\n DECLARE myVarOk VARCHAR(5) = 'abcde';\n DECLARE myVarExceeded VARCHAR(10) = 'abcde12345';\n\n SET myVarOk = 'xyz';\n SET myVarExceeded = '123456789';\n END;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlStringLengthExceeded", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlSideEffectsInspection", + "shortDescription": { + "text": "Statement with side effects" + }, + "fullDescription": { + "text": "Reports statements that might lead to modification of a database during a read-only connection. To enable read-only mode for a connection, right-click a data source in the Database tool window (View | Tool Windows | Database) and select Properties. In the Data Sources and Drivers dialog, click the Options tab and select the Read-only checkbox. Example (MySQL): 'CREATE TABLE foo(a INT);\nINSERT INTO foo VALUES (1);' As 'CREATE TABLE' and 'INSERT INTO' statements lead to a database modification, these statements will be highlighted in read-only connection mode.", + "markdown": "Reports statements that might lead to modification of a database during a read-only connection.\n\nTo enable read-only mode for a\nconnection,\nright-click a data source in the **Database** tool window (**View \\| Tool Windows \\| Database** ) and select **Properties** .\nIn the **Data Sources and Drivers** dialog, click the **Options** tab and select the **Read-only** checkbox.\n\nExample (MySQL):\n\n CREATE TABLE foo(a INT);\n INSERT INTO foo VALUES (1);\n\nAs `CREATE TABLE` and `INSERT INTO` statements lead to a database modification, these statements will be highlighted\nin read-only connection mode." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlSideEffects", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlDtInspection", + "shortDescription": { + "text": "Ill-formed date/time literals" + }, + "fullDescription": { + "text": "Reports errors in date and time literals. This inspection is available in MySQL, Oracle, Db2, and H2. Example (MySQL): 'SELECT TIME '10 -12:13:14' FROM dual;\nSELECT TIME ' 12 : 13 : 14 ' FROM dual;\nSELECT TIME '12 13 14' FROM dual;\nSELECT TIME '12-13-14' FROM dual;\nSELECT TIME '12.13.14' FROM dual;\nSELECT TIME '12:13:' FROM dual;\nSELECT TIME '12:13' FROM dual;\nSELECT TIME '12:' FROM dual;' In this example, dates ignore the MySQL standard for date and time literals. Therefore, they will be highlighted. For more information about date and time literals in MySQL, see Date and Time Literals at dev.mysql.com. The following date and type literals are valid for MySQL. 'SELECT TIME '12:13:14' FROM dual;\nSELECT TIME '12:13:14.555' FROM dual;\nSELECT TIME '12:13:14.' FROM dual;\nSELECT TIME '-12:13:14' FROM dual;\nSELECT TIME '10 12:13:14' FROM dual;\nSELECT TIME '-10 12:13:14' FROM dual;'", + "markdown": "Reports errors in date and time literals. This inspection is available in MySQL, Oracle, Db2, and H2.\n\nExample (MySQL):\n\n SELECT TIME '10 -12:13:14' FROM dual;\n SELECT TIME ' 12 : 13 : 14 ' FROM dual;\n SELECT TIME '12 13 14' FROM dual;\n SELECT TIME '12-13-14' FROM dual;\n SELECT TIME '12.13.14' FROM dual;\n SELECT TIME '12:13:' FROM dual;\n SELECT TIME '12:13' FROM dual;\n SELECT TIME '12:' FROM dual;\n\nIn this example, dates ignore the MySQL standard for date and time literals. Therefore, they will be highlighted.\nFor more information about date and time literals in MySQL, see [Date and Time Literals at dev.mysql.com](https://dev.mysql.com/doc/refman/8.0/en/date-and-time-literals.html).\n\nThe following date and type literals are valid for MySQL.\n\n SELECT TIME '12:13:14' FROM dual;\n SELECT TIME '12:13:14.555' FROM dual;\n SELECT TIME '12:13:14.' FROM dual;\n SELECT TIME '-12:13:14' FROM dual;\n SELECT TIME '10 12:13:14' FROM dual;\n SELECT TIME '-10 12:13:14' FROM dual;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlDateTime", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlIllegalCursorStateInspection", + "shortDescription": { + "text": "Illegal cursor state" + }, + "fullDescription": { + "text": "Reports illegal cursor states inside SQL routines. A routine has CLOSE or FETCH statements but a cursor might be closed. A routine has the OPEN statement but a cursor might be opened. Example (Microsoft SQL Server): 'CREATE TABLE t(col INT);\n\nCREATE PROCEDURE foo() AS\nBEGIN\nDECLARE my_cursor CURSOR FOR SELECT * FROM t;\nDECLARE a INT;\nFETCH my_cursor INTO a;\nCLOSE my_cursor;\nEND;' According to CLOSE (Transact-SQL) at docs.microsoft.com, CLOSE must be issued on an open cursor, and CLOSE is not allowed on cursors that have only been declared or are already closed. So, we need to open the cursor to fix the warning. 'CREATE PROCEDURE foo() AS\nBEGIN\nDECLARE my_cursor CURSOR FOR SELECT * FROM t;\nDECLARE a INT;\nOPEN my_cursor;\nFETCH my_cursor INTO a;\nCLOSE my_cursor;\nEND;'", + "markdown": "Reports illegal cursor states inside SQL routines.\n\n* A routine has CLOSE or FETCH statements but a cursor might be closed.\n* A routine has the OPEN statement but a cursor might be opened.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE t(col INT);\n\n CREATE PROCEDURE foo() AS\n BEGIN\n DECLARE my_cursor CURSOR FOR SELECT * FROM t;\n DECLARE a INT;\n FETCH my_cursor INTO a;\n CLOSE my_cursor;\n END;\n\nAccording to [CLOSE (Transact-SQL) at\ndocs.microsoft.com](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/close-transact-sql), CLOSE must be issued on an open cursor, and CLOSE is not allowed on cursors that have only been declared or are\nalready closed. So, we need to open the cursor to fix the warning.\n\n CREATE PROCEDURE foo() AS\n BEGIN\n DECLARE my_cursor CURSOR FOR SELECT * FROM t;\n DECLARE a INT;\n OPEN my_cursor;\n FETCH my_cursor INTO a;\n CLOSE my_cursor;\n END;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlIllegalCursorState", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlJoinWithoutOnInspection", + "shortDescription": { + "text": "Unsafe 'join' clause in 'delete' statement" + }, + "fullDescription": { + "text": "Reports missing conditional checks for statements that might modify the whole database. For example, usages of JOIN clauses inside DELETE statements without ON or WHERE. Without conditional checks on JOIN, DELETE drops contents of the entire table. Example (MySQL): 'CREATE TABLE foo (a INT,b INT,c INT);\nCREATE TABLE bar (a INT,b INT,c INT);\n\nDELETE table1 FROM foo table1 INNER JOIN bar table2;'", + "markdown": "Reports missing conditional checks for statements that might modify the whole database.\n\nFor example, usages of JOIN clauses inside DELETE statements without ON or WHERE. Without conditional checks on JOIN, DELETE drops\ncontents of the entire table.\n\nExample (MySQL):\n\n CREATE TABLE foo (a INT,b INT,c INT);\n CREATE TABLE bar (a INT,b INT,c INT);\n\n DELETE table1 FROM foo table1 INNER JOIN bar table2;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlJoinWithoutOn", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlDropIndexedColumnInspection", + "shortDescription": { + "text": "Index is dependent on column" + }, + "fullDescription": { + "text": "Reports cases when you try to drop columns from indexed tables. This inspection is available in Microsoft SQL Server and Sybase ASE. Example (Microsoft SQL Server): 'CREATE TABLE test_index\n(\ncol INT NOT NULL,\ncol2 INT NOT NULL,\ncol3 INT NOT NULL UNIQUE,\ncol4 VARCHAR(200)\n);\n\nCREATE UNIQUE INDEX aaaa ON test_index (col, col2);\n\nALTER TABLE test_index\nDROP COLUMN col;' You cannot delete the 'col' column because it is in the indexed table. To delete the column, you need to delete the 'aaaa' index first (for example, DROP INDEX aaaa).", + "markdown": "Reports cases when you try to drop columns from indexed tables. This inspection is available in Microsoft SQL Server and Sybase ASE.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE test_index\n (\n col INT NOT NULL,\n col2 INT NOT NULL,\n col3 INT NOT NULL UNIQUE,\n col4 VARCHAR(200)\n );\n\n CREATE UNIQUE INDEX aaaa ON test_index (col, col2);\n\n ALTER TABLE test_index\n DROP COLUMN col;\n\nYou cannot delete the `col` column because it is in the indexed table. To delete the column, you need to delete the\n`aaaa` index first (for example, DROP INDEX aaaa)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlDropIndexedColumn", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlCheckUsingColumnsInspection", + "shortDescription": { + "text": "Check using clause columns" + }, + "fullDescription": { + "text": "Reports columns in the USING clause that does not exist in both tables. Example (MySQL): 'CREATE TABLE t1 (i INT, j INT);\nCREATE TABLE t2 (k INT, l INT);\nSELECT * FROM t1 JOIN t2 USING (j);' In USING clauses, a column name must be present in both tables, and the SELECT query will automatically join those tables by using the given column name. As we do not have the 'j' column in 't2', we can rewrite the query using ON. The ON clause can join tables where the column names do not match in both tables. 'SELECT * FROM t1 JOIN t2 ON t1.j = t2.l;'", + "markdown": "Reports columns in the USING clause that does not exist in both tables.\n\nExample (MySQL):\n\n CREATE TABLE t1 (i INT, j INT);\n CREATE TABLE t2 (k INT, l INT);\n SELECT * FROM t1 JOIN t2 USING (j);\n\nIn USING clauses, a column name must be present in both tables, and the SELECT query will automatically join\nthose tables by using the given column name. As we do not have the `j` column in `t2`, we can\nrewrite the query using ON. The ON clause can join tables where the column names do not match in both tables.\n\n SELECT * FROM t1 JOIN t2 ON t1.j = t2.l;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlCheckUsingColumns", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlInsertValuesInspection", + "shortDescription": { + "text": "VALUES clause cardinality" + }, + "fullDescription": { + "text": "Reports situations when a number of parameters in VALUES does not match a number of columns in a target table. Example (MySQL): 'CREATE TABLE foo(a INT, b INT, c INT);\n\nINSERT INTO foo VALUES (1,2,3,4)' The 'foo' table has three columns but in the INSERT INTO statement we pass four.", + "markdown": "Reports situations when a number of parameters in VALUES does not match a number of columns in a target table.\n\nExample (MySQL):\n\n CREATE TABLE foo(a INT, b INT, c INT);\n\n INSERT INTO foo VALUES (1,2,3,4)\n\nThe `foo` table has three columns but in the INSERT INTO statement we pass four." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlInsertValues", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlConstantConditionInspection", + "shortDescription": { + "text": "Constant condition" + }, + "fullDescription": { + "text": "Reports conditions in WHERE or JOIN clauses that are always TRUE or always FALSE. Example (MySQL): 'CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\nSELECT a FROM t1 WHERE 'Cat' = 'Cat';' The ''Cat' = 'Cat'' is always true and will be reported.", + "markdown": "Reports conditions in WHERE or JOIN clauses that are always TRUE or always FALSE.\n\nExample (MySQL):\n\n CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\n SELECT a FROM t1 WHERE 'Cat' = 'Cat';\n\nThe `'Cat' = 'Cat'` is always true and will be reported." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlConstantCondition", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlDialectInspection", + "shortDescription": { + "text": "SQL dialect detection" + }, + "fullDescription": { + "text": "Reports situations when a dialect is not assigned to an SQL file. For example, when you open a new SQL file without assigning a dialect to it, you see a notification where the best matching dialect is advised. Click the Use link to use the advised dialect. Alternatively, click the Change dialect to link to select the other dialect.", + "markdown": "Reports situations when a dialect is not assigned to an SQL file.\n\nFor example, when you open a new SQL file without assigning a dialect\nto it, you see a notification where the best matching dialect is advised. Click the **Use \\** link to use the advised\ndialect. Alternatively, click the **Change dialect to** link to select the other dialect." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlDialectInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlRedundantElseNullInspection", + "shortDescription": { + "text": "Redundant ELSE NULL clause" + }, + "fullDescription": { + "text": "Reports redundant ELSE NULL clauses. Example (MySQL): 'SELECT CASE WHEN 2 > 1 THEN 'OK' ELSE NULL END AS alias FROM foo;' The 'ELSE NULL' part will never be executed and may be omitted.", + "markdown": "Reports redundant ELSE NULL clauses.\n\nExample (MySQL):\n\n SELECT CASE WHEN 2 > 1 THEN 'OK' ELSE NULL END AS alias FROM foo;\n\nThe `ELSE NULL` part will never be executed and may be omitted." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlRedundantElseNull", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MysqlParsingInspection", + "shortDescription": { + "text": "Unsupported syntax in pre-8.0 versions" + }, + "fullDescription": { + "text": "Reports invalid usages of UNION in queries. The inspection works in MySQL versions that are earlier than 8.0. Example (MySQL): 'SELECT * FROM (SELECT 1 UNION (SELECT 1 UNION SELECT 2)) a;'", + "markdown": "Reports invalid usages of UNION in queries.\n\nThe inspection works in MySQL versions that are earlier than 8.0.\n\nExample (MySQL):\n\n\n SELECT * FROM (SELECT 1 UNION (SELECT 1 UNION SELECT 2)) a;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MysqlParsing", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "MySQL", + "index": 18, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlCallNotationInspection", + "shortDescription": { + "text": "Using of named and positional arguments" + }, + "fullDescription": { + "text": "Reports calls in which positional arguments go after the named ones. Works in PostgreSQL, Oracle, and Db2. Example (In PostgreSQL): 'CREATE FUNCTION foo(a int, b int, c int) RETURNS int\n LANGUAGE plpgsql AS\n$$\nBEGIN\n RETURN a + b + c;\nEND\n$$;\nSELECT foo(a => 1, b => 2, c => 3);\n -- `3` goes after the named argument\nSELECT foo(1, b => 2, 3);\n -- `1` and `3` go after the named argument\nSELECT foo(b => 2, 1, 3);'", + "markdown": "Reports calls in which positional arguments go after the named ones. Works in PostgreSQL, Oracle, and Db2.\n\nExample (In PostgreSQL):\n\n CREATE FUNCTION foo(a int, b int, c int) RETURNS int\n LANGUAGE plpgsql AS\n $$\n BEGIN\n RETURN a + b + c;\n END\n $$;\n SELECT foo(a => 1, b => 2, c => 3);\n -- `3` goes after the named argument\n SELECT foo(1, b => 2, 3);\n -- `1` and `3` go after the named argument\n SELECT foo(b => 2, 1, 3);\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "SqlCallNotation", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MongoJSExtDeprecationInspection", + "shortDescription": { + "text": "Deprecated element" + }, + "fullDescription": { + "text": "Reports usages of deprecated methods in MongoDB and JavaScript code. The quick-fix replaces deprecated methods with recommended alternatives. Example: 'db.my_collection.insert()' After the quick-fix is applied: 'db.my_collection.insertOne()'", + "markdown": "Reports usages of deprecated methods in MongoDB and JavaScript code.\n\nThe quick-fix replaces deprecated methods with recommended alternatives.\n\nExample:\n\n\n db.my_collection.insert()\n\nAfter the quick-fix is applied:\n\n\n db.my_collection.insertOne()\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MongoJSDeprecation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "MongoJS", + "index": 15, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlDuplicateColumnInspection", + "shortDescription": { + "text": "Duplicating column name in SELECT" + }, + "fullDescription": { + "text": "Reports duplicated names of column aliases in SELECT lists. Example (Sybase ASE): 'CREATE TABLE t1 (a TEXT, b INT, c INT);\n\nSELECT a AS x, b AS x FROM t1;' The 'x' alias name is used for 'a' and 'b' columns. These assignments are highlighted as errors because you cannot use identical alias names for columns in Sybase ASE.", + "markdown": "Reports duplicated names of column aliases in SELECT lists.\n\nExample (Sybase ASE):\n\n CREATE TABLE t1 (a TEXT, b INT, c INT);\n\n SELECT a AS x, b AS x FROM t1;\n\nThe `x` alias name is used for `a` and `b` columns. These assignments are highlighted as errors because\nyou cannot use identical alias names for columns in Sybase ASE." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlDuplicateColumn", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlShadowingAliasInspection", + "shortDescription": { + "text": "Column is shadowed by alias" + }, + "fullDescription": { + "text": "Reports SELECT aliases with names that match column names in the FROM clause. Example (MySQL): 'CREATE TABLE foo (a INT, b INT, c INT);\nSELECT a b, c FROM foo;' The 'a' column uses the 'b' alias but the 'b' name is also used by the column from the 'foo' table.", + "markdown": "Reports SELECT aliases with names that match column names in the FROM clause.\n\nExample (MySQL):\n\n CREATE TABLE foo (a INT, b INT, c INT);\n SELECT a b, c FROM foo;\n\nThe `a` column uses the `b` alias but the `b` name is also used by the column from the `foo`\ntable." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlShadowingAlias", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MongoJSDeprecationInspection", + "shortDescription": { + "text": "Deprecated element" + }, + "fullDescription": { + "text": "Reports usages of deprecated methods in MongoDB and JavaScript code. The quick-fix replaces deprecated methods with recommended alternatives. Example: 'db.my_collection.insert()' After the quick-fix is applied: 'db.my_collection.insertOne()'", + "markdown": "Reports usages of deprecated methods in MongoDB and JavaScript code.\n\nThe quick-fix replaces deprecated methods with recommended alternatives.\n\nExample:\n\n db.my_collection.insert()\n\nAfter the quick-fix is applied:\n\n db.my_collection.insertOne()\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MongoJSDeprecation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "MongoJS", + "index": 15, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlTypeInspection", + "shortDescription": { + "text": "Types compatibility" + }, + "fullDescription": { + "text": "Reports type-related errors.", + "markdown": "Reports type-related errors." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlType", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlUnreachableCodeInspection", + "shortDescription": { + "text": "Unreachable code" + }, + "fullDescription": { + "text": "Reports unreachable statements inside SQL routines. Example (Microsoft SQL Server): 'CREATE FUNCTION foo() RETURNS INT AS\nBEGIN\n THROW;\n RETURN 1;\nEND;' In Microsoft SQL Server, the 'THROW' statement raises an exception and transfers execution to the CATCH block of the TRY...CATCH construct. Therefore, the 'RETURN 1;' part will never be executed.", + "markdown": "Reports unreachable statements inside SQL routines.\n\nExample (Microsoft SQL Server):\n\n CREATE FUNCTION foo() RETURNS INT AS\n BEGIN\n THROW;\n RETURN 1;\n END;\n\nIn Microsoft SQL Server, the `THROW` statement raises an exception and transfers execution to the CATCH block of the TRY...CATCH\nconstruct. Therefore, the `RETURN 1;` part will never be executed." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlUnreachable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlUnicodeStringLiteralInspection", + "shortDescription": { + "text": "Unicode usage in SQL" + }, + "fullDescription": { + "text": "Reports string literals that use national characters without the 'N' prefix. Without the N prefix, the string is converted to the default code page of the database. This default code page may not recognize certain characters. For more information, see nchar and nvarchar (Transact-SQL) at docs.microsoft.com. Example (Microsoft SQL Server): 'SELECT 'abcde' AS a;\nSELECT N'abcde' AS b;\nSELECT 'абвгд' AS c;\nSELECT N'абвгд' AS d;' The 'SELECT 'абвгд' AS c;' does not have the 'N' prefix, the ''абвгд'' part will be highlighted.", + "markdown": "Reports string literals that use national characters without the `N` prefix.\n\nWithout the N prefix, the string is converted to the default\ncode page of the database. This default code page may not recognize certain characters. For more information, see\n[nchar and nvarchar\n(Transact-SQL)\nat docs.microsoft.com](https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql).\n\nExample (Microsoft SQL Server):\n\n SELECT 'abcde' AS a;\n SELECT N'abcde' AS b;\n SELECT 'абвгд' AS c;\n SELECT N'абвгд' AS d;\n\nThe `SELECT 'абвгд' AS c;` does not have the `N` prefix, the `'абвгд'` part will be highlighted." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlUnicodeStringLiteral", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlNoDataSourceInspection", + "shortDescription": { + "text": "No data sources configured" + }, + "fullDescription": { + "text": "Reports the absence of data sources in the Database tool window (View | Tool Windows | Database).", + "markdown": "Reports the absence of data sources in the **Database** tool window (**View \\| Tool Windows \\| Database**)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlNoDataSourceInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlUnusedVariableInspection", + "shortDescription": { + "text": "Unused variable" + }, + "fullDescription": { + "text": "Reports unused arguments, variables, or parameters. Example (PostgreSQL): 'CREATE FUNCTION foo(PARAMUSED INT, PARAMUNUSED INT) RETURNS INT AS\n$$\nBEGIN\n RETURN PARAMUSED;\nEND\n$$ LANGUAGE plpgsql;' The 'PARAMUNUSED' parameter is not used in the function and might be deleted.", + "markdown": "Reports unused arguments, variables, or parameters.\n\nExample (PostgreSQL):\n\n CREATE FUNCTION foo(PARAMUSED INT, PARAMUNUSED INT) RETURNS INT AS\n $$\n BEGIN\n RETURN PARAMUSED;\n END\n $$ LANGUAGE plpgsql;\n\nThe `PARAMUNUSED` parameter is not used in the function and might be deleted." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlUnused", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlResolveInspection", + "shortDescription": { + "text": "Unresolved reference" + }, + "fullDescription": { + "text": "Reports unresolved SQL references. Example (MySQL): 'CREATE TABLE users(id INT, name VARCHAR(40));\nCREATE TABLE admins(id INT, col1 INT);\n\nSELECT users.id, admins.id FROM admins WHERE admins.id > 1;' The 'users.id' column is unresolved because the 'users' table is missing in the FROM clause.", + "markdown": "Reports unresolved SQL references.\n\nExample (MySQL):\n\n CREATE TABLE users(id INT, name VARCHAR(40));\n CREATE TABLE admins(id INT, col1 INT);\n\n SELECT users.id, admins.id FROM admins WHERE admins.id > 1;\n\nThe `users.id` column is unresolved because the `users` table is missing in the FROM clause." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "SqlResolve", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PgSelectFromProcedureInspection", + "shortDescription": { + "text": "Postgres: Select from procedure call" + }, + "fullDescription": { + "text": "Reports situations when you make SELECT from a function or a DBLINK without an alias with a type (for example, 'AS t1(s VARCHAR)'). This requirement does not apply to scalar functions. Example (PostgreSQL): 'CREATE FUNCTION produce_a_table() RETURNS RECORD AS $$\nSELECT 1;\n$$ LANGUAGE sql;\nSELECT * FROM produce_a_table() AS s (c1 INT);\nSELECT * FROM produce_a_table() AS s (c1);\nSELECT * FROM DBLINK('dbname=mydb', 'SELECT proname, prosrc FROM pg_proc') AS t1;' The 'AS s (c1 INT)' has a typed alias, while 'AS s (c1)' and 'AS t1' do not. In this case, the second call of 'produce_a_table()' and 'DBLINK()' will be highlighted.", + "markdown": "Reports situations when you make SELECT from a function or a DBLINK without an alias with a type (for example, `AS t1(s VARCHAR)`).\n\nThis requirement does not apply to scalar functions.\n\nExample (PostgreSQL):\n\n CREATE FUNCTION produce_a_table() RETURNS RECORD AS $$\n SELECT 1;\n $$ LANGUAGE sql;\n SELECT * FROM produce_a_table() AS s (c1 INT);\n SELECT * FROM produce_a_table() AS s (c1);\n SELECT * FROM DBLINK('dbname=mydb', 'SELECT proname, prosrc FROM pg_proc') AS t1;\n\nThe `AS s (c1 INT)` has a typed alias, while `AS s (c1)` and `AS t1` do not.\nIn this case, the second call of `produce_a_table()` and `DBLINK()` will be highlighted." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PgSelectFromProcedure", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "PostgreSQL", + "index": 72, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlCurrentSchemaInspection", + "shortDescription": { + "text": "Current console schema introspected" + }, + "fullDescription": { + "text": "Reports schemas and databases in the current session that are not introspected. For example, this warning might occur when you try to create a table in the schema that is not introspected. Introspection is a method of inspecting a data source. When you perform introspection, structural information in the data source is inspected to detect tables, columns, functions, and other elements with their attributes.", + "markdown": "Reports schemas and databases in the current session that are not introspected.\n\nFor example, this warning might occur when you try to create a table in the schema that is not introspected.\n\nIntrospection is a method of inspecting a data source. When you perform introspection, structural information in the data source is\ninspected to detect tables, columns, functions, and other elements with their attributes." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlCurrentSchemaInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlMisleadingReferenceInspection", + "shortDescription": { + "text": "Misleading references" + }, + "fullDescription": { + "text": "Reports ambiguous references in SQL code. For example, when a name refer to both a table column and a routine parameter. The execution of such code might lead to errors or unexpected results due to counter-intuitive resolution logic. Usually, names with a more local scope have higher priority. Example (PostgreSQL): 'CREATE TABLE foo\n(\n id INT,\n name VARCHAR(5)\n);\nCREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n$$\nDECLARE\n b INT;\nBEGIN\n -- `name` is ambiguous as it is used as a column name and a parameter\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\nEND;\n$$ LANGUAGE plpgsql;' In PostgreSQL, you can use the '#variable_conflict' directives to explicitly specify a correct reference. For example, use '#variable_conflict use_column' to refer to a column name, or '#variable_conflict use_variable' to refer to a parameter. 'CREATE TABLE foo\n(\n id INT,\n name VARCHAR(5)\n);\nCREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n$$\n #variable_conflict use_column\nDECLARE\n b INT;\nBEGIN\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\nEND;\n$$ LANGUAGE plpgsql;'", + "markdown": "Reports ambiguous references in SQL code.\n\nFor example, when a name refer to both a table column and a routine parameter. The execution of such code might lead to errors or unexpected\nresults due to counter-intuitive resolution logic. Usually, names with a more local scope have higher priority.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo\n (\n id INT,\n name VARCHAR(5)\n );\n CREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n $$\n DECLARE\n b INT;\n BEGIN\n -- `name` is ambiguous as it is used as a column name and a parameter\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\n END;\n $$ LANGUAGE plpgsql;\n\nIn PostgreSQL, you can use the `#variable_conflict` directives to explicitly specify a correct reference. For example,\nuse `#variable_conflict use_column` to refer to a column name, or `#variable_conflict use_variable` to refer to a\nparameter.\n\n CREATE TABLE foo\n (\n id INT,\n name VARCHAR(5)\n );\n CREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n $$\n #variable_conflict use_column\n DECLARE\n b INT;\n BEGIN\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\n END;\n $$ LANGUAGE plpgsql;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlMisleadingReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlInsertIntoGeneratedColumnInspection", + "shortDescription": { + "text": "Insertion into generated columns" + }, + "fullDescription": { + "text": "Reports INSERT statements that assign values to generated columns. Generated columns can be read, but their values can not be directly written. Example (PostgreSQL): 'CREATE TABLE foo\n(\n col1 INT,\n col2 INT GENERATED ALWAYS AS (col1 + 1) STORED\n);\nINSERT INTO foo(col1, col2) VALUES (1, 2);'\n You cannot insert '2' into the 'col2' column because this column is generated. For this script to work, you can change '2' to DEFAULT. 'INSERT INTO foo(col1, col2) VALUES (1, DEFAULT);'", + "markdown": "Reports INSERT statements that assign values to generated columns. Generated columns can be read, but their values can not be directly written.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo\n (\n col1 INT,\n col2 INT GENERATED ALWAYS AS (col1 + 1) STORED\n );\n INSERT INTO foo(col1, col2) VALUES (1, 2);\n\nYou cannot insert `2` into the `col2` column because this column is generated.\nFor this script to work, you can change `2` to DEFAULT.\n`INSERT INTO foo(col1, col2) VALUES (1, DEFAULT);`" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlInsertIntoGeneratedColumn", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlRedundantLimitInspection", + "shortDescription": { + "text": "Redundant row limiting in queries" + }, + "fullDescription": { + "text": "Reports redundant row limiting clauses like FETCH and LIMIT in queries. Example (PostgreSQL): 'CREATE TABLE foo(a INT);\n\nSELECT * FROM foo WHERE EXISTS(SELECT * FROM foo LIMIT 2);\nSELECT * FROM foo WHERE EXISTS(SELECT * FROM foo FETCH FIRST 2 ROWS ONLY);' To fix the warning, you can add OFFSET to limiting clauses. If OFFSET is missing, then LIMIT is redundant because the usage of LIMIT does not influence the operation result of EXISTS. In case with OFFSET, we skip first 'N' rows and this will influence the output. 'SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW LIMIT 2);\nSELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW FETCH FIRST 2 ROWS ONLY);'", + "markdown": "Reports redundant row limiting clauses like FETCH and LIMIT in queries.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo(a INT);\n\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo LIMIT 2);\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo FETCH FIRST 2 ROWS ONLY);\n\nTo fix the warning, you can add OFFSET to limiting clauses. If OFFSET is missing, then LIMIT is redundant because\nthe usage of LIMIT does not influence the operation result of EXISTS. In case with OFFSET, we skip first `N` rows and this will\ninfluence the output.\n\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW LIMIT 2);\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW FETCH FIRST 2 ROWS ONLY);\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlRedundantLimit", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlInsertNullIntoNotNullInspection", + "shortDescription": { + "text": "Insert NULL into NOT NULL column" + }, + "fullDescription": { + "text": "Reports cases when you insert NULL values into columns that accept only NOT NULL values. Example (Microsoft SQL Server): 'CREATE TABLE br2 (\nid INT NOT NULL,\ncol1 NVARCHAR (20) NOT NULL,\ncol2 NVARCHAR (20) NOT NULL,\n);\n--\nINSERT INTO br2 (id, col1, col2)\nVALUES (1, NULL, NULL);' You cannot insert NULL values in 'col1' and 'col2' because they are defined as NOT NULL. If you run the script as is, you will receive an error. To fix this code, replace NULL in the VALUES part with some values (for example, '42' and ''bird''). INSERT INTO br2 (id, col1, col2)\nVALUES (1, 42, 'bird');", + "markdown": "Reports cases when you insert NULL values into columns that accept only NOT NULL values.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE br2 (\n id INT NOT NULL,\n col1 NVARCHAR (20) NOT NULL,\n col2 NVARCHAR (20) NOT NULL,\n );\n --\n INSERT INTO br2 (id, col1, col2)\n VALUES (1, NULL, NULL);\n\nYou cannot insert NULL values in `col1` and `col2` because they are defined as NOT NULL. If you run the script as\nis,\nyou will receive an error. To fix this code, replace NULL in the VALUES part with some values (for example, `42` and\n`'bird'`).\n\n```\nINSERT INTO br2 (id, col1, col2)\nVALUES (1, 42, 'bird');\n```" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlInsertNullIntoNotNull", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlDerivedTableAliasInspection", + "shortDescription": { + "text": "Each derived table should have alias" + }, + "fullDescription": { + "text": "Reports derived tables without aliases. Example (MySQL): 'CREATE TABLE table1 (id INT, name VARCHAR(20), cats FLOAT);\nCREATE TABLE table2 (id INT, age INTEGER);\n\nSELECT id AS ID, name, cats, age\nFROM (SELECT table1.id, name, cats, age\nFROM table1\nJOIN table2 ON table1.id = table2.id);' According to Derived Tables at dev.mysql.com, an alias is mandatory. You can add the alias by using the Introduce alias quick-fix. After the quick-fix is applied: 'SELECT id AS ID, name, cats, age\nFROM (SELECT table1.id, name, cats, age\nFROM table1\nJOIN table2 ON table1.id = table2.id);'", + "markdown": "Reports derived tables without aliases.\n\nExample (MySQL):\n\n CREATE TABLE table1 (id INT, name VARCHAR(20), cats FLOAT);\n CREATE TABLE table2 (id INT, age INTEGER);\n\n SELECT id AS ID, name, cats, age\n FROM (SELECT table1.id, name, cats, age\n FROM table1\n JOIN table2 ON table1.id = table2.id);\n\nAccording to [Derived Tables at dev.mysql.com](https://dev.mysql.com/doc/refman/8.0/en/derived-tables.html), an alias is\nmandatory. You can add the alias by using the **Introduce alias** quick-fix.\n\nAfter the quick-fix is applied:\n\n SELECT id AS ID, name, cats, age\n FROM (SELECT table1.id, name, cats, age\n FROM table1\n JOIN table2 ON table1.id = table2.id);\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlDerivedTableAlias", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MsBuiltinInspection", + "shortDescription": { + "text": "Builtin functions" + }, + "fullDescription": { + "text": "Reports truncations of string arguments in ISNULL functions. The ISNULL syntax is 'ISNULL(check_expression, replacement_value)'. According to ISNULL at docs.microsoft.com, 'replacement_value' will be truncated if 'replacement_value' is longer than 'check_expression'. Example (Microsoft SQL Server): 'DECLARE @name1 VARCHAR(2) = NULL;\nDECLARE @name2 VARCHAR(10) = 'Example';\nDECLARE @name3 VARCHAR(2) = 'Hi';\n\n -- `@name2` is VARCHAR(10) and will be truncated\nSELECT ISNULL(@name1, @name2);\n\n -- `@name3` is VARCHAR(2) as `@name1` and will not be truncated\nSELECT ISNULL(@name1, @name3);'", + "markdown": "Reports truncations of string arguments in ISNULL functions.\n\nThe ISNULL syntax is `ISNULL(check_expression, replacement_value)`.\n\nAccording to [ISNULL at\ndocs.microsoft.com](https://docs.microsoft.com/en-us/sql/t-sql/functions/isnull-transact-sql), `replacement_value` will be truncated if `replacement_value` is longer than\n`check_expression`.\n\nExample (Microsoft SQL Server):\n\n DECLARE @name1 VARCHAR(2) = NULL;\n DECLARE @name2 VARCHAR(10) = 'Example';\n DECLARE @name3 VARCHAR(2) = 'Hi';\n\n -- `@name2` is VARCHAR(10) and will be truncated\n SELECT ISNULL(@name1, @name2);\n\n -- `@name3` is VARCHAR(2) as `@name1` and will not be truncated\n SELECT ISNULL(@name1, @name3);\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MssqlBuiltin", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL server", + "index": 73, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlTriggerTransitionInspection", + "shortDescription": { + "text": "Suspicious code in triggers" + }, + "fullDescription": { + "text": "Reports incorrect usages of transition table variables in triggers. Example (HSQLDB): 'CREATE TABLE foo(a INT);\n\nCREATE TRIGGER trg\n AFTER DELETE ON foo\nBEGIN\n SELECT * FROM NEW;\nEND;\n\nCREATE TRIGGER trig AFTER INSERT ON foo\n REFERENCING OLD ROW AS newrow\n FOR EACH ROW WHEN (a > 1)\n INSERT INTO foo VALUES (1)' In HSQLDB, DELETE triggers may be used only with the OLD state while INSERT triggers may have only the NEW state. So, in the previous example, NEW in 'SELECT * FROM NEW;' will be highlighted as well as OLD in 'REFERENCING OLD ROW AS newrow'.", + "markdown": "Reports incorrect usages of transition table variables in triggers.\n\nExample (HSQLDB):\n\n CREATE TABLE foo(a INT);\n\n CREATE TRIGGER trg\n AFTER DELETE ON foo\n BEGIN\n SELECT * FROM NEW;\n END;\n\n CREATE TRIGGER trig AFTER INSERT ON foo\n REFERENCING OLD ROW AS newrow\n FOR EACH ROW WHEN (a > 1)\n INSERT INTO foo VALUES (1)\n\nIn HSQLDB, DELETE triggers may be used only with the OLD state while INSERT triggers may have only the NEW state. So, in the previous\nexample, NEW in `SELECT * FROM NEW;` will be highlighted as well as OLD in `REFERENCING OLD ROW AS newrow`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlTriggerTransition", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlMultipleLimitClausesInspection", + "shortDescription": { + "text": "Multiple row limiting/offset clauses in queries" + }, + "fullDescription": { + "text": "Reports usages of multiple row limiting clauses in a single query. Example (Microsoft SQL Server): 'create table foo(a int);\nselect top 1 * from foo order by a offset 10 rows fetch next 20 rows only;' The SELECT TOP clause is used to specify that only 1 record must be returned. The FETCH clause specifies the number of rows to return after the OFFSET clause has been processed. But as we already have the SELECT TOP limiting clause, the FETCH clause might be redundant.", + "markdown": "Reports usages of multiple row limiting clauses in a single query.\n\nExample (Microsoft SQL Server):\n\n create table foo(a int);\n select top 1 * from foo order by a offset 10 rows fetch next 20 rows only;\n\nThe SELECT TOP clause is used to specify that only 1 record must be\nreturned. The FETCH clause specifies the number of rows to return after the OFFSET\nclause has been processed. But as we already have the SELECT TOP limiting clause, the FETCH clause might be redundant." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlMultipleLimitClauses", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlNamedArgumentsInspection", + "shortDescription": { + "text": "Named arguments should be used" + }, + "fullDescription": { + "text": "Reports arguments that are used without names in routine calls. By default, this inspection is disabled. For more information about the difference between named and unnamed parameters, see Binding Parameters by Name (Named Parameters) at docs.microsoft.com . Example (Microsoft SQL Server): 'CREATE FUNCTION foo(n INT, m INT) RETURNS INT AS\nBEGIN\n RETURN n + m;\nEND;\n\nCREATE PROCEDURE test AS\nBEGIN\n foo n = 1, m = 2;\n\n--- The following call misses parameter names and will be highlighted\n foo 1, 2;\nEND;' Parameters '1, 2' in the 'foo 1, 2;' call are highlighted because they miss names.", + "markdown": "Reports arguments that are used without names in routine calls. By default, this inspection is disabled.\n\nFor more information about the difference between named and unnamed parameters, see [Binding Parameters by Name (Named Parameters) at docs.microsoft.com](https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/binding-parameters-by-name-named-parameters).\n\nExample (Microsoft SQL Server):\n\n CREATE FUNCTION foo(n INT, m INT) RETURNS INT AS\n BEGIN\n RETURN n + m;\n END;\n\n CREATE PROCEDURE test AS\n BEGIN\n foo n = 1, m = 2;\n\n --- The following call misses parameter names and will be highlighted\n foo 1, 2;\n END;\n\nParameters `1, 2` in the `foo 1, 2;` call are highlighted because they miss names." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlNamedArguments", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlCaseVsCoalesceInspection", + "shortDescription": { + "text": "Using CASE instead of COALESCE function and vice versa" + }, + "fullDescription": { + "text": "Reports situations when CASE and COALESCE calls are interchangeable. This inspection has the following intention actions: Replace with 'COALESCE' call and the opposite one Replace with CASE expression. Example (MySQL): 'SELECT\n -- this CASE may be replaced by COALESCE\n\tCASE\n\t\tWHEN C1 IS NOT NULL THEN C1\n\t\tELSE 0\n\t\tEND\nFROM dual;' In the example, the CASE statement can be replaced with 'SELECT COALESCE(C1, 0)' that produces the same output. If you prefer using CASE expressions, select the Prefer CASE expressions over COALESCE function option on the inspection page.", + "markdown": "Reports situations when CASE and COALESCE calls are interchangeable. This inspection has the following intention actions: **Replace\nwith 'COALESCE' call** and the opposite one **Replace with CASE expression** .\n\nExample (MySQL):\n\n SELECT\n -- this CASE may be replaced by COALESCE\n \tCASE\n \t\tWHEN C1 IS NOT NULL THEN C1\n \t\tELSE 0\n \t\tEND\n FROM dual;\n\nIn the example, the CASE statement can be replaced with `SELECT COALESCE(C1, 0)` that produces the same output.\n\nIf you prefer using CASE expressions, select the **Prefer CASE expressions over COALESCE function** option on\nthe inspection page." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlCaseVsCoalesce", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlRedundantAliasInspection", + "shortDescription": { + "text": "Redundant alias expressions" + }, + "fullDescription": { + "text": "Reports alias expressions that duplicate names of columns in tables and might be redundant. Example (PostgreSQL): 'CREATE TABLE foo(a INT, b INT);\n\nSELECT * FROM foo foo(a, b);\nSELECT * FROM foo foo(a);\nSELECT * FROM foo foo(x);\nSELECT * FROM foo foo(x, y);' The first two aliases use the same column names as in the 'foo' table. They are considered redundant because they column names are identical.", + "markdown": "Reports alias expressions that duplicate names of columns in tables and might be redundant.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo(a INT, b INT);\n\n SELECT * FROM foo foo(a, b);\n SELECT * FROM foo foo(a);\n SELECT * FROM foo foo(x);\n SELECT * FROM foo foo(x, y);\n\nThe first two aliases use the same column names as in the `foo` table. They are considered redundant because they\ncolumn names are identical." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlRedundantAlias", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlIdentifierInspection", + "shortDescription": { + "text": "Identifier should be quoted" + }, + "fullDescription": { + "text": "Reports situations when you use SQL reserved keywords as identifier names in your query. Example (Microsoft SQL Server): 'CREATE TABLE select (identity INT IDENTITY NOT NULL, order INT NOT NULL);' We use 'select', 'identity', and 'order' as table and column names. But they are also reserved keywords in Microsoft SQL Server. Therefore, in order to use them as object names in the query, you must quote these identifiers. To quote them, you can use the Quote identifier quick-fix. After the quick-fix is applied: 'CREATE TABLE [select] ([identity] INT IDENTITY NOT NULL, [order] INT NOT NULL);'", + "markdown": "Reports situations when you use SQL reserved keywords as identifier names in your query.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE select (identity INT IDENTITY NOT NULL, order INT NOT NULL);\n\nWe use `select`, `identity`, and `order` as table and column names.\nBut they are also reserved keywords in Microsoft SQL Server.\nTherefore, in order to use them as object names in the query, you must quote these identifiers. To quote them, you can use the\n**Quote identifier** quick-fix.\n\nAfter the quick-fix is applied:\n\n CREATE TABLE [select] ([identity] INT IDENTITY NOT NULL, [order] INT NOT NULL);\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlIdentifier", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlTransactionStatementInTriggerInspection", + "shortDescription": { + "text": "Use of transaction management statements in triggers" + }, + "fullDescription": { + "text": "Reports usages of transaction management statements like COMMIT or ROLLBACK in trigger bodies. With COMMIT or ROLLBACK statements in a trigger body, the trigger will not compile. The fail happens because triggers start during transactions. When the trigger starts the current transaction is still not complete. As COMMIT terminates a transaction, both statements (COMMIT and ROLLBACK) would lead to an exception. Changes that are executed in a trigger should be committed (or rolled back) by the owning transaction that started the trigger. Example (Oracle): 'CREATE TABLE employee_audit\n(\n id INT NOT NULL,\n update_date DATE NOT NULL,\n old_name VARCHAR2(100),\n new_name VARCHAR2(100)\n);\n\nCREATE TABLE employees\n(\n id INT NOT NULL,\n name VARCHAR2(100) NOT NULL\n);\n\nCREATE OR REPLACE TRIGGER trig_commit\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\nBEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n COMMIT;\nEND;\n\nCREATE OR REPLACE TRIGGER trig_rollback\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\nBEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n ROLLBACK;\nEND;'", + "markdown": "Reports usages of transaction management statements like COMMIT or ROLLBACK in trigger bodies.\n\nWith COMMIT or ROLLBACK statements in a trigger body, the trigger will not compile.\nThe fail happens because triggers start during transactions. When the trigger starts the current transaction is still not complete. As\nCOMMIT\nterminates a transaction, both statements (COMMIT and ROLLBACK) would lead to an exception.\nChanges that are executed in a trigger should be committed (or rolled back) by the owning transaction that started the trigger.\n\nExample (Oracle):\n\n CREATE TABLE employee_audit\n (\n id INT NOT NULL,\n update_date DATE NOT NULL,\n old_name VARCHAR2(100),\n new_name VARCHAR2(100)\n );\n\n CREATE TABLE employees\n (\n id INT NOT NULL,\n name VARCHAR2(100) NOT NULL\n );\n\n CREATE OR REPLACE TRIGGER trig_commit\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\n BEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n COMMIT;\n END;\n\n CREATE OR REPLACE TRIGGER trig_rollback\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\n BEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n ROLLBACK;\n END;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlTransactionStatementInTrigger", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlRedundantCodeInCoalesceInspection", + "shortDescription": { + "text": "Redundant code in COALESCE call" + }, + "fullDescription": { + "text": "Reports all the arguments except for the first expression that does not evaluate to NULL in COALESCE functions. Example (MySQL): 'SELECT COALESCE(NULL, NULL, NULL, 42, NULL, 'string') as a;' The first NOT NULL argument is '42', all other arguments will be grayed out.", + "markdown": "Reports all the arguments except for the first expression that does not evaluate to NULL in COALESCE functions.\n\nExample (MySQL):\n\n SELECT COALESCE(NULL, NULL, NULL, 42, NULL, 'string') as a;\n\nThe first NOT NULL argument is `42`, all other arguments will be grayed out." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlRedundantCodeInCoalesce", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlStorageInspection", + "shortDescription": { + "text": "SQL source modification detection" + }, + "fullDescription": { + "text": "Reports situations when source code of a database object has been changed. The inspection is triggered when you perform database or object introspection. The introspection is run when you open source code of an object, run statements, and perform code refactoring. Also, you can run introspection by right-clicking an object and selecting Refresh. The inspection covers the following situations: Object source code was changed in the database but code in the editor was not updated. Works in PostgreSQL, Microsoft SQL Server, Oracle, and Sybase ASE. You changed the object source code, introspected the database, but source code has been already changed by someone else. The database introspector was updated in the IDE and you need to download new object properties that were missing in the previous introspector version.", + "markdown": "Reports situations when source code of a database object has been changed.\n\nThe inspection is triggered when you perform database or object introspection. The introspection is run when you open source code of an\nobject, run statements, and perform code refactoring.\nAlso, you can run introspection by right-clicking an object and selecting **Refresh**.\n\nThe inspection covers the following situations:\n\n* Object source code was changed in the database but code in the editor was not updated. Works in PostgreSQL, Microsoft SQL Server, Oracle, and Sybase ASE.\n* You changed the object source code, introspected the database, but source code has been already changed by someone else.\n* The database introspector was updated in the IDE and you need to download new object properties that were missing in the previous introspector version." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlStorageInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MsOrderByInspection", + "shortDescription": { + "text": "ORDER BY in queries" + }, + "fullDescription": { + "text": "Reports usages when the 'ORDER BY' clause is used without 'TOP', 'OFFSET', or 'FOR XML' in views, inline functions, derived tables, subqueries, and common table expressions. For more information about usages of 'ORDER BY', see SELECT - ORDER BY Clause (Transact-SQL) at docs.microsoft.com. Example (Microsoft SQL server): 'CREATE TABLE foo (a INT NOT NULL, b INT NOT NULL);\n\nSELECT *\nFROM (SELECT a, b\nFROM foo A\nWHERE a < 89\nORDER BY b) ALIAS;' In a subquery, ORDER BY will be highlighted as an error. You can add TOP, OFFSET, or FOR XML to a subquery. Alternatively, use the Delete element quick-fix to delete the ORDER BY section. After the quick-fix is applied: 'SELECT *\nFROM (SELECT a, b\nFROM foo A\nWHERE a < 89) ALIAS;'", + "markdown": "Reports usages when the `ORDER BY` clause is used without `TOP`, `OFFSET`, or `FOR XML` in views, inline functions, derived tables, subqueries, and common table expressions.\n\nFor more information about usages of `ORDER BY`, see [SELECT - ORDER BY Clause (Transact-SQL) at\ndocs.microsoft.com](https://docs.microsoft.com/en-us/sql/t-sql/queries/select-order-by-clause-transact-sql).\n\nExample (Microsoft SQL server):\n\n CREATE TABLE foo (a INT NOT NULL, b INT NOT NULL);\n\n SELECT *\n FROM (SELECT a, b\n FROM foo A\n WHERE a < 89\n ORDER BY b) ALIAS;\n\nIn a subquery, ORDER BY will be highlighted as an error. You can add TOP, OFFSET, or FOR XML to a subquery.\nAlternatively, use the **Delete element** quick-fix to delete the ORDER BY section.\n\nAfter the quick-fix is applied:\n\n SELECT *\n FROM (SELECT a, b\n FROM foo A\n WHERE a < 89) ALIAS;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "MsOrderBy", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "SQL server", + "index": 73, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlSignatureInspection", + "shortDescription": { + "text": "Function signature" + }, + "fullDescription": { + "text": "Reports signature issues for built-in functions. The inspection will report a wrong number of arguments, invalid keywords, wrong data types, and other issues. Example (MySQL): 'CREATE TABLE foo (a INT, b INT, c INT)\n\nSELECT IFNULL() FROM foo; -- error\nSELECT IFNULL(a) FROM foo; -- error\nSELECT IFNULL(a, b) FROM foo; -- OK\nSELECT IFNULL(a, b, c) FROM foo; -- error' In MySQL, the 'IFNULL()' function accepts strictly two arguments. So, only the 'SELECT IFNULL(a, b) FROM foo;' query is correct.", + "markdown": "Reports signature issues for built-in functions.\n\nThe inspection will report a wrong number of arguments, invalid keywords, wrong data types, and other issues.\n\nExample (MySQL):\n\n CREATE TABLE foo (a INT, b INT, c INT)\n\n SELECT IFNULL() FROM foo; -- error\n SELECT IFNULL(a) FROM foo; -- error\n SELECT IFNULL(a, b) FROM foo; -- OK\n SELECT IFNULL(a, b, c) FROM foo; -- error\n\nIn MySQL, the `IFNULL()` function accepts strictly two arguments. So, only the `SELECT IFNULL(a, b) FROM foo;`\nquery is correct." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlSignature", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlRedundantOrderingDirectionInspection", + "shortDescription": { + "text": "Redundant ordering direction" + }, + "fullDescription": { + "text": "Reports redundant ordering directions like ASC and DESC in ORDER BY clauses. Example (MySQL): 'CREATE TABLE foo(a INT, b INT, c INT);\nSELECT * FROM foo ORDER BY a ASC, b DESC, c ASC;' The ORDER BY keyword sorts the records in the ascending order by default. So, the 'ASC' keyword for 'a' and 'c' columns is redundant.", + "markdown": "Reports redundant ordering directions like ASC and DESC in ORDER BY clauses.\n\nExample (MySQL):\n\n CREATE TABLE foo(a INT, b INT, c INT);\n SELECT * FROM foo ORDER BY a ASC, b DESC, c ASC;\n\nThe ORDER BY keyword sorts the records in the ascending order by default. So, the `ASC` keyword for `a` and\n`c` columns is redundant." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlRedundantOrderingDirection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlDeprecateTypeInspection", + "shortDescription": { + "text": "Deprecated type" + }, + "fullDescription": { + "text": "Reports usages of types that are deprecated and might disappear in future versions of DBMS. Reported types: LONG in Oracle (see Deprecated and Desupported Features at docs.oracle.com). TEXT, NTEXT, and IMAGE in Microsoft SQL Server (see Deprecated Database Engine Features in SQL Server 2016 at docs.microsoft.com). Example (Oracle): 'CREATE TABLE ot.foo(\na NUMBER GENERATED BY DEFAULT AS IDENTITY,\nb LONG NOT NULL\n);'", + "markdown": "Reports usages of types that are deprecated and might disappear in future versions of DBMS.\n\nReported types:\n\n* LONG in Oracle (see [Deprecated\n and Desupported Features at docs.oracle.com](https://docs.oracle.com/cd/A91202_01/901_doc/server.901/a90120/ch4_dep.htm#6690)).\n* TEXT, NTEXT, and IMAGE in Microsoft SQL Server (see [Deprecated Database Engine Features in SQL Server 2016 at docs.microsoft.com](https://docs.microsoft.com/en-us/sql/database-engine/deprecated-database-engine-features-in-sql-server-2016?view=sql-server-ver15)).\n\nExample (Oracle):\n\n CREATE TABLE ot.foo(\n a NUMBER GENERATED BY DEFAULT AS IDENTITY,\n b LONG NOT NULL\n );\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlDeprecateType", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlAggregatesInspection", + "shortDescription": { + "text": "Aggregate-related problems" + }, + "fullDescription": { + "text": "Reports invalid usages of SQL aggregate functions. The following situations are considered: Columns that are used in HAVING and ORDER BY clauses but are missed in GROUP BY clauses. 'CREATE TABLE foo(id INT PRIMARY KEY, a INT, b INT);\nSELECT a, MAX(b) FROM foo GROUP BY a HAVING b > 0;\nSELECT * FROM foo GROUP BY a ORDER BY b;' This rule does not apply when grouping is made by the primary key. 'SELECT * FROM foo GROUP BY id ORDER BY b;' Aggregate functions in a wrong context. Usually, you can use aggregate functions in the following contexts: a list of expressions in SELECT; in HAVING and ORDER BY sections; and other dialect-specific cases. The following queries will display an error. 'SELECT a FROM foo WHERE MAX(b) > 0;\nSELECT a FROM foo GROUP BY MAX(a);' Nested calls of aggregate functions. 'SELECT MAX(SUM(a)) FROM foo GROUP BY a;' This rule does not apply to analytic functions. The following query is valid and correct. 'SELECT MAX(SUM(a) OVER ()) FROM foo;' Usages of HAVING without aggregate functions. In this case, consider rewriting your code using the WHERE section. 'SELECT a, MAX(b) FROM foo GROUP BY a HAVING a > 0;'", + "markdown": "Reports invalid usages of SQL aggregate functions.\n\nThe following situations are considered:\n\n* Columns that are used in HAVING and ORDER BY clauses but are missed in GROUP BY clauses.\n\n CREATE TABLE foo(id INT PRIMARY KEY, a INT, b INT);\n SELECT a, MAX(b) FROM foo GROUP BY a HAVING b > 0;\n SELECT * FROM foo GROUP BY a ORDER BY b;\n\n This rule does not apply when grouping is made by the primary key.\n\n SELECT * FROM foo GROUP BY id ORDER BY b;\n\n* Aggregate functions in a wrong context. Usually, you can use aggregate functions in the following contexts: a list of expressions in\n SELECT; in HAVING and ORDER BY sections; and other dialect-specific cases. The following queries will display an error.\n\n SELECT a FROM foo WHERE MAX(b) > 0;\n SELECT a FROM foo GROUP BY MAX(a);\n\n* Nested calls of aggregate functions.\n\n SELECT MAX(SUM(a)) FROM foo GROUP BY a;\n\n This rule does not apply to analytic functions. The following query is valid and correct.\n\n SELECT MAX(SUM(a) OVER ()) FROM foo;\n\n* Usages of HAVING without aggregate functions. In this case, consider rewriting your code using the WHERE section.\n\n SELECT a, MAX(b) FROM foo GROUP BY a HAVING a > 0;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlAggregates", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlConstantExpressionInspection", + "shortDescription": { + "text": "Constant expression" + }, + "fullDescription": { + "text": "Reports conditions and expressions that are always true, false or null. Example (MySQL): 'CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\nSELECT a FROM t1 WHERE 'Cat' = 'Cat';\nSELECT a FROM t1 WHERE 'Cat' = null;' The ''Cat' = 'Cat'' is always true and will be reported. The ''Cat' = null' is always null and will be reported.", + "markdown": "Reports conditions and expressions that are always true, false or null.\n\nExample (MySQL):\n\n CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\n SELECT a FROM t1 WHERE 'Cat' = 'Cat';\n SELECT a FROM t1 WHERE 'Cat' = null;\n\nThe `'Cat' = 'Cat'` is always true and will be reported.\n\nThe `'Cat' = null` is always null and will be reported." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlConstantExpression", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlMissingColumnAliasesInspection", + "shortDescription": { + "text": "Missing column aliases" + }, + "fullDescription": { + "text": "Reports queries without explicit aliases in output expressions (for example, in the SELECT statement). Example (PostgreSQL): 'CREATE TABLE foo(a INT, b INT);\n\nSELECT 1, a + 1 AS A2, MAX(b) AS M\nFROM foo;'", + "markdown": "Reports queries without explicit aliases in output expressions (for example, in the SELECT statement).\n\nExample (PostgreSQL):\n\n CREATE TABLE foo(a INT, b INT);\n\n SELECT 1, a + 1 AS A2, MAX(b) AS M\n FROM foo;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlMissingColumnAliases", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlAddNotNullColumnInspection", + "shortDescription": { + "text": "Adding not null column without default value" + }, + "fullDescription": { + "text": "Reports attempts to create NOT NULL columns without DEFAULT values. Example (Microsoft SQL Server): 'CREATE TABLE foo (a INT, b INT)\n\nALTER TABLE foo ADD c INT NOT NULL;' By default, a column holds NULL values. In the example, we use the NOT NULL constraint that enforces a column not to accept NULL values. If we prohibit to use NULL values, we must set the DEFAULT value that SQL can use when we create a new record. 'ALTER TABLE foo ADD c INT NOT NULL DEFAULT 42;' You can quickly add the DEFAULT value by using the Add DEFAULT value quick-fix.", + "markdown": "Reports attempts to create NOT NULL columns without DEFAULT values.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE foo (a INT, b INT)\n\n ALTER TABLE foo ADD c INT NOT NULL;\n\nBy default, a column holds NULL values. In the example, we use the NOT NULL constraint that enforces a column not to accept NULL values.\nIf we prohibit to use NULL values, we must set the DEFAULT value that SQL can use when we create a new record.\n\n ALTER TABLE foo ADD c INT NOT NULL DEFAULT 42;\n\nYou can quickly add the DEFAULT value by using the **Add DEFAULT value** quick-fix." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlAddNotNullColumn", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OraOverloadInspection", + "shortDescription": { + "text": "Overloading errors" + }, + "fullDescription": { + "text": "Reports invalid cases of subprogram overloading in Oracle. Example (Oracle): 'DECLARE\n SUBTYPE fff IS BINARY_INTEGER;\n SUBTYPE ggg IS NATURAL;\n PROCEDURE foo (a IN ggg) IS BEGIN NULL; END;\n PROCEDURE foo (a IN fff) IS BEGIN NULL; END;\nBEGIN\n NULL;\nEND;' You cannot overload subprograms which parameters differ only in subtypes. For example, you cannot overload procedures where one accepts a BINARY INTEGER parameter and the other accepts a NATURAL parameter. For more information about restrictions on procedure overloading, see Restrictions on Overloading at docs.oracle.com.", + "markdown": "Reports invalid cases of subprogram overloading in Oracle.\n\nExample (Oracle):\n\n DECLARE\n SUBTYPE fff IS BINARY_INTEGER;\n SUBTYPE ggg IS NATURAL;\n PROCEDURE foo (a IN ggg) IS BEGIN NULL; END;\n PROCEDURE foo (a IN fff) IS BEGIN NULL; END;\n BEGIN\n NULL;\n END;\n\nYou cannot overload subprograms which parameters differ only in subtypes. For example, you cannot overload procedures where one accepts a\nBINARY INTEGER parameter and the other accepts a NATURAL parameter. For more information about restrictions on procedure overloading,\nsee [Restrictions on Overloading at docs.oracle.com](https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/subprograms.htm)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlOverload", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Oracle", + "index": 78, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OraMissingBodyInspection", + "shortDescription": { + "text": "Missing body for package/object type specification" + }, + "fullDescription": { + "text": "Reports package and object type specifications that are missing body declarations. Package specifications and object types that declare routines as well as package specifications with cursors must have body declarations where those routines and cursors are implemented. Absence of a body leads to a runtime error when routines or cursors are invoked in program code. Example (Oracle): 'CREATE OR REPLACE PACKAGE ppp IS\n FUNCTION foo(a INT) RETURN INT;\nEND;'", + "markdown": "Reports package and object type specifications that are missing body declarations.\n\nPackage specifications and object types that declare routines as well as package specifications with cursors must have body\ndeclarations where those routines and cursors are implemented. Absence of a body leads to a runtime error when routines or cursors are\ninvoked in program code.\n\nExample (Oracle):\n\n CREATE OR REPLACE PACKAGE ppp IS\n FUNCTION foo(a INT) RETURN INT;\n END;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlMissingBody", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Oracle", + "index": 78, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OraUnmatchedForwardDeclarationInspection", + "shortDescription": { + "text": "Forward declaration without definition" + }, + "fullDescription": { + "text": "Reports declarations of procedures and functions that are missing their implementation in code. In Oracle, you can declare a procedure or a function without its body, and write the implementation later. The inspection will report names of such procedures or functions that are left without implementation. Example (Oracle): 'DECLARE PROCEDURE foo(a int, b varchar2);\nBEGIN\n NULL;\nEND;' The 'foo' procedure is declared but is missing implementation. We can add the implementation to get rid of the error. 'DECLARE PROCEDURE foo(a int, b varchar2);\n PROCEDURE foo(a int, b varchar2) IS\nBEGIN\n NULL;\nEND;\nBEGIN\n NULL;\nEND;'", + "markdown": "Reports declarations of procedures and functions that are missing their implementation in code.\n\nIn Oracle, you can declare a procedure or a function without its body, and write the implementation later. The inspection will report names\nof such procedures or functions that are left without implementation.\n\nExample (Oracle):\n\n DECLARE PROCEDURE foo(a int, b varchar2);\n BEGIN\n NULL;\n END;\n\nThe `foo` procedure is declared but is missing implementation. We can add the implementation to get rid of the error.\n\n DECLARE PROCEDURE foo(a int, b varchar2);\n PROCEDURE foo(a int, b varchar2) IS\n BEGIN\n NULL;\n END;\n BEGIN\n NULL;\n END;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "SqlUnmatchedForwardDeclaration", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Oracle", + "index": 78, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlGotoInspection", + "shortDescription": { + "text": "Usages of GOTO statements" + }, + "fullDescription": { + "text": "Reports usages of backward GOTO statements and GOTO statements used to exit a loop. The extensive use of GOTO statements is generally not recommended. For details, see GOTO statement in SQL procedures at ibm.com. Instead of jumping back to a previous statement using GOTO, consider using a loop. Instead of exiting the WHILE loop with GOTO, consider using other control-of-flow statements (for example, RETURN or BREAK). Example (Oracle): 'CREATE PROCEDURE test(n INT) AS\nDECLARE\n x INT;\nBEGIN\n x := 0;\n GOTO a;\n <> x := 1;\n IF (n = 0) THEN\n GOTO a;\n END IF;\n WHILE TRUE\n LOOP\n GOTO b;\n END LOOP;\n <> x := 3;\nEND;'", + "markdown": "Reports usages of backward GOTO statements and GOTO statements used to exit a loop.\n\nThe extensive use of GOTO statements is generally\nnot recommended. For details, see [GOTO statement in\nSQL\nprocedures at ibm.com](https://www.ibm.com/docs/no/db2/11.5?topic=procedures-goto-statement-in-sql).\n\nInstead of jumping back to a previous statement using GOTO, consider using a loop.\n\nInstead of exiting the WHILE loop with GOTO, consider using other control-of-flow statements (for example, RETURN or BREAK).\n\nExample (Oracle):\n\n CREATE PROCEDURE test(n INT) AS\n DECLARE\n x INT;\n BEGIN\n x := 0;\n GOTO a;\n <> x := 1;\n IF (n = 0) THEN\n GOTO a;\n END IF;\n WHILE TRUE\n LOOP\n GOTO b;\n END LOOP;\n <> x := 3;\n END;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlGoto", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MongoJSExtResolveInspection", + "shortDescription": { + "text": "Resolution problems" + }, + "fullDescription": { + "text": "Reports unresolved references in MongoDB and JavaScript code.", + "markdown": "Reports unresolved references in MongoDB and JavaScript code." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MongoJSResolve", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "MongoJS", + "index": 15, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlWithoutWhereInspection", + "shortDescription": { + "text": "Delete or update statement without where clauses" + }, + "fullDescription": { + "text": "Reports usages of DELETE or UPDATE statements without WHERE clauses. Without WHERE clauses, DELETE drops all the data from the table, and UPDATE overwrites values for all the table rows. Example (MySQL): 'CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\nupdate t1 set a = 'Smith';\ndelete from t1;'", + "markdown": "Reports usages of DELETE or UPDATE statements without WHERE clauses.\n\nWithout WHERE clauses, DELETE drops all the data from the table, and UPDATE overwrites values for all the table rows.\n\nExample (MySQL):\n\n CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\n update t1 set a = 'Smith';\n delete from t1;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlWithoutWhere", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlAmbiguousColumnInspection", + "shortDescription": { + "text": "Ambiguous reference" + }, + "fullDescription": { + "text": "Reports columns that have identical names but belong to different tables. Example (MySQL): 'CREATE TABLE foo(id INT PRIMARY KEY);\nCREATE TABLE bar(id INT PRIMARY KEY);\n\nSELECT foo.id, bar.id FROM foo, bar WHERE id > 0;' The 'id' column appears in 'foo' and 'bar' tables. You need to qualify the column name to make the query correct. 'SELECT foo.id, bar.id FROM foo, bar WHERE foo.id > 0;'", + "markdown": "Reports columns that have identical names but belong to different tables.\n\nExample (MySQL):\n\n CREATE TABLE foo(id INT PRIMARY KEY);\n CREATE TABLE bar(id INT PRIMARY KEY);\n\n SELECT foo.id, bar.id FROM foo, bar WHERE id > 0;\n\nThe `id` column appears in `foo` and `bar` tables. You need to qualify the column name to\nmake the query correct.\n\n SELECT foo.id, bar.id FROM foo, bar WHERE foo.id > 0;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlAmbiguousColumn", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlUnusedCteInspection", + "shortDescription": { + "text": "Unused common table expression" + }, + "fullDescription": { + "text": "Reports unused common table expressions (CTE) inside the query. Example (PostgreSQL): 'CREATE TABLE foo(a INT);\n\nWITH a AS (SELECT 1 AS x FROM foo)\nSELECT 1 + 2 FROM foo;' By using WITH, we create a temporary named result set with the name 'a', also known as a common table expression (CTE). But we do not use this CTE later in the code. The unused CTE is greyed out.", + "markdown": "Reports unused common table expressions (CTE) inside the query.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo(a INT);\n\n WITH a AS (SELECT 1 AS x FROM foo)\n SELECT 1 + 2 FROM foo;\n\nBy using WITH, we create a temporary named result set with the name `a`, also known as a common table expression (CTE). But\nwe do not use this CTE later in the code. The unused CTE is greyed out." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlUnusedCte", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MongoJSResolveInspection", + "shortDescription": { + "text": "Resolution problems" + }, + "fullDescription": { + "text": "Reports unresolved references in MongoDB and JavaScript code. Example: 'db\nuse foo\n -- a reference to a non-existing collection\ndb.non_existing_collection\ndb['non_existing_collection']\ndb['non_existing_collection'].find().hasNext()' The 'non_existing_collection' collection does not exist in the database and will be reported.", + "markdown": "Reports unresolved references in MongoDB and JavaScript code.\n\nExample:\n\n db\n use foo\n -- a reference to a non-existing collection\n db.non_existing_collection\n db['non_existing_collection']\n db['non_existing_collection'].find().hasNext()\n\nThe `non_existing_collection` collection does not exist in the database and will be reported." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MongoJSResolve", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "MongoJS", + "index": 15, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlNullComparisonInspection", + "shortDescription": { + "text": "Null comparison" + }, + "fullDescription": { + "text": "Reports comparisons with NULL that can be replaced with IS NULL or IS NOT NULL operators. Example (Microsoft SQL Server): 'CREATE TABLE foo ( id int );\n\nSELECT * FROM foo WHERE NULL = NULL;\nSELECT * FROM foo WHERE NULL != NULL;' The 'NULL = NULL' can be replaced with 'IS NULL', the 'NULL != NULL' comparison with 'IS NOT NULL'. To do this replacement, you can use Use IS NULL operator or Use IS NOT NULL operator quick-fixes. 'SELECT * FROM foo WHERE NULL IS NULL;\nSELECT * FROM foo WHERE NULL IS NOT NULL;'", + "markdown": "Reports comparisons with NULL that can be replaced with IS NULL or IS NOT NULL operators.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE foo ( id int );\n\n SELECT * FROM foo WHERE NULL = NULL;\n SELECT * FROM foo WHERE NULL != NULL;\n\nThe `NULL = NULL` can be replaced with `IS NULL`, the `NULL != NULL` comparison\nwith `IS NOT NULL`. To do this replacement, you can use **Use IS NULL operator** or **Use IS NOT NULL operator**\nquick-fixes.\n\n SELECT * FROM foo WHERE NULL IS NULL;\n SELECT * FROM foo WHERE NULL IS NOT NULL;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlNullComparison", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.intellij.plugins.markdown", + "version": "241.18034.45", + "rules": [ + { + "id": "MarkdownOutdatedTableOfContents", + "shortDescription": { + "text": "Outdated table of contents section" + }, + "fullDescription": { + "text": "Checks if a particular table of contents section corresponds to the actual structure of the document.", + "markdown": "Checks if a particular table of contents section corresponds to the actual structure of the document." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownOutdatedTableOfContents", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 21, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownUnresolvedLinkLabel", + "shortDescription": { + "text": "Unresolved link label" + }, + "fullDescription": { + "text": "Reports unresolved link labels in Markdown files.", + "markdown": "Reports unresolved link labels in Markdown files." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownUnresolvedLinkLabel", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 21, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownIncorrectTableFormatting", + "shortDescription": { + "text": "Incorrect table formatting" + }, + "fullDescription": { + "text": "Checks if table is correctly formatted.", + "markdown": "Checks if table is correctly formatted." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "MarkdownIncorrectTableFormatting", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 21, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownIncorrectlyNumberedListItem", + "shortDescription": { + "text": "Incorrectly numbered list item" + }, + "fullDescription": { + "text": "Ordered list items are expected to have straight numeration starting from 1. The motivation behind this is that most of Markdown processors are ignoring the numbering of ordered lists. A processor will generate an '
    ' element for such list, that will number items continuously from 1.", + "markdown": "Ordered list items are expected to have straight numeration starting from 1.\n\nThe motivation behind this is that most of Markdown processors are ignoring the numbering of ordered lists. A processor will generate an `
      ` element for such list, that will number items continuously from 1." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownIncorrectlyNumberedListItem", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 21, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownLinkDestinationWithSpaces", + "shortDescription": { + "text": "Links should not contain spaces" + }, + "fullDescription": { + "text": "To ensure consistency between different tools, file links should not contain spaces. Example: '[Some file link](some file.md)' A quick-fix replaces spaces with their url-encoded equivalent: '[Some file link](some%20file.md)'", + "markdown": "To ensure consistency between different tools, file links should not contain spaces.\n\n**Example:**\n\n\n [Some file link](some file.md)\n\nA quick-fix replaces spaces with their url-encoded equivalent:\n\n\n [Some file link](some%20file.md)\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownLinkDestinationWithSpaces", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 21, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownNoTableBorders", + "shortDescription": { + "text": "Table doesn't have side borders" + }, + "fullDescription": { + "text": "Checks if table has correct side borders. For compatibility reasons all table rows should have borders (pipe symbols) at the start and at the end.", + "markdown": "Checks if table has correct side borders. For compatibility reasons all table rows should have borders (pipe symbols) at the start and at the end." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownNoTableBorders", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 21, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownUnresolvedFileReference", + "shortDescription": { + "text": "Unresolved file references" + }, + "fullDescription": { + "text": "Reports unresolved file references in Markdown files.", + "markdown": "Reports unresolved file references in Markdown files." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownUnresolvedFileReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 21, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownUnresolvedHeaderReference", + "shortDescription": { + "text": "Unresolved header reference" + }, + "fullDescription": { + "text": "Reports unresolved header references in Markdown files.", + "markdown": "Reports unresolved header references in Markdown files." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownUnresolvedHeaderReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 21, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.jetbrains.restClient", + "version": "241.18034.45", + "rules": [ + { + "id": "HttpRequestRequestSeparatorJsonBodyInspection", + "shortDescription": { + "text": "Missing request separator in JSON body" + }, + "fullDescription": { + "text": "Reports possible requests in injected JSON body where request separator '###' is missing. The quick fix suggests adding the separator '###' before the request.", + "markdown": "Reports possible requests in injected JSON body where request separator `###` is missing. The quick fix suggests adding the separator `###` before the request." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HttpRequestRequestSeparatorJsonBodyInspection", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpRequestWhitespaceInsideRequestTargetPath", + "shortDescription": { + "text": "Whitespace in URL in request" + }, + "fullDescription": { + "text": "Highlights spaces inside URL path segments. HTTP Client will ignore them. For better composing use Split Lines action.", + "markdown": "Highlights spaces inside URL path segments. HTTP Client will ignore them. For better composing use Split Lines action." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HttpRequestWhitespaceInsideRequestTargetPath", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpClientUnresolvedAuthId", + "shortDescription": { + "text": "Unresolved Auth identifier" + }, + "fullDescription": { + "text": "Highlights references to non-existent Auth configurations. Suggests creating a new one in the current environment.", + "markdown": "Highlights references to non-existent Auth configurations. Suggests creating a new one in the current environment." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "HttpClientUnresolvedAuthId", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpRequestEnvironmentAuthConfigurationValidationInspection", + "shortDescription": { + "text": "Auth configuration validation" + }, + "fullDescription": { + "text": "Reports Auth configuration the following problems in HTTP Client environment files: Missing properties in Auth configuration Auth/Security configuration placed in private environment file", + "markdown": "Reports Auth configuration the following problems in HTTP Client environment files:\n\n* Missing properties in Auth configuration\n* Auth/Security configuration placed in private environment file" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HttpRequestEnvironmentAuthConfigurationValidationInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpRequestContentLengthIsIgnored", + "shortDescription": { + "text": "Redundant 'Content-Length'" + }, + "fullDescription": { + "text": "Reports an explicitly set 'Content-Length' header. The header is redundant because HTTP Client uses the actual request body length.", + "markdown": "Reports an explicitly set `Content-Length` header. The header is redundant because HTTP Client uses the actual request body length." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HttpRequestContentLengthIsIgnored", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpRequestRequestSeparatorXmlBodyInspection", + "shortDescription": { + "text": "Missing request separator in HTML/XML body" + }, + "fullDescription": { + "text": "Reports possible requests in injected XML/HTML body where request separator '###' is missing. The quick fix suggests adding the separator '###' before the request.", + "markdown": "Reports possible requests in injected XML/HTML body where request separator `###` is missing. The quick fix suggests adding the separator `###` before the request." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HttpRequestRequestSeparatorXmlBodyInspection", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "IncorrectHttpHeaderInspection", + "shortDescription": { + "text": "Incorrect HTTP header" + }, + "fullDescription": { + "text": "Reports unknown HTTP headers that do not match any publicly known headers. The quick fix suggests adding the header to the list of custom headers when the Use custom HTTP headers option is enabled. HTTP headers from the list of custom headers will not trigger the inspection.", + "markdown": "Reports unknown HTTP headers that do not match any [publicly\nknown headers](https://www.iana.org/assignments/message-headers/message-headers.xml). The quick fix suggests adding the header to the list of custom headers when the **Use custom HTTP headers** option\nis enabled. HTTP headers from the list of custom headers will not trigger the inspection." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "IncorrectHttpHeaderInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpClientInappropriateProtocolUsageInspection", + "shortDescription": { + "text": "Inappropriate HTTP Protocol usage" + }, + "fullDescription": { + "text": "Reports inappropriate usage of HTTP protocol keyword, e.g. 'HTTP/2', with non-HTTP method requests. Such a usage will be ignored.", + "markdown": "Reports inappropriate usage of HTTP protocol keyword, e.g. `HTTP/2`, with non-HTTP method requests. Such a usage will be ignored." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HttpClientInappropriateProtocolUsageInspection", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpRequestPlaceholder", + "shortDescription": { + "text": "'$placeholder' in HTTP Request" + }, + "fullDescription": { + "text": "Reports a '$placeholder' inside a request. A '$placeholder' to be replaced by the user is created automatically when a tool cannot recognize a part of a request. For example, a request mapping '/aaaa/*/bbb' will be generated as 'GET localhost/aaaa/{{$placeholder}}/bbb'.", + "markdown": "Reports a `$placeholder` inside a request.\n\nA `$placeholder` to be replaced by the user is created automatically when a tool cannot recognize a part of a request. For example, a request mapping `/aaaa/*/bbb` will be generated as `GET localhost/aaaa/{{$placeholder}}/bbb`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HttpRequestPlaceholder", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpClientUnresolvedVariable", + "shortDescription": { + "text": "Unresolved environment variable" + }, + "fullDescription": { + "text": "Reports variables undeclared in the current environment HTTP Client. Executing requests with undeclared variables probably fail. Consider adding a variable to the environment or selecting an environment with this variable. Inspection doesn't report variables in request bodies, because it can be a valid syntax of the body. Some variables may be not reported as unresolved, because they are declared in response or pre-request handler scripts via 'client.global.set' or 'request.variables.set' functions call.", + "markdown": "Reports variables undeclared in the current environment HTTP Client.\n\n\nExecuting requests with undeclared variables probably fail.\nConsider adding a variable to the environment or selecting an environment with this variable.\n\nInspection doesn't report variables in request bodies, because it can be a valid syntax of the body.\n\n\nSome variables may be not reported as unresolved, because they are declared in response or pre-request handler scripts via\n`client.global.set` or `request.variables.set` functions call." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HttpClientUnresolvedVariable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpRequestRequestSeparatorYamlBodyInspection", + "shortDescription": { + "text": "Missing request separator in YAML body" + }, + "fullDescription": { + "text": "Reports possible requests in injected YAML body where request separator '###' is missing. The quick fix suggests adding the separator '###' before the request.", + "markdown": "Reports possible requests in injected YAML body where request separator `###` is missing. The quick fix suggests adding the separator `###` before the request." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HttpRequestRequestSeparatorYamlBodyInspection", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpUrlsUsage", + "shortDescription": { + "text": "Link with unencrypted protocol" + }, + "fullDescription": { + "text": "Reports the links that use unencrypted protocols (such as HTTP), which can expose your data to man-in-the-middle attacks. These attacks are dangerous in general and may be especially harmful for artifact repositories. Use protocols with encryption, such as HTTPS, instead. See HTTPS: Difference from HTTP (wikipedia.org).", + "markdown": "Reports the links that use unencrypted protocols (such as HTTP), which can expose your data to man-in-the-middle attacks. These attacks\nare dangerous in general and may be especially harmful for artifact repositories. Use protocols with encryption, such as HTTPS,\ninstead.\n\nSee [HTTPS: Difference from HTTP (wikipedia.org)](https://en.wikipedia.org/wiki/HTTPS#Difference_from_HTTP)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HttpUrlsUsage", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Security", + "index": 77, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij.dts", + "version": "241.18034.45", + "rules": [ + { + "id": "DtsPropertyEnum", + "shortDescription": { + "text": "Invalid property value (enum)" + }, + "fullDescription": { + "text": "Reports enum properties with invalid values. The values of an enum property are specified in the node binding.", + "markdown": "Reports enum properties with invalid values. The values of an enum property are specified in the node binding." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DtsPropertyEnum", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsDuplicateElement", + "shortDescription": { + "text": "Duplicate element" + }, + "fullDescription": { + "text": "Reports duplicated elements inside a node. This could either be two or more properties with the same name or two or more nodes.", + "markdown": "Reports duplicated elements inside a node. This could either be two or more properties with the same name or two or more nodes." + }, + "defaultConfiguration": { + "enabled": true, + "level": "error", + "parameters": { + "suppressToolId": "DtsDuplicateElement", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsRequiredProperty", + "shortDescription": { + "text": "Required properties" + }, + "fullDescription": { + "text": "Reports missing required properties. Properties are considered required if they are marked as required in the binding.", + "markdown": "Reports missing required properties. Properties are considered required if they are marked as required in the binding." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DtsRequiredProperty", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsBits", + "shortDescription": { + "text": "Invalid array element size" + }, + "fullDescription": { + "text": "Reports invalid array element size. Array elements must be 8, 16, 32 or 64-bits.", + "markdown": "Reports invalid array element size. Array elements must be 8, 16, 32 or 64-bits." + }, + "defaultConfiguration": { + "enabled": true, + "level": "error", + "parameters": { + "suppressToolId": "DtsBits", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsNodeName", + "shortDescription": { + "text": "Invalid node name" + }, + "fullDescription": { + "text": "Reports invalid node names. Node names should match '[a-zA-Z0-9,._+@-]+' and should only include at most one '@'.", + "markdown": "Reports invalid node names. Node names should match `[a-zA-Z0-9,._+@-]+` and should only include at most one `@`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DtsNodeName", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsPropertyType", + "shortDescription": { + "text": "Invalid property type" + }, + "fullDescription": { + "text": "Reports properties with invalid type. The type of the property is specified in the node binding.", + "markdown": "Reports properties with invalid type. The type of the property is specified in the node binding." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DtsPropertyType", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsLabelName", + "shortDescription": { + "text": "Invalid label name" + }, + "fullDescription": { + "text": "Reports invalid label names. Label names should match '[a-zA-Z_][a-zA-Z0-9_]*'.", + "markdown": "Reports invalid label names. Label names should match `[a-zA-Z_][a-zA-Z0-9_]*`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DtsLabelName", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsUnitName", + "shortDescription": { + "text": "Invalid unit name" + }, + "fullDescription": { + "text": "Reports invalid unit names inside node names. Unit names should not have leading 0s or start with 0x.", + "markdown": "Reports invalid unit names inside node names. Unit names should not have leading 0s or start with 0x." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "DtsUnitName", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsPropertyName", + "shortDescription": { + "text": "Invalid property name" + }, + "fullDescription": { + "text": "Reports invalid property names. Property names should match '[a-zA-Z0-9,._+*#?-]+'.", + "markdown": "Reports invalid property names. Property names should match `[a-zA-Z0-9,._+*#?-]+`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DtsPropertyName", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsContainer", + "shortDescription": { + "text": "Invalid entry location" + }, + "fullDescription": { + "text": "Reports if an entry is not valid in its current location. For example if a property was defied on the root level of a devicetree source file.", + "markdown": "Reports if an entry is not valid in its current location. For example if a property was defied on the root level of a devicetree source file." + }, + "defaultConfiguration": { + "enabled": true, + "level": "error", + "parameters": { + "suppressToolId": "DtsContainer", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsPropertyConst", + "shortDescription": { + "text": "Invalid property value (const)" + }, + "fullDescription": { + "text": "Reports const properties with invalid values. The value of a const property is specified in the node binding.", + "markdown": "Reports const properties with invalid values. The value of a const property is specified in the node binding." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DtsPropertyConst", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsStatementOrder", + "shortDescription": { + "text": "Invalid entry order" + }, + "fullDescription": { + "text": "Reports if property and node entries are in the wrong order. Property definitions should always come before node definitions.", + "markdown": "Reports if property and node entries are in the wrong order. Property definitions should always come before node definitions." + }, + "defaultConfiguration": { + "enabled": true, + "level": "error", + "parameters": { + "suppressToolId": "DtsStatementOrder", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsUndeclaredProperty", + "shortDescription": { + "text": "Undeclared property" + }, + "fullDescription": { + "text": "Reports undeclared properties. Properties are undeclared if there not present in the properties section of the binding. There are some exceptions: Property name ends with: '-controller' Property name starts with: '#' Property name starts with: 'pinctrl-' And the following properties are allowed: status compatible phandle ranges device_type interrupts-extended interrupt-parent", + "markdown": "Reports undeclared properties. Properties are undeclared if there not present in the properties section of the binding. \n\nThere are some exceptions:\n\n* Property name ends with: `-controller`\n* Property name starts with: `#`\n* Property name starts with: `pinctrl-`\n\nAnd the following properties are allowed:\n\n\n\n* status\n* compatible\n* phandle\n* ranges\n* device_type\n* interrupts-extended\n* interrupt-parent" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DtsUndeclaredProperty", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "HtmlTools", + "version": "241.18034.45", + "rules": [ + { + "id": "HtmlRequiredAltAttribute", + "shortDescription": { + "text": "Missing required 'alt' attribute" + }, + "fullDescription": { + "text": "Reports a missing 'alt' attribute in a 'img' or 'applet' tag or in a 'area' element of an image map. Suggests adding a required attribute with a text alternative for the contents of the tag. Based on WCAG 2.0: H24, H35, H36, H37.", + "markdown": "Reports a missing `alt` attribute in a `img` or `applet` tag or in a `area` element of an image map. Suggests adding a required attribute with a text alternative for the contents of the tag. Based on WCAG 2.0: [H24](https://www.w3.org/TR/WCAG20-TECHS/H24.html), [H35](https://www.w3.org/TR/WCAG20-TECHS/H35.html), [H36](https://www.w3.org/TR/WCAG20-TECHS/H36.html), [H37](https://www.w3.org/TR/WCAG20-TECHS/H37.html)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlRequiredAltAttribute", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML/Accessibility", + "index": 32, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlFormInputWithoutLabel", + "shortDescription": { + "text": "Missing associated label" + }, + "fullDescription": { + "text": "Reports a form element ('input', 'textarea', or 'select') without an associated label. Suggests creating a new label. Based on WCAG 2.0: H44.", + "markdown": "Reports a form element (`input`, `textarea`, or `select`) without an associated label. Suggests creating a new label. Based on WCAG 2.0: [H44](https://www.w3.org/TR/WCAG20-TECHS/H44.html). " + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlFormInputWithoutLabel", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML/Accessibility", + "index": 32, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlRequiredTitleAttribute", + "shortDescription": { + "text": "Missing required 'title' attribute" + }, + "fullDescription": { + "text": "Reports a missing title attribute 'frame', 'iframe', 'dl', and 'a' tags. Suggests adding a title attribute. Based on WCAG 2.0: H33, H40, and H64.", + "markdown": "Reports a missing title attribute `frame`, `iframe`, `dl`, and `a` tags. Suggests adding a title attribute. Based on WCAG 2.0: [H33](https://www.w3.org/TR/WCAG20-TECHS/H33.html), [H40](https://www.w3.org/TR/WCAG20-TECHS/H40.html), and [H64](https://www.w3.org/TR/WCAG20-TECHS/H64.html)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HtmlRequiredTitleAttribute", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "HTML/Accessibility", + "index": 32, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlDeprecatedTag", + "shortDescription": { + "text": "Obsolete tag" + }, + "fullDescription": { + "text": "Reports an obsolete HTML5 tag. Suggests replacing the obsolete tag with a CSS or another tag.", + "markdown": "Reports an obsolete HTML5 tag. Suggests replacing the obsolete tag with a CSS or another tag." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlDeprecatedTag", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckImageSize", + "shortDescription": { + "text": "Mismatched image size" + }, + "fullDescription": { + "text": "Reports a 'width' and 'height' attribute value of a 'img' tag that is different from the actual width and height of the referenced image.", + "markdown": "Reports a `width` and `height` attribute value of a `img` tag that is different from the actual width and height of the referenced image." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CheckImageSize", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlRequiredSummaryAttribute", + "shortDescription": { + "text": "Missing required 'summary' attribute" + }, + "fullDescription": { + "text": "Reports a missing 'summary' attribute in a 'table' tag. Suggests adding a'summary' attribute. Based on WCAG 2.0: H73.", + "markdown": "Reports a missing `summary` attribute in a `table` tag. Suggests adding a`summary` attribute. Based on WCAG 2.0: [H73](https://www.w3.org/TR/WCAG20-TECHS/H73.html)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HtmlRequiredSummaryAttribute", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "HTML/Accessibility", + "index": 32, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlRequiredLangAttribute", + "shortDescription": { + "text": "Missing required 'lang' attribute" + }, + "fullDescription": { + "text": "Reports a missing 'lang' (or 'xml:lang') attribute in a 'html' tag. Suggests adding a required attribute to state the default language of the document. Based on WCAG 2.0: H57.", + "markdown": "Reports a missing `lang` (or `xml:lang`) attribute in a `html` tag. Suggests adding a required attribute to state the default language of the document. Based on WCAG 2.0: [H57](https://www.w3.org/TR/WCAG20-TECHS/H57.html)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlRequiredLangAttribute", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML/Accessibility", + "index": 32, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlNonExistentInternetResource", + "shortDescription": { + "text": "Unresolved web link" + }, + "fullDescription": { + "text": "Reports an unresolved web link. Works by making network requests in the background.", + "markdown": "Reports an unresolved web link. Works by making network requests in the background." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlNonExistentInternetResource", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlRequiredTitleElement", + "shortDescription": { + "text": "Missing required 'title' element" + }, + "fullDescription": { + "text": "Reports a missing 'title' element inside a 'head' section. Suggests adding a 'title' element. The title should describe the document. Based on WCAG 2.0: H25.", + "markdown": "Reports a missing `title` element inside a `head` section. Suggests adding a `title` element. The title should describe the document. Based on WCAG 2.0: [H25](https://www.w3.org/TR/WCAG20-TECHS/H25.html)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlRequiredTitleElement", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML/Accessibility", + "index": 32, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlDeprecatedAttribute", + "shortDescription": { + "text": "Obsolete attribute" + }, + "fullDescription": { + "text": "Reports an obsolete HTML5 attribute.", + "markdown": "Reports an obsolete HTML5 attribute." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlDeprecatedAttribute", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlPresentationalElement", + "shortDescription": { + "text": "Presentational tag" + }, + "fullDescription": { + "text": "Reports a presentational HTML tag. Suggests replacing the presentational tag with a CSS or another tag.", + "markdown": "Reports a presentational HTML tag. Suggests replacing the presentational tag with a CSS or another tag." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HtmlPresentationalElement", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "Docker", + "version": "241.18034.45", + "rules": [ + { + "id": "ComposeMissingKeys", + "shortDescription": { + "text": "Missing docker-compose YAML keys" + }, + "fullDescription": { + "text": "Reports missing required keys in Docker Compose files.", + "markdown": "Reports missing required keys in Docker Compose files. " + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "ComposeMissingKeys", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Docker-compose", + "index": 36, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DockerFileAssignments", + "shortDescription": { + "text": "Invalid spaces in ''key=value'' pair" + }, + "fullDescription": { + "text": "Reports incorrect spacing for key-value pairs in 'ARG', 'ENV', and 'LABEL' commands. While it is not explicitly specified in the Dockerfile specification, some combinations of spacing for key-value pairs are not allowed. Docker build will fail after reaching the problem instruction. Examples: The 'ARG' command does not allow any spaces around '=' 'ENV' and 'LABEL' do not allow spaces after '=' '# all the commands below will fail\n ARG answer = 42\n ARG version= \"1.0.0\"\n LABEL \"maintained.by\"= someone@gmail.com\n ENV JAVA_HOME= \"/docker-java-home\"' After the quick-fix is applied: 'ARG answer=2\n ARG version=\"1.0.0\"\n LABEL \"maintained.by\"=someone@gmail.com\n ENV JAVA_HOME=\"/docker-java-home\"'", + "markdown": "Reports incorrect spacing for key-value pairs in `ARG`, `ENV`, and `LABEL` commands.\n\n\nWhile it is not explicitly specified in the [Dockerfile specification](https://docs.docker.com/engine/reference/builder/#arg),\nsome combinations of spacing for key-value pairs are not allowed.\nDocker build will fail after reaching the problem instruction.\n\n**Examples:**\n\n* The `ARG` command does not allow any spaces around '='\n* `ENV` and `LABEL` do not allow spaces after '='\n\n\n # all the commands below will fail\n ARG answer = 42\n ARG version= \"1.0.0\"\n LABEL \"maintained.by\"= someone@gmail.com\n ENV JAVA_HOME= \"/docker-java-home\"\n\nAfter the quick-fix is applied:\n\n\n ARG answer=2\n ARG version=\"1.0.0\"\n LABEL \"maintained.by\"=someone@gmail.com\n ENV JAVA_HOME=\"/docker-java-home\"\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DockerFileAssignments", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Dockerfile", + "index": 40, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DockerFileAddOrCopyPaths", + "shortDescription": { + "text": "Invalid destination for ''ADD''/''COPY'' commands" + }, + "fullDescription": { + "text": "Reports invalid destination directories in 'ADD' and 'COPY' commands. According to the Dockerfile specification, if multiple sources are specified, then the destination must be a directory, and it must end with a slash '/'. Otherwise, Docker build will fail. Examples: '# all the commands below will fail\n ADD textA.txt textB.txt relativeDir\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination\"]\n COPY text3.txt text4.txt /absolute/path' After the quick-fix is applied: 'ADD textA.txt textB.txt relativeDir/\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n COPY text3.txt text4.txt /absolute/path/'", + "markdown": "Reports invalid destination directories in `ADD` and `COPY` commands.\n\n\nAccording to the [Dockerfile specification](https://docs.docker.com/engine/reference/builder/#add),\nif multiple sources are specified, then the destination must be a directory, and it must end with a slash '/'.\nOtherwise, Docker build will fail.\n\n**Examples:**\n\n\n # all the commands below will fail\n ADD textA.txt textB.txt relativeDir\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination\"]\n COPY text3.txt text4.txt /absolute/path\n\nAfter the quick-fix is applied:\n\n\n ADD textA.txt textB.txt relativeDir/\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n COPY text3.txt text4.txt /absolute/path/\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "DockerFileAddOrCopyPaths", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Dockerfile", + "index": 40, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DockerFileRunCommandMissingContinuation", + "shortDescription": { + "text": "Missing continuation character for ''RUN'' command" + }, + "fullDescription": { + "text": "Reports missing continuation characters in 'RUN' command. In the shell form of 'RUN' command you should use a '\\' (backslash) to continue a single 'RUN' instruction onto the next line. Otherwise, Docker build will fail. Examples: '# the command below will fail\n RUN /bin/bash -c 'source $HOME/.bashrc;\n echo $HOME'' After the quick-fix is applied: 'RUN /bin/bash -c 'source $HOME/.bashrc; \\\n echo $HOME''", + "markdown": "Reports missing continuation characters in `RUN` command.\n\n\nIn the *shell* form of `RUN` command you should use a '\\\\' (backslash)\nto continue a single `RUN` instruction onto the next line.\nOtherwise, Docker build will fail.\n\n**Examples:**\n\n\n # the command below will fail\n RUN /bin/bash -c 'source $HOME/.bashrc;\n echo $HOME'\n\nAfter the quick-fix is applied:\n\n\n RUN /bin/bash -c 'source $HOME/.bashrc; \\\n echo $HOME'\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DockerFileRunCommandMissingContinuation", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Dockerfile", + "index": 40, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DockerJsonFormStringLiterals", + "shortDescription": { + "text": "A single quoted string in JSON array format" + }, + "fullDescription": { + "text": "Reports a single quoted string in JSON array format. JSON array form, must use double-quotes (\") around words not single-quotes ('). Otherwise, Docker build will fail. Examples: '# all the commands below will fail\n RUN ['/bin/bash', '-c', 'echo hello']\n ADD ['binaryA.jar', 'binary2.jar', 'destination/']\n COPY ['binaryA.jar', 'binary2.jar', 'destination/']' After the quick-fix is applied: 'RUN [\"/bin/bash\", \"-c\", \"echo hello\"]\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n COPY [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]'", + "markdown": "Reports a single quoted string in JSON array format.\n\n\nJSON array form, must use double-quotes (\") around words not single-quotes ('). Otherwise, Docker build will fail.\n\n**Examples:**\n\n\n # all the commands below will fail\n RUN ['/bin/bash', '-c', 'echo hello']\n ADD ['binaryA.jar', 'binary2.jar', 'destination/']\n COPY ['binaryA.jar', 'binary2.jar', 'destination/']\n\nAfter the quick-fix is applied:\n\n\n RUN [\"/bin/bash\", \"-c\", \"echo hello\"]\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n COPY [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "DockerJsonFormStringLiterals", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Dockerfile", + "index": 40, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ComposeUnknownValues", + "shortDescription": { + "text": "Unknown docker-compose YAML values" + }, + "fullDescription": { + "text": "Reports unrecognized values in Docker Compose files.", + "markdown": "Reports unrecognized values in Docker Compose files. " + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "ComposeUnknownValues", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Docker-compose", + "index": 36, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ComposeUnknownKeys", + "shortDescription": { + "text": "Unknown docker-compose YAML keys" + }, + "fullDescription": { + "text": "Reports unrecognized keys in Docker Compose files.", + "markdown": "Reports unrecognized keys in Docker Compose files. " + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "ComposeUnknownKeys", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Docker-compose", + "index": 36, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ComposeUnquotedPorts", + "shortDescription": { + "text": "Unquoted port mappings" + }, + "fullDescription": { + "text": "Reports unquoted port mappings in Docker Compose files. According to the Compose file specification, mapping ports in the 'HOST:CONTAINER' format may lead to erroneous results when using a container port lower than 60, because YAML parses numbers in the format 'xx:yy' as a base-60 value. For this reason, we recommend always explicitly specifying the port mappings as strings. Examples: 'ports:\n - 3000\n - 3000-3005\n - 22:22\n - 8080:8080' After the quick-fix is applied: 'ports:\n - \"3000\"\n - \"3000-3005\"\n - \"22:22\"\n - \"8080:8080\"'", + "markdown": "Reports unquoted port mappings in Docker Compose files.\n\n\nAccording to the [Compose file specification](https://docs.docker.com/compose/compose-file/compose-file-v3/#short-syntax-1),\nmapping ports in the `HOST:CONTAINER` format may lead to erroneous results when using a container port lower than 60,\nbecause YAML parses numbers in the format `xx:yy` as a base-60 value.\nFor this reason, we recommend always explicitly specifying the port mappings as strings.\n\n**Examples:**\n\n\n ports:\n - 3000\n - 3000-3005\n - 22:22\n - 8080:8080\n\nAfter the quick-fix is applied:\n\n\n ports:\n - \"3000\"\n - \"3000-3005\"\n - \"22:22\"\n - \"8080:8080\"\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ComposeUnquotedPorts", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Docker-compose", + "index": 36, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DockerFileArgumentCount", + "shortDescription": { + "text": "Wrong number of arguments" + }, + "fullDescription": { + "text": "Reports invalid number of arguments for the Dockerfile commands. Docker build will fail after reaching the instruction with an invalid number of arguments.", + "markdown": "Reports invalid number of arguments for the Dockerfile commands.\n\n\nDocker build will fail after reaching the instruction with an invalid number of arguments." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DockerFileArgumentCount", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Dockerfile", + "index": 40, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij.css", + "version": "241.18034.45", + "rules": [ + { + "id": "CssInvalidHtmlTagReference", + "shortDescription": { + "text": "Invalid type selector" + }, + "fullDescription": { + "text": "Reports a CSS type selector that matches an unknown HTML element.", + "markdown": "Reports a CSS [type selector](https://developer.mozilla.org/en-US/docs/Web/CSS/Type_selectors) that matches an unknown HTML element." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssInvalidHtmlTagReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidCustomPropertyAtRuleDeclaration", + "shortDescription": { + "text": "Invalid @property declaration" + }, + "fullDescription": { + "text": "Reports a missing required syntax, inherits, or initial-value property in a declaration of a custom property.", + "markdown": "Reports a missing required [syntax](https://developer.mozilla.org/en-US/docs/web/css/@property/syntax), [inherits](https://developer.mozilla.org/en-US/docs/web/css/@property/inherits), or [initial-value](https://developer.mozilla.org/en-US/docs/web/css/@property/initial-value) property in a declaration of a custom property." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidCustomPropertyAtRuleDeclaration", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidFunction", + "shortDescription": { + "text": "Invalid function" + }, + "fullDescription": { + "text": "Reports an unknown CSS function or an incorrect function parameter.", + "markdown": "Reports an unknown [CSS function](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Functions) or an incorrect function parameter." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidFunction", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssMissingSemicolon", + "shortDescription": { + "text": "Missing semicolon" + }, + "fullDescription": { + "text": "Reports a missing semicolon at the end of a declaration.", + "markdown": "Reports a missing semicolon at the end of a declaration." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssMissingSemicolon", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Code style issues", + "index": 49, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssRedundantUnit", + "shortDescription": { + "text": "Redundant measure unit" + }, + "fullDescription": { + "text": "Reports a measure unit of a zero value where units are not required by the specification. Example: 'width: 0px'", + "markdown": "Reports a measure unit of a zero value where units are not required by the specification.\n\n**Example:**\n\n width: 0px\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssRedundantUnit", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Code style issues", + "index": 49, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssMissingComma", + "shortDescription": { + "text": "Missing comma in selector list" + }, + "fullDescription": { + "text": "Reports a multi-line selector. Most likely this means that several single-line selectors are actually intended but a comma is missing at the end of one or several lines. Example: 'input /* comma has probably been forgotten */\n.button {\n margin: 1px;\n}'", + "markdown": "Reports a multi-line selector. Most likely this means that several single-line selectors are actually intended but a comma is missing at the end of one or several lines.\n\n**Example:**\n\n\n input /* comma has probably been forgotten */\n .button {\n margin: 1px;\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssMissingComma", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Probable bugs", + "index": 61, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidPropertyValue", + "shortDescription": { + "text": "Invalid property value" + }, + "fullDescription": { + "text": "Reports an incorrect CSS property value.", + "markdown": "Reports an incorrect CSS property value." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidPropertyValue", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssBrowserCompatibilityForProperties", + "shortDescription": { + "text": "Property is incompatible with selected browsers" + }, + "fullDescription": { + "text": "Reports a CSS property that is not supported by the specified browsers. Based on the MDN Compatibility Data.", + "markdown": "Reports a CSS property that is not supported by the specified browsers. Based on the [MDN Compatibility Data](https://github.com/mdn/browser-compat-data)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssBrowserCompatibilityForProperties", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidCustomPropertyAtRuleName", + "shortDescription": { + "text": "Invalid @property name" + }, + "fullDescription": { + "text": "Reports an invalid custom property name. Custom property name should be prefixed with two dashes. Example: '@property invalid-property-name {\n ...\n}\n\n@property --valid-property-name {\n ...\n}'", + "markdown": "Reports an invalid custom property name. Custom property name should be prefixed with two dashes.\n\n**Example:**\n\n\n @property invalid-property-name {\n ...\n }\n\n @property --valid-property-name {\n ...\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidCustomPropertyAtRuleName", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssConvertColorToHexInspection", + "shortDescription": { + "text": "Color could be replaced with #-hex" + }, + "fullDescription": { + "text": "Reports an 'rgb()', 'hsl()', or other color function. Suggests replacing a color function with an equivalent hexadecimal notation. Example: 'rgb(12, 15, 255)' After the quick-fix is applied: '#0c0fff'.", + "markdown": "Reports an `rgb()`, `hsl()`, or other color function.\n\nSuggests replacing a color function with an equivalent hexadecimal notation.\n\n**Example:**\n\n rgb(12, 15, 255)\n\nAfter the quick-fix is applied:\n\n #0c0fff.\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssConvertColorToHexInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssReplaceWithShorthandUnsafely", + "shortDescription": { + "text": "Properties may probably be replaced with a shorthand" + }, + "fullDescription": { + "text": "Reports a set of longhand CSS properties and suggests replacing an incomplete set of longhand CSS properties with a shorthand form, which is however not 100% equivalent in this case. For example, 2 properties: 'outline-color' and 'outline-style' may be replaced with a single 'outline'. Such replacement is not 100% equivalent because shorthands reset all omitted sub-values to their initial states. In this example, switching to the 'outline' shorthand means that 'outline-width' is also set to its initial value, which is 'medium'. This inspection doesn't handle full sets of longhand properties (when switching to shorthand is 100% safe). For such cases see the 'Properties may be safely replaced with a shorthand' inspection instead.", + "markdown": "Reports a set of longhand CSS properties and suggests replacing an incomplete set of longhand CSS properties with a shorthand form, which is however not 100% equivalent in this case.\n\n\nFor example, 2 properties: `outline-color` and `outline-style` may be replaced with a single `outline`.\nSuch replacement is not 100% equivalent because shorthands reset all omitted sub-values to their initial states.\nIn this example, switching to the `outline` shorthand means that `outline-width` is also set to its initial value,\nwhich is `medium`.\n\n\nThis inspection doesn't handle full sets of longhand properties (when switching to shorthand is 100% safe).\nFor such cases see the 'Properties may be safely replaced with a shorthand' inspection instead." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "CssReplaceWithShorthandUnsafely", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssUnknownUnit", + "shortDescription": { + "text": "Unknown unit" + }, + "fullDescription": { + "text": "Reports an unknown unit.", + "markdown": "Reports an unknown unit." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssUnknownUnit", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidMediaFeature", + "shortDescription": { + "text": "Invalid media feature" + }, + "fullDescription": { + "text": "Reports an unknown CSS media feature or an incorrect media feature value.", + "markdown": "Reports an unknown [CSS media feature](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries) or an incorrect media feature value." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidMediaFeature", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssConvertColorToRgbInspection", + "shortDescription": { + "text": "Color could be replaced with rgb()" + }, + "fullDescription": { + "text": "Reports an 'hsl()' or 'hwb()' color function or a hexadecimal color notation. Suggests replacing such color value with an equivalent 'rgb()' or 'rgba()' color function. Example: '#0c0fff' After the quick-fix is applied: 'rgb(12, 15, 255)'.", + "markdown": "Reports an `hsl()` or `hwb()` color function or a hexadecimal color notation.\n\nSuggests replacing such color value with an equivalent `rgb()` or `rgba()` color function.\n\n**Example:**\n\n #0c0fff\n\nAfter the quick-fix is applied:\n\n rgb(12, 15, 255).\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssConvertColorToRgbInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssUnusedSymbol", + "shortDescription": { + "text": "Unused selector" + }, + "fullDescription": { + "text": "Reports a CSS class or an element IDs that appears in selectors but is not used in HTML. Note that complete inspection results are available only when running it via Code | Inspect Code or Code | Analyze Code | Run Inspection by Name. Due to performance reasons, style sheet files are not inspected on the fly.", + "markdown": "Reports a CSS class or an element IDs that appears in selectors but is not used in HTML.\n\n\nNote that complete inspection results are available only when running it via **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name**.\nDue to performance reasons, style sheet files are not inspected on the fly." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssUnusedSymbol", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssDeprecatedValue", + "shortDescription": { + "text": "Deprecated value" + }, + "fullDescription": { + "text": "Reports a deprecated CSS value. Suggests replacing the deprecated value with its valid equivalent.", + "markdown": "Reports a deprecated CSS value. Suggests replacing the deprecated value with its valid equivalent." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssDeprecatedValue", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssNonIntegerLengthInPixels", + "shortDescription": { + "text": "Non-integer length in pixels" + }, + "fullDescription": { + "text": "Reports a non-integer length in pixels. Example: 'width: 3.14px'", + "markdown": "Reports a non-integer length in pixels.\n\n**Example:**\n\n width: 3.14px\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "CssNonIntegerLengthInPixels", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Probable bugs", + "index": 61, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidImport", + "shortDescription": { + "text": "Misplaced @import" + }, + "fullDescription": { + "text": "Reports a misplaced '@import' statement. According to the specification, '@import' rules must precede all other types of rules, except '@charset' rules.", + "markdown": "Reports a misplaced `@import` statement.\n\n\nAccording to the [specification](https://developer.mozilla.org/en-US/docs/Web/CSS/@import),\n`@import` rules must precede all other types of rules, except `@charset` rules." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssInvalidImport", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidAtRule", + "shortDescription": { + "text": "Unknown at-rule" + }, + "fullDescription": { + "text": "Reports an unknown CSS at-rule.", + "markdown": "Reports an unknown [CSS at-rule](https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidAtRule", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssUnresolvedCustomProperty", + "shortDescription": { + "text": "Unresolved custom property" + }, + "fullDescription": { + "text": "Reports an unresolved reference to a custom property among the arguments of the 'var()' function.", + "markdown": "Reports an unresolved reference to a [custom property](https://developer.mozilla.org/en-US/docs/Web/CSS/--*) among the arguments of the `var()` function." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssUnresolvedCustomProperty", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssOverwrittenProperties", + "shortDescription": { + "text": "Overwritten property" + }, + "fullDescription": { + "text": "Reports a duplicated CSS property within a ruleset. Respects shorthand properties. Example: '.foo {\n margin-bottom: 1px;\n margin-bottom: 1px; /* duplicates margin-bottom */\n margin: 0; /* overrides margin-bottom */\n}'", + "markdown": "Reports a duplicated CSS property within a ruleset. Respects shorthand properties.\n\n**Example:**\n\n\n .foo {\n margin-bottom: 1px;\n margin-bottom: 1px; /* duplicates margin-bottom */\n margin: 0; /* overrides margin-bottom */\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssOverwrittenProperties", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssUnknownTarget", + "shortDescription": { + "text": "Unresolved file reference" + }, + "fullDescription": { + "text": "Reports an unresolved file reference, for example, an incorrect path in an '@import' statement.", + "markdown": "Reports an unresolved file reference, for example, an incorrect path in an `@import` statement." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssUnknownTarget", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssNegativeValue", + "shortDescription": { + "text": "Negative property value" + }, + "fullDescription": { + "text": "Reports a negative value of a CSS property that is not expected to be less than zero, for example, object width or height.", + "markdown": "Reports a negative value of a CSS property that is not expected to be less than zero, for example, object width or height." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssNegativeValue", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssNoGenericFontName", + "shortDescription": { + "text": "Missing generic font family name" + }, + "fullDescription": { + "text": "Verifies that the 'font-family' property contains a generic font family name as a fallback alternative. Generic font family names are: 'serif', 'sans-serif', 'cursive', 'fantasy', and 'monospace'.", + "markdown": "Verifies that the [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) property contains a generic font family name as a fallback alternative.\n\n\nGeneric font family names are: `serif`, `sans-serif`, `cursive`, `fantasy`,\nand `monospace`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssNoGenericFontName", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Probable bugs", + "index": 61, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssUnresolvedClassInComposesRule", + "shortDescription": { + "text": "Unresolved class in 'composes' rule" + }, + "fullDescription": { + "text": "Reports a CSS class reference in the 'composes' rule that cannot be resolved to any valid target. Example: '.className {/* ... */}\n\n .otherClassName {\n composes: className;\n }'", + "markdown": "Reports a CSS class reference in the ['composes'](https://github.com/css-modules/css-modules#composition) rule that cannot be resolved to any valid target.\n\n**Example:**\n\n\n .className {/* ... */}\n\n .otherClassName {\n composes: className;\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssUnresolvedClassInComposesRule", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidCharsetRule", + "shortDescription": { + "text": "Misplaced or incorrect @charset" + }, + "fullDescription": { + "text": "Reports a misplaced '@charset' at-rule or an incorrect charset value.", + "markdown": "Reports a misplaced `@charset` at-rule or an incorrect charset value." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssInvalidCharsetRule", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssReplaceWithShorthandSafely", + "shortDescription": { + "text": "Properties may be safely replaced with a shorthand" + }, + "fullDescription": { + "text": "Reports a set of longhand properties. Suggests replacing a complete set of longhand CSS properties with an equivalent shorthand form. For example, 4 properties: 'padding-top', 'padding-right', 'padding-bottom', and 'padding-left' can be safely replaced with a single 'padding' property. Note that this inspection doesn't show up if the set of longhand properties is incomplete (e.g. only 3 'padding-xxx' properties in a ruleset) because switching to a shorthand may change the result. For such cases consider the 'Properties may probably be replaced with a shorthand' inspection.", + "markdown": "Reports a set of longhand properties. Suggests replacing a complete set of longhand CSS properties with an equivalent shorthand form.\n\n\nFor example, 4 properties: `padding-top`, `padding-right`, `padding-bottom`, and\n`padding-left`\ncan be safely replaced with a single `padding` property.\n\n\nNote that this inspection doesn't show up if the set of longhand properties is incomplete\n(e.g. only 3 `padding-xxx` properties in a ruleset)\nbecause switching to a shorthand may change the result.\nFor such cases consider the 'Properties may probably be replaced with a shorthand'\ninspection." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "CssReplaceWithShorthandSafely", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssUnknownProperty", + "shortDescription": { + "text": "Unknown property" + }, + "fullDescription": { + "text": "Reports an unknown CSS property or a property used in a wrong context. Add the unknown property to the 'Custom CSS properties' list to skip validation.", + "markdown": "Reports an unknown CSS property or a property used in a wrong context.\n\nAdd the unknown property to the 'Custom CSS properties' list to skip validation." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssUnknownProperty", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidPseudoSelector", + "shortDescription": { + "text": "Invalid pseudo-selector" + }, + "fullDescription": { + "text": "Reports an incorrect CSS pseudo-class pseudo-element.", + "markdown": "Reports an incorrect CSS [pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes) [pseudo-element](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidPseudoSelector", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidNestedSelector", + "shortDescription": { + "text": "Invalid nested selector" + }, + "fullDescription": { + "text": "Reports a nested selector starting with an identifier or a functional notation.", + "markdown": "Reports a nested selector starting with an identifier or a functional notation." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssInvalidNestedSelector", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.jetbrains.plugins.yaml", + "version": "241.18034.45", + "rules": [ + { + "id": "YAMLSchemaValidation", + "shortDescription": { + "text": "Validation by JSON Schema" + }, + "fullDescription": { + "text": "Reports inconsistencies between a YAML file and a JSON Schema if the schema is specified. Scheme example: '{\n \"properties\": {\n \"SomeNumberProperty\": {\n \"type\": \"number\"\n }\n }\n }' The following is an example with the corresponding warning: 'SomeNumberProperty: hello world'", + "markdown": "Reports inconsistencies between a YAML file and a JSON Schema if the schema is specified.\n\n**Scheme example:**\n\n\n {\n \"properties\": {\n \"SomeNumberProperty\": {\n \"type\": \"number\"\n }\n }\n }\n\n**The following is an example with the corresponding warning:**\n\n\n SomeNumberProperty: hello world\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "YAMLSchemaValidation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 45, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAMLIncompatibleTypes", + "shortDescription": { + "text": "Suspicious type mismatch" + }, + "fullDescription": { + "text": "Reports a mismatch between a scalar value type in YAML file and types of the values in the similar positions. Example: 'myElements:\n - value1\n - value2\n - false # <- reported, because it is a boolean value, while other values are strings'", + "markdown": "Reports a mismatch between a scalar value type in YAML file and types of the values in the similar positions.\n\n**Example:**\n\n\n myElements:\n - value1\n - value2\n - false # <- reported, because it is a boolean value, while other values are strings\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "YAMLIncompatibleTypes", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 45, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAMLUnresolvedAlias", + "shortDescription": { + "text": "Unresolved alias" + }, + "fullDescription": { + "text": "Reports unresolved aliases in YAML files. Example: 'some_key: *unknown_alias'", + "markdown": "Reports unresolved aliases in YAML files.\n\n**Example:**\n\n\n some_key: *unknown_alias\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "YAMLUnresolvedAlias", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 45, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAMLSchemaDeprecation", + "shortDescription": { + "text": "Deprecated YAML key" + }, + "fullDescription": { + "text": "Reports deprecated keys in YAML files. Deprecation is checked only if there exists a JSON schema associated with the corresponding YAML file. Note that the deprecation mechanism is not defined in the JSON Schema specification yet, and this inspection uses a non-standard 'deprecationMessage' extension. Scheme deprecation example: '{\n \"properties\": {\n \"SomeDeprecatedProperty\": {\n \"deprecationMessage\": \"Baz\",\n \"description\": \"Foo bar\"\n }\n }\n }' The following is an example with the corresponding warning: 'SomeDeprecatedProperty: some value'", + "markdown": "Reports deprecated keys in YAML files.\n\nDeprecation is checked only if there exists a JSON schema associated with the corresponding YAML file.\n\nNote that the deprecation mechanism is not defined in the JSON Schema specification yet,\nand this inspection uses a non-standard `deprecationMessage` extension.\n\n**Scheme deprecation example:**\n\n\n {\n \"properties\": {\n \"SomeDeprecatedProperty\": {\n \"deprecationMessage\": \"Baz\",\n \"description\": \"Foo bar\"\n }\n }\n }\n\n**The following is an example with the corresponding warning:**\n\n\n SomeDeprecatedProperty: some value\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "YAMLSchemaDeprecation", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 45, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAMLRecursiveAlias", + "shortDescription": { + "text": "Recursive alias" + }, + "fullDescription": { + "text": "Reports recursion in YAML aliases. Alias can't be recursive and be used inside the data referenced by a corresponding anchor. Example: 'some_key: &some_anchor\n sub_key1: value1\n sub_key2: *some_anchor'", + "markdown": "Reports recursion in YAML aliases.\n\nAlias can't be recursive and be used inside the data referenced by a corresponding anchor.\n\n**Example:**\n\n\n some_key: &some_anchor\n sub_key1: value1\n sub_key2: *some_anchor\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "YAMLRecursiveAlias", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 45, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAMLDuplicatedKeys", + "shortDescription": { + "text": "Duplicated YAML keys" + }, + "fullDescription": { + "text": "Reports duplicated keys in YAML files. Example: 'same_key: some value\n same_key: another value'", + "markdown": "Reports duplicated keys in YAML files.\n\n**Example:**\n\n\n same_key: some value\n same_key: another value\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "YAMLDuplicatedKeys", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 45, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAMLUnusedAnchor", + "shortDescription": { + "text": "Unused anchor" + }, + "fullDescription": { + "text": "Reports unused anchors. Example: 'some_key: &some_anchor\n key1: value1'", + "markdown": "Reports unused anchors.\n\n**Example:**\n\n\n some_key: &some_anchor\n key1: value1\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "YAMLUnusedAnchor", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 45, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.jetbrains.plugins.less", + "version": "241.18034.45", + "rules": [ + { + "id": "LessUnresolvedMixin", + "shortDescription": { + "text": "Unresolved mixin" + }, + "fullDescription": { + "text": "Reports a reference to a Less mixin that is not resolved. Example: '* {\n .unknown-mixin();\n}'", + "markdown": "Reports a reference to a [Less mixin](http://lesscss.org/features/#mixins-feature) that is not resolved.\n\n**Example:**\n\n\n * {\n .unknown-mixin();\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LessUnresolvedMixin", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Less", + "index": 50, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LessUnresolvedVariable", + "shortDescription": { + "text": "Unresolved variable" + }, + "fullDescription": { + "text": "Reports a reference to a Less variable that is not resolved. Example: '* {\n margin: @unknown-var;\n}'", + "markdown": "Reports a reference to a [Less variable](http://lesscss.org/features/#variables-feature) that is not resolved.\n\n**Example:**\n\n\n * {\n margin: @unknown-var;\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LessUnresolvedVariable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Less", + "index": 50, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LessResolvedByNameOnly", + "shortDescription": { + "text": "Missing import" + }, + "fullDescription": { + "text": "Reports a reference to a variable or mixin that is declared in another file, which is not explicitly imported in the current file. Example: '* {\n margin: @var-in-other-file;\n}'", + "markdown": "Reports a reference to a variable or mixin that is declared in another file, which is not explicitly [imported](http://lesscss.org/features/#import-atrules-feature) in the current file.\n\n**Example:**\n\n\n * {\n margin: @var-in-other-file;\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "LessResolvedByNameOnly", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Less", + "index": 50, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.intellij.intelliLang", + "version": "241.18034.45", + "rules": [ + { + "id": "InjectedReferences", + "shortDescription": { + "text": "Injected references" + }, + "fullDescription": { + "text": "Reports unresolved references injected by Language Injections. Example: '@Language(\"file-reference\")\n String fileName = \"/home/user/nonexistent.file\"; // highlighted if file doesn't exist'", + "markdown": "Reports unresolved references injected by [Language Injections](https://www.jetbrains.com/help/idea/using-language-injections.html).\n\nExample:\n\n\n @Language(\"file-reference\")\n String fileName = \"/home/user/nonexistent.file\"; // highlighted if file doesn't exist\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "error", + "parameters": { + "suppressToolId": "InjectedReferences", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.jetbrains.plugins.vue", + "version": "241.18034.45", + "rules": [ + { + "id": "VueDataFunction", + "shortDescription": { + "text": "Data function" + }, + "fullDescription": { + "text": "Reports a Vue component data property that is not a function. Suggests wrapping an object literal with a function. When defining a component, 'data' must be declared as a function that returns the initial data object, because the same definition will be used for creating numerous instances. If a plain object is still used for 'data', that very object will be shared by reference across all instances created! With a 'data' function, every time a new instance is created we can simply call it to return a fresh copy of the initial data.", + "markdown": "Reports a Vue component [data](https://vuejs.org/v2/api/#data) property that is not a function. Suggests wrapping an object literal with a function.\n\nWhen defining a component, `data` must be declared as a function that returns the initial data object, because the same definition will be used for creating numerous instances. If a plain object is still used for `data`, that very object will be shared by reference across all instances created! With a `data` function, every time a new instance is created we can simply call it to return a fresh copy of the initial data." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "VueDataFunction", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Vue", + "index": 52, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "VueUnrecognizedSlot", + "shortDescription": { + "text": "Unrecognized slot" + }, + "fullDescription": { + "text": "Reports an unrecognized Vue slot.", + "markdown": "Reports an unrecognized Vue slot." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "VueUnrecognizedSlot", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Vue", + "index": 52, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "VueMissingComponentImportInspection", + "shortDescription": { + "text": "Missing component import" + }, + "fullDescription": { + "text": "Reports Vue components, which require to be imported in Vue templates. It provides a quick fix to add the missing import.", + "markdown": "Reports Vue components, which require to be imported in Vue templates. It provides a quick fix to add the missing import." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "VueMissingComponentImportInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Vue", + "index": 52, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "VueUnrecognizedDirective", + "shortDescription": { + "text": "Unrecognized directive" + }, + "fullDescription": { + "text": "Reports an unrecognized Vue directive.", + "markdown": "Reports an unrecognized Vue directive." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "VueUnrecognizedDirective", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Vue", + "index": 52, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "VueDuplicateTag", + "shortDescription": { + "text": "Duplicate template/script tag" + }, + "fullDescription": { + "text": "Reports multiple usages of the 'template' or 'script' tag in a Vue file. Vue Component specification indicates that each '*.vue' file can contain at most one 'template' or 'script' block at a time.", + "markdown": "Reports multiple usages of the `template` or `script` tag in a Vue file.\n\n[Vue Component specification](https://vue-loader.vuejs.org/spec.html) indicates that each `*.vue` file can contain at most one `template` or `script` block at a time." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "VueDuplicateTag", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Vue", + "index": 52, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "VueDeprecatedSymbol", + "shortDescription": { + "text": "Deprecated symbol" + }, + "fullDescription": { + "text": "Reports a deprecated Vue symbol.", + "markdown": "Reports a deprecated Vue symbol." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "VueDeprecatedSymbol", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Vue", + "index": 52, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.intellij.qodana", + "version": "241.18034.8", + "rules": [ + { + "id": "JsCoverageInspection", + "shortDescription": { + "text": "Check JavaScript and TypeScript source code coverage" + }, + "fullDescription": { + "text": "Reports methods, classes and files whose coverage is below a certain threshold.", + "markdown": "Reports methods, classes and files whose coverage is below a certain threshold." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsCoverageInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Code Coverage", + "index": 67, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "QodanaSanity", + "shortDescription": { + "text": "Sanity" + }, + "fullDescription": { + "text": "Reports issues essential to this file like syntax errors, unresolved methods and variables, etc...", + "markdown": "Reports issues essential to this file like syntax errors, unresolved methods and variables, etc..." + }, + "defaultConfiguration": { + "enabled": true, + "level": "error", + "parameters": { + "suppressToolId": "QodanaSanity", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Qodana", + "index": 76, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.jetbrains.plugins.github", + "version": "241.18034.45", + "rules": [ + { + "id": "GithubFunctionSignatureValidation", + "shortDescription": { + "text": "Standard library functions validation" + }, + "fullDescription": { + "text": "Reports invalid GitHub Actions Expression language standard library function calls For more information on GitHub Actions Expression language, see the GitHub documentation.", + "markdown": "Reports invalid GitHub Actions Expression language standard library function calls\n\n\nFor more information on GitHub Actions Expression language, see the [GitHub documentation](https://docs.github.com/en/actions/learn-github-actions/expressions)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "GithubFunctionSignatureValidation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "GitHub actions", + "index": 69, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UndefinedParamsPresent", + "shortDescription": { + "text": "Undefined action parameters" + }, + "fullDescription": { + "text": "Reports the presence of parameters which are not defined in an action. It also provides a Quick Fix by removing the undefined parameters. For more information on action params, see the GitHub documentation.", + "markdown": "Reports the presence of parameters which are not defined in an action. It also provides a Quick Fix by removing the undefined parameters.\n\n\nFor more information on action params, see the [GitHub documentation](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runsstepswith)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UndefinedParamsPresent", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "GitHub actions", + "index": 69, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MandatoryParamsAbsent", + "shortDescription": { + "text": "Invalid action parameters" + }, + "fullDescription": { + "text": "Reports the absence of mandatory parameters that do not have a default value for an action. It also provides a Quick Fix by adding the missing parameters with an empty value. For more information on action params, see the GitHub documentation.", + "markdown": "Reports the absence of mandatory parameters that do not have a default value for an action. It also provides a Quick Fix by adding the missing parameters with an empty value.\n\n\nFor more information on action params, see the [GitHub documentation](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runsstepswith)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "MandatoryParamsAbsent", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "GitHub actions", + "index": 69, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UndefinedAction", + "shortDescription": { + "text": "Undefined action reference" + }, + "fullDescription": { + "text": "Detects unresolved action references in GitHub action and workflow files. For more information on action references, see the GitHub documentation.", + "markdown": "Detects unresolved action references in GitHub action and workflow files.\n\n\nFor more information on action references, see the [GitHub documentation](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsuses)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UndefinedAction", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "GitHub actions", + "index": 69, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij.stylelint", + "version": "241.18034.45", + "rules": [ + { + "id": "Stylelint", + "shortDescription": { + "text": "Stylelint" + }, + "fullDescription": { + "text": "Reports a discrepancy detected by the Stylelint linter. The highlighting is based on the rule severity specified in the Stylelint configuration file for each individual rule.", + "markdown": "Reports a discrepancy detected by the [Stylelint](http://stylelint.io) linter. \n\nThe highlighting is based on the rule severity specified in the [Stylelint configuration file](https://stylelint.io/user-guide/configure) for each individual rule." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "Stylelint", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Code quality tools", + "index": 71, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "intellij.webpack", + "version": "241.18034.45", + "rules": [ + { + "id": "WebpackConfigHighlighting", + "shortDescription": { + "text": "Webpack config compliance with JSON Schema" + }, + "fullDescription": { + "text": "Validates options in webpack config files (which name should start with `webpack`, e.g. `webpack.config.js`) against webpack options schema. Disable this inspection to turn off validation and code completion inside the configuration object.", + "markdown": "Validates options in webpack config files (which name should start with \\`webpack\\`, e.g. \\`webpack.config.js\\`) against [webpack options schema](https://github.com/webpack/webpack/blob/master/schemas/WebpackOptions.json). \n\nDisable this inspection to turn off validation and code completion inside the configuration object." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "WebpackConfigHighlighting", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "tslint", + "version": "241.18034.45", + "rules": [ + { + "id": "TsLint", + "shortDescription": { + "text": "TSLint" + }, + "fullDescription": { + "text": "Reports a discrepancy detected by the TSLint linter. The highlighting is based on the rule severity specified in the TSLint configuration file for each individual rule. Clear the 'Use rule severity from the configuration file' checkbox to use the severity configured in this inspection for all TSLint rules.", + "markdown": "Reports a discrepancy detected by the [TSLint](https://github.com/palantir/tslint) linter. \n\nThe highlighting is based on the rule severity specified in the [TSLint configuration file](https://palantir.github.io/tslint/usage/configuration/) for each individual rule. \n\nClear the 'Use rule severity from the configuration file' checkbox to use the severity configured in this inspection for all TSLint rules." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TsLint", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code quality tools", + "index": 66, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij.jsonpath", + "version": "241.18034.45", + "rules": [ + { + "id": "JsonPathEvaluateUnknownKey", + "shortDescription": { + "text": "Unknown property key used for JSONPath evaluate expression" + }, + "fullDescription": { + "text": "Reports a key in a JSONPath expression that is missing in the source JSON document to evaluate.", + "markdown": "Reports a key in a JSONPath expression that is missing in the source JSON document to evaluate." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsonPathEvaluateUnknownKey", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JSONPath", + "index": 75, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JsonPathUnknownFunction", + "shortDescription": { + "text": "Unknown JSONPath function" + }, + "fullDescription": { + "text": "Reports an unknown name in a JSONPath function call instead of known standard function names: 'concat', 'keys', 'length', 'min', 'max', 'avg', 'stddev', 'sum'.", + "markdown": "Reports an unknown name in a JSONPath function call instead of known standard function names: `concat`, `keys`, `length`, `min`, `max`, `avg`, `stddev`, `sum`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsonPathUnknownFunction", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JSONPath", + "index": 75, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JsonPathUnknownOperator", + "shortDescription": { + "text": "Unknown JSONPath operator" + }, + "fullDescription": { + "text": "Reports an unknown operator on a JSONPath expression instead of one of the standard ones: 'in', 'nin', 'subsetof', 'anyof', 'noneof', 'size', 'empty', 'contains'.", + "markdown": "Reports an unknown operator on a JSONPath expression instead of one of the standard ones: `in`, `nin`, `subsetof`, `anyof`, `noneof`, `size`, `empty`, `contains`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsonPathUnknownOperator", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JSONPath", + "index": 75, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "tanvd.grazi", + "version": "241.18034.45", + "rules": [ + { + "id": "LanguageDetectionInspection", + "shortDescription": { + "text": "Natural language detection" + }, + "fullDescription": { + "text": "Detects natural languages and suggests enabling corresponding grammar and spelling checks.", + "markdown": "Detects natural languages and suggests enabling corresponding grammar and spelling checks." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LanguageDetectionInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Proofreading", + "index": 68, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "GrazieInspection", + "shortDescription": { + "text": "Grammar" + }, + "fullDescription": { + "text": "Reports grammar mistakes in your text. You can configure the inspection in Settings | Editor | Natural Languages | Grammar.", + "markdown": "Reports grammar mistakes in your text. You can configure the inspection in [Settings \\| Editor \\| Natural Languages \\| Grammar](settings://reference.settingsdialog.project.grazie)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "GrazieInspection", + "ideaSeverity": "GRAMMAR_ERROR", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "Proofreading", + "index": 68, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.toml.lang", + "version": "241.18034.45", + "rules": [ + { + "id": "TomlUnresolvedReference", + "shortDescription": { + "text": "Unresolved reference" + }, + "fullDescription": { + "text": "Reports unresolved references in TOML files.", + "markdown": "Reports unresolved references in TOML files." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "TomlUnresolvedReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "TOML", + "index": 80, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + } + ] + }, + "invocations": [ + { + "startTimeUtc": "2024-08-05T01:26:57.0086298Z", + "exitCode": 0, + "executionSuccessful": true + } + ], + "language": "en-US", + "versionControlProvenance": [ + { + "repositoryUri": "https://github.com/opentibiabr/canary.git", + "revisionId": "43fdb88ea14c24d58ac7c9cd50b28c5196f9c5d3", + "branch": "main", + "properties": { + "repoUrl": "https://github.com/opentibiabr/canary.git", + "lastAuthorName": "Renato Foot Guimarães Costallat", + "vcsType": "Git", + "lastAuthorEmail": "costallat@hotmail.com" + } + } + ], + "results": [ + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3112, + "startColumn": 2, + "charOffset": 95313, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3110, + "startColumn": 1, + "charOffset": 95306, + "charLength": 186, + "snippet": { + "text": "\t}\r\n\r\n\tuint16_t amount = msg.get();\r\n\tuint64_t price = oldProtocol ? static_cast(msg.get()) : msg.get();\r\n\tbool anonymous = (msg.getByte() != 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7f50018899484f2f", + "equalIndicator/v1": "002ce4e3c9047eedc500d63944d02fc7ce8ea38a0dfd3e3f99c06ceef1158c97" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'signed char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'signed char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 120, + "startColumn": 54, + "charOffset": 4409, + "charLength": 9, + "snippet": { + "text": "centerPos" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 118, + "startColumn": 1, + "charOffset": 4289, + "charLength": 333, + "snippet": { + "text": "\tif (multifloor) {\r\n\t\tif (centerPos.z > MAP_INIT_SURFACE_LAYER) {\r\n\t\t\tminRangeZ = static_cast(std::max(centerPos.z - MAP_LAYER_VIEW_LIMIT, 0u));\r\n\t\t\tmaxRangeZ = static_cast(std::min(centerPos.z + MAP_LAYER_VIEW_LIMIT, MAP_MAX_LAYERS - 1));\r\n\t\t} else if (centerPos.z == MAP_INIT_SURFACE_LAYER - 1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4fc5526566efba35", + "equalIndicator/v1": "004d334de55f140a7b9942527421c319880c44ed00f7575e0662732eca02a2cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1038, + "startColumn": 100, + "charOffset": 39484, + "charLength": 6, + "snippet": { + "text": "corpse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1036, + "startColumn": 1, + "charOffset": 39371, + "charLength": 239, + "snippet": { + "text": "\r\n// Monster\r\nvoid EventCallback::monsterOnDropLoot(std::shared_ptr monster, std::shared_ptr corpse) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::monsterOnDropLoot - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d88af56504dd865f", + "equalIndicator/v1": "004fb00d6d7fe1aa3f378e2253d7d8adc92ce7344b4fa9fe1cebce5ff8f58e37" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1216, + "startColumn": 7, + "charOffset": 46383, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1214, + "startColumn": 1, + "charOffset": 46259, + "charLength": 276, + "snippet": { + "text": "\r\nvoid EventCallback::zoneAfterCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureLeave - \"\r\n\t\t \"Zone {} Creature {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "14e9ffd99da27466", + "equalIndicator/v1": "00506df460be7534e24eefe56822e9a0f2228b554f549f8c43be7dfb971f000f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1200, + "startColumn": 41, + "charOffset": 45764, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1198, + "startColumn": 1, + "charOffset": 45718, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd2302c1a1bdb0b8", + "equalIndicator/v1": "005d3d29d53506de065563e6127b224c6de4f5b38b5b0755af5bfb696d17cfe9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1937, + "startColumn": 2, + "charOffset": 59034, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1935, + "startColumn": 1, + "charOffset": 58967, + "charLength": 229, + "snippet": { + "text": "\r\nvoid ProtocolGame::parsePlayerBuyOnShop(NetworkMessage &msg) {\r\n\tuint16_t id = msg.get();\r\n\tuint8_t count = msg.getByte();\r\n\tuint16_t amount = oldProtocol ? static_cast(msg.getByte()) : msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5a2e28489ef0999e", + "equalIndicator/v1": "00686a79b6f8930a89ad12d9036583ef29efb7130b7706d2c5db1707c7bee443" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1110, + "startColumn": 38, + "charOffset": 32995, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1108, + "startColumn": 1, + "charOffset": 32835, + "charLength": 350, + "snippet": { + "text": "\r\n\t\tif (!mType->info.soundVector.empty() && (mType->info.soundChance >= static_cast(uniform_random(1, 100)))) {\r\n\t\t\tint64_t index = uniform_random(0, static_cast(mType->info.soundVector.size() - 1));\r\n\t\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), mType->info.soundVector[index], getMonster());\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2124272d95057ae8", + "equalIndicator/v1": "0085585729435a9f832f5568fe43827ab194ec08392f70e615266a8b513e3b2d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 15, + "startColumn": 57, + "charOffset": 538, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 13, + "startColumn": 1, + "charOffset": 454, + "charLength": 284, + "snippet": { + "text": "#include \"game/game.hpp\"\r\n\r\nbool IOLoginDataSave::saveItems(std::shared_ptr player, const ItemBlockList &itemList, DBInsert &query_insert, PropWriteStream &propWriteStream) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2b3c0ee5d196bdd4", + "equalIndicator/v1": "00ab8119b5f9538c4ce7d026cc1b857eecf55f6ca69923f1ce62773631760396" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 95, + "startColumn": 74, + "charOffset": 2854, + "charLength": 9, + "snippet": { + "text": "moveEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 93, + "startColumn": 1, + "charOffset": 2776, + "charLength": 180, + "snippet": { + "text": "}\r\n\r\nbool MoveEvents::registerLuaUniqueEvent(const std::shared_ptr moveEvent) {\r\n\tauto uniqueIdVector = moveEvent->getUniqueIdsVector();\r\n\tif (uniqueIdVector.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2750afa9c22913fa", + "equalIndicator/v1": "00b4db4b8db0971fa7854b21584ee615c4b97199a2bd91ee149e8c61acf9c7af" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 955, + "startColumn": 64, + "charOffset": 34449, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 953, + "startColumn": 1, + "charOffset": 34381, + "charLength": 220, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) {\r\n\t// Player:onTradeRequest(target, item)\r\n\tif (info.playerOnTradeRequest == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9b6cf1a2a7419b78", + "equalIndicator/v1": "00c51789f6f132103913b144b2efe83207e7808d4ec2294e8d31d0990ae956e6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 925, + "startColumn": 73, + "charOffset": 30081, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 923, + "startColumn": 1, + "charOffset": 30004, + "charLength": 239, + "snippet": { + "text": "}\r\n\r\nvoid Creature::applyAbsorbDamageModifications(std::shared_ptr attacker, int32_t &damage, CombatType_t combatType) const {\r\n\tif (combatType != COMBAT_HEALING && damage != 0) {\r\n\t\tint32_t value = getAbsorbPercent(combatType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8e3a48ea87f07dd3", + "equalIndicator/v1": "00db005be4c23f2dd13b21e92d979f49723ff7a85ef1305a0d001ca2f0cf46d1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead", + "markdown": "Do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 47, + "startColumn": 22, + "charOffset": 1228, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 45, + "startColumn": 1, + "charOffset": 1133, + "charLength": 251, + "snippet": { + "text": "\r\nbool Modules::registerEvent(Event_ptr event, const pugi::xml_node &) {\r\n\tModule_ptr module { static_cast(event.release()) };\r\n\tif (module->getEventType() == MODULE_TYPE_NONE) {\r\n\t\tg_logger().error(\"Trying to register event without type!\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79a46945fbf9945b", + "equalIndicator/v1": "00ddc1665d49ad2913b4365b679221b32825e81c5b12a8f057080ebeb17a57bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1098, + "startColumn": 2, + "charOffset": 39398, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1096, + "startColumn": 1, + "charOffset": 39391, + "charLength": 46, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "37dd9ae4c092c453", + "equalIndicator/v1": "00e8b9c40b3260a7ad761078e41767441085af54feddf773c4d9e5cc2c4bf249" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 792, + "startColumn": 21, + "charOffset": 25738, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 790, + "startColumn": 1, + "charOffset": 25659, + "charLength": 176, + "snippet": { + "text": "\r\n\tint32_t minValue = std::round(player->getLevel() / 5);\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\r\n\r\n\tif (target) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "705b2ee940b80d44", + "equalIndicator/v1": "0100a5f5d1f05b7aac933746d3bae79feb6594c026a50d6651547dd6ba3f74d2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7627, + "startColumn": 91, + "charOffset": 266830, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7625, + "startColumn": 1, + "charOffset": 266735, + "charLength": 247, + "snippet": { + "text": "}\r\n\r\nbool Game::combatChangeMana(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage) {\r\n\tconst Position &targetPos = target->getPosition();\r\n\tauto manaChange = damage.primary.value + damage.secondary.value;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9bcf026fbe379b1d", + "equalIndicator/v1": "0111414d953b5734e2c898401b5a87fd755cf4fa433c00bb84b68242d8c8dff4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 536, + "startColumn": 24, + "charOffset": 14291, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 534, + "startColumn": 1, + "charOffset": 14262, + "charLength": 175, + "snippet": { + "text": "\t}\r\n\r\n\tcreature->healthMax = getNumber(L, 2);\r\n\tcreature->health = std::min(creature->health, creature->healthMax);\r\n\tg_game().addCreatureHealth(creature);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b83b9de834b85115", + "equalIndicator/v1": "0123ae2a480b40ce5864b4d0862f1739d2af30e3c6fc3d0f4a41746b2d9d0afd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'operator vector' must be marked explicit to avoid unintentional implicit conversions", + "markdown": "'operator vector' must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 116, + "startColumn": 27, + "charOffset": 3371, + "charLength": 9, + "snippet": { + "text": "ArrayType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 114, + "startColumn": 1, + "charOffset": 3339, + "charLength": 84, + "snippet": { + "text": "\t}\r\n\r\n\texplicit(false) operator ArrayType() const {\r\n\t\treturn get();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d771443d71c08e16", + "equalIndicator/v1": "013323c06ce4b94b69ad560d82506536047025f471ffb47fcb750a165b7eb1d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1119, + "startColumn": 16, + "charOffset": 33833, + "charLength": 5, + "snippet": { + "text": "index" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1117, + "startColumn": 1, + "charOffset": 33743, + "charLength": 148, + "snippet": { + "text": "\r\nvoid Tile::replaceThing(uint32_t index, std::shared_ptr thing) {\r\n\tint32_t pos = index;\r\n\r\n\tstd::shared_ptr item = thing->getItem();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a85fc7bf062db0a3", + "equalIndicator/v1": "0133b1e2b81c9446ad2d8ee64728120ef27a775740b7243eca16a9addce9daf1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 867, + "startColumn": 17, + "charOffset": 26090, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 865, + "startColumn": 1, + "charOffset": 26069, + "charLength": 234, + "snippet": { + "text": "}\r\n\r\nvoid Container::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr topParent = getTopParent();\r\n\tif (topParent->getCreature()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4d216bf40b0d008b", + "equalIndicator/v1": "0158e545c4080b094679202f04677076481fbaa8c17870e7936de49c89007c51" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2818, + "startColumn": 2, + "charOffset": 86087, + "charLength": 11, + "snippet": { + "text": "charmRune_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2816, + "startColumn": 1, + "charOffset": 86080, + "charLength": 144, + "snippet": { + "text": "\t}\r\n\r\n\tcharmRune_t runeID = static_cast(msg.getByte());\r\n\tuint8_t action = msg.getByte();\r\n\tuint16_t raceid = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5912f7bf9e525631", + "equalIndicator/v1": "015afa847af1b098989965396c735561e53402b6ed179c0c955a49b7b882aad8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 368, + "startColumn": 103, + "charOffset": 13203, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 366, + "startColumn": 1, + "charOffset": 13096, + "charLength": 334, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventCreatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) {\r\n\tif (info.creatureOnDrainHealth == -1) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "407c559e2fb7e9b4", + "equalIndicator/v1": "01a2d4bdb41c837eb9a69d253d01180fe3b99075d1f83105b73573130ce739fc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 230, + "startColumn": 21, + "charOffset": 6296, + "charLength": 7, + "snippet": { + "text": "npcType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 228, + "startColumn": 1, + "charOffset": 6257, + "charLength": 167, + "snippet": { + "text": "\r\n\tint index = 0;\r\n\tlua_createtable(L, npcType->info.voiceVector.size(), 0);\r\n\tfor (const auto &voiceBlock : npcType->info.voiceVector) {\r\n\t\tlua_createtable(L, 0, 2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f5061ede8d0ca74", + "equalIndicator/v1": "01a951af123a4d48eb7f8d4f98009e7797d792575c68dab6263119f9c1380a87" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 107, + "startColumn": 75, + "charOffset": 4016, + "charLength": 6, + "snippet": { + "text": "result" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 105, + "startColumn": 1, + "charOffset": 3937, + "charLength": 218, + "snippet": { + "text": "}\r\n\r\nbool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result, bool disableIrrelevantInfo /* = false*/) {\r\n\tif (!result || !player) {\r\n\t\tstd::string nullptrType = !result ? \"Result\" : \"Player\";\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1a5a8590f41dcfc", + "equalIndicator/v1": "01b9b35abb7fa8ea6e04102eacb59a474a92b26795d4eca965a9c5d23953132c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5135, + "startColumn": 55, + "charOffset": 183013, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5133, + "startColumn": 1, + "charOffset": 182954, + "charLength": 252, + "snippet": { + "text": "}\r\n\r\nvoid Game::internalCloseTrade(std::shared_ptr player) {\r\n\tstd::shared_ptr tradePartner = player->tradePartner;\r\n\tif ((tradePartner && tradePartner->getTradeState() == TRADE_TRANSFER) || player->getTradeState() == TRADE_TRANSFER) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4ff3908507f6223e", + "equalIndicator/v1": "01f2e7555fc6bd49820d92f39137bb718c5aed47091ff17d983f7ea2b711a409" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6495, + "startColumn": 111, + "charOffset": 224192, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6493, + "startColumn": 1, + "charOffset": 224077, + "charLength": 273, + "snippet": { + "text": "}\r\n\r\nbool Game::combatBlockHit(CombatDamage &damage, std::shared_ptr attacker, std::shared_ptr target, bool checkDefense, bool checkArmor, bool field) {\r\n\tif (damage.primary.type == COMBAT_NONE && damage.secondary.type == COMBAT_NONE) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f06168c685bef74e", + "equalIndicator/v1": "023103e87a498e099ae83a2106c16c880f22287b0d440a7718864ba83e3b9826" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'raidEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'raidEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 103, + "startColumn": 24, + "charOffset": 2597, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 101, + "startColumn": 1, + "charOffset": 2552, + "charLength": 112, + "snippet": { + "text": "\tvoid startRaid();\r\n\r\n\tvoid executeRaidEvent(const std::shared_ptr raidEvent);\r\n\tvoid resetRaid();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e6e273d6c07c68f", + "equalIndicator/v1": "0245d7ce534cdc6fdca6e0505f094da91469bd5a46782f403bbafcc637e3bee7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1190, + "startColumn": 50, + "charOffset": 34801, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1188, + "startColumn": 1, + "charOffset": 34747, + "charLength": 217, + "snippet": { + "text": "}\r\n\r\nvoid Player::sendLootStats(std::shared_ptr item, uint8_t count) {\r\n\tuint64_t value = 0;\r\n\tif (item->getID() == ITEM_GOLD_COIN || item->getID() == ITEM_PLATINUM_COIN || item->getID() == ITEM_CRYSTAL_COIN) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2ea4a18d76ef7e9d", + "equalIndicator/v1": "0249279da9018252358aac7e2b595c4595da930b0ee82245ab97bda5cbce66c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 706, + "startColumn": 97, + "charOffset": 27162, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 704, + "startColumn": 1, + "charOffset": 27061, + "charLength": 291, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f9ae60b5c397ef2", + "equalIndicator/v1": "02492d87ad46632b4ad64a3bd8f35ed5cd57f3abccecbbd24e59f10cec16cd5a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 7, + "charOffset": 984, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 823, + "charLength": 351, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\n\tbool isDepotChest() const override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6d98bb0e0959a9f3", + "equalIndicator/v1": "026ab7b08fe677994468f010175dd6592f596fa17079ac759d03374711196d53" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 621, + "startColumn": 27, + "charOffset": 22121, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 619, + "startColumn": 1, + "charOffset": 22089, + "charLength": 135, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnLookInBattleList, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3a2814a1eb1bdd89", + "equalIndicator/v1": "02723b263663384d79efc4838389f7ef123c5ba28fbb353ac1e4f969ce642722" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 25, + "charOffset": 632, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 603, + "charLength": 246, + "snippet": { + "text": "}\r\n\r\nReturnValue DepotChest::queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor /* = nullptr*/) {\r\n\tstd::shared_ptr item = thing->getItem();\r\n\tif (item == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "771dea193711d651", + "equalIndicator/v1": "0275985241458ba719a4dc0ef74e53e9b601c421c7391f92ed635af52e6dcf0e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'conn' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'conn' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 26, + "startColumn": 12, + "charOffset": 835, + "charLength": 4, + "snippet": { + "text": "conn" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 24, + "startColumn": 1, + "charOffset": 773, + "charLength": 131, + "snippet": { + "text": "\r\n\texplicit ProtocolStatus(Connection_ptr conn) :\r\n\t\tProtocol(conn) { }\r\n\r\n\tvoid onRecvFirstMessage(NetworkMessage &msg) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bfbe7b4aa4990636", + "equalIndicator/v1": "02ad0e3f6649af90f929938052cc018dff739ebd9c727de848e4729e2e4765ac" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2037, + "startColumn": 63, + "charOffset": 60349, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2035, + "startColumn": 1, + "charOffset": 60282, + "charLength": 172, + "snippet": { + "text": "}\r\n\r\nvoid Player::onRemoveContainerItem(std::shared_ptr container, std::shared_ptr item) {\r\n\tif (tradeState != TRADE_TRANSFER) {\r\n\t\tcheckTradeState(item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e8adc3bca0b10eec", + "equalIndicator/v1": "02ea6f1dbcc1a813b89d8d2786d1e1d954e488066a3308f8a04051644166205b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 554, + "startColumn": 27, + "charOffset": 19630, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 552, + "startColumn": 1, + "charOffset": 19598, + "charLength": 130, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnBrowseField, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "de5607edd8c49744", + "equalIndicator/v1": "02ff6b12402271562ec6b7f23db7029b691eaef3fd86ea4b053bad57123ac479" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 234, + "startColumn": 27, + "charOffset": 8420, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 232, + "startColumn": 1, + "charOffset": 8388, + "charLength": 133, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.creatureOnChangeOutfit, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4a39da1a5eed26ea", + "equalIndicator/v1": "0319d61ed3366dd769890abf744ea8a1bfdb20a3e11de7ccc77be11e5b5957ac" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 464, + "startColumn": 7, + "charOffset": 17506, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 462, + "startColumn": 1, + "charOffset": 17389, + "charLength": 257, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnMove - \"\r\n\t\t \"Player {} item {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "08e6ddc14ab4d444", + "equalIndicator/v1": "031fbbde9fc44c879ccf672eb4056ae81f9e0007169655cee1591a8a03acc294" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: m_maxItems", + "markdown": "Constructor does not initialize these fields: m_maxItems" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 34, + "startColumn": 12, + "charOffset": 1067, + "charLength": 9, + "snippet": { + "text": "Container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 1051, + "charLength": 168, + "snippet": { + "text": "}\r\n\r\nContainer::Container(uint16_t initType, uint16_t initSize, bool initUnlocked /*= true*/, bool initPagination /*= false*/) :\r\n\tItem(initType),\r\n\tmaxSize(initSize),\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "14f9250ed32dc8f6", + "equalIndicator/v1": "0378f6e80a53c4b5c58ac6dd790b3eb69c8a3f8d8f8de7659b6da9c773b65a4f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 217, + "startColumn": 7, + "charOffset": 6532, + "charLength": 8, + "snippet": { + "text": "addThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 215, + "startColumn": 1, + "charOffset": 6464, + "charLength": 196, + "snippet": { + "text": "\tstd::vector> getSurroundingTiles();\r\n\r\n\tvoid addThing(std::shared_ptr thing) override final;\r\n\tvoid addThing(int32_t index, std::shared_ptr thing) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cbd945e8b12400e0", + "equalIndicator/v1": "037cb83b2e9333076794f413f19da0df8f40b9be4eb3a275acf91e016e3944c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 706, + "startColumn": 65, + "charOffset": 27130, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 704, + "startColumn": 1, + "charOffset": 27061, + "charLength": 291, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "956a83004595ec2b", + "equalIndicator/v1": "039051f28398b7b77755c9b854debe54318546679b26ab3ad3924c6bc89bf53a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 475, + "startColumn": 90, + "charOffset": 15688, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 473, + "startColumn": 1, + "charOffset": 15594, + "charLength": 145, + "snippet": { + "text": "}\r\n\r\nvoid Actions::showUseHotkeyMessage(std::shared_ptr player, std::shared_ptr item, uint32_t count) {\r\n\tstd::ostringstream ss;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9fdf8b8f46bc426a", + "equalIndicator/v1": "0397b7981b363289c4cede45bfb0d5d191309983632c15c9568d4aecfda068aa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Escaped string literal can be written as a raw string literal", + "markdown": "Escaped string literal can be written as a raw string literal" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 133, + "startColumn": 15, + "charOffset": 4253, + "charLength": 28, + "snippet": { + "text": "\"\\\"footer\\\": { \\\"text\\\": \\\"\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 131, + "startColumn": 1, + "charOffset": 4160, + "charLength": 182, + "snippet": { + "text": "\t\t}\r\n\t\tif (g_configManager().getBoolean(DISCORD_SEND_FOOTER, __FUNCTION__)) {\r\n\t\t\tpayload << \"\\\"footer\\\": { \\\"text\\\": \\\"\" << footer_text.str() << \"\\\" }, \";\r\n\t\t}\r\n\t\tif (color >= 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5338e735d454f92e", + "equalIndicator/v1": "03b2f90dadede9ab253a16c7bf2d6c941cbaf0aa00549c3c5c876cdb46c63c73" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 259, + "startColumn": 62, + "charOffset": 7604, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 257, + "startColumn": 1, + "charOffset": 7538, + "charLength": 152, + "snippet": { + "text": "}\r\n\r\nPosition Spells::getCasterPosition(std::shared_ptr creature, Direction dir) {\r\n\treturn getNextPosition(dir, creature->getPosition());\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "86ed948a90a06c81", + "equalIndicator/v1": "03c2681d50399708c0a6bca8f63e3e528572140bb1b8e89855e4312b506cb4f2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Converting integer literal to bool, use bool literal instead", + "markdown": "Converting integer literal to bool, use bool literal instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 56, + "startColumn": 10, + "charOffset": 1453, + "charLength": 1, + "snippet": { + "text": "0" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 54, + "startColumn": 1, + "charOffset": 1392, + "charLength": 104, + "snippet": { + "text": "\tauto bankable = getBankable();\r\n\tif (!bankable) {\r\n\t\treturn 0;\r\n\t}\r\n\tbankable->setBankBalance(amount);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67663aea5c33e972", + "equalIndicator/v1": "03d390431b97ac5c73a888dc47dcea6a4a49bcc1f02dab2450d854c7ccc9944d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1257, + "startColumn": 89, + "charOffset": 41487, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1255, + "startColumn": 1, + "charOffset": 41394, + "charLength": 344, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatHealth(std::shared_ptr caster, std::shared_ptr target, const Position &origin, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster && target)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "276ded4f964a9fb6", + "equalIndicator/v1": "03d7080c05bb2ca7f90fb67e8803cce4ffd5ed62e2b0d9eda316b188054c377a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 480, + "startColumn": 132, + "charOffset": 13683, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 478, + "startColumn": 1, + "charOffset": 13547, + "charLength": 379, + "snippet": { + "text": "}\r\n\r\nvoid Tile::onRemoveTileItem(const CreatureVector &spectators, const std::vector &oldStackPosVector, std::shared_ptr item) {\r\n\tif ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) {\r\n\t\tauto it = g_game().browseFields.find(getTile());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "72138b473d08a740", + "equalIndicator/v1": "04042f0b214a2d8cd13ae31301e6406e5412baa74325f0d3896f9f961fe52b71" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 297, + "startColumn": 2, + "charOffset": 8746, + "charLength": 2, + "snippet": { + "text": "if" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 295, + "startColumn": 1, + "charOffset": 8644, + "charLength": 183, + "snippet": { + "text": "\t// monster:getTargetCount()\r\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\r\n\tif (monster) {\r\n\t\tlua_pushnumber(L, monster->getTargetList().size());\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2dc650adcf0ee234", + "equalIndicator/v1": "042e4ecc21e0e8344175ab6f0570f8b99c70e4312ae7f6c51cfb234c455f309b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1167, + "startColumn": 99, + "charOffset": 44404, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1165, + "startColumn": 1, + "charOffset": 44301, + "charLength": 237, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::zoneBeforeCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureLeave - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "077900b51d4344a1", + "equalIndicator/v1": "043f94d8de84bec7c6950addd6386048c9264bea35e34970554890a03309371f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2565, + "startColumn": 3, + "charOffset": 74588, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2563, + "startColumn": 1, + "charOffset": 74524, + "charLength": 180, + "snippet": { + "text": "\t}\r\n\tbool isConcoctionActive(Concoction_t concotion) const {\r\n\t\tuint16_t itemId = static_cast(concotion);\r\n\t\tif (!activeConcoctions.contains(itemId)) {\r\n\t\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eca87d319d6a6fbe", + "equalIndicator/v1": "044e762af59b09a34d9d497dea1f4cf18336c1e3257de0eb9e999b799486f10b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10519, + "startColumn": 62, + "charOffset": 365267, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10517, + "startColumn": 1, + "charOffset": 365201, + "charLength": 232, + "snippet": { + "text": "}\r\n\r\nvoid Game::afterCreatureZoneChange(std::shared_ptr creature, const std::unordered_set> &fromZones, const std::unordered_set> &toZones) const {\r\n\tif (!creature) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "72eeaa554fc29398", + "equalIndicator/v1": "04830bc4398e7dc0aa46f1ada569bfad14d4181c63be9a5650b02f68ed59d070" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 667, + "startColumn": 26, + "charOffset": 31232, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 665, + "startColumn": 1, + "charOffset": 31037, + "charLength": 336, + "snippet": { + "text": "// SLOT_BLUE_TOP_100 = 19\r\nvoid IOWheel::slotBlueTop100(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\taddVesselResonance(player, bonusData, WheelSlots_t::SLOT_BLUE_TOP_100, WheelGemAffinity_t::Blue, points);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b47ccb4943d2db59", + "equalIndicator/v1": "04bad30583703148e7f51afc8e5855a5e4ad7ee7db4c68fe6a409bd654b12a7e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 26, + "startColumn": 7, + "charOffset": 831, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 24, + "startColumn": 1, + "charOffset": 663, + "charLength": 472, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a0ae5b3c0c0908cc", + "equalIndicator/v1": "04c7fd228204fd80edd881b1f36b8423fbd93836a7c6a0581cbbf8f13d1f566a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 253, + "startColumn": 10, + "charOffset": 7708, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 251, + "startColumn": 1, + "charOffset": 7612, + "charLength": 117, + "snippet": { + "text": "std::string LuaFunctionsLoader::popString(lua_State* L) {\r\n\tif (lua_gettop(L) == 0) {\r\n\t\treturn std::string();\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a539a658bd38f813", + "equalIndicator/v1": "04e1d1df948597f40c99d4989d038384bd0784660d0a57938794c3425389c247" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 272, + "startColumn": 23, + "charOffset": 9047, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 270, + "startColumn": 1, + "charOffset": 8921, + "charLength": 144, + "snippet": { + "text": "\t\tg_game().sendSingleSoundEffect(tile->getPosition(), SoundEffect_t::PHYSICAL_RANGE_MISS, player);\r\n\t}\r\n\tonUsedWeapon(player, item, tile);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "380a6be5c3ac7f60", + "equalIndicator/v1": "04e380af2b42f02629f270c9e5c9c87384e850af894e7f37634daf9eaeb8c1c1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 34, + "startColumn": 23, + "charOffset": 1151, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 1124, + "charLength": 163, + "snippet": { + "text": "}\r\n\r\nReturnValue Teleport::queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr) {\r\n\treturn RETURNVALUE_NOTPOSSIBLE;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b4bacdda553068de", + "equalIndicator/v1": "04ef3f3a05de61d096256fc48b9bd667ebbf9aee7343934ff89bacc9eb1c69aa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1084, + "startColumn": 49, + "charOffset": 35404, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1082, + "startColumn": 1, + "charOffset": 35351, + "charLength": 230, + "snippet": { + "text": "}\r\n\r\nbool Combat::doCombat(std::shared_ptr caster, std::shared_ptr target, const Position &origin, int affected /* = 1 */) const {\r\n\t// target combat callback function\r\n\tif (params.combatType != COMBAT_NONE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1abe8d5a89b6d01b", + "equalIndicator/v1": "05072b81ab91984708e144eee9329976e8c800567c5b2ce354f028d4edaf776a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4710, + "startColumn": 56, + "charOffset": 148694, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4708, + "startColumn": 1, + "charOffset": 148634, + "charLength": 109, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendLootStats(std::shared_ptr item, uint8_t count) {\r\n\tif (!item) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bafd73ff774f619a", + "equalIndicator/v1": "0508afcbc72617d3cb1007d820c3709bee8aaa8d78a6f112d490cc1fc085b60c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 378, + "startColumn": 10, + "charOffset": 11694, + "charLength": 5, + "snippet": { + "text": "items" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 376, + "startColumn": 1, + "charOffset": 11633, + "charLength": 116, + "snippet": { + "text": "\r\n\tint16_t getMagicShieldCapacityPercent() const {\r\n\t\treturn items[id].abilities->magicShieldCapacityPercent;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7a2915915fcb6869", + "equalIndicator/v1": "050efc96bfcba13c6edf2ab2bc7a7daa008bbfc1c62cbb07e8f5c18989fea97c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 809, + "startColumn": 25, + "charOffset": 26155, + "charLength": 15, + "snippet": { + "text": "getWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 807, + "startColumn": 1, + "charOffset": 26126, + "charLength": 245, + "snippet": { + "text": "}\r\n\r\nint32_t WeaponDistance::getWeaponDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, bool maxDamage /*= false*/) const {\r\n\tint32_t attackValue = item->getAttack();\r\n\tbool hasElement = false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "552b91f1ec0e07c8", + "equalIndicator/v1": "0530e2f0b329c6cc180c3498a156c86c4425c08ecb75b82e86752a07060fc195" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'transformItem' is within a recursive call chain", + "markdown": "Function 'transformItem' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2691, + "startColumn": 29, + "charOffset": 101179, + "charLength": 13, + "snippet": { + "text": "transformItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2689, + "startColumn": 1, + "charOffset": 101146, + "charLength": 321, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Game::transformItem(std::shared_ptr item, uint16_t newId, int32_t newCount /*= -1*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (item->getID() == newId && (newCount == -1 || (newCount == item->getSubType() && newCount != 0))) { // chargeless item placed on map = infinite\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a8187066f9503cf3", + "equalIndicator/v1": "053388149a89e0130a781d129939936f0a212f10b703c4650669c8f21c243c87" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", + "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 728, + "startColumn": 15, + "charOffset": 23678, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 726, + "startColumn": 1, + "charOffset": 23637, + "charLength": 74, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tchance = it.hitChance;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d4a690e93b22f0f", + "equalIndicator/v1": "0543f3fc2ec0d9092104f60d595dfe14755339bca29684771d6bb5e8e5230c92" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 835, + "startColumn": 60, + "charOffset": 31937, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 833, + "startColumn": 1, + "charOffset": 31873, + "charLength": 271, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnCombat - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0c36d01405770872", + "equalIndicator/v1": "055bf7faa61cb709bba54af43bd4377d91bf60fbbd314a0c08670350772b99d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 136, + "startColumn": 2, + "charOffset": 4235, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 134, + "startColumn": 1, + "charOffset": 4186, + "charLength": 123, + "snippet": { + "text": "\tint32_t itemCount = 1;\r\n\tint32_t subType = 1;\r\n\tuint32_t count = getNumber(L, 3, 1);\r\n\r\n\tif (it.hasSubType()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "18f030d8fefe6873", + "equalIndicator/v1": "0567a8fb0f0ff2aa43580a6bfae8ae3e6830132be50cb802b4e160450ce7700a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1215, + "startColumn": 36, + "charOffset": 35778, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1213, + "startColumn": 1, + "charOffset": 35639, + "charLength": 172, + "snippet": { + "text": "\tvoid sendCreatureWalkthrough(std::shared_ptr creature, bool walkthrough) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureWalkthrough(creature, walkthrough);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "85066812fb5268dc", + "equalIndicator/v1": "05708e798f0f7c1701b6a5b889370ce39731099857765153a6f5828bdefd3be6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::list::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5165, + "startColumn": 95, + "charOffset": 162688, + "charLength": 3, + "snippet": { + "text": "810" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5163, + "startColumn": 1, + "charOffset": 162431, + "charLength": 307, + "snippet": { + "text": "\tstd::map counterMap;\r\n\tuint32_t buyOffersToSend = std::min(buyOffers.size(), 810 + std::max(0, 810 - sellOffers.size()));\r\n\tuint32_t sellOffersToSend = std::min(sellOffers.size(), 810 + std::max(0, 810 - buyOffers.size()));\r\n\r\n\tNetworkMessage msg;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bcf40b9a2e0fefee", + "equalIndicator/v1": "0576a0d7af0e59172bcab62a506d78b8ae8557e89fc5dbc5f4789acec7d2d608" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 596, + "startColumn": 13, + "charOffset": 28975, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 594, + "startColumn": 1, + "charOffset": 28781, + "charLength": 416, + "snippet": { + "text": "\t} else if (stringValue == \"absorbpercentmanadrain\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_MANADRAIN)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentdrown\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DROWNDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentphysical\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "851e6d94beec7005", + "equalIndicator/v1": "0583f9f6070f11a684e54867a4d862ceac9a2a8bb9926ec462e9818eb8b840a5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 933, + "startColumn": 7, + "charOffset": 33704, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 931, + "startColumn": 1, + "charOffset": 33692, + "charLength": 136, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnTurn - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fec4ff5d46845ef9", + "equalIndicator/v1": "0592d608535b6352c996b18d986083a38bdf6e746d60cc58b8533627ce04e64d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: channelId", + "markdown": "Constructor does not initialize these fields: channelId" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 43, + "startColumn": 2, + "charOffset": 1162, + "charLength": 11, + "snippet": { + "text": "TextMessage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 41, + "startColumn": 1, + "charOffset": 1112, + "charLength": 162, + "snippet": { + "text": "struct TextMessage {\r\n\tTextMessage() = default;\r\n\tTextMessage(MessageClasses initType, std::string initText) :\r\n\t\ttype(initType), text(std::move(initText)) { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5cc0b4630a5a121d", + "equalIndicator/v1": "05cd2ddee7658ce2cae6377e80194f55e6f0dfc0ca69bd70eebc4a47dde420c9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 58, + "startColumn": 41, + "charOffset": 1800, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 56, + "startColumn": 1, + "charOffset": 1754, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c228fe8a89531189", + "equalIndicator/v1": "05e15418463bf450ed6c22ed6f85e1c8f8a926a1156a500b0281b5474a4357c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 419, + "startColumn": 10, + "charOffset": 11205, + "charLength": 17, + "snippet": { + "text": "getReflectPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 417, + "startColumn": 1, + "charOffset": 11190, + "charLength": 184, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t getReflectPercent(CombatType_t combat, bool useCharges = false) const override;\r\n\r\n\tint32_t getReflectFlat(CombatType_t combat, bool useCharges = false) const override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2fd24d3f8cf018c9", + "equalIndicator/v1": "060283e76764a0cf44ee2039fd56fde9d89546a8bd0d47d0a72c9a1217b823ca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 391, + "startColumn": 113, + "charOffset": 12624, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 389, + "startColumn": 1, + "charOffset": 12507, + "charLength": 243, + "snippet": { + "text": "}\r\n\r\nbool Actions::useItem(std::shared_ptr player, const Position &pos, uint8_t index, std::shared_ptr item, bool isHotkey) {\r\n\tconst ItemType &it = Item::items[item->getID()];\r\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2d7a5d8e5d5abbfe", + "equalIndicator/v1": "0607f1a546bbd9d086295463c26732736263945a9314de5c0936e6e2116a6456" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Valty', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Valty', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/arraylist.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 102, + "startColumn": 22, + "charOffset": 2309, + "charLength": 6, + "snippet": { + "text": "_Valty" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 100, + "startColumn": 1, + "charOffset": 2281, + "charLength": 109, + "snippet": { + "text": "\t\t}\r\n\r\n\t\ttemplate \r\n\t\tdecltype(auto) emplace_front(_Valty &&... v) {\r\n\t\t\tneedUpdate = true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "680e21a97f1df0ed", + "equalIndicator/v1": "060dc568bd27032686b8c86f3c173dbfdf57eaf6dce7bf832f0c0baa4a16bb81" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 183, + "startColumn": 2, + "charOffset": 6788, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 181, + "startColumn": 1, + "charOffset": 6781, + "charLength": 46, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8f6b25bd0b4b8d81", + "equalIndicator/v1": "061f81cae0c0c5744929e0121c8fb79612de4520cddf24049313ba549a600d10" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2088, + "startColumn": 58, + "charOffset": 61649, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2086, + "startColumn": 1, + "charOffset": 61587, + "charLength": 134, + "snippet": { + "text": "}\r\n\r\nvoid Player::onRemoveInventoryItem(std::shared_ptr item) {\r\n\tif (tradeState != TRADE_TRANSFER) {\r\n\t\tcheckTradeState(item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ac6267b84fa7822f", + "equalIndicator/v1": "0625daa73c94b3554445f06276733506d4c5fd38f32a9a822a5b258277807dd0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 199, + "startColumn": 63, + "charOffset": 6067, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 197, + "startColumn": 1, + "charOffset": 6000, + "charLength": 186, + "snippet": { + "text": "}\r\n\r\nReturnValue Combat::canTargetCreature(std::shared_ptr player, std::shared_ptr target) {\r\n\tif (player == target) {\r\n\t\treturn RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "66a7a373ead18b90", + "equalIndicator/v1": "062d63181b8168c55090ffb3a168b571875d9dc47e7a70b3897130d9acb1ffce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3521, + "startColumn": 14, + "charOffset": 106528, + "charLength": 1, + "snippet": { + "text": "n" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3519, + "startColumn": 1, + "charOffset": 106372, + "charLength": 213, + "snippet": { + "text": "\t\t\t\t// try find an already existing item to stack with\r\n\t\t\t\tif (tmpItem->equals(item) && tmpItem->getItemCount() < tmpItem->getStackSize()) {\r\n\t\t\t\t\tindex = n;\r\n\t\t\t\t\t*destItem = tmpItem;\r\n\t\t\t\t\treturn tmpContainer;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b647f842edbafcbd", + "equalIndicator/v1": "065219692d5308f976d9f14146f8f6ef973e576f6524f757bca638b3aa16e445" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 213, + "startColumn": 66, + "charOffset": 6731, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 211, + "startColumn": 1, + "charOffset": 6661, + "charLength": 223, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Actions::getAction(std::shared_ptr item) {\r\n\tif (item->hasAttribute(ItemAttribute_t::UNIQUEID)) {\r\n\t\tauto it = uniqueItemMap.find(item->getAttribute(ItemAttribute_t::UNIQUEID));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3fb1ea88033404d0", + "equalIndicator/v1": "066f7c51628a4411add5681f1e9ec1b5e533e5ece7c1dae45cd8e902ee293599" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7809, + "startColumn": 62, + "charOffset": 245631, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7807, + "startColumn": 1, + "charOffset": 245565, + "charLength": 121, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::openImbuementWindow(std::shared_ptr item) {\r\n\tif (!item || item->isRemoved()) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "de6d5a0456e8ba19", + "equalIndicator/v1": "066f92050658460e4b2739eadd040090b590393fb0663aac585e6877f5ac37b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'name' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'name' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2923, + "startColumn": 48, + "charOffset": 102908, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2921, + "startColumn": 1, + "charOffset": 102856, + "charLength": 169, + "snippet": { + "text": "}\r\n\r\nbool PlayerWheel::getInstant(const std::string name) const {\r\n\tif (name == \"Battle Instinct\") {\r\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_INSTINCT);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4b0254e56a30f776", + "equalIndicator/v1": "066fab314f43598ce21f62696e75eb5cad24866d4cac9bfa63704a2d33a25608" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 455, + "startColumn": 22, + "charOffset": 24166, + "charLength": 31, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 453, + "startColumn": 1, + "charOffset": 24014, + "charLength": 316, + "snippet": { + "text": "\tvoid changeLight(const std::shared_ptr creature);\r\n\tvoid updateCreatureIcon(const std::shared_ptr creature);\r\n\tvoid reloadCreature(const std::shared_ptr creature);\r\n\tvoid updateCreatureSkull(std::shared_ptr player);\r\n\tvoid updatePlayerShield(std::shared_ptr player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ac2600f362a5a1e", + "equalIndicator/v1": "06781621800ba7458c9433a4aba2420d3adb72d5b79d56b636fc3db514abeae4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3460, + "startColumn": 38, + "charOffset": 105859, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3458, + "startColumn": 1, + "charOffset": 105621, + "charLength": 431, + "snippet": { + "text": "\tmsg.add(std::min(player->getHealth(), std::numeric_limits::max()));\r\n\tmsg.add(std::min(player->getMaxHealth(), std::numeric_limits::max()));\r\n\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r\n\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\tmsg.addByte(player->getSoul());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "88664f2a0ab8d8e9", + "equalIndicator/v1": "069a82498b0f12f701fbcc681c79e5a056d093ab8d5c6222ee1654af4df0405e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 597, + "startColumn": 8, + "charOffset": 14733, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 595, + "startColumn": 1, + "charOffset": 14631, + "charLength": 220, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetWrapableTo(lua_State* L) {\r\n\t// itemType:getWrapableTo()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->wrapableTo);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "10376e1f2c882f79", + "equalIndicator/v1": "06a4796f652f83eaeb7e6291b777cb996a89f5b28b50d6a9b47c8b440cc987ae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1206, + "startColumn": 40, + "charOffset": 35367, + "charLength": 5, + "snippet": { + "text": "value" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1204, + "startColumn": 1, + "charOffset": 35288, + "charLength": 134, + "snippet": { + "text": "\t\tvalue = iType.sellPrice * count;\r\n\t}\r\n\tg_metrics().addCounter(\"player_loot\", value, { { \"player\", getName() } });\r\n\r\n\tif (client) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f538737986a781eb", + "equalIndicator/v1": "06bc7882725be6017c1397e3765a42a74fe975fc84e3a97bb6a862721d4d1b7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2535, + "startColumn": 35, + "charOffset": 75781, + "charLength": 7, + "snippet": { + "text": "manaMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2533, + "startColumn": 1, + "charOffset": 75662, + "charLength": 232, + "snippet": { + "text": "\t\t} else {\r\n\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r\n\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\r\n\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "90c8270af225201d", + "equalIndicator/v1": "06cabf517114f142f1620baee4d61a400d9d2416d4e14f890959037851b8387f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6921, + "startColumn": 29, + "charOffset": 240347, + "charLength": 36, + "snippet": { + "text": "(damage.primary.value * damageBonus)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6919, + "startColumn": 1, + "charOffset": 240212, + "charLength": 264, + "snippet": { + "text": "\t\t\tint32_t damageBonus = attackerPlayer->wheel()->checkDivineGrenade(target);\r\n\t\t\tif (damageBonus != 0) {\r\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\r\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5f7f55592b5f38b", + "equalIndicator/v1": "06d275c181a1264484c3f7d38415abcf9861c2b24ec01b9a42fa57be9b686e5f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'protocol' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'protocol' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/outputmessage.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 38, + "startColumn": 60, + "charOffset": 1114, + "charLength": 8, + "snippet": { + "text": "protocol" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 36, + "startColumn": 1, + "charOffset": 1050, + "charLength": 134, + "snippet": { + "text": "}\r\n\r\nvoid OutputMessagePool::addProtocolToAutosend(Protocol_ptr protocol) {\r\n\t// dispatcher thread\r\n\tif (bufferedProtocols.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1f54ac55acd1575e", + "equalIndicator/v1": "06dfd02f58b12fb8cbaffce8c4c929afde424ed633c98c80c990ed984b092949" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 507, + "startColumn": 65, + "charOffset": 18047, + "charLength": 5, + "snippet": { + "text": "party" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 505, + "startColumn": 1, + "charOffset": 17978, + "charLength": 208, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPartyOnShareExperience(std::shared_ptr party, uint64_t &exp) {\r\n\t// Party:onShareExperience(exp) or Party.onShareExperience(self, exp)\r\n\tif (info.partyOnShareExperience == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a7140ac1e8b56e8b", + "equalIndicator/v1": "06eeadc3dc6337818258f9701e63a0f7329a462ad16ad2b890b5e83184b8d58e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7831, + "startColumn": 90, + "charOffset": 273772, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7829, + "startColumn": 1, + "charOffset": 273678, + "charLength": 294, + "snippet": { + "text": "}\r\n\r\nvoid Game::addCreatureHealth(const CreatureVector &spectators, std::shared_ptr target) {\r\n\tuint8_t healthPercent = std::ceil((static_cast(target->getHealth()) / std::max(target->getMaxHealth(), 1)) * 100);\r\n\tif (const auto &targetPlayer = target->getPlayer()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c961c67199f109c4", + "equalIndicator/v1": "071cbf6851b71eaf6e3142e771ec76dbcbd0e8a7173cc78d07e3a1ff28f60541" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1387, + "startColumn": 36, + "charOffset": 41694, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1385, + "startColumn": 1, + "charOffset": 41544, + "charLength": 185, + "snippet": { + "text": "\tvoid sendPartyCreatureHealth(std::shared_ptr creature, uint8_t healthPercent) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyCreatureHealth(creature, healthPercent);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "598b35dfcd0ce73d", + "equalIndicator/v1": "072c98d28dc4bf571af1aa0bd0b020ea880013f875093135c6cadd75b2543683" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2419, + "startColumn": 2, + "charOffset": 64769, + "charLength": 31, + "snippet": { + "text": "// player:addFamiliar(lookType)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2417, + "startColumn": 1, + "charOffset": 64707, + "charLength": 178, + "snippet": { + "text": "\r\nint PlayerFunctions::luaPlayerAddFamiliar(lua_State* L) {\r\n\t// player:addFamiliar(lookType)\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2741f6a7a7d47447", + "equalIndicator/v1": "073c858d29882621f023b5cb0d862a7e031102260a3182c53f299aa79bc50e23" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'", + "markdown": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 228, + "startColumn": 11, + "charOffset": 7041, + "charLength": 4, + "snippet": { + "text": "Item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 226, + "startColumn": 1, + "charOffset": 6982, + "charLength": 99, + "snippet": { + "text": "\tvirtual std::shared_ptr clone() const;\r\n\r\n\tvirtual ~Item() = default;\r\n\r\n\t// non-assignable\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fb4db60a48ccf4cd", + "equalIndicator/v1": "0749f465c408e854065ad8e1d599b8a236d7b88b1be675c80e0f8c31c3e2ccf0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5995, + "startColumn": 71, + "charOffset": 176107, + "charLength": 11, + "snippet": { + "text": "nextReqMana" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5993, + "startColumn": 1, + "charOffset": 176006, + "charLength": 210, + "snippet": { + "text": "\r\n\t\toldSkillValue = magLevel;\r\n\t\toldPercentToNextLevel = static_cast(manaSpent * 100) / nextReqMana;\r\n\r\n\t\tg_events().eventPlayerOnGainSkillTries(static_self_cast(), SKILL_MAGLEVEL, tries);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b5373c7c59290bb", + "equalIndicator/v1": "0750f06a273e8bc4b10c62fd3f7554a746d2b1befefdda08b3747f2d1b9d11ef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 669, + "startColumn": 72, + "charOffset": 18279, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 667, + "startColumn": 1, + "charOffset": 18203, + "charLength": 173, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updatePercentBuffs(std::shared_ptr creature) {\r\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\r\n\t\tif (buffsPercent[i] == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "851b1112a7d2f171", + "equalIndicator/v1": "07c21d88685e187fe8120b6b7c738fa38d78f95f6b95afadb810b2df4c24837d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9129, + "startColumn": 46, + "charOffset": 319098, + "charLength": 10, + "snippet": { + "text": "totalPrice" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9127, + "startColumn": 1, + "charOffset": 318985, + "charLength": 230, + "snippet": { + "text": "\r\n\t\tplayer->setBankBalance(player->getBankBalance() + totalPrice);\r\n\t\tg_metrics().addCounter(\"balance_increase\", totalPrice, { { \"player\", player->getName() }, { \"context\", \"market_sale\" } });\r\n\r\n\t\tif (it.id == ITEM_STORE_COIN) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "056c5308e6614045", + "equalIndicator/v1": "07e165b7eb5f845b4bad3f842883de2d53f31703ffcfc58e890f00d5c0b804d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4243, + "startColumn": 107, + "charOffset": 127988, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4241, + "startColumn": 1, + "charOffset": 127844, + "charLength": 242, + "snippet": { + "text": "\t\t\tcheckLootContainers(container);\r\n\r\n\t\t\tif (container->isRemoved() || !Position::areInRange<1, 1, 0>(getPosition(), container->getPosition())) {\r\n\t\t\t\tautoCloseContainers(container);\r\n\t\t\t} else if (container->getTopParent() == getPlayer()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c7e779ffb1cb6f54", + "equalIndicator/v1": "07e283abb932206ed9ef9a3884a55159dd5aa0eb06b4969fec9fa92b62bbddbb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 420, + "startColumn": 2, + "charOffset": 15144, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 418, + "startColumn": 1, + "charOffset": 15137, + "charLength": 46, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e635c284111b6a8", + "equalIndicator/v1": "07e58e32a1c7e112ec3bdb9d1c651b621ae8176cce47494bcf48d643e248fee4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5571, + "startColumn": 17, + "charOffset": 165216, + "charLength": 17, + "snippet": { + "text": "getReflectPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5569, + "startColumn": 1, + "charOffset": 165195, + "charLength": 195, + "snippet": { + "text": "}\r\n\r\nint32_t Player::getReflectPercent(CombatType_t combat, bool useCharges) const {\r\n\tint32_t result = reflectPercent[combatTypeToIndex(combat)];\r\n\tfor (const auto &item : getEquippedItems()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "da04b22833ce20ac", + "equalIndicator/v1": "07fa49c1f5c2a0780d0f7c99aa847f8984385d67a66a7921a5aab77581dfffc8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1266, + "startColumn": 67, + "charOffset": 38882, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1264, + "startColumn": 1, + "charOffset": 38811, + "charLength": 166, + "snippet": { + "text": "}\r\n\r\nvoid Creature::onAttackedCreatureKilled(std::shared_ptr target) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (target != getCreature()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ec1e2bf11bfb7dc4", + "equalIndicator/v1": "0807724d2d2f0305c3c57a8efeffcadc9ef64cd912f3e73f5b36f4f3a18f77a7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 953, + "startColumn": 46, + "charOffset": 36402, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 951, + "startColumn": 1, + "charOffset": 36302, + "charLength": 164, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, player);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4d3603f67e1a7519", + "equalIndicator/v1": "080821f3ea35efafcb90d48eb60eb8d27c738299ac62c5b843a02fdbfcd8fde6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 361, + "startColumn": 4, + "charOffset": 11945, + "charLength": 88, + "snippet": { + "text": "case COMBAT_EARTHDAMAGE:\r\n\t\t\t\tdefaultMap[2] -= static_cast(elementEntry.second)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 359, + "startColumn": 1, + "charOffset": 11865, + "charLength": 212, + "snippet": { + "text": "\t\t\t\tdefaultMap[1] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_EARTHDAMAGE:\r\n\t\t\t\tdefaultMap[2] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_ENERGYDAMAGE:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b1a976cd675bbd5", + "equalIndicator/v1": "086094af625c027cc201956132ca11d8fc4b84ed4a80f3fa8b5c6170442b7db7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1450, + "startColumn": 75, + "charOffset": 42486, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1448, + "startColumn": 1, + "charOffset": 42407, + "charLength": 163, + "snippet": { + "text": "}\r\n\r\nvoid Player::onApplyImbuement(Imbuement* imbuement, std::shared_ptr item, uint8_t slot, bool protectionCharm) {\r\n\tif (!imbuement || !item) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2015631eb94159b5", + "equalIndicator/v1": "086344ca59176339eb59d7539168694b0d44062b3faad3cd604f87618aa5cff9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6420, + "startColumn": 74, + "charOffset": 202823, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6418, + "startColumn": 1, + "charOffset": 202745, + "charLength": 180, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPartyCreatureShowStatus(std::shared_ptr target, bool showStatus) {\r\n\tuint32_t cid = target->getID();\r\n\tif (!knownCreatureSet.contains(cid)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c4f268dfd1190c63", + "equalIndicator/v1": "0868448f3ec99464ce58af247c0f16de31fbebad708b1d3b061ab3654e49663d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1763, + "startColumn": 2, + "charOffset": 61475, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1761, + "startColumn": 1, + "charOffset": 61468, + "charLength": 47, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3c3aa44548f42d7d", + "equalIndicator/v1": "088de07babefd850fa90173a2fe2ce7e9b8f280234438b1de70d67e91b8ebaca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Ilist', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Ilist', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/arraylist.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 39, + "startColumn": 40, + "charOffset": 1094, + "charLength": 6, + "snippet": { + "text": "_Ilist" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 37, + "startColumn": 1, + "charOffset": 1048, + "charLength": 95, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tvoid assign(std::initializer_list _Ilist) {\r\n\t\t\tbackContainer.assign(_Ilist);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd3cafddfcf745fc", + "equalIndicator/v1": "08e5bd95e89dd02893ce96af8d2676fcbec4f596cdb7589dad03e2899ff015b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1635, + "startColumn": 7, + "charOffset": 57272, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1633, + "startColumn": 1, + "charOffset": 57128, + "charLength": 367, + "snippet": { + "text": "void TileCallback::onTileCombat(std::shared_ptr creature, std::shared_ptr tile) const {\r\n\t// onTileCombat(creature, pos)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[TileCallback::onTileCombat - Creature {} type {} on tile x: {} y: {} z: {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62871b09f3ebfa9c", + "equalIndicator/v1": "09460b9d35ad96adb78c056aa359f5e752935cfdd439365c613aed8f66327cf0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The value returned by this function should not be disregarded; neglecting it may lead to errors", + "markdown": "The value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 84, + "startColumn": 3, + "charOffset": 2556, + "charLength": 6, + "snippet": { + "text": "socket" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 82, + "startColumn": 1, + "charOffset": 2526, + "charLength": 247, + "snippet": { + "text": "\r\n\t\tstd::error_code error;\r\n\t\tsocket.shutdown(asio::ip::tcp::socket::shutdown_both, error);\r\n\t\tif (error && error != asio::error::not_connected) {\r\n\t\t\tg_logger().error(\"[Connection::closeSocket] - Failed to shutdown socket: {}\", error.message());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79f105fffed4660a", + "equalIndicator/v1": "0954ad40d06ba04b0a29362d5d09a683b1e2834fdb0ee7d04c2eedf0087ac8ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1056, + "startColumn": 6, + "charOffset": 38069, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1054, + "startColumn": 1, + "charOffset": 38033, + "charLength": 173, + "snippet": { + "text": "\tlua_pushnumber(L, rawExp);\r\n\r\n\tif (scriptInterface.protectedCall(L, 4, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b4bb8ceafe503766", + "equalIndicator/v1": "09682e4e976e7defb3537fd552faa4da62993182de8e3be80b2e2fe564e4db16" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 644, + "startColumn": 76, + "charOffset": 20860, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 642, + "startColumn": 1, + "charOffset": 20780, + "charLength": 180, + "snippet": { + "text": "}\r\n\r\nCombatDamage Combat::applyImbuementElementalDamage(std::shared_ptr attackerPlayer, std::shared_ptr item, CombatDamage damage) {\r\n\tif (!item) {\r\n\t\treturn damage;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e8494bd102a7bf15", + "equalIndicator/v1": "097968014b5a54eed184a625122a0e87f722840b94fb821afe9c989f014176a4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 555, + "startColumn": 9, + "charOffset": 17961, + "charLength": 13, + "snippet": { + "text": "elementDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 553, + "startColumn": 1, + "charOffset": 17897, + "charLength": 84, + "snippet": { + "text": "\r\nint16_t WeaponMelee::getElementDamageValue() const {\r\n\treturn elementDamage;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c8cc08005e6a389", + "equalIndicator/v1": "09cced22fc1823d1304908fad120e02c09c761f85c8a79bc090cdf28f834b628" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getCharmPoints' can be made const", + "markdown": "Method 'getCharmPoints' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1937, + "startColumn": 11, + "charOffset": 57253, + "charLength": 14, + "snippet": { + "text": "getCharmPoints" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1935, + "startColumn": 1, + "charOffset": 57206, + "charLength": 93, + "snippet": { + "text": "\t\titemPriceMap[itemId] = price;\r\n\t}\r\n\tuint32_t getCharmPoints() {\r\n\t\treturn charmPoints;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6ae25befbb098402", + "equalIndicator/v1": "09e77b2911ff3840134fbb8ed766baebcb382c680383b78edc6d57ca63514943" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 832, + "startColumn": 2, + "charOffset": 31832, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 830, + "startColumn": 1, + "charOffset": 31825, + "charLength": 52, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d28dec2cdb324626", + "equalIndicator/v1": "09f01ce3f2b8933100951f63cdce3ef5a9cddbaa2ed97634e42c76de9f7c9cef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 288, + "startColumn": 64, + "charOffset": 10193, + "charLength": 7, + "snippet": { + "text": "percent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 286, + "startColumn": 1, + "charOffset": 10041, + "charLength": 279, + "snippet": { + "text": "\t\t\t\t\t\tuint32_t percent = std::min(100, pugi::cast(attr.value()));\r\n\r\n\t\t\t\t\t\timbuement.absorbPercent[combatTypeToIndex(combatType)] = percent;\r\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"speed\") == 0) {\r\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "52d28152b378f983", + "equalIndicator/v1": "0a124a464cb135f89a4d862583e2deb4b1325a276e316ada2f48d2d30c91b42a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getRequiredLevel' can be made const", + "markdown": "Method 'getRequiredLevel' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 220, + "startColumn": 11, + "charOffset": 7159, + "charLength": 16, + "snippet": { + "text": "getRequiredLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 218, + "startColumn": 1, + "charOffset": 7132, + "charLength": 72, + "snippet": { + "text": "\t\tslot = s;\r\n\t}\r\n\tuint32_t getRequiredLevel() {\r\n\t\treturn reqLevel;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a873fc30c21cbaed", + "equalIndicator/v1": "0a4bc7604f8a06fc04d886d8dac4d74398f272151e119d494171f7120d27af3d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2576, + "startColumn": 44, + "charOffset": 76964, + "charLength": 14, + "snippet": { + "text": "nextLevelCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2574, + "startColumn": 1, + "charOffset": 76915, + "charLength": 116, + "snippet": { + "text": "\t}\r\n\r\n\tdouble_t result = round(((count * 100.) / nextLevelCount) * 100.) / 100.;\r\n\tif (result > 100) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d3b6b21c26ddf7a", + "equalIndicator/v1": "0a7f1522a8644c003b8ef39dad44df733f0e9b70f20ed5b7ff73a2813b30e3f0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1168, + "startColumn": 7, + "charOffset": 44429, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1166, + "startColumn": 1, + "charOffset": 44304, + "charLength": 278, + "snippet": { + "text": "\r\nbool EventCallback::zoneBeforeCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureLeave - \"\r\n\t\t \"Zone {} Creature {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c8ea6676a4f89d52", + "equalIndicator/v1": "0a84645430e7d6e77141794be5fe90173e7ecd3c30282bda61d3eaf55bc9ad2d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: text", + "markdown": "Constructor does not initialize these fields: text" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 8, + "charOffset": 569, + "charLength": 9, + "snippet": { + "text": "BasicItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 543, + "charLength": 89, + "snippet": { + "text": "\r\n#pragma pack(1)\r\nstruct BasicItem {\r\n\tstd::string text;\r\n\t// size_t description { 0 };\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79d31b2df980bcc7", + "equalIndicator/v1": "0a969a7631d2c70d583fe0d2b252a2c6242e56ed4ed946aa2f8b23b7fe0db406" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 751, + "startColumn": 53, + "charOffset": 24677, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 749, + "startColumn": 1, + "charOffset": 24620, + "charLength": 180, + "snippet": { + "text": "}\r\n\r\nuint32_t Spell::getManaCost(std::shared_ptr player) const {\r\n\tWheelSpellGrade_t spellGrade = player->wheel()->getSpellUpgrade(getName());\r\n\tuint32_t manaRedution = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dd1a6915dd614028", + "equalIndicator/v1": "0aa8565d32f49a75d949fe8d264a57292d28d5a74c02f7f4febc2747635ea169" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 437, + "startColumn": 59, + "charOffset": 13087, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 435, + "startColumn": 1, + "charOffset": 13024, + "charLength": 221, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::StepInField(std::shared_ptr creature, std::shared_ptr item, const Position &) {\r\n\tif (creature == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::StepInField] - Creature is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7fce00f72210a3e2", + "equalIndicator/v1": "0aaef74e5734f0dca60fdb1345b190442d8ba43ea9d8fba55f4a9f069cdb4374" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3132, + "startColumn": 2, + "charOffset": 96031, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3130, + "startColumn": 1, + "charOffset": 95920, + "charLength": 227, + "snippet": { + "text": "void ProtocolGame::parseMarketAcceptOffer(NetworkMessage &msg) {\r\n\tuint32_t timestamp = msg.get();\r\n\tuint16_t counter = msg.get();\r\n\tuint16_t amount = msg.get();\r\n\tif (amount > 0 && counter > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "00594876d401ec76", + "equalIndicator/v1": "0aaf62ed3b4d898322754c00a99fc959af2a5413dc1b7cb5928c04ae3adeea9e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 961, + "startColumn": 7, + "charOffset": 34630, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 959, + "startColumn": 1, + "charOffset": 34618, + "charLength": 154, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnTradeRequest - \"\r\n\t\t \"Player {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5f1fe7ce1e25b319", + "equalIndicator/v1": "0ab4cbc2a4b8ce7444e225d12fc18ee9a7019358d592b87f67bff0733983ce91" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 226, + "startColumn": 10, + "charOffset": 6438, + "charLength": 7, + "snippet": { + "text": "maxBeds" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 224, + "startColumn": 1, + "charOffset": 6396, + "charLength": 57, + "snippet": { + "text": "\r\n\tint32_t getMaxBeds() const {\r\n\t\treturn maxBeds;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f8d9b1d2d3b27bd1", + "equalIndicator/v1": "0ac3c84f6c168997f85a0c3968c37fe6e4119c3cc207b8e3d1d504470a59f7d8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 321, + "startColumn": 8, + "charOffset": 7987, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 319, + "startColumn": 1, + "charOffset": 7889, + "charLength": 214, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetCapacity(lua_State* L) {\r\n\t// itemType:getCapacity()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->maxItems);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c9148f75a60de6b9", + "equalIndicator/v1": "0acb0db6585dd2b5f2dcc19b801c4a238dc66c03ab7825f7fdfddc937af621d4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2128, + "startColumn": 2, + "charOffset": 65386, + "charLength": 15, + "snippet": { + "text": "HighscoreType_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2126, + "startColumn": 1, + "charOffset": 65379, + "charLength": 154, + "snippet": { + "text": "\t}\r\n\r\n\tHighscoreType_t type = static_cast(msg.getByte());\r\n\tuint8_t category = msg.getByte();\r\n\tuint32_t vocation = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2b9f3e86e896e88", + "equalIndicator/v1": "0ae459f987fc84989e7fad9ab8e5ac75c8466e4ad19a80daec04bbd5ccad1c67" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1205, + "startColumn": 29, + "charOffset": 35480, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1203, + "startColumn": 1, + "charOffset": 35349, + "charLength": 151, + "snippet": { + "text": "\tvoid sendCreatureIcon(std::shared_ptr creature) {\r\n\t\tif (client && !client->oldProtocol) {\r\n\t\t\tclient->sendCreatureIcon(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0099d96430b2168e", + "equalIndicator/v1": "0b1813f2db8c84333de5287c12e8b3a9b753e75f033a98fda7c630caacaba5d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'initBoolValue' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'initBoolValue' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 52, + "charOffset": 812, + "charLength": 10, + "snippet": { + "text": "const bool" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 589, + "charLength": 295, + "snippet": { + "text": "\tCustomAttribute(const std::string &initStringKey, const std::string &initStringValue);\r\n\tCustomAttribute(const std::string &initStringKey, const double initDoubleValue);\r\n\tCustomAttribute(const std::string &initStringKey, const bool initBoolValue);\r\n\r\n\tconst std::string &getStringKey() const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aa87e150ff0c0731", + "equalIndicator/v1": "0b37b47d4f3f9be212b766e5e66c8766e9a65683070be0781e4949b9ff3731c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'mType' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'mType' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 274, + "startColumn": 112, + "charOffset": 8790, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 272, + "startColumn": 1, + "charOffset": 8674, + "charLength": 246, + "snippet": { + "text": "}\r\n\r\nvoid SpawnMonster::scheduleSpawn(uint32_t spawnMonsterId, spawnBlock_t &sb, const std::shared_ptr mType, uint16_t interval, bool startup /*= false*/) {\r\n\tif (interval <= 0) {\r\n\t\tspawnMonster(spawnMonsterId, sb, mType, startup);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "934945c6a3a7c265", + "equalIndicator/v1": "0b38cbdabe599194ee31e04f4cb78cd7220a0845977a0b8d614811aa2b2b6b70" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7726, + "startColumn": 37, + "charOffset": 270238, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7724, + "startColumn": 1, + "charOffset": 270195, + "charLength": 193, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tauto manaLoss = std::min(target->getMana(), -manaChange);\r\n\t\tBlockType_t blockType = target->blockHit(attacker, COMBAT_MANADRAIN, manaLoss);\r\n\t\tif (blockType != BLOCK_NONE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "990cc4809476c65e", + "equalIndicator/v1": "0b3f45de831b3797b8f1973e92e6a9a808d06f4978975d85f400a4022f17c88e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'isPremium' can be made const", + "markdown": "Method 'isPremium' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 97, + "startColumn": 7, + "charOffset": 2494, + "charLength": 9, + "snippet": { + "text": "isPremium" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 95, + "startColumn": 1, + "charOffset": 2482, + "charLength": 49, + "snippet": { + "text": "\t}\r\n\r\n\tbool isPremium() {\r\n\t\treturn premium;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e5eae05015f86ece", + "equalIndicator/v1": "0b6582080d2295196e1b9ac337ad41ad98a9a7a9a25d41c13bd0c6b306fb1bd6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 242, + "startColumn": 8, + "charOffset": 6009, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 240, + "startColumn": 1, + "charOffset": 5919, + "charLength": 198, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetName(lua_State* L) {\r\n\t// itemType:getName()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushString(L, itemType->name);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75e2ee8c1bf2c493", + "equalIndicator/v1": "0b6c95013135a2ff74b136bc4cdc49d1baa149659e6563798b9577c3b26538cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 670, + "startColumn": 61, + "charOffset": 21370, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 668, + "startColumn": 1, + "charOffset": 21305, + "charLength": 248, + "snippet": { + "text": "}\r\n\r\nvoid Spell::applyCooldownConditions(std::shared_ptr player) const {\r\n\tWheelSpellGrade_t spellGrade = player->wheel()->getSpellUpgrade(getName());\r\n\tbool isUpgraded = getWheelOfDestinyUpgraded() && static_cast(spellGrade) > 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ed1dac496045d96", + "equalIndicator/v1": "0b98c22b49c93456978dc1278186d399931b355974e156a9369da58180499a2e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 202, + "startColumn": 80, + "charOffset": 5668, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 200, + "startColumn": 1, + "charOffset": 5584, + "charLength": 128, + "snippet": { + "text": "}\r\n\r\nbool House::kickPlayer(std::shared_ptr player, std::shared_ptr target) {\r\n\tif (!target) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "80a718ba540240fc", + "equalIndicator/v1": "0bb94f7e97fcffb357cf1ea3a1a4165635693c419cff8dd2f371fb1af48af44f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 902, + "startColumn": 52, + "charOffset": 29271, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 900, + "startColumn": 1, + "charOffset": 29215, + "charLength": 127, + "snippet": { + "text": "}\r\n\r\nvoid Creature::drainMana(std::shared_ptr attacker, int32_t manaLoss) {\r\n\tonAttacked();\r\n\tchangeMana(-manaLoss);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "477499c93ecc2d51", + "equalIndicator/v1": "0bcef6c1eb6a13fcce508d31fbefc96b6d6d0b2ecf82dc88f36e895b5ec0edfa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1291, + "startColumn": 55, + "charOffset": 42847, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1289, + "startColumn": 1, + "charOffset": 42788, + "charLength": 305, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatHealth(std::shared_ptr caster, const Position &position, const std::unique_ptr &area, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tapplyExtensions(caster, nullptr, damage, params);\r\n\tconst auto origin = caster ? caster->getPosition() : Position();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bdf62cbfe2911424", + "equalIndicator/v1": "0be179621848755f2de485a89a55d84e521c513bd7a2cded9c27490cfe5d0458" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 958, + "startColumn": 27, + "charOffset": 30747, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 956, + "startColumn": 1, + "charOffset": 30715, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6e25960ca0312694", + "equalIndicator/v1": "0c03eb26a70d6b7fea2f866fbd0a66ce110f00cbb0d88c656dc4f57b6d30115b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use '= default' to define a trivial destructor", + "markdown": "Use '= default' to define a trivial destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 3, + "charOffset": 662, + "charLength": 16, + "snippet": { + "text": "CreatureCallback" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 486, + "charLength": 248, + "snippet": { + "text": "\tCreatureCallback(LuaScriptInterface* scriptInterface, std::shared_ptr targetCreature) :\r\n\t\tscriptInterface(scriptInterface), m_targetCreature(targetCreature) {};\r\n\t~CreatureCallback() { }\r\n\r\n\tbool startScriptInterface(int32_t scriptId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a0163640bc7684f4", + "equalIndicator/v1": "0c17e6b8eb5dd14fdfe11c882da5659ddc9d9de57b1b869133c681ba996f7f69" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 792, + "startColumn": 57, + "charOffset": 25774, + "charLength": 11, + "snippet": { + "text": "attackSkill" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 790, + "startColumn": 1, + "charOffset": 25659, + "charLength": 176, + "snippet": { + "text": "\r\n\tint32_t minValue = std::round(player->getLevel() / 5);\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\r\n\r\n\tif (target) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "113ea4f52e25822c", + "equalIndicator/v1": "0c76009ca120775e5773ec14ea73a215a392963e78bec811159019cfb5420b2c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 853, + "startColumn": 17, + "charOffset": 25475, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 851, + "startColumn": 1, + "charOffset": 25454, + "charLength": 231, + "snippet": { + "text": "}\r\n\r\nvoid Container::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr topParent = getTopParent();\r\n\tif (topParent->getCreature()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bf5a9dedb4e861e5", + "equalIndicator/v1": "0c8df03f11773a7f170cf6d0636190ead4eac2ce80fda9ce030a3cbb68a8c5f3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 740, + "startColumn": 27, + "charOffset": 23123, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 738, + "startColumn": 1, + "charOffset": 23091, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a39dee61e517bbc9", + "equalIndicator/v1": "0c972b1f975c846ae34a24d3d9c71d18c43bd4f4ecbcb757ac6329416f2993ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1298, + "startColumn": 23, + "charOffset": 43349, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1296, + "startColumn": 1, + "charOffset": 43178, + "charLength": 246, + "snippet": { + "text": "\r\nvoid Combat::doCombatMana(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tdoCombatMana(caster, target, caster ? caster->getPosition() : Position(), damage, params);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1f21b7b3709c816c", + "equalIndicator/v1": "0c9ba9f1fc8c6653cfb1e0d58d1df30ce81d8181db2fa081343b5b9320dedd03" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getLockerItemsAndCountById' can be made const", + "markdown": "Method 'getLockerItemsAndCountById' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7016, + "startColumn": 65, + "charOffset": 207407, + "charLength": 26, + "snippet": { + "text": "getLockerItemsAndCountById" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7014, + "startColumn": 1, + "charOffset": 207338, + "charLength": 305, + "snippet": { + "text": "}\r\n\r\nstd::pair>, uint16_t> Player::getLockerItemsAndCountById(const std::shared_ptr &depotLocker, uint8_t tier, uint16_t itemId) {\r\n\tstd::vector> lockerItems;\r\n\tauto [itemVector, itemMap] = requestLockerItems(depotLocker, false, tier);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0b53e62203e503f1", + "equalIndicator/v1": "0cc2ba6090f2321688016ad11e234b99cc0f575fe894ec7429fff3f25a32bdcf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 393, + "startColumn": 8, + "charOffset": 9789, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 391, + "startColumn": 1, + "charOffset": 9693, + "charLength": 211, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetDefense(lua_State* L) {\r\n\t// itemType:getDefense()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->defense);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "491791f0f961f478", + "equalIndicator/v1": "0cd296c964b98891c7d06bbbcc9cb1916dd4cb0e7a9ff687acc6613ac7885197" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly", + "markdown": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2379, + "startColumn": 61, + "charOffset": 90428, + "charLength": 12, + "snippet": { + "text": "__FUNCTION__" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2377, + "startColumn": 1, + "charOffset": 90284, + "charLength": 187, + "snippet": { + "text": "\t\tauto autoContainer = Item::CreateItem(autoContainerId);\r\n\t\tif (!autoContainer) {\r\n\t\t\tg_logger().error(\"[{}] Failed to create auto container\", __FUNCTION__);\r\n\t\t\treturn toCylinder;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "673525a785ee75b1", + "equalIndicator/v1": "0cd77114bf16ea63df97c39f55bc47c602f3998758021c6d28763eb0a46276bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'door' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'door' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 405, + "startColumn": 43, + "charOffset": 11850, + "charLength": 4, + "snippet": { + "text": "door" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 403, + "startColumn": 1, + "charOffset": 11803, + "charLength": 128, + "snippet": { + "text": "}\r\n\r\nvoid House::addDoor(std::shared_ptr door) {\r\n\tdoorList.push_back(door);\r\n\tdoor->setHouse(static_self_cast());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3252cbc4676141cd", + "equalIndicator/v1": "0d275a7a4cb904fd5b4b3ed2bb82f89862d893905603dc136da7da70506e553c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'guild' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'guild' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 36, + "startColumn": 54, + "charOffset": 1366, + "charLength": 5, + "snippet": { + "text": "guild" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 34, + "startColumn": 1, + "charOffset": 1308, + "charLength": 94, + "snippet": { + "text": "}\r\n\r\nvoid IOGuild::saveGuild(const std::shared_ptr guild) {\r\n\tif (!guild) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "66b08e2e4d664535", + "equalIndicator/v1": "0d35fc20a6dc1db927591a91cf6d10cc63a7084f78f6ea518a16fdd786c8e960" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use nullptr", + "markdown": "Use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 399, + "startColumn": 61, + "charOffset": 12120, + "charLength": 4, + "snippet": { + "text": "NULL" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 397, + "startColumn": 1, + "charOffset": 12039, + "charLength": 198, + "snippet": { + "text": "\t\treturn false;\r\n\t}\r\n\tauto isContainerAndHasSomethingInside = (getContainer() != NULL) && (getContainer()->getItemList().size() > 0);\r\n\treturn (isStowable() || isContainerAndHasSomethingInside);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6790fb62f6eb56e", + "equalIndicator/v1": "0d36666e79b6e08850eb1b237f15f1c03fb06d511da8a7b16a4f6efab264b43f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 501, + "startColumn": 33, + "charOffset": 14387, + "charLength": 9, + "snippet": { + "text": "spectator" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 499, + "startColumn": 1, + "charOffset": 14319, + "charLength": 239, + "snippet": { + "text": "\t// send to client\r\n\tsize_t i = 0;\r\n\tfor (std::shared_ptr spectator : spectators) {\r\n\t\tif (std::shared_ptr tmpPlayer = spectator->getPlayer()) {\r\n\t\t\ttmpPlayer->sendRemoveTileThing(cylinderMapPos, oldStackPosVector[i++]);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1cb413ff4b6f3a5d", + "equalIndicator/v1": "0d60f30d25703e7f4e5ce47a5149d332a3bdcd97784b8f1fd09919ea76b60d2e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 424, + "startColumn": 85, + "charOffset": 15278, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 422, + "startColumn": 1, + "charOffset": 15182, + "charLength": 194, + "snippet": { + "text": "\r\n// Party\r\nbool Events::eventPartyOnJoin(std::shared_ptr party, std::shared_ptr player) {\r\n\t// Party:onJoin(player) or Party.onJoin(self, player)\r\n\tif (info.partyOnJoin == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e63a2ba4874f48a8", + "equalIndicator/v1": "0d702d55a575747be4afafc8cd12e2752fb2f89a58b28517b75c1ae14bb14fda" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 22, + "charOffset": 606, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 552, + "charLength": 247, + "snippet": { + "text": "#include \"map/spectators.hpp\"\r\n\r\nReturnValue Mailbox::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t, std::shared_ptr) {\r\n\tstd::shared_ptr item = thing->getItem();\r\n\tif (item && Mailbox::canSend(item)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "96225abee62a7a35", + "equalIndicator/v1": "0d8a0fbb8b71c45ec992414c411a49297e21561f9db9c4e359171e9bdb03b5af" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2645, + "startColumn": 47, + "charOffset": 99712, + "charLength": 8, + "snippet": { + "text": "cylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2643, + "startColumn": 1, + "charOffset": 99661, + "charLength": 195, + "snippet": { + "text": "}\r\n\r\nvoid Game::addMoney(std::shared_ptr cylinder, uint64_t money, uint32_t flags /*= 0*/) {\r\n\tif (cylinder == nullptr) {\r\n\t\tg_logger().error(\"[{}] cylinder is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e938265e7859d1a", + "equalIndicator/v1": "0d99d672b74230b5e9ca9766aae537c9374fd998b746206bb0a705fcb0542bf3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1974, + "startColumn": 2, + "charOffset": 60483, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1972, + "startColumn": 1, + "charOffset": 60422, + "charLength": 159, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseRemoveVip(NetworkMessage &msg) {\r\n\tuint32_t guid = msg.get();\r\n\tg_game().playerRequestRemoveVip(player->getID(), guid);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "11f027a087cef3f5", + "equalIndicator/v1": "0d9f422cd0bdfda969381a822ce786ed41571e5c5abf60ede0621c67479e1a69" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1257, + "startColumn": 55, + "charOffset": 41453, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1255, + "startColumn": 1, + "charOffset": 41394, + "charLength": 344, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatHealth(std::shared_ptr caster, std::shared_ptr target, const Position &origin, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster && target)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6938b1dacdf0e0ab", + "equalIndicator/v1": "0dc8175d1d31997b0d6c304583cfb5b4384c78bc494835b0b4c635fda2cc197a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 446, + "startColumn": 15, + "charOffset": 12729, + "charLength": 18, + "snippet": { + "text": "onAttackedCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 444, + "startColumn": 1, + "charOffset": 12576, + "charLength": 328, + "snippet": { + "text": "\tvoid onTickCondition(ConditionType_t type, bool &bRemove);\r\n\tvirtual void onCombatRemoveCondition(std::shared_ptr condition);\r\n\tvirtual void onAttackedCreature(std::shared_ptr) { }\r\n\tvirtual void onAttacked();\r\n\tvirtual void onAttackedCreatureDrainHealth(std::shared_ptr target, int32_t points);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2909a10601ae0fa9", + "equalIndicator/v1": "0dd154510c6cb741380df6ab7e9ac118617c12efded28197c89ce3f76c1f37bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 548, + "startColumn": 2, + "charOffset": 14591, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 546, + "startColumn": 1, + "charOffset": 14496, + "charLength": 235, + "snippet": { + "text": "\tdouble amount = getNumber(L, 4);\r\n\tuint16_t subType = getNumber(L, 5, 1);\r\n\tuint16_t actionId = getNumber(L, 6, 0);\r\n\tbool ignoreCap = getBoolean(L, 7, false);\r\n\tbool inBackpacks = getBoolean(L, 8, false);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db9da1af80666057", + "equalIndicator/v1": "0dfc7a66c308a20a10ed2b768b61f0bd0e8627684abfa27a1f0b934053462dbc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 146, + "startColumn": 2, + "charOffset": 5063, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 144, + "startColumn": 1, + "charOffset": 5056, + "charLength": 72, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n\treturn returnValue;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab11e86e2a7eede2", + "equalIndicator/v1": "0e6c674d27b097a9748117d80f63047bde799980b20aed4f1e22432efaf754b7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 321, + "startColumn": 2, + "charOffset": 11929, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 319, + "startColumn": 1, + "charOffset": 11922, + "charLength": 52, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f87715c6cc3a1f8d", + "equalIndicator/v1": "0e75527bd55a0df678cb494132be89c73f2209483699d33febf8d24fb4af4603" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 630, + "startColumn": 16, + "charOffset": 16948, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 628, + "startColumn": 1, + "charOffset": 16914, + "charLength": 128, + "snippet": { + "text": "\t\t\tcontinue;\r\n\t\t}\r\n\t\tsetAbsorb(i, std::round((100 - creature->getAbsorbPercent(indexToCombatType(i))) * value / 100.f));\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "249547746ac118e0", + "equalIndicator/v1": "0e7e00e1b2e03259bd496af8edd4b7da941fe35413f27f7e9dcdf2772c89267e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 479, + "startColumn": 21, + "charOffset": 11272, + "charLength": 14, + "snippet": { + "text": "creatureVector" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 477, + "startColumn": 1, + "charOffset": 11246, + "charLength": 73, + "snippet": { + "text": "\t}\r\n\r\n\tlua_createtable(L, creatureVector->size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "55382831522e71a4", + "equalIndicator/v1": "0e7e494983ea12eed51c3578b8ce41790ff597b6e2bcef5485aa2eb8c772eebd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 285, + "startColumn": 41, + "charOffset": 10590, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 283, + "startColumn": 1, + "charOffset": 10544, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "50dd218cbc8d9cf1", + "equalIndicator/v1": "0e84443c4d240465e7887e009d1c638a48bb08f8fca0830ad42894008f52259a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1531, + "startColumn": 12, + "charOffset": 43807, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1529, + "startColumn": 1, + "charOffset": 43791, + "charLength": 209, + "snippet": { + "text": "}\r\n\r\nvoid Tile::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tauto spectators = Spectators().find(getPosition(), true);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d6442d4db6bdaf17", + "equalIndicator/v1": "0e8dc867581e9fb7833cf55068f2fb3b77ddb2d13a91f3557e830522ac2d565e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 73, + "startColumn": 7, + "charOffset": 2387, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 71, + "startColumn": 1, + "charOffset": 2241, + "charLength": 308, + "snippet": { + "text": "\r\nReturnValue EventCallback::creatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnAreaCombat - \"\r\n\t\t \"Creature {} on tile position {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ffa1b1c114f07897", + "equalIndicator/v1": "0ea2a432bde10ec0f17245026f15ba3df4f01221a5d119e7194ed91d7dc790ef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1910, + "startColumn": 67, + "charOffset": 55164, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1908, + "startColumn": 1, + "charOffset": 55093, + "charLength": 150, + "snippet": { + "text": "}\r\n\r\nstd::string Item::parseImbuementDescription(std::shared_ptr item) {\r\n\tstd::ostringstream s;\r\n\tif (item && item->getImbuementSlot() >= 1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "46c2dc1579318a12", + "equalIndicator/v1": "0ec9082c837b92ef94d35bb3d33b8357a44beabda0ed83f06dc4132de7b6bc3c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6865, + "startColumn": 15, + "charOffset": 215068, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6863, + "startColumn": 1, + "charOffset": 215007, + "charLength": 99, + "snippet": { + "text": "\tmsg.addByte(cid);\r\n\tmsg.add(slot);\r\n\tAddItem(msg, item);\r\n\twriteToOutputBuffer(msg);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e3af63bcdd716b5d", + "equalIndicator/v1": "0f2f5c7333cd5b0968c5b4f98f0306aba5b0529fee12ce74b95582e0d27b4bc3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 612, + "startColumn": 40, + "charOffset": 18563, + "charLength": 10, + "snippet": { + "text": "resultList" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 610, + "startColumn": 1, + "charOffset": 18458, + "charLength": 167, + "snippet": { + "text": "\t\t\tif (!resultList.empty()) {\r\n\t\t\t\tauto it = resultList.begin();\r\n\t\t\t\tstd::advance(it, uniform_random(0, resultList.size() - 1));\r\n\t\t\t\treturn selectTarget(*it);\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "13820499c8017c55", + "equalIndicator/v1": "0f3d47117b912efd01448a9f085d5afd33251ecd5bb4fcf45070b3e8ec099cae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 242, + "startColumn": 32, + "charOffset": 6889, + "charLength": 7, + "snippet": { + "text": "bedItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 240, + "startColumn": 1, + "charOffset": 6839, + "charLength": 140, + "snippet": { + "text": "\r\n\tint index = 0;\r\n\tfor (std::shared_ptr bedItem : beds) {\r\n\t\tpushUserdata(L, bedItem);\r\n\t\tsetItemMetatable(L, -1, bedItem);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f1d8a51783378faf", + "equalIndicator/v1": "0f697e3cddaf4d0a7389875b768d3129f6008895f5e6a0cd078c3018f2ceb6fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1329, + "startColumn": 53, + "charOffset": 44738, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1327, + "startColumn": 1, + "charOffset": 44681, + "charLength": 303, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatMana(std::shared_ptr caster, const Position &position, const std::unique_ptr &area, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tapplyExtensions(caster, nullptr, damage, params);\r\n\tconst auto origin = caster ? caster->getPosition() : Position();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9309a671f5bbe613", + "equalIndicator/v1": "0f6eed27d3240ef31b72010db345c1f0950b50b83f67f3f8145898b036457bfd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 966, + "startColumn": 7, + "charOffset": 36837, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 964, + "startColumn": 1, + "charOffset": 36695, + "charLength": 266, + "snippet": { + "text": "\r\nbool EventCallback::playerOnRotateItem(std::shared_ptr player, std::shared_ptr item, const Position &position) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a40499dea31e72d3", + "equalIndicator/v1": "0f88d9f4621fd5304fff8ac6f9fcad4bb29cf85af99adf8df1ee970fe7dd2dc1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7968, + "startColumn": 69, + "charOffset": 250476, + "charLength": 6, + "snippet": { + "text": "corpse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7966, + "startColumn": 1, + "charOffset": 250403, + "charLength": 171, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendKillTrackerUpdate(std::shared_ptr corpse, const std::string &name, const Outfit_t creatureOutfit) {\r\n\tif (oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c7e500db557bf79b", + "equalIndicator/v1": "0f93c585d775b2f8e5315900e0e6962c1b62e88fcf6b810f2c1dc1ae4080ff65" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 102, + "startColumn": 59, + "charOffset": 3467, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 100, + "startColumn": 1, + "charOffset": 3403, + "charLength": 147, + "snippet": { + "text": "\t}\r\n\r\n\tbool playerCanUseItemOnHouseTile(std::shared_ptr player, std::shared_ptr item) {\r\n\t\tif (!player || !item) {\r\n\t\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "73f9471c3a9efdd4", + "equalIndicator/v1": "0ff137a7fd5d9711f14353f87b0741a722ef95b0ecf2f319a4f7684a542c5480" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 786, + "startColumn": 56, + "charOffset": 25544, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 784, + "startColumn": 1, + "charOffset": 25484, + "charLength": 210, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatDispelFunc(std::shared_ptr, std::shared_ptr target, const CombatParams ¶ms, CombatDamage*) {\r\n\tif (target) {\r\n\t\ttarget->removeCombatCondition(params.dispelType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "35081e79b2a0d47b", + "equalIndicator/v1": "0fffe54367d15494c0bf91485736743522fe0444f69cb5947d1fcd7442c11bc9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 44, + "startColumn": 16, + "charOffset": 1122, + "charLength": 16, + "snippet": { + "text": "internalAddThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 42, + "startColumn": 1, + "charOffset": 1102, + "charLength": 81, + "snippet": { + "text": "}\r\n\r\nvoid Cylinder::internalAddThing(uint32_t, std::shared_ptr) {\r\n\t//\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9b5b5c08bec6f5c5", + "equalIndicator/v1": "101cfc334f1eca8b10164e058ed29336efc49013711c7228e6a2fbf7f245ad81" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1374, + "startColumn": 61, + "charOffset": 41145, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1372, + "startColumn": 1, + "charOffset": 41080, + "charLength": 158, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::GetTileDescription(std::shared_ptr tile, NetworkMessage &msg) {\r\n\tif (oldProtocol) {\r\n\t\tmsg.add(0x00); // Env effects\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb5edd2108ae9083", + "equalIndicator/v1": "103c4d0fd6727d7c673347423cfa3c36ebeb0ea7a4c50e15a6b41b7caa6915b3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'compareItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'compareItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 242, + "startColumn": 41, + "charOffset": 8114, + "charLength": 11, + "snippet": { + "text": "compareItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 240, + "startColumn": 1, + "charOffset": 8069, + "charLength": 105, + "snippet": { + "text": "}\r\n\r\nbool Item::equals(std::shared_ptr compareItem) const {\r\n\tif (!compareItem) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c8346e0f12156595", + "equalIndicator/v1": "103e01350dcda241138a9084ce69857cf4d38a446d4ff5a24db65a2bc0df7823" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'getRewardsFromContainer' is within a recursive call chain", + "markdown": "Function 'getRewardsFromContainer' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1329, + "startColumn": 44, + "charOffset": 39149, + "charLength": 23, + "snippet": { + "text": "getRewardsFromContainer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1327, + "startColumn": 1, + "charOffset": 39101, + "charLength": 193, + "snippet": { + "text": "}\r\n\r\nstd::vector> Player::getRewardsFromContainer(std::shared_ptr container) const {\r\n\tstd::vector> rewardItemsVector;\r\n\tif (container) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f42be0fc33d2e2ee", + "equalIndicator/v1": "105fd426da3c36297678936842109ad92dcea5e3ad1589b6ea6165731f701a20" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7550, + "startColumn": 64, + "charOffset": 263094, + "charLength": 56, + "snippet": { + "text": "charm->chance + attackerPlayer->getCharmChanceModifier()" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7548, + "startColumn": 1, + "charOffset": 262928, + "charLength": 429, + "snippet": { + "text": "\t activeCharm != CHARM_NONE) {\r\n\t\tconst auto charm = g_iobestiary().getBestiaryCharm(activeCharm);\r\n\t\tint8_t chance = charm->id == CHARM_CRIPPLE ? charm->chance : charm->chance + attackerPlayer->getCharmChanceModifier();\r\n\t\tg_logger().debug(\"charm chance: {}, base: {}, bonus: {}\", chance, charm->chance, attackerPlayer->getCharmChanceModifier());\r\n\t\tif (charm->type == CHARM_OFFENSIVE && (chance >= normal_random(0, 100))) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cac5caffc2d03451", + "equalIndicator/v1": "10b84d1cae216d65a261a2d19a6f3c2d2f937b78b6501da11a613c51ff919c4f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 298, + "startColumn": 93, + "charOffset": 7706, + "charLength": 5, + "snippet": { + "text": "ticks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 296, + "startColumn": 1, + "charOffset": 7608, + "charLength": 132, + "snippet": { + "text": "\t}\r\n\r\n\treturn createCondition(static_cast(id), static_cast(type), ticks, 0, buff != 0, subId);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "42bccebb473cab30", + "equalIndicator/v1": "10bec48557ea88722a3fefbb734178cce2b35b38832c1839013dc30f18a5d990" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 348, + "startColumn": 18, + "charOffset": 9962, + "charLength": 21, + "snippet": { + "text": "getElementDamageValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 346, + "startColumn": 1, + "charOffset": 9912, + "charLength": 151, + "snippet": { + "text": "\t\treturn params.combatType;\r\n\t}\r\n\tvirtual int16_t getElementDamageValue() const override;\r\n\tvoid setMinChange(int32_t change) {\r\n\t\tminChange = change;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "54111c5c0eeda6de", + "equalIndicator/v1": "110050b93a8d3710fb5f151d50a1441623f1d41445e4ec13b2866b11383d1fb9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10015, + "startColumn": 8, + "charOffset": 348893, + "charLength": 25, + "snippet": { + "text": "auto [monsterId, monster]" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10013, + "startColumn": 1, + "charOffset": 348740, + "charLength": 272, + "snippet": { + "text": "\t\t// If the forgeable monsters haven't been created\r\n\t\t// Then we'll create them so they don't return in the next if (forgeableMonsters.empty())\r\n\t\tfor (auto [monsterId, monster] : monsters) {\r\n\t\t\tauto monsterTile = monster->getTile();\r\n\t\t\tif (!monster || !monsterTile) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "924506ed2704c1df", + "equalIndicator/v1": "110ad18245f3651a199e6384b8d12d04ea405aa0d6a306382075b21ba753b5a7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 767, + "startColumn": 65, + "charOffset": 29217, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 765, + "startColumn": 1, + "charOffset": 29148, + "charLength": 180, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerStorage(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d1b7ca5264817701", + "equalIndicator/v1": "1135e902e21ab46e30a70f9b31d5fdf7aa33493de52a8f45953bdb9dd5dae30d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 783, + "startColumn": 41, + "charOffset": 30094, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 781, + "startColumn": 1, + "charOffset": 30048, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e239a5fc547feff1", + "equalIndicator/v1": "1158ebadb62572aab46707b1af298e15bd82e05798184fb79e2b640e91dadeb7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 391, + "startColumn": 41, + "charOffset": 14697, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 389, + "startColumn": 1, + "charOffset": 14651, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "887ada9be39af280", + "equalIndicator/v1": "116697cb6f4f128a886ddd93dad0c675138d67e7d67d9d81cbc5d48416efe483" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newOwner' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newOwner' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 514, + "startColumn": 94, + "charOffset": 15319, + "charLength": 8, + "snippet": { + "text": "newOwner" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 512, + "startColumn": 1, + "charOffset": 15221, + "charLength": 157, + "snippet": { + "text": "}\r\n\r\nbool House::executeTransfer(std::shared_ptr item, std::shared_ptr newOwner) {\r\n\tif (transferItem != item) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "44e2e600b43e9f95", + "equalIndicator/v1": "11713c70cccfb4d148ac7c9cc12027358a7ec86e176ecb6eb8b23ef92c7e0b21" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'onGainExperience' is within a recursive call chain", + "markdown": "Function 'onGainExperience' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1289, + "startColumn": 16, + "charOffset": 39635, + "charLength": 16, + "snippet": { + "text": "onGainExperience" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1287, + "startColumn": 1, + "charOffset": 39615, + "charLength": 172, + "snippet": { + "text": "}\r\n\r\nvoid Creature::onGainExperience(uint64_t gainExp, std::shared_ptr target) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tauto master = getMaster();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75e323914019e42c", + "equalIndicator/v1": "118e3a24fa79d17ae23b08e65d61b4ce6b25e6ebc1b2fd161d457aff27459498" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 605, + "startColumn": 59, + "charOffset": 16319, + "charLength": 28, + "snippet": { + "text": "(skillsPercent[skill] - 100)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 603, + "startColumn": 1, + "charOffset": 16201, + "charLength": 165, + "snippet": { + "text": "\r\n\t\tint32_t unmodifiedSkill = player->getBaseSkill(skill);\r\n\t\tskills[skill] = static_cast(unmodifiedSkill * ((skillsPercent[skill] - 100) / 100.f));\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "17bdb40224b0f798", + "equalIndicator/v1": "11a0c529ba3bb1f966183b0bed334a939c04fbd0c3e699f49679b1906ccb2296" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use std::make_unique instead", + "markdown": "Use std::make_unique instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 159, + "startColumn": 13, + "charOffset": 4362, + "charLength": 5, + "snippet": { + "text": "reset" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 157, + "startColumn": 1, + "charOffset": 4139, + "charLength": 368, + "snippet": { + "text": "\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4::from_string(g_configManager().getString(IP, __FUNCTION__))), serverPort)));\r\n\t\t} else {\r\n\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4(INADDR_ANY)), serverPort)));\r\n\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d1b644eb69e423e7", + "equalIndicator/v1": "1200409a003768d41a85db9779990b66199eb801a4fcdf96bec3a6df64ff280e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 526, + "startColumn": 8, + "charOffset": 13017, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 524, + "startColumn": 1, + "charOffset": 12921, + "charLength": 211, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetDecayId(lua_State* L) {\r\n\t// itemType:getDecayId()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->decayTo);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3595d2751d68a764", + "equalIndicator/v1": "1228eabedd5d8c4608e98d1f42d77579833fd5eabedd612d634bb721209459f5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'mType' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'mType' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 34, + "startColumn": 53, + "charOffset": 1118, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 1061, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nMonster::Monster(const std::shared_ptr mType) :\r\n\tCreature(),\r\n\tnameDescription(asLowerCaseString(mType->nameDescription)),\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "58d70a9bb55d946b", + "equalIndicator/v1": "122fdb7ff6089e8e94f81ac4d68c9feae912b0c50e7fc76392b43c65e63aeddf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 808, + "startColumn": 20, + "charOffset": 20102, + "charLength": 18, + "snippet": { + "text": "luaItemSetDuration" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 806, + "startColumn": 1, + "charOffset": 20078, + "charLength": 244, + "snippet": { + "text": "}\r\n\r\nint ItemFunctions::luaItemSetDuration(lua_State* L) {\r\n\t// item:setDuration(minDuration, maxDuration = 0, decayTo = 0, showDuration = true)\r\n\t// Example: item:setDuration(10000, 20000, 2129, false) = random duration from range 10000/20000\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "358f1e0127ad7783", + "equalIndicator/v1": "125f89eb1ab2cddd1d3131955295c9aa7e39713ead40d3d0914e963f2b0c9319" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 792, + "startColumn": 89, + "charOffset": 25792, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 790, + "startColumn": 1, + "charOffset": 25699, + "charLength": 255, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatNullFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage*) {\r\n\tCombatConditionFunc(caster, target, params, nullptr);\r\n\tCombatDispelFunc(caster, target, params, nullptr);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0ec1d9d7a30d4bbd", + "equalIndicator/v1": "12743b06c0cb50ac35327b86485d4346abfa4f84265e85f4f082423d0a66f59d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 61, + "startColumn": 61, + "charOffset": 1693, + "charLength": 5, + "snippet": { + "text": "thing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 59, + "startColumn": 1, + "charOffset": 1628, + "charLength": 125, + "snippet": { + "text": "}\r\n\r\nuint32_t ScriptEnvironment::addThing(std::shared_ptr thing) {\r\n\tif (!thing || thing->isRemoved()) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d82af4b0f510cdbe", + "equalIndicator/v1": "1286bfea5d455c186adc20984cc1763eba49ffb338b75ac9d6b5cc0681638c77" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1005, + "startColumn": 12, + "charOffset": 27961, + "charLength": 4, + "snippet": { + "text": "zone" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1003, + "startColumn": 1, + "charOffset": 27876, + "charLength": 145, + "snippet": { + "text": "\tlua_createtable(L, static_cast(zones.size()), 0);\r\n\tint index = 0;\r\n\tfor (auto zone : zones) {\r\n\t\tindex++;\r\n\t\tpushUserdata(L, zone);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4462430f479cbac8", + "equalIndicator/v1": "129326ca885278422dab62fb9717409de20f67676de6b0c21632b917cf2fd70f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'creature' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'creature' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1085, + "startColumn": 62, + "charOffset": 31682, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1083, + "startColumn": 1, + "charOffset": 31612, + "charLength": 255, + "snippet": { + "text": "\t\t}\r\n\t}\r\n\tvoid sendUpdateTileCreature(const std::shared_ptr creature) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendUpdateTileCreature(creature->getPosition(), creature->getTile()->getClientIndexOfCreature(static_self_cast(), creature), creature);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71b309b996bfd431", + "equalIndicator/v1": "12a033ec8869d1fae589a735a22d37977442ae7423de67a96eba40fa0f13e772" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2037, + "startColumn": 96, + "charOffset": 60382, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2035, + "startColumn": 1, + "charOffset": 60282, + "charLength": 172, + "snippet": { + "text": "}\r\n\r\nvoid Player::onRemoveContainerItem(std::shared_ptr container, std::shared_ptr item) {\r\n\tif (tradeState != TRADE_TRANSFER) {\r\n\t\tcheckTradeState(item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8167981ddf4657f1", + "equalIndicator/v1": "12da16983d01e7acbdc5215890db8314dd8148d3d215bed3dc3ba84ba762fce7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5617, + "startColumn": 63, + "charOffset": 166601, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5615, + "startColumn": 1, + "charOffset": 166534, + "charLength": 117, + "snippet": { + "text": "}\r\n\r\nPartyShields_t Player::getPartyShield(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\treturn SHIELD_NONE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "131b46d7180b1dc8", + "equalIndicator/v1": "130a68b981fe8e1cacd893bd7a772efe62cdfbda5698a8e8d42bdb93d9385886" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1367, + "startColumn": 31, + "charOffset": 41081, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1365, + "startColumn": 1, + "charOffset": 40964, + "charLength": 137, + "snippet": { + "text": "\tvoid sendCreatureHealth(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureHealth(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "90efd39277f0c3ff", + "equalIndicator/v1": "131236725241ea8f5787ead29996e9ed6732696ec5101f276f8b4fcdd047ab63" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 723, + "startColumn": 67, + "charOffset": 27951, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 721, + "startColumn": 1, + "charOffset": 27880, + "charLength": 182, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerBosstiary(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6e2a249c34e53c05", + "equalIndicator/v1": "131537fc39cd553f0755d02c7854d97ff1eea94c376a9bd3636f8134f66cdd31" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 142, + "startColumn": 14, + "charOffset": 4031, + "charLength": 13, + "snippet": { + "text": "queryMaxCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 140, + "startColumn": 1, + "charOffset": 3820, + "charLength": 668, + "snippet": { + "text": "\t// cylinder implementations\r\n\tvirtual ReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override final;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6d7f459cad2705eb", + "equalIndicator/v1": "132f39e960a159fa3447700cf9818e8aca59aaf0f00b16e91dabb2840dd20551" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 29, + "startColumn": 14, + "charOffset": 830, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 27, + "startColumn": 1, + "charOffset": 785, + "charLength": 486, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e90294d1ed7a4fd2", + "equalIndicator/v1": "133e0aec4dd5158973d4bd3c1a5a3b5a10486c9b1676251fc03a1bf6e87641de" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 121, + "startColumn": 41, + "charOffset": 4237, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 119, + "startColumn": 1, + "charOffset": 4191, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0db080d49074b3ef", + "equalIndicator/v1": "13747aa3d8cf8ff42f29a5d841dd049d849735fbe81f4af7bcd745c59d26c1bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 900, + "startColumn": 96, + "charOffset": 28744, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 898, + "startColumn": 1, + "charOffset": 28644, + "charLength": 218, + "snippet": { + "text": "}\r\n\r\nbool InstantSpell::canThrowSpell(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tconst Position &fromPos = creature->getPosition();\r\n\tconst Position &toPos = target->getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "12de0b1fc2839d64", + "equalIndicator/v1": "13784989bfa5dc27993122fa88847d51df890a4f66729a6884ca926a968d636e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'hmenu' declared with a const-qualified typedef; results in the type being 'HMENU__ *const' instead of 'const HMENU__ *'", + "markdown": "'hmenu' declared with a const-qualified typedef; results in the type being 'HMENU__ \\*const' instead of 'const HMENU__ \\*'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 229, + "startColumn": 14, + "charOffset": 7847, + "charLength": 5, + "snippet": { + "text": "hmenu" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 227, + "startColumn": 1, + "charOffset": 7775, + "charLength": 162, + "snippet": { + "text": "#ifdef OS_WINDOWS\r\n\tconst HWND hwnd = GetConsoleWindow();\r\n\tconst HMENU hmenu = GetSystemMenu(hwnd, FALSE);\r\n\tEnableMenuItem(hmenu, SC_CLOSE, MF_GRAYED);\r\n#endif\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "202ff16d38a98230", + "equalIndicator/v1": "137e1649e71e784b37af3ff0d6e434a0784a2043bb10dfd2a2936469cb978762" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/metrics/metrics.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 187, + "startColumn": 2, + "charOffset": 6878, + "charLength": 20, + "snippet": { + "text": "DEFINE_LATENCY_CLASS" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 185, + "startColumn": 1, + "charOffset": 6870, + "charLength": 162, + "snippet": { + "text": "\t\t}\r\n\r\n\tDEFINE_LATENCY_CLASS(method, \"method\", \"method\");\r\n\tDEFINE_LATENCY_CLASS(lua, \"lua\", \"scope\");\r\n\tDEFINE_LATENCY_CLASS(query, \"query\", \"truncated_query\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8ecbc58b89dcbd85", + "equalIndicator/v1": "137e52dde1846afc2a7429ce1f69c92bfc1a2959ca2107845e83696fa4ce9585" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1136, + "startColumn": 65, + "charOffset": 31658, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1134, + "startColumn": 1, + "charOffset": 31542, + "charLength": 228, + "snippet": { + "text": "\r\nstd::vector>\r\nItem::getDescriptions(const ItemType &it, std::shared_ptr item /*= nullptr*/) {\r\n\tstd::ostringstream ss;\r\n\tstd::vector> descriptions;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c4e2fc6694d20204", + "equalIndicator/v1": "138573f34414dd5743566051f9c08590317efe38ccddaf162c6c3e8b56fe3559" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 85, + "startColumn": 12, + "charOffset": 2788, + "charLength": 9, + "snippet": { + "text": "healthMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 83, + "startColumn": 1, + "charOffset": 2666, + "charLength": 282, + "snippet": { + "text": "\t\tmonster->skull = mType->info.skull;\r\n\t\tmonster->health = mType->info.health * mType->getHealthMultiplier();\r\n\t\tmonster->healthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\t\tmonster->baseSpeed = mType->getBaseSpeed();\r\n\t\tmonster->internalLight = mType->info.light;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5b763c8c50de29ef", + "equalIndicator/v1": "139436863c9bdaf03057510af2966c517bcb8e2a4031a09687dd791ee1fca9a1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 769, + "startColumn": 53, + "charOffset": 24324, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 767, + "startColumn": 1, + "charOffset": 24267, + "charLength": 141, + "snippet": { + "text": "}\r\n\r\nvoid Party::addPlayerSupply(std::shared_ptr player, std::shared_ptr item) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ccc674bd46d3883d", + "equalIndicator/v1": "13bc8ed1c4309b7a08661815252ea441c1dcaed22b4f184ed642c8539a683f09" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 884, + "startColumn": 21, + "charOffset": 28142, + "charLength": 15, + "snippet": { + "text": "getWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 882, + "startColumn": 1, + "charOffset": 28117, + "charLength": 313, + "snippet": { + "text": "}\r\n\r\nint32_t WeaponWand::getWeaponDamage(std::shared_ptr player, std::shared_ptr, std::shared_ptr, bool maxDamage /* = false*/) const {\r\n\tif (!g_configManager().getBoolean(TOGGLE_CHAIN_SYSTEM, __FUNCTION__)) {\r\n\t\t// Returns maximum damage or a random value between minChange and maxChange\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "de96d150e611567c", + "equalIndicator/v1": "13dcdbe150406cfe2a2030340383c57f3efc4f13e7cba50832805492baed7abd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 467, + "startColumn": 27, + "charOffset": 16670, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 465, + "startColumn": 1, + "charOffset": 16638, + "charLength": 123, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.partyOnLeave, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "25da1ac2f1d1054d", + "equalIndicator/v1": "13f67782077dc9ddce73a32e88719699c68cc267bbc2a9e7f4fe03ee53234877" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2700, + "startColumn": 14, + "charOffset": 79830, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2698, + "startColumn": 1, + "charOffset": 79510, + "charLength": 614, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ffb8e3eb0904ae69", + "equalIndicator/v1": "13f69e45d6fafc8276df04531e184b903bf9edffc46d34c920e29b8795a2da86" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Move constructors should be marked noexcept", + "markdown": "Move constructors should be marked noexcept" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 113, + "startColumn": 2, + "charOffset": 2888, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 111, + "startColumn": 1, + "charOffset": 2830, + "charLength": 149, + "snippet": { + "text": "\tItemType &operator=(const ItemType &other) = delete;\r\n\r\n\tItemType(ItemType &&other) = default;\r\n\tItemType &operator=(ItemType &&other) = default;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a798465f00799c30", + "equalIndicator/v1": "13fd2870b3a4043fa09529112c4b4cddd7190a9b6dd4ff85eb87b78d3101b3b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3093, + "startColumn": 101, + "charOffset": 115178, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3091, + "startColumn": 1, + "charOffset": 115073, + "charLength": 265, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalCollectManagedItems(std::shared_ptr player, std::shared_ptr item, ObjectCategory_t category /* = OBJECTCATEGORY_DEFAULT*/, bool isLootContainer /* = true*/) {\r\n\tif (!player || !item) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a418343f262f42f6", + "equalIndicator/v1": "140030301d1e7b73b1f9ba322e5981a4de9f2cb048131f010f1aa9f643e9b8c4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 299, + "startColumn": 8, + "charOffset": 7447, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 297, + "startColumn": 1, + "charOffset": 7351, + "charLength": 211, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetCharges(lua_State* L) {\r\n\t// itemType:getCharges()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->charges);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "778360e0c82e8500", + "equalIndicator/v1": "1419f3b29c98ceeb3d4936fd7369622421aebda52f19acbc70d131b6390e7d50" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 592, + "startColumn": 2, + "charOffset": 13848, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 590, + "startColumn": 1, + "charOffset": 13841, + "charLength": 175, + "snippet": { + "text": "\t}\r\n\r\n\tuint32_t subType = getNumber(L, 3, 1);\r\n\r\n\tstd::shared_ptr item = Item::CreateItem(itemId, std::min(subType, Item::items[itemId].stackSize));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd927b3657703377", + "equalIndicator/v1": "141c5b3ed1ee08f8fca21d79d8552608d54c01dd743e9aa11487d9c3153caf53" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 651, + "startColumn": 18, + "charOffset": 17590, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 649, + "startColumn": 1, + "charOffset": 17554, + "charLength": 147, + "snippet": { + "text": "\t\t\tcontinue;\r\n\t\t}\r\n\t\tsetIncrease(i, std::round((100 - creature->getIncreasePercent(indexToCombatType(i))) * increasePercentValue / 100.f));\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "36bf79a6fc456ac2", + "equalIndicator/v1": "143c91fc3735b192ea0773244690036e9d5080c15824f3b007f10f903d23a0f7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 313, + "startColumn": 71, + "charOffset": 11248, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 311, + "startColumn": 1, + "charOffset": 11173, + "charLength": 109, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::AddItem(NetworkMessage &msg, std::shared_ptr item) {\r\n\tif (!item) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ee86a8f5dbaadfc8", + "equalIndicator/v1": "14569eddfdae31173c45939f8658cd0a33c9a9ee4c1d45a252cfbb140f9e930d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Move constructor initializes class member by calling a copy constructor", + "markdown": "Move constructor initializes class member by calling a copy constructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 34, + "startColumn": 3, + "charOffset": 933, + "charLength": 5, + "snippet": { + "text": "spell" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 820, + "charLength": 181, + "snippet": { + "text": "\tspellBlock_t &operator=(const spellBlock_t &other) = delete;\r\n\tspellBlock_t(spellBlock_t &&other) noexcept :\r\n\t\tspell(other.spell),\r\n\t\tchance(other.chance),\r\n\t\tspeed(other.speed),\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9674191d0666b774", + "equalIndicator/v1": "146accb20dea487aa4b6b735ff7716ac51c4c53c1efae77f53fd1a81145fe418" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3862, + "startColumn": 38, + "charOffset": 115730, + "charLength": 14, + "snippet": { + "text": "amountToRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3860, + "startColumn": 1, + "charOffset": 115559, + "charLength": 210, + "snippet": { + "text": "\t\t// If the item quantity is already needed, remove the quantity and stop the loop\r\n\t\tif (item->getItemAmount() >= amountToRemove) {\r\n\t\t\tg_game().internalRemoveItem(item, amountToRemove);\r\n\t\t\treturn true;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1ef362c45a00a6b8", + "equalIndicator/v1": "146d67e122ebd92a33e97abd49fbe30d5609bef1c9ccabae2b9088accd6c46f1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'itemIds' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'itemIds' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 385, + "startColumn": 82, + "charOffset": 19872, + "charLength": 27, + "snippet": { + "text": "const std::vector" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 383, + "startColumn": 1, + "charOffset": 19619, + "charLength": 344, + "snippet": { + "text": "\tvoid playerOpenManagedContainer(uint32_t playerId, ObjectCategory_t category, bool isLootContainer);\r\n\tvoid playerSetQuickLootFallback(uint32_t playerId, bool fallback);\r\n\tvoid playerQuickLootBlackWhitelist(uint32_t playerId, QuickLootFilter_t filter, const std::vector itemIds);\r\n\r\n\tvoid playerRequestDepotItems(uint32_t playerId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d69c24edf3a0d7c", + "equalIndicator/v1": "148079d9a96e7bbbfb08dde39d1cf53e971c27ed78ed857529eedbe2cd2936d8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1340, + "startColumn": 92, + "charOffset": 45479, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1338, + "startColumn": 1, + "charOffset": 45383, + "charLength": 357, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatCondition(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster == target || canCombat) && params.impactEffect != CONST_ME_NONE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "18e036021615f85d", + "equalIndicator/v1": "14d039554f2403dc869afbdfa54cd1c2191dde6198d3777b5fbf1491bee0199b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1259, + "startColumn": 27, + "charOffset": 44803, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1257, + "startColumn": 1, + "charOffset": 44771, + "charLength": 134, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnInventoryUpdate, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "615266a73d3f5a03", + "equalIndicator/v1": "14d8d4c75f5516ea2ee9a205773f4ce3e5286d20ccf9ce8651d01a51825bdf14" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2092, + "startColumn": 8, + "charOffset": 57539, + "charLength": 4, + "snippet": { + "text": "mina" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2090, + "startColumn": 1, + "charOffset": 57411, + "charLength": 191, + "snippet": { + "text": "void ConditionSpeed::getFormulaValues(int32_t var, int32_t &min, int32_t &max) const {\r\n\tint32_t difference = var - 40;\r\n\tmin = mina * difference + minb;\r\n\tmax = maxa * difference + maxb;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c78d53a48c87d48c", + "equalIndicator/v1": "14e323249a761eb6aaa946e5bd51740d3e6ca2bf79aed035c53e21034d0db33b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 339, + "startColumn": 75, + "charOffset": 11764, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 337, + "startColumn": 1, + "charOffset": 11685, + "charLength": 157, + "snippet": { + "text": "}\r\n\r\nstd::vector Imbuements::getImbuements(std::shared_ptr player, std::shared_ptr item) {\r\n\tstd::vector imbuements;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e52c75ab5939d5a", + "equalIndicator/v1": "14f0768f5cee99cbd8d4d3d702719e29558c8a8e9530169014ae056aebe3e892" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Std::move of the const variable 'initDescription' has no effect; remove std::move() or make the variable non-const", + "markdown": "Std::move of the const variable 'initDescription' has no effect; remove std::move() or make the variable non-const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1403, + "startColumn": 15, + "charOffset": 37043, + "charLength": 9, + "snippet": { + "text": "std::move" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1401, + "startColumn": 1, + "charOffset": 36980, + "charLength": 137, + "snippet": { + "text": "\t\tguid(initGuid),\r\n\t\tname(std::move(initName)),\r\n\t\tdescription(std::move(initDescription)),\r\n\t\ticon(initIcon),\r\n\t\tnotify(initNotify) { }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b0e7db36be9d28f9", + "equalIndicator/v1": "150214f8efcfe819f6388798effbd41cbc1e96298a50243735ff7d05f94918ab" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1176, + "startColumn": 6, + "charOffset": 41952, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1174, + "startColumn": 1, + "charOffset": 41894, + "charLength": 195, + "snippet": { + "text": "\tLuaScriptInterface::pushCombatDamage(L, damage);\r\n\r\n\tif (scriptInterface.protectedCall(L, 8, 4) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "07b98791f23d6669", + "equalIndicator/v1": "153d17cb538e863e66f8acf83877b196eee08a41fe32f81d7e6a7348f42a5c60" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'item' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 259, + "startColumn": 37, + "charOffset": 10407, + "charLength": 27, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 257, + "startColumn": 1, + "charOffset": 10177, + "charLength": 325, + "snippet": { + "text": "\tbool internalCreatureSay(std::shared_ptr creature, SpeakClasses type, const std::string &text, bool ghostMode, Spectators* spectatorsPtr = nullptr, const Position* pos = nullptr);\r\n\r\n\tObjectCategory_t getObjectCategory(const std::shared_ptr item);\r\n\tObjectCategory_t getObjectCategory(const ItemType &it);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7712cebfcd93a72b", + "equalIndicator/v1": "1551a079ebd0fef2e576f6a085e94591dcb90519768f8c004baf084656cb5135" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 503, + "startColumn": 66, + "charOffset": 27181, + "charLength": 31, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 501, + "startColumn": 1, + "charOffset": 27020, + "charLength": 326, + "snippet": { + "text": "\t// Animation help functions\r\n\tvoid addCreatureHealth(const std::shared_ptr target);\r\n\tstatic void addCreatureHealth(const CreatureVector &spectators, const std::shared_ptr target);\r\n\tvoid addPlayerMana(const std::shared_ptr target);\r\n\tvoid addPlayerVocation(const std::shared_ptr target);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d866c7556d8500da", + "equalIndicator/v1": "15a705a5ccd9db5a154c94612aa1fdca810f87cd83e6b1e81423acf794a9e63d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 310, + "startColumn": 8, + "charOffset": 7718, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 308, + "startColumn": 1, + "charOffset": 7614, + "charLength": 223, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetFluidSource(lua_State* L) {\r\n\t// itemType:getFluidSource()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->fluidSource);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1368264523ad3df6", + "equalIndicator/v1": "15b28b34f3a967ab5fab945dc422c9e5250100d7291e41f354933f81c2035747" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getXpBoostTime' can be made const", + "markdown": "Method 'getXpBoostTime' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1862, + "startColumn": 11, + "charOffset": 55268, + "charLength": 14, + "snippet": { + "text": "getXpBoostTime" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1860, + "startColumn": 1, + "charOffset": 55252, + "charLength": 62, + "snippet": { + "text": "\t}\r\n\r\n\tuint16_t getXpBoostTime() {\r\n\t\treturn xpBoostTime;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0a54feedb4c5e5b4", + "equalIndicator/v1": "15fb7dc6bc960b58d9da6ec40a4cbb680831508f8168e54f2a114c9b3fe1085d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 199, + "startColumn": 15, + "charOffset": 8218, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 197, + "startColumn": 1, + "charOffset": 8065, + "charLength": 311, + "snippet": { + "text": "\r\n\tvirtual void postAddNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\tvirtual void postRemoveNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\r\n\tbool isPushable() override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4dbd0c2ffb896c0a", + "equalIndicator/v1": "16037eb1713e2b0c7d034834212e4b121efa91f089aabcb811dd6ea46924fd97" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 94, + "startColumn": 68, + "charOffset": 2823, + "charLength": 6, + "snippet": { + "text": "action" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 92, + "startColumn": 1, + "charOffset": 2751, + "charLength": 168, + "snippet": { + "text": "}\r\n\r\nbool Actions::registerLuaActionEvent(const std::shared_ptr action) {\r\n\tauto actionIdVector = action->getActionIdsVector();\r\n\tif (actionIdVector.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bdfa1a4fe6f94292", + "equalIndicator/v1": "16152b628580ca27fab95a054400b28e7836dd02e553fb4865868d497696552b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 438, + "startColumn": 20, + "charOffset": 10366, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 436, + "startColumn": 1, + "charOffset": 10341, + "charLength": 63, + "snippet": { + "text": "\t}\r\n\r\n\tlua_pushnumber(L, tile->getItemCount());\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9c9f7bcb9043ec36", + "equalIndicator/v1": "162476875a0f2cc42e82cb75e50ed01135549e621a3d8eddb67ede64dd248f86" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 44, + "startColumn": 8, + "charOffset": 1232, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 42, + "startColumn": 1, + "charOffset": 1144, + "charLength": 201, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsDoor(lua_State* L) {\r\n\t// itemType:isDoor()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isDoor());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "89262b407d4b0f53", + "equalIndicator/v1": "163aeb80e45083f52f94e59e70738ce5cb4f430d857eb5cf4dfdbd90dcbb6e24" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1299, + "startColumn": 9, + "charOffset": 38471, + "charLength": 5, + "snippet": { + "text": "items" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1297, + "startColumn": 1, + "charOffset": 38445, + "charLength": 61, + "snippet": { + "text": "\t\t\t}\r\n\t\t} else {\r\n\t\t\tn += items->getTopItemCount();\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ec13440e777a08ac", + "equalIndicator/v1": "16529d6c5e432f6b3eb57f7c29da690ebfae9041b4aeb4fc1e783229329ee37b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6840, + "startColumn": 36, + "charOffset": 236682, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6838, + "startColumn": 1, + "charOffset": 236517, + "charLength": 298, + "snippet": { + "text": "\tfloat pvpDamageMultiplier = targetDamageReceivedMultiplier * attackerDamageDealtMultiplier * levelDifferenceDamageMultiplier;\r\n\r\n\tdamage.primary.value = std::round(damage.primary.value * pvpDamageMultiplier);\r\n\tdamage.secondary.value = std::round(damage.secondary.value * pvpDamageMultiplier);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c0a0fea28f804dc7", + "equalIndicator/v1": "1655a1d94576ddb110ff6e17620721b31506f593113dd02c072c0586fc80f464" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from '::std::_Common_float_type_t' (aka 'double') to 'float'", + "markdown": "Narrowing conversion from '::std::_Common_float_type_t' (aka 'double') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 347, + "startColumn": 10, + "charOffset": 9843, + "charLength": 10, + "snippet": { + "text": "multiplier" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 345, + "startColumn": 1, + "charOffset": 9742, + "charLength": 154, + "snippet": { + "text": "\tfloat getDefenseMultiplier() const {\r\n\t\tfloat multiplier = mType->getDefenseMultiplier();\r\n\t\treturn multiplier * std::pow(1.02f, getForgeStack());\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4ab7d1751ec71ddf", + "equalIndicator/v1": "16578122a38b99b875610d34edd0663f4f3bb823d629efdfc8643b8054c297a4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 113, + "startColumn": 32, + "charOffset": 3424, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 111, + "startColumn": 1, + "charOffset": 3243, + "charLength": 329, + "snippet": { + "text": "\tbool registerLuaActionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaEvent(const std::shared_ptr event);\r\n\tvoid clear(bool isFromXML = false);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "03e81efa061fcf54", + "equalIndicator/v1": "167b247c3604431c98c2d38090d54f2c84fdc026c434212336912fc612c07d74" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6380, + "startColumn": 55, + "charOffset": 220327, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6378, + "startColumn": 1, + "charOffset": 220268, + "charLength": 144, + "snippet": { + "text": "}\r\n\r\nvoid Game::setCreatureSpeed(std::shared_ptr creature, int32_t speed) {\r\n\tcreature->setBaseSpeed(static_cast(speed));\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3df242853b837c55", + "equalIndicator/v1": "16b2c291f0cead58649948201123af703744045fea3fe9014a1b46902d64cc6e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'returnValue' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'returnValue' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 257, + "startColumn": 22, + "charOffset": 9487, + "charLength": 17, + "snippet": { + "text": "const ReturnValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 255, + "startColumn": 1, + "charOffset": 9416, + "charLength": 175, + "snippet": { + "text": "\tvoid sendForgingData();\r\n\tvoid sendOpenForge();\r\n\tvoid sendForgeError(const ReturnValue returnValue);\r\n\tvoid closeForgeWindow();\r\n\tvoid parseForgeEnter(NetworkMessage &msg);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "69d73e110a7280ec", + "equalIndicator/v1": "16d196811271c04bbb0c271ed4e7a9770b877d7d2f8312a9544128c239e0971a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant call to 'c_str'", + "markdown": "Redundant call to 'c_str'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 283, + "startColumn": 22, + "charOffset": 8082, + "charLength": 8, + "snippet": { + "text": "password" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 281, + "startColumn": 1, + "charOffset": 7992, + "charLength": 146, + "snippet": { + "text": "\r\nbool Account::authenticatePassword(const std::string &password) {\r\n\tif (Argon2 {}.argon(password.c_str(), getPassword())) {\r\n\t\treturn true;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c207dcb6bc537774", + "equalIndicator/v1": "16d994a9345f7deaf60256622b6ac7f80a10c07bae39f3948e41b20bdb5ceb5b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5592, + "startColumn": 17, + "charOffset": 165850, + "charLength": 14, + "snippet": { + "text": "getReflectFlat" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5590, + "startColumn": 1, + "charOffset": 165829, + "charLength": 189, + "snippet": { + "text": "}\r\n\r\nint32_t Player::getReflectFlat(CombatType_t combat, bool useCharges) const {\r\n\tint32_t result = reflectFlat[combatTypeToIndex(combat)];\r\n\tfor (const auto &item : getEquippedItems()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "109ebed26f58c37a", + "equalIndicator/v1": "16e3b69b1870299428f7f05dcc3135750955fb94f3f84b6c81d0b120a21fe150" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 137, + "startColumn": 11, + "charOffset": 3813, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 135, + "startColumn": 1, + "charOffset": 3766, + "charLength": 69, + "snippet": { + "text": "\t\t\treturn \"onRecvbyte\";\r\n\t\tdefault:\r\n\t\t\treturn std::string();\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "10a004c155f36b47", + "equalIndicator/v1": "17173f9a9f4c2cdc703495319ab6e87692d7a62607613b790fce6001e7bee766" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Std::move of the const variable 'initName' has no effect; remove std::move() or make the variable non-const", + "markdown": "Std::move of the const variable 'initName' has no effect; remove std::move() or make the variable non-const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1402, + "startColumn": 8, + "charOffset": 37006, + "charLength": 9, + "snippet": { + "text": "std::move" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1400, + "startColumn": 1, + "charOffset": 36847, + "charLength": 244, + "snippet": { + "text": "\tVIPEntry(uint32_t initGuid, const std::string &initName, const std::string &initDescription, uint32_t initIcon, bool initNotify) :\r\n\t\tguid(initGuid),\r\n\t\tname(std::move(initName)),\r\n\t\tdescription(std::move(initDescription)),\r\n\t\ticon(initIcon),\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3719ed87512de548", + "equalIndicator/v1": "172372ec666f9911ff0476c348a272a2038ca18b48bc01ef21f986b1769f49b2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 160, + "startColumn": 3, + "charOffset": 4656, + "charLength": 49, + "snippet": { + "text": "condition->setFormulaVars(mina, minb, maxa, maxb)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 158, + "startColumn": 1, + "charOffset": 4516, + "charLength": 227, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1)->dynamic_self_cast();\r\n\tif (condition) {\r\n\t\tcondition->setFormulaVars(mina, minb, maxa, maxb);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "74209be36f304ca9", + "equalIndicator/v1": "172749740d97c2b7a11976e7e733c6465cf5371e3cef3199cdfceb4f45a732b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 661, + "startColumn": 15, + "charOffset": 21640, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 659, + "startColumn": 1, + "charOffset": 21600, + "charLength": 101, + "snippet": { + "text": "\t\t\t\tcase 1:\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tchance = std::min(skill, 74) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a40f7ae37625a585", + "equalIndicator/v1": "172b6a9eaf6ecaaa49ce0a65156f13f6fee98bd89b69c77300c8add909c5cfa9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2440, + "startColumn": 17, + "charOffset": 72637, + "charLength": 8, + "snippet": { + "text": "vocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2438, + "startColumn": 1, + "charOffset": 72565, + "charLength": 172, + "snippet": { + "text": "\t\t\tcapacity += noneVocation->getCapGain();\r\n\t\t} else {\r\n\t\t\thealthMax += vocation->getHPGain();\r\n\t\t\thealth += vocation->getHPGain();\r\n\t\t\tmanaMax += vocation->getManaGain();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f185d3b04ec210c4", + "equalIndicator/v1": "172e020845e8aab6ea46e1aa3c8121b66702e6ca5d84411d6990da03546b7c4d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1064, + "startColumn": 98, + "charOffset": 30946, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1062, + "startColumn": 1, + "charOffset": 30821, + "charLength": 236, + "snippet": { + "text": "\t// tile\r\n\t// send methods\r\n\tvoid sendAddTileItem(std::shared_ptr itemTile, const Position &pos, std::shared_ptr item) {\r\n\t\tif (client) {\r\n\t\t\tint32_t stackpos = itemTile->getStackposOfItem(static_self_cast(), item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fd8503b1c8cd044d", + "equalIndicator/v1": "1731632336120dcf8133b89f1f0ef0bf37be4e126661bc5aeacf8a4d1c766d7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Where', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Where', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorset.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 67, + "startColumn": 56, + "charOffset": 1746, + "charLength": 6, + "snippet": { + "text": "_Where" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 65, + "startColumn": 1, + "charOffset": 1684, + "charLength": 153, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, const T &_Val) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, _Val);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "77e512ac653b2480", + "equalIndicator/v1": "173772b4925c35187428ef44ca02f6e3d37674fe9802e18329ac15f7b9834563" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4424, + "startColumn": 60, + "charOffset": 159216, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4422, + "startColumn": 1, + "charOffset": 159152, + "charLength": 174, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Game::wrapItem(std::shared_ptr item, std::shared_ptr house) {\r\n\tuint16_t hiddenCharges = 0;\r\n\tuint16_t amount = item->getItemCount();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "88a8c1e7841224e8", + "equalIndicator/v1": "177b0ddb2aeed4d06fe228840a0f28ab1a70d20b0bd069748a9d9460f629ff70" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 296, + "startColumn": 4, + "charOffset": 7596, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 294, + "startColumn": 1, + "charOffset": 7575, + "charLength": 194, + "snippet": { + "text": "\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (auto it = creatures->rbegin(), end = creatures->rend(); it != end; ++it) {\r\n\t\t\t\tif (!(*it)->isInvisible()) {\r\n\t\t\t\t\tstd::shared_ptr player = (*it)->getPlayer();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fa81428f32f9537e", + "equalIndicator/v1": "1781fc8766fd48b5986d6ffd3c9b8a3ed82fb6d01f092492dede7f0b5a5674ed" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1364, + "startColumn": 55, + "charOffset": 46593, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1362, + "startColumn": 1, + "charOffset": 46534, + "charLength": 312, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatDispel(std::shared_ptr caster, const Position &position, const std::unique_ptr &area, const CombatParams ¶ms) {\r\n\tconst auto origin = caster ? caster->getPosition() : Position();\r\n\tCombatFunc(caster, origin, position, area, params, CombatDispelFunc, nullptr);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ae8ee9f227f6f07a", + "equalIndicator/v1": "1799a09932d19c0938dcecaaeae1a8efd3ce6288760cb3ea7377aee692bdb3c1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6604, + "startColumn": 120, + "charOffset": 194173, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6602, + "startColumn": 1, + "charOffset": 193930, + "charLength": 349, + "snippet": { + "text": "\t\t\tif (!g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) {\r\n\t\t\t\tslot->state = PreyTaskDataState_Inactive;\r\n\t\t\t} else if (slot->id == PreySlot_Three && !g_configManager().getBoolean(TASK_HUNTING_FREE_THIRD_SLOT, __FUNCTION__)) {\r\n\t\t\t\tslot->state = PreyTaskDataState_Locked;\r\n\t\t\t} else if (slot->id == PreySlot_Two && !isPremium()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8285f6e57fe0aebd", + "equalIndicator/v1": "17aaa5de91782f47c187515ad250c35605733af868f616246ece314d358a02fd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 261, + "startColumn": 114, + "charOffset": 8588, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 259, + "startColumn": 1, + "charOffset": 8470, + "charLength": 179, + "snippet": { + "text": "}\r\n\r\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr tile) const {\r\n\tif (isLoadedCallback()) {\r\n\t\tLuaVariant var;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db653183438ba301", + "equalIndicator/v1": "17e485deca5bcaaa3daa5499b07bb24999eedd28bd223dc7756a7ac03c1a79a0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 438, + "startColumn": 7, + "charOffset": 16490, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 436, + "startColumn": 1, + "charOffset": 16361, + "charLength": 279, + "snippet": { + "text": "\r\nbool EventCallback::playerOnLookInShop(std::shared_ptr player, const ItemType* itemType, uint8_t count) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInShop - \"\r\n\t\t \"Player {} itemType {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b3d0d48e39a06e96", + "equalIndicator/v1": "17ec75e7df4c1bfafd10e9d51a4e972cba95aebd0cc937459a51f00dc1b2fbe7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3041, + "startColumn": 56, + "charOffset": 113085, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3039, + "startColumn": 1, + "charOffset": 113025, + "charLength": 269, + "snippet": { + "text": "}\r\n\r\nbool Game::handleFallbackLogic(std::shared_ptr player, std::shared_ptr &lootContainer, ContainerIterator &containerIterator, const bool &fallbackConsumed) {\r\n\tif (fallbackConsumed || !player->quickLootFallbackToMainContainer) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2eb3f52d249e258c", + "equalIndicator/v1": "17f05e8cb36c3289dd8898292469c031d3fc171261672454b63c7648d8b17a3f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 167, + "startColumn": 20, + "charOffset": 5314, + "charLength": 17, + "snippet": { + "text": "luaGameGetPlayers" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 165, + "startColumn": 1, + "charOffset": 5290, + "charLength": 135, + "snippet": { + "text": "}\r\n\r\nint GameFunctions::luaGameGetPlayers(lua_State* L) {\r\n\t// Game.getPlayers()\r\n\tlua_createtable(L, g_game().getPlayersOnline(), 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "91c617c26caf3a7e", + "equalIndicator/v1": "181a51b8f870799b9d20e7428cd002fafd55b9ebd0da50685adcde7ae16505ce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'weak_service' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'weak_service' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 143, + "startColumn": 59, + "charOffset": 3842, + "charLength": 12, + "snippet": { + "text": "weak_service" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 141, + "startColumn": 1, + "charOffset": 3779, + "charLength": 162, + "snippet": { + "text": "}\r\n\r\nvoid ServicePort::openAcceptor(std::weak_ptr weak_service, uint16_t port) {\r\n\tif (auto service = weak_service.lock()) {\r\n\t\tservice->open(port);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5d57f2cbe2e4a14a", + "equalIndicator/v1": "18256162ce3d3694ad8677df7a8a69edf1f3d9ecb6bb10a8f000d6523770fae3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1544, + "startColumn": 45, + "charOffset": 46183, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1542, + "startColumn": 1, + "charOffset": 46017, + "charLength": 187, + "snippet": { + "text": "\tvoid sendTradeItemRequest(const std::string &traderName, std::shared_ptr item, bool ack) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendTradeItemRequest(traderName, item, ack);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "15ec5ebff57da5fb", + "equalIndicator/v1": "189799b4544b8d2e9963616e6cda51d47aee0d1e5e7f930c20b804bb9944bcfb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 165, + "startColumn": 66, + "charOffset": 4816, + "charLength": 11, + "snippet": { + "text": "variantName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 163, + "startColumn": 1, + "charOffset": 4670, + "charLength": 186, + "snippet": { + "text": "\tMonsterType() = default;\r\n\texplicit MonsterType(const std::string &initName) :\r\n\t\tname(initName), typeName(initName), nameDescription(initName), variantName(\"\") {};\r\n\r\n\t// non-copyable\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8af845b66e164e78", + "equalIndicator/v1": "189de310621a7c971f007ae6b0e567ecbc914fb390d5e4b2b2dba7c723906e26" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'podium' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'podium' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1598, + "startColumn": 29, + "charOffset": 47594, + "charLength": 6, + "snippet": { + "text": "podium" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1596, + "startColumn": 1, + "charOffset": 47432, + "charLength": 208, + "snippet": { + "text": "\tvoid sendPodiumWindow(std::shared_ptr podium, const Position &position, uint16_t itemId, uint8_t stackpos) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPodiumWindow(podium, position, itemId, stackpos);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a923fca25636ac9d", + "equalIndicator/v1": "18ba5f62cb6d1deb5a126b85a21f88203728c582cb47852f37234e050730426e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1520, + "startColumn": 68, + "charOffset": 53149, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1518, + "startColumn": 1, + "charOffset": 53016, + "charLength": 207, + "snippet": { + "text": "//**********************************************************//\r\n\r\nuint32_t ValueCallback::getMagicLevelSkill(std::shared_ptr player, const CombatDamage &damage) const {\r\n\tif (!player) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "605b6510760c01c1", + "equalIndicator/v1": "18daf9fa5be439f7edd6964e9140a6790a4eb2e0c3ac18707457f1b73bc7ad74" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 209, + "startColumn": 19, + "charOffset": 6043, + "charLength": 16, + "snippet": { + "text": "mysql_num_fields" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 207, + "startColumn": 1, + "charOffset": 6007, + "charLength": 122, + "snippet": { + "text": "\thandle = res;\r\n\r\n\tint num_fields = mysql_num_fields(handle);\r\n\r\n\tconst MYSQL_FIELD* fields = mysql_fetch_fields(handle);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b73e8a41769c1f0", + "equalIndicator/v1": "18f4378ff7f8efb411ded4d7ce19363a0c0be874e46be7bf66014e90bfc2706f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5317, + "startColumn": 46, + "charOffset": 157074, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5315, + "startColumn": 1, + "charOffset": 157024, + "charLength": 110, + "snippet": { + "text": "}\r\n\r\nbool Player::isInWar(std::shared_ptr player) const {\r\n\tif (!player || !guild) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "492790525f0c626d", + "equalIndicator/v1": "190eee4f7827851362d80ae2a8e714bdce908e2782f325ba77e32e9b52510082" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'time_t' (aka 'long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'time_t' (aka 'long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 606, + "startColumn": 2, + "charOffset": 16700, + "charLength": 27, + "snippet": { + "text": "// player:getFreeCapacity()" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 604, + "startColumn": 1, + "charOffset": 16634, + "charLength": 178, + "snippet": { + "text": "\r\nint PlayerFunctions::luaPlayerGetFreeCapacity(lua_State* L) {\r\n\t// player:getFreeCapacity()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7fb92bdf7efc5472", + "equalIndicator/v1": "192c866bc9b2b224a510a5eb23937abba1ecb4286061d9b21ab223b59ff611d2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1890, + "startColumn": 50, + "charOffset": 55943, + "charLength": 3, + "snippet": { + "text": "npc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1888, + "startColumn": 1, + "charOffset": 55889, + "charLength": 140, + "snippet": { + "text": "}\r\n\r\nbool Player::openShopWindow(std::shared_ptr npc, const std::vector &shopItems) {\r\n\tBenchmark brenchmark;\r\n\tif (!npc) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "73ac26877e43a0f5", + "equalIndicator/v1": "194a5eeae53591ecd1ce6a50309579af0d0b43a212117eac469cf06c171b64ff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 31, + "startColumn": 26, + "charOffset": 1088, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 29, + "startColumn": 1, + "charOffset": 1058, + "charLength": 174, + "snippet": { + "text": "}\r\n\r\nReturnValue TrashHolder::queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr /*= nullptr*/) {\r\n\treturn RETURNVALUE_NOTPOSSIBLE;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5466f40106e4fe84", + "equalIndicator/v1": "194cfc17ea22ee01bbd9c672a66bc1fb898fa4ec165db9c3c400e131680d9895" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8322, + "startColumn": 66, + "charOffset": 288176, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8320, + "startColumn": 1, + "charOffset": 288106, + "charLength": 269, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerCyclopediaCharacterInfo(std::shared_ptr player, uint32_t characterID, CyclopediaCharacterInfoType_t characterInfoType, uint16_t entriesPerPage, uint16_t page) {\r\n\tuint32_t playerGUID = player->getGUID();\r\n\tif (characterID != playerGUID) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "09b73c79007e8cc8", + "equalIndicator/v1": "1967e47e0cb21c8376cfad34774d269716518e6538e3aa633d752120232a03f1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 771, + "startColumn": 11, + "charOffset": 22441, + "charLength": 17, + "snippet": { + "text": "getBaseMagicLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 769, + "startColumn": 1, + "charOffset": 22385, + "charLength": 103, + "snippet": { + "text": "\t\t\treturn manaMax;\r\n\t\tcase STAT_MAGICPOINTS:\r\n\t\t\treturn getBaseMagicLevel();\r\n\t\tdefault:\r\n\t\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "163feca789bf0b17", + "equalIndicator/v1": "19a7cd5ef99fcbf0e822a4bb7a9476e92bd1abee1941c8f0370ccf8f9f982a80" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2934, + "startColumn": 4, + "charOffset": 89723, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2932, + "startColumn": 1, + "charOffset": 89560, + "charLength": 294, + "snippet": { + "text": "\t\tstd::map mtype_list = g_game().getBestiaryList();\r\n\t\tfor (uint16_t monsterCount = 1; monsterCount <= monsterAmount; monsterCount++) {\r\n\t\t\tuint16_t raceid = msg.get();\r\n\t\t\tif (player->getBestiaryKillCount(raceid) > 0) {\r\n\t\t\t\tauto it = mtype_list.find(raceid);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a6da45cdde2eb648", + "equalIndicator/v1": "19f88238dc7f75aad8b6d30aed73bc0c6330a82a4dea9f89584b58be59b43e91" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'sendPlayerPartyIcons' can be made const", + "markdown": "Method 'sendPlayerPartyIcons' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5692, + "startColumn": 14, + "charOffset": 168178, + "charLength": 20, + "snippet": { + "text": "sendPlayerPartyIcons" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5690, + "startColumn": 1, + "charOffset": 168160, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nvoid Player::sendPlayerPartyIcons(std::shared_ptr player) {\r\n\tsendPartyCreatureShield(player);\r\n\tsendPartyCreatureSkull(player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "191a7c0f239ab51d", + "equalIndicator/v1": "1a06b07fd46582643073108931ac9736ceee4d54356cbea67f5275d1b359a672" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 495, + "startColumn": 64, + "charOffset": 14744, + "charLength": 9, + "snippet": { + "text": "moveEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 493, + "startColumn": 1, + "charOffset": 14676, + "charLength": 263, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool isCheck) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75947f05b7d5e8e9", + "equalIndicator/v1": "1a1dcaf4cd5aab886359739c4662790744b32cfdf829882eec38dc9b488c7d02" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1929, + "startColumn": 61, + "charOffset": 52365, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1927, + "startColumn": 1, + "charOffset": 52300, + "charLength": 208, + "snippet": { + "text": "}\r\n\r\nbool ConditionFeared::getFleePath(std::shared_ptr creature, const Position &pos, std::vector &dirList) {\r\n\tconst std::vector walkSize { 15, 9, 3, 1 };\r\n\tbool found = false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dd36db282bb27f8e", + "equalIndicator/v1": "1a59b1198bc482e95568aced48b67431b4efcfc6f12b89cbac448ddca942e4d2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 201, + "startColumn": 54, + "charOffset": 6643, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 199, + "startColumn": 1, + "charOffset": 6585, + "charLength": 173, + "snippet": { + "text": "}\r\n\r\nbool IOLoginData::savePlayer(std::shared_ptr player) {\r\n\tbool success = DBTransaction::executeWithinTransaction([player]() {\r\n\t\treturn savePlayerGuard(player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "86af1a5763446da6", + "equalIndicator/v1": "1aa11b1e9fd1f515906c3c8ea6c5ccb0b75c9b7b6d26582e8bd293e7722fdb87" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 763, + "startColumn": 38, + "charOffset": 27435, + "charLength": 10, + "snippet": { + "text": "toCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 761, + "startColumn": 1, + "charOffset": 27343, + "charLength": 149, + "snippet": { + "text": "\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r\n\treturn scriptInterface.callFunction(7);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "80fa9e9c5e9fbd63", + "equalIndicator/v1": "1aae59fb50e1b1efe4d60d22c579027e7825a62315d9abe76c886c1d76098c4d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1879, + "startColumn": 51, + "charOffset": 55713, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1877, + "startColumn": 1, + "charOffset": 55633, + "charLength": 128, + "snippet": { + "text": "\tvoid updateUIExhausted();\r\n\r\n\tbool isQuickLootListedItem(std::shared_ptr item) const {\r\n\t\tif (!item) {\r\n\t\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fb8b853c4bd9191c", + "equalIndicator/v1": "1ab17639e668a7af0347e8497b12a763b859af797e17128b31bf5c8a2fce102b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 732, + "startColumn": 60, + "charOffset": 26057, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 730, + "startColumn": 1, + "charOffset": 25993, + "charLength": 445, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) {\r\n\t// Player:onMoveItem(item, count, fromPosition, toPosition) or Player.onMoveItem(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)\r\n\tif (info.playerOnMoveItem == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4766689b6a7a3fc0", + "equalIndicator/v1": "1b10b760543fe38432aaf171524634902f2231ac0c2c76211dee28f844dea0cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 157, + "startColumn": 173, + "charOffset": 4743, + "charLength": 14, + "snippet": { + "text": "damageModifier" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 155, + "startColumn": 1, + "charOffset": 4545, + "charLength": 314, + "snippet": { + "text": "\r\n\t// Calculating damage\r\n\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(level, playerSkill, totalAttack, attackFactor, true) * player->getVocation()->meleeDamageMultiplier * damageModifier / 100);\r\n\tint32_t minDamage = level / 5;\r\n\tint32_t realDamage = normal_random(minDamage, maxDamage);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b955993d7d02c3f4", + "equalIndicator/v1": "1b1b9e64741006f59e8cdb6bdf53a38b6a9349154a9b4c7013cca0c23c9092dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 989, + "startColumn": 31, + "charOffset": 29518, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 987, + "startColumn": 1, + "charOffset": 29396, + "charLength": 195, + "snippet": { + "text": "\t\t\t\tif (targetChangeTicks >= mType->info.changeTargetSpeed) {\r\n\t\t\t\t\ttargetChangeTicks = 0;\r\n\t\t\t\t\tm_targetChangeCooldown = mType->info.changeTargetSpeed;\r\n\r\n\t\t\t\t\tif (challengeFocusDuration > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e10599f2e47045c5", + "equalIndicator/v1": "1b2cccc60c84ad7ecfc2a4f216c7e7da9c3fe422a3843e4279fecca67afae1e0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 11, + "charOffset": 1290, + "charLength": 7, + "snippet": { + "text": "npcType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1160, + "charLength": 256, + "snippet": { + "text": "\tcurrentOutfit = npcType->info.outfit;\r\n\tfloat multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__);\r\n\thealth = npcType->info.health * multiplier;\r\n\thealthMax = npcType->info.healthMax * multiplier;\r\n\tbaseSpeed = npcType->info.baseSpeed;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "04a577fa6a03204a", + "equalIndicator/v1": "1b30773692ecf29b8f2bdbec36f1655959955e4a8c93661115a262a15c157d17" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 408, + "startColumn": 65, + "charOffset": 15301, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 406, + "startColumn": 1, + "charOffset": 15232, + "charLength": 280, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInTrade - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2f68bfd0b9f168a", + "equalIndicator/v1": "1b50c8d1e7dbebd1ae63e5550e4b1871dc3866950153a7c81d14114bc39fdda0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1274, + "startColumn": 53, + "charOffset": 37859, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1272, + "startColumn": 1, + "charOffset": 37802, + "charLength": 174, + "snippet": { + "text": "}\r\n\r\nvoid Tile::removeCreature(std::shared_ptr creature) {\r\n\tg_game().map.getMapSector(tilePos.x, tilePos.y)->removeCreature(creature);\r\n\tremoveThing(creature, 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e9fc92a381f3dddb", + "equalIndicator/v1": "1b6784819cd828f52550c03dc3671f6ce7d5651361ca7dc5e79b617f123de8f9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 680, + "startColumn": 27, + "charOffset": 21856, + "charLength": 8, + "snippet": { + "text": "cooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 678, + "startColumn": 1, + "charOffset": 21806, + "charLength": 167, + "snippet": { + "text": "\r\n\tif (cooldown > 0) {\r\n\t\tint32_t spellCooldown = cooldown;\r\n\t\tif (isUpgraded) {\r\n\t\t\tspellCooldown -= getWheelOfDestinyBoost(WheelSpellBoost_t::COOLDOWN, spellGrade);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d94f924fb2a19189", + "equalIndicator/v1": "1b80669537b81eadfd69db063ae8393357509511c0cb45371252059e72011b52" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 703, + "startColumn": 2, + "charOffset": 19319, + "charLength": 13, + "snippet": { + "text": "ConditionId_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 701, + "startColumn": 1, + "charOffset": 19248, + "charLength": 306, + "snippet": { + "text": "\r\n\tConditionType_t conditionType = getNumber(L, 2);\r\n\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\r\n\tuint32_t subId = getNumber(L, 4, 0);\r\n\tconst std::shared_ptr condition = creature->getCondition(conditionType, conditionId, subId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4eb80efbd9fb919a", + "equalIndicator/v1": "1b9d775f8774d8769c39a19dcde1a9b1fc38f69f664c6aaa3ff14e1c97b803a2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4282, + "startColumn": 55, + "charOffset": 129109, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4280, + "startColumn": 1, + "charOffset": 129001, + "charLength": 177, + "snippet": { + "text": "\r\n// i will keep this function so it can be reviewed\r\nbool Player::updateSaleShopList(std::shared_ptr item) {\r\n\tuint16_t itemId = item->getID();\r\n\tif (!itemId || !item) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6175ee7bca0d2037", + "equalIndicator/v1": "1bc8027cd60f90c87228fed3c99fcc35d794cb38b767e9c8af7356bfcc39f91b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Annotate this function with 'override' or (rarely) 'final'", + "markdown": "Annotate this function with 'override' or (rarely) 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 30, + "startColumn": 7, + "charOffset": 859, + "charLength": 18, + "snippet": { + "text": "onRecvFirstMessage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 28, + "startColumn": 1, + "charOffset": 818, + "charLength": 94, + "snippet": { + "text": "\t\tProtocol(loginConnection) { }\r\n\r\n\tvoid onRecvFirstMessage(NetworkMessage &msg);\r\n\r\nprivate:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b4117c1c3efef1ee", + "equalIndicator/v1": "1c02f13ffb525bb6bba727fd8d6011a42cf646b334f6e42b9b531c8a32200d96" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 779, + "startColumn": 28, + "charOffset": 23275, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 777, + "startColumn": 1, + "charOffset": 23241, + "charLength": 131, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\t\tenv->setScriptId(mType->info.thinkEvent, scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2babb7ee4f231ac9", + "equalIndicator/v1": "1c35a6bc79d8e17e50641a6a4858825f6fb131c921340c743b25f616f50b7737" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 556, + "startColumn": 17, + "charOffset": 26018, + "charLength": 18, + "snippet": { + "text": "parseAbsorbPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 554, + "startColumn": 1, + "charOffset": 25997, + "charLength": 214, + "snippet": { + "text": "}\r\n\r\nvoid ItemParse::parseAbsorbPercent(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\tstd::string stringValue = tmpStrValue;\r\n\tif (stringValue == \"absorbpercentall\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ef3e9b624cf4344", + "equalIndicator/v1": "1c369f5fbbdab38070f6b3a16e5c7e069d9994efc30381613fb350dc5dc4433c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Result of integer division used in a floating point context; possible loss of precision", + "markdown": "Result of integer division used in a floating point context; possible loss of precision" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 74, + "startColumn": 96, + "charOffset": 2103, + "charLength": 5, + "snippet": { + "text": "level" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 72, + "startColumn": 1, + "charOffset": 1860, + "charLength": 377, + "snippet": { + "text": "int32_t Weapons::getMaxWeaponDamage(uint32_t level, int32_t attackSkill, int32_t attackValue, float attackFactor, bool isMelee) {\r\n\tif (isMelee) {\r\n\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\r\n\t} else {\r\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "43918a4e62d920c5", + "equalIndicator/v1": "1c5e4b5a31cb70992d19cd3805f70b9c8a9c2c929c0b9e2ab217475cd1dd3f57" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 941, + "startColumn": 27, + "charOffset": 34002, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 939, + "startColumn": 1, + "charOffset": 33970, + "charLength": 123, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnTurn, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "83d6dde5afc00cfd", + "equalIndicator/v1": "1c6a90477552d7e9356791990cd0401e7321840f58dfb9a3adb3dfbbaf923036" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'connectionWeak' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'connectionWeak' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 395, + "startColumn": 51, + "charOffset": 13913, + "charLength": 14, + "snippet": { + "text": "connectionWeak" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 393, + "startColumn": 1, + "charOffset": 13858, + "charLength": 163, + "snippet": { + "text": "}\r\n\r\nvoid Connection::handleTimeout(ConnectionWeak_ptr connectionWeak, const std::error_code &error) {\r\n\tif (error == asio::error::operation_aborted) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6cc2baf21efd6696", + "equalIndicator/v1": "1c6fe60f12f707b9624ab439da6abedc1b74700b834f25a836821a6910013209" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7367, + "startColumn": 94, + "charOffset": 256472, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7365, + "startColumn": 1, + "charOffset": 256374, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nvoid Game::updatePlayerPartyHuntAnalyzer(const CombatDamage &damage, std::shared_ptr player) const {\r\n\tif (!player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc3fc446b562a951", + "equalIndicator/v1": "1c70365efa2dc75d0276ada3df63388a584e5d42b41d026466af309010a77151" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 251, + "startColumn": 62, + "charOffset": 7932, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 249, + "startColumn": 1, + "charOffset": 7866, + "charLength": 241, + "snippet": { + "text": "}\r\n\r\nReturnValue Actions::internalUseItem(std::shared_ptr player, const Position &pos, uint8_t index, std::shared_ptr item, bool isHotkey) {\r\n\tif (std::shared_ptr door = item->getDoor()) {\r\n\t\tif (!door->canUse(player)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2ad431aa828aab93", + "equalIndicator/v1": "1c7b5a1ba11d4063f956b3547d6f11cffc7c127a33edebd02244f963ac6a54ec" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3057, + "startColumn": 175, + "charOffset": 113759, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3055, + "startColumn": 1, + "charOffset": 113580, + "charLength": 252, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::processMoveOrAddItemToLootContainer(std::shared_ptr item, std::shared_ptr lootContainer, uint32_t &remainderCount, std::shared_ptr player) {\r\n\tstd::shared_ptr moveItem = nullptr;\r\n\tReturnValue ret;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e7df6ec813583d8c", + "equalIndicator/v1": "1c7fa93209099249a6b651f0362a1c757c32fe2563dab30cceb530bbfff551b3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1128, + "startColumn": 47, + "charOffset": 33821, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1126, + "startColumn": 1, + "charOffset": 33770, + "charLength": 210, + "snippet": { + "text": "}\r\n\r\nvoid Monster::pushItems(std::shared_ptr tile, const Direction &nextDirection) {\r\n\t// We can not use iterators here since we can push the item to another tile\r\n\t// which will invalidate the iterator.\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a807b8e346867682", + "equalIndicator/v1": "1ca0c174bfa9516f66be5b458fb7609d1d6cf7eb97e1ba8402dabb215de6201f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2861, + "startColumn": 93, + "charOffset": 106964, + "charLength": 6, + "snippet": { + "text": "corpse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2859, + "startColumn": 1, + "charOffset": 106867, + "charLength": 172, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerQuickLootCorpse(std::shared_ptr player, std::shared_ptr corpse, const Position &position) {\r\n\tif (!player || !corpse) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2f17a2bc5f1f5c4", + "equalIndicator/v1": "1cb11e3e2be7c634e56842c9f60c3921e0b52431dc4d152d520e601850d1d516" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 804, + "startColumn": 7, + "charOffset": 25654, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 802, + "startColumn": 1, + "charOffset": 25565, + "charLength": 251, + "snippet": { + "text": "\t// onAddItem(moveitem, tileitem, pos)\r\n\t// onRemoveItem(moveitem, tileitem, pos)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[MoveEvent::executeAddRemItem - \"\r\n\t\t \"Item {} item on tile x: {} y: {} z: {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b54dca5677cf22db", + "equalIndicator/v1": "1cc3d12f47296b366d4647e2fa7012b1ce33f7e55f5e031ea4ff11530c694af8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'isMarketMenuAvailable' can be made const", + "markdown": "Method 'isMarketMenuAvailable' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 579, + "startColumn": 7, + "charOffset": 15840, + "charLength": 21, + "snippet": { + "text": "isMarketMenuAvailable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 577, + "startColumn": 1, + "charOffset": 15807, + "charLength": 85, + "snippet": { + "text": "\t\treturn supplyStash;\r\n\t}\r\n\tbool isMarketMenuAvailable() {\r\n\t\treturn marketMenu;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1022d29540ada967", + "equalIndicator/v1": "1cd6f24177faf7abf852f8656135c3a77141e49ad329780e556c7cf42692f0a6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4441, + "startColumn": 44, + "charOffset": 133696, + "charLength": 17, + "snippet": { + "text": "getLostExperience" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4439, + "startColumn": 1, + "charOffset": 133390, + "charLength": 372, + "snippet": { + "text": "\t\tauto attackerPlayer = attacker->getPlayer();\r\n\t\tif (attackerPlayer && attackerPlayer.get() != this && skillLoss && std::abs(static_cast(attackerPlayer->getLevel() - level)) <= g_configManager().getNumber(EXP_FROM_PLAYERS_LEVEL_RANGE, __FUNCTION__)) {\r\n\t\t\treturn std::max(0, std::floor(getLostExperience() * getDamageRatio(attacker) * 0.75));\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f97ab1b1f76709f6", + "equalIndicator/v1": "1cddd0390501b32da1478576d45c3b9e4f1ba3ff572202c6c870c0529026f5f1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 915, + "startColumn": 13, + "charOffset": 29761, + "charLength": 26, + "snippet": { + "text": "(damage * getMitigation())" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 913, + "startColumn": 1, + "charOffset": 29578, + "charLength": 349, + "snippet": { + "text": "\tif (combatType != COMBAT_MANADRAIN && combatType != COMBAT_LIFEDRAIN && combatType != COMBAT_AGONYDAMAGE) { // Increase mitigate damage\r\n\t\tauto originalDamage = damage;\r\n\t\tdamage -= (damage * getMitigation()) / 100.;\r\n\t\tg_logger().trace(\"[mitigation] creature: {}, original damage: {}, mitigation damage: {}\", getName(), originalDamage, damage);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2b5727131d73bf06", + "equalIndicator/v1": "1ceaddaafcca2a0a9e236277dfcd143d22d10a3584c1ede907603f9a165eced7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 607, + "startColumn": 68, + "charOffset": 21554, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 605, + "startColumn": 1, + "charOffset": 21482, + "charLength": 311, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) {\r\n\t// Player:onLookInBattleList(creature, position, distance) or Player.onLookInBattleList(self, creature, position, distance)\r\n\tif (info.playerOnLookInBattleList == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5a0cfb382596b26b", + "equalIndicator/v1": "1d173f239485adb5e7847ac10174b7a245cf12aa95f7bd87c1987b92b22f12ea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 16, + "startColumn": 2, + "charOffset": 435, + "charLength": 3, + "snippet": { + "text": "RSA" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 412, + "charLength": 56, + "snippet": { + "text": "class RSA {\r\npublic:\r\n\tRSA(Logger &logger);\r\n\t~RSA();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e77ea38ed92155ec", + "equalIndicator/v1": "1d180653ce03f2e45ffaf880688778f7452f3ea970f8a3784c840ae84cd3e831" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6865, + "startColumn": 85, + "charOffset": 237871, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6863, + "startColumn": 1, + "charOffset": 237749, + "charLength": 260, + "snippet": { + "text": "\r\n// Wheel of destiny combat helpers\r\nvoid Game::applyWheelOfDestinyHealing(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) {\r\n\tdamage.primary.value += (damage.primary.value * damage.healingMultiplier) / 100.;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "31af5a89ba7eba9f", + "equalIndicator/v1": "1d22736dc1c150267f465fd3ed3b938a36ec0bf44674e3c2180df77df9b2d265" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2818, + "startColumn": 43, + "charOffset": 84125, + "charLength": 6, + "snippet": { + "text": "skills" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2816, + "startColumn": 1, + "charOffset": 84075, + "charLength": 204, + "snippet": { + "text": "\t\t\t}\r\n\r\n\t\t\tskills[i].tries = std::max(0, skills[i].tries - lostSkillTries);\r\n\t\t\tskills[i].percent = Player::getPercentLevel(skills[i].tries, vocation->getReqSkillTries(i, skills[i].level));\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a0989bf301592a00", + "equalIndicator/v1": "1d57cfc13847c2a0a1c4613c7ad2ef65fd27a4c2861386cf527e2cb282f6d694" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'partner' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'partner' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 426, + "startColumn": 46, + "charOffset": 16104, + "charLength": 7, + "snippet": { + "text": "partner" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 424, + "startColumn": 1, + "charOffset": 16004, + "charLength": 165, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r\n\tLuaScriptInterface::pushUserdata(L, partner);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7d2ea91ab23ade66", + "equalIndicator/v1": "1d74ea8c4b6ecf6a45bdd485c763010a6b5346ea9136f56c865b607caf967b73" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 257, + "startColumn": 28, + "charOffset": 6893, + "charLength": 9, + "snippet": { + "text": "sleptTime" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 255, + "startColumn": 1, + "charOffset": 6860, + "charLength": 118, + "snippet": { + "text": "\t}\r\n\r\n\tconst int32_t soulRegen = sleptTime / (60 * 15); // RATE_SOUL_REGEN_SPEED?\r\n\tplayer->changeSoul(soulRegen);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e51fba050f98d96a", + "equalIndicator/v1": "1d8d811affebe79d315683c82ba30ed08cf77c0982c84fab809644a89786ecf3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7403, + "startColumn": 53, + "charOffset": 257811, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7401, + "startColumn": 1, + "charOffset": 257633, + "charLength": 320, + "snippet": { + "text": "void Game::sendMessages(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\r\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\r\n) const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "99f8a7d019707827", + "equalIndicator/v1": "1d9b75312423c8303ea99bd92dddcbd2a2827bd8b0a4b9c90ef2f104e60d9597" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 891, + "startColumn": 12, + "charOffset": 23708, + "charLength": 8, + "snippet": { + "text": "uint64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 889, + "startColumn": 1, + "charOffset": 23691, + "charLength": 191, + "snippet": { + "text": "\t}\r\n\r\n\tif (const uint64_t writtenDate = getAttribute(ItemAttribute_t::DATE)) {\r\n\t\tpropWriteStream.write(ATTR_WRITTENDATE);\r\n\t\tpropWriteStream.write(writtenDate);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5ad2881659567fb2", + "equalIndicator/v1": "1dd05075695e6632209873011cc6ef452ba2b99b4cec2dbe41eb853f196276cf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 68, + "startColumn": 45, + "charOffset": 1949, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 66, + "startColumn": 1, + "charOffset": 1900, + "charLength": 200, + "snippet": { + "text": "}\r\n\r\nvoid Decay::stopDecay(std::shared_ptr item) {\r\n\tif (item->hasAttribute(ItemAttribute_t::DECAYSTATE)) {\r\n\t\tauto timestamp = item->getAttribute(ItemAttribute_t::DURATION_TIMESTAMP);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79d2a9d6def445ce", + "equalIndicator/v1": "1dd6fad53e782d869a3e1a9f399e109c33102c541fa01dd89453109abb288ff4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 523, + "startColumn": 41, + "charOffset": 17439, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 521, + "startColumn": 1, + "charOffset": 17393, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0206377db9847d8b", + "equalIndicator/v1": "1de5431e50dc1be97e7a3b63271601ecbb3ec3a055cbc12eb0b7c7063fa3e748" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8441, + "startColumn": 4, + "charOffset": 267128, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8439, + "startColumn": 1, + "charOffset": 267046, + "charLength": 195, + "snippet": { + "text": "\t\tcase SUPPLY_STASH_ACTION_STOW_ITEM: {\r\n\t\t\tPosition pos = msg.getPosition();\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint8_t stackpos = msg.getByte();\r\n\t\t\tuint32_t count = msg.getByte();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2681e71e970e3283", + "equalIndicator/v1": "1e0660c72ccd1a9665231be154ecfb540113ae39c294aae5f005694f9320ab0f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 292, + "startColumn": 54, + "charOffset": 9023, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 290, + "startColumn": 1, + "charOffset": 8965, + "charLength": 274, + "snippet": { + "text": "}\r\n\r\nvoid IOPrey::parsePreyAction(std::shared_ptr player, PreySlot_t slotId, PreyAction_t action, PreyOption_t option, int8_t index, uint16_t raceId) const {\r\n\tconst auto &slot = player->getPreySlotById(slotId);\r\n\tif (!slot || slot->state == PreyDataState_Locked) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "58f2a89703c4ae1b", + "equalIndicator/v1": "1e0ff4234047f8775c810ad2389af1833373f4103de1fe110f8140a3d26ad239" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 894, + "startColumn": 2, + "charOffset": 34114, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 892, + "startColumn": 1, + "charOffset": 34107, + "charLength": 52, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b7cf44d7a2e11bb", + "equalIndicator/v1": "1e10da9bba18aab541f6cdceb02d85b86610b896f42f6a725e49bf84dd18e139" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 679, + "startColumn": 66, + "charOffset": 26026, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 677, + "startColumn": 1, + "charOffset": 25956, + "charLength": 259, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeRequest - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3bc718617017d678", + "equalIndicator/v1": "1e46f0ea60a4ea3b7522f71a37514df6f966518476419d46f33f467bdeb62dfb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 44, + "startColumn": 19, + "charOffset": 1509, + "charLength": 10, + "snippet": { + "text": "removeItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 42, + "startColumn": 1, + "charOffset": 1392, + "charLength": 229, + "snippet": { + "text": "\r\n// Second argument is disabled by default because not need to send to client in the RewardChest\r\nvoid RewardChest::removeItem(std::shared_ptr thing, bool /* sendToClient = false*/) {\r\n\tif (thing == nullptr) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cefb919cba906aff", + "equalIndicator/v1": "1e4f6cc3c8bc0960aad2dbf2a77304be619320096d6e4424040930090fb3d204" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 144, + "startColumn": 83, + "charOffset": 3990, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 142, + "startColumn": 1, + "charOffset": 3903, + "charLength": 215, + "snippet": { + "text": "}\r\n\r\nCombatDamage Weapon::getCombatDamage(CombatDamage combat, std::shared_ptr player, std::shared_ptr item, int32_t damageModifier) const {\r\n\t// Local variables\r\n\tuint32_t level = player->getLevel();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "550e43e667693636", + "equalIndicator/v1": "1e5778a99782dc9b62f0a7239dfbe83eec50fe324d7b10394a2aa1849bcbb74a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 453, + "startColumn": 86, + "charOffset": 16242, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 451, + "startColumn": 1, + "charOffset": 16152, + "charLength": 191, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPartyOnLeave(std::shared_ptr party, std::shared_ptr player) {\r\n\t// Party:onLeave(player) or Party.onLeave(self, player)\r\n\tif (info.partyOnLeave == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9646a78219d77687", + "equalIndicator/v1": "1e6408feac98be86c6b2f954944fdb065821d17f5bf418b90d37bab5e35b4e98" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 941, + "startColumn": 99, + "charOffset": 35924, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 939, + "startColumn": 1, + "charOffset": 35821, + "charLength": 257, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0027f87575a3ea23", + "equalIndicator/v1": "1e656dd164eb639ea6a55c7c8f43393e3945a67dcd126c78dea38fda38788e5e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1116, + "startColumn": 46, + "charOffset": 33240, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1114, + "startColumn": 1, + "charOffset": 33190, + "charLength": 214, + "snippet": { + "text": "}\r\n\r\nbool Monster::pushItem(std::shared_ptr item, const Direction &nextDirection) {\r\n\tconst Position ¢erPos = item->getPosition();\r\n\tfor (const auto &[x, y] : getPushItemLocationOptions(nextDirection)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "58dd7ffa9a869d3b", + "equalIndicator/v1": "1e65bf04b887e6ffaf1f1d58e64bcfaab1df98f009385933b68f0231ac17b3fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Return type 'const std::string' (aka 'const basic_string, allocator>') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness", + "markdown": "Return type 'const std::string' (aka 'const basic_string, allocator\\>') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 568, + "startColumn": 2, + "charOffset": 16696, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 566, + "startColumn": 1, + "charOffset": 16665, + "charLength": 176, + "snippet": { + "text": "\t\treturn items[id].name;\r\n\t}\r\n\tconst std::string getPluralName() const {\r\n\t\tif (hasAttribute(ItemAttribute_t::PLURALNAME)) {\r\n\t\t\treturn getString(ItemAttribute_t::PLURALNAME);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2df6ef06b8638dc", + "equalIndicator/v1": "1e67bccceb0b2811290358300e3bd968397e8531b362fffe1095b7933d511a6c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 382, + "startColumn": 8, + "charOffset": 9527, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 380, + "startColumn": 1, + "charOffset": 9433, + "charLength": 208, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetAttack(lua_State* L) {\r\n\t// itemType:getAttack()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->attack);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "090868364f4603f6", + "equalIndicator/v1": "1e74fb18a3b628da1790be2b4e8cc5c3ee6ffbeba0e82feb5b8df01186c1a347" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8016, + "startColumn": 57, + "charOffset": 279189, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8014, + "startColumn": 1, + "charOffset": 279128, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nvoid Game::addBestiaryList(uint16_t raceid, std::string name) {\r\n\tauto it = BestiaryList.find(raceid);\r\n\tif (it != BestiaryList.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d4fd2af5365f7fec", + "equalIndicator/v1": "1e85a2cbcb9f543f48cae53e99a16ed9f5aeaa6dcf7c6ee21c6051aa8ba1b35a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 476, + "startColumn": 8, + "charOffset": 11793, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 474, + "startColumn": 1, + "charOffset": 11685, + "charLength": 202, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetElementDamage(lua_State* L) {\r\n\t// itemType:getElementDamage()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (!itemType) {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "93f1788e10bfb799", + "equalIndicator/v1": "1ebfedf25cfcbe3812e9c0eec22f8e0971059679711bb56cfde4dd5506396664" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1301, + "startColumn": 87, + "charOffset": 43511, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1299, + "startColumn": 1, + "charOffset": 43420, + "charLength": 342, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatMana(std::shared_ptr caster, std::shared_ptr target, const Position &origin, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster && target)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "31c1234727212a5d", + "equalIndicator/v1": "1ec094c70c0e27583498180560d2347d47aa8a207e9ab8fb80a006f255334d67" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The value returned by this function should not be disregarded; neglecting it may lead to errors", + "markdown": "The value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 179, + "startColumn": 3, + "charOffset": 5011, + "charLength": 8, + "snippet": { + "text": "acceptor" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 177, + "startColumn": 1, + "charOffset": 4942, + "charLength": 100, + "snippet": { + "text": "\tif (acceptor && acceptor->is_open()) {\r\n\t\tstd::error_code error;\r\n\t\tacceptor->close(error);\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cea2648f2496047c", + "equalIndicator/v1": "1ec845615940da735088d83d305f0524c012c62f07a073d1cff49ac8c02201a2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 166, + "startColumn": 57, + "charOffset": 4539, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 164, + "startColumn": 1, + "charOffset": 4478, + "charLength": 184, + "snippet": { + "text": "}\r\n\r\nbool Party::passPartyLeadership(std::shared_ptr player) {\r\n\tauto leader = getLeader();\r\n\tif (!leader || !player || leader == player || player->getParty().get() != this) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "16ed13e9252572e2", + "equalIndicator/v1": "1edb1f9365a20edc7db408edca604659d7506d7d11ebf253bc792c762d638b8a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 594, + "startColumn": 44, + "charOffset": 30539, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 592, + "startColumn": 1, + "charOffset": 30468, + "charLength": 114, + "snippet": { + "text": "\t\treturn tilesToClean;\r\n\t}\r\n\tvoid addTileToClean(std::shared_ptr tile) {\r\n\t\ttilesToClean.emplace(tile);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e898fcfec18110e0", + "equalIndicator/v1": "1eede7fc13c30831582ef91ed31f34a883962cc075fbaa0df4f112a8d974b3f3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6321, + "startColumn": 65, + "charOffset": 200254, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6319, + "startColumn": 1, + "charOffset": 200185, + "charLength": 128, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureHealth(std::shared_ptr creature) {\r\n\tif (creature->isHealthHidden()) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d39e6eae897a079d", + "equalIndicator/v1": "1ef5628c57bb9fb55117b17f158e0090e16c6aecbe53d449372579057cccf50a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 777, + "startColumn": 64, + "charOffset": 23628, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 775, + "startColumn": 1, + "charOffset": 23501, + "charLength": 240, + "snippet": { + "text": "\r\n\tif (item->isStackable() && count != item->getItemCount()) {\r\n\t\tuint8_t newCount = static_cast(std::max(0, item->getItemCount() - count));\r\n\t\tconst int32_t oldWeight = item->getWeight();\r\n\t\titem->setItemCount(newCount);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c8ec3bab67f81ff7", + "equalIndicator/v1": "1effc41db45eaea9d0165a22384313394a17a254bae18bc5e55ba4a3a14714fd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 336, + "startColumn": 96, + "charOffset": 12058, + "charLength": 7, + "snippet": { + "text": "speaker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 334, + "startColumn": 1, + "charOffset": 11958, + "charLength": 234, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventCreatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) {\r\n\t// Creature:onHear(speaker, words, type)\r\n\tif (info.creatureOnHear == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a79f71c336bf4a80", + "equalIndicator/v1": "1f03c345c934cfe1ba9a9d5cbd02883485457c2cbd6383fa1f702649919c31de" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 197, + "startColumn": 2, + "charOffset": 4826, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 195, + "startColumn": 1, + "charOffset": 4816, + "charLength": 146, + "snippet": { + "text": "\t\t}\r\n\t}\r\n\tint32_t subType = getNumber(L, 3, -1);\r\n\r\n\tstd::shared_ptr item = g_game().findItemOfType(tile, itemId, false, subType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "97461fd3bc33a0a9", + "equalIndicator/v1": "1f0703296025c17f43bb4cb1add0086833e0ba20e051a6be81630ec1f62a8b95" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1796, + "startColumn": 54, + "charOffset": 48467, + "charLength": 1, + "snippet": { + "text": "i" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1794, + "startColumn": 1, + "charOffset": 48389, + "charLength": 170, + "snippet": { + "text": "\t\t\tlist.push_back(i);\r\n\r\n\t\t\tx1 = std::fabs(1.0 - ((static_cast(sum)) + i) / med);\r\n\t\t\tx2 = std::fabs(1.0 - (static_cast(sum) / med));\r\n\t\t} while (x1 < x2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5b0cc70f221c9dbf", + "equalIndicator/v1": "1f16ccea41454bf8a6ed0aff39b7cc5aa73f8f1542af128def9d39415cf200f4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 117, + "startColumn": 15, + "charOffset": 4894, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 115, + "startColumn": 1, + "charOffset": 4807, + "charLength": 239, + "snippet": { + "text": "\t * \\param link holds the relation the object has to the cylinder\r\n\t */\r\n\tvirtual void postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) = 0;\r\n\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "09ba5ed3808bfd81", + "equalIndicator/v1": "1f280d24641261b27219774dbdb01199a9223b8fea02fc8b3be4bd4cb24f12d4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 89, + "startColumn": 33, + "charOffset": 2330, + "charLength": 30, + "snippet": { + "text": "getUserdataShared(L, 1)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 87, + "startColumn": 1, + "charOffset": 2218, + "charLength": 179, + "snippet": { + "text": "int PartyFunctions::luaPartyGetMembers(lua_State* L) {\r\n\t// party:getMembers()\r\n\tstd::shared_ptr party = getUserdataShared(L, 1);\r\n\tif (!party) {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e40f6cef8672dab4", + "equalIndicator/v1": "1f40df8b71a02a14f7c7b6da576dde24b3a986c1e8b757b0ff84aa49ef2877f5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 81, + "startColumn": 10, + "charOffset": 2200, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 79, + "startColumn": 1, + "charOffset": 2147, + "charLength": 105, + "snippet": { + "text": "\t}\r\n\tint32_t getDefense() const override {\r\n\t\treturn mType->info.defense * getDefenseMultiplier();\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "52b0beb11cdd0aad", + "equalIndicator/v1": "1f5a4c0dccc8c2b5c6188331cb058e322d624e87b718a91219c42749bc19b92f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1245, + "startColumn": 27, + "charOffset": 36604, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1243, + "startColumn": 1, + "charOffset": 36501, + "charLength": 123, + "snippet": { + "text": "\tvoid reloadCreature(std::shared_ptr creature) {\r\n\t\tif (client) {\r\n\t\t\tclient->reloadCreature(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e06f8495c6f7e248", + "equalIndicator/v1": "1f96c8aeef18944e0d5cec61f06b14b64ec076e4c35deb70dfc19f16ef4bf808" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 569, + "startColumn": 57, + "charOffset": 18007, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 567, + "startColumn": 1, + "charOffset": 17946, + "charLength": 236, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatHealthFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\r\n\tif (!data) {\r\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c4640a6cd35c6754", + "equalIndicator/v1": "1f9b4b43e83acc304516dc0f8836b4f91cce9fa56e0ea5d54083e6aef6a50520" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1932, + "startColumn": 18, + "charOffset": 55723, + "charLength": 13, + "snippet": { + "text": "imbuementInfo" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1930, + "startColumn": 1, + "charOffset": 55698, + "charLength": 206, + "snippet": { + "text": "\t\t\t}\r\n\r\n\t\t\tint minutes = imbuementInfo.duration / 60;\r\n\t\t\tint hours = minutes / 60;\r\n\t\t\ts << fmt::format(\"{} {} {:02}:{:02}h\", baseImbuement->name, imbuementInfo.imbuement->getName(), hours, minutes % 60);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6838f7bce1d88bc8", + "equalIndicator/v1": "1fb211d7f5d7746448c1a12b9314ab030e94e0444e9c6016a7261961ad414bc5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 761, + "startColumn": 20, + "charOffset": 29350, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 759, + "startColumn": 1, + "charOffset": 29325, + "charLength": 62, + "snippet": { + "text": "\t}\r\n\r\n\tlua_pushnumber(L, exp);\r\n\tlua_pushnumber(L, rawExp);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "85ce9d0d5187628a", + "equalIndicator/v1": "1fbb44eda8eefbddc3ce7daa22f8003d656eb2cf7a8a09c6c3a05ce7eff7fc70" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1372, + "startColumn": 36, + "charOffset": 41229, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1370, + "startColumn": 1, + "charOffset": 41102, + "charLength": 147, + "snippet": { + "text": "\tvoid sendPartyCreatureUpdate(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyCreatureUpdate(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "895d4618783b245f", + "equalIndicator/v1": "1fbf085f13111597e2b733f2d8f43902b0143b0d18bdb78e627a6c498cb950f4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'house' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'house' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1435, + "startColumn": 14, + "charOffset": 42136, + "charLength": 5, + "snippet": { + "text": "house" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1433, + "startColumn": 1, + "charOffset": 42021, + "charLength": 148, + "snippet": { + "text": "void Player::setEditHouse(std::shared_ptr house, uint32_t listId /*= 0*/) {\r\n\twindowTextId++;\r\n\teditHouse = house;\r\n\teditListId = listId;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "168a5c6ff27da5a7", + "equalIndicator/v1": "1fc634ac6e46022a112759b0750829e11634ad8794e2ec983a84c1ab26988deb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 631, + "startColumn": 63, + "charOffset": 24203, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 629, + "startColumn": 1, + "charOffset": 24136, + "charLength": 265, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnReportBug(std::shared_ptr player, const std::string &message, const Position &position, uint8_t category) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnReportBug - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "278524400d4b3e09", + "equalIndicator/v1": "1fd342c145f7d223dc29bbdff7b0916f19fa6d663d63797f587c6f818f6c1711" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::all_of()'", + "markdown": "Replace loop by 'std::ranges::all_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 275, + "startColumn": 2, + "charOffset": 7636, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 273, + "startColumn": 1, + "charOffset": 7614, + "charLength": 141, + "snippet": { + "text": "\t\treturn false;\r\n\t}\r\n\tfor (const std::shared_ptr &tile : houseTiles) {\r\n\t\tif (!transferToDepot(player, tile)) {\r\n\t\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "11224c8c98bdb6f8", + "equalIndicator/v1": "1fd7e843691d5d536d9a1185e37e90ec3f857ef85bed53930e7bd5ba7b3e6b02" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1254, + "startColumn": 7, + "charOffset": 44658, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1252, + "startColumn": 1, + "charOffset": 44646, + "charLength": 124, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9643c11e0ff57d1a", + "equalIndicator/v1": "201d06afa316c2f6e1d7cbbc6b0eb61e2b18e0d3834d1212baab685c14b6038b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1922, + "startColumn": 20, + "charOffset": 66050, + "charLength": 1, + "snippet": { + "text": "x" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1920, + "startColumn": 1, + "charOffset": 65933, + "charLength": 165, + "snippet": { + "text": "\t\t\tfor (uint32_t y = 0; y < rows; ++y) {\r\n\t\t\t\t// calculate new coordinates using rotation center\r\n\t\t\t\tint32_t newX = x - centerX;\r\n\t\t\t\tint32_t newY = y - centerY;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "46b319ef78489c82", + "equalIndicator/v1": "201e5a7b07df9ff089184d45cd19a4cecb8f49b6f87b844cf4713381f469260d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8798, + "startColumn": 60, + "charOffset": 306886, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8796, + "startColumn": 1, + "charOffset": 306809, + "charLength": 247, + "snippet": { + "text": "} // namespace\r\n\r\nbool checkCanInitCreateMarketOffer(std::shared_ptr player, uint8_t type, const ItemType &it, uint16_t amount, uint64_t price, std::ostringstream &offerStatus) {\r\n\tif (!player) {\r\n\t\tofferStatus << \"Failed to load player\";\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b724201006f48f6", + "equalIndicator/v1": "20236783fe64ca87e0274f92851e1d6fe1beb02418286f62a1910f5201bab647" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 437, + "startColumn": 64, + "charOffset": 16426, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 435, + "startColumn": 1, + "charOffset": 16358, + "charLength": 236, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnLookInShop(std::shared_ptr player, const ItemType* itemType, uint8_t count) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInShop - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "974fc8d1e9f865be", + "equalIndicator/v1": "2024e4e5795ace18036b83fa44bb811d6cf57186cf007759c206a107f3569d9e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1283, + "startColumn": 7, + "charOffset": 45631, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1281, + "startColumn": 1, + "charOffset": 45619, + "charLength": 146, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventOnStorageUpdate - \"\r\n\t\t \"Player {} key {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "859d8a6a6ea28c71", + "equalIndicator/v1": "20300fb1cfb4225bcec563a15686ebfd25dec261aff2d89027cc4d73cd6d14cc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1816, + "startColumn": 3, + "charOffset": 54887, + "charLength": 16, + "snippet": { + "text": "ObjectCategory_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1814, + "startColumn": 1, + "charOffset": 54783, + "charLength": 266, + "snippet": { + "text": "\t\tg_game().playerClearManagedContainer(player->getID(), category, true);\r\n\t} else if (action == 2) {\r\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tg_game().playerOpenManagedContainer(player->getID(), category, true);\r\n\t} else if (action == 3) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e17f9ff27382085f", + "equalIndicator/v1": "204f9e94b7ca01d09cf89bf11d4b92bee2b62f4c5adc9693270d1ae7ad2e8fe9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 18, + "charOffset": 1423, + "charLength": 12, + "snippet": { + "text": "ValueWrapper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1269, + "charLength": 396, + "snippet": { + "text": "\texplicit(false) ValueWrapper(int value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(double value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const phmap::flat_hash_map &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const std::initializer_list> &init_list, uint64_t timestamp = 0);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3063d4564dc4dc71", + "equalIndicator/v1": "205dd1b4e22d3efc5e106926290a4be82cdf440e8308bbf1f585f574c3f8a3a2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 161, + "startColumn": 10, + "charOffset": 4425, + "charLength": 13, + "snippet": { + "text": "getThrowRange" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 159, + "startColumn": 1, + "charOffset": 4410, + "charLength": 71, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t getThrowRange() const override final {\r\n\t\treturn 1;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a109ae3f5884f137", + "equalIndicator/v1": "2064a6f2e7f2ea974605912e846c087f3c69ae9a6212545589a5ed2c627c65d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'long long' to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'long long' to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 51, + "startColumn": 43, + "charOffset": 1417, + "charLength": 8, + "snippet": { + "text": "duration" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 49, + "startColumn": 1, + "charOffset": 1304, + "charLength": 189, + "snippet": { + "text": "\t\tif (decayMap.empty()) {\r\n\t\t\teventId = g_dispatcher().scheduleEvent(\r\n\t\t\t\tstd::max(SCHEDULER_MINTICKS, duration), [this] { checkDecay(); }, \"Decay::checkDecay\"\r\n\t\t\t);\r\n\t\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dc0a301b449d03d5", + "equalIndicator/v1": "20894c70490ccfeb0945614dce1477c72a0cfd7f970806136783330852d4bfe5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 997, + "startColumn": 41, + "charOffset": 37958, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 995, + "startColumn": 1, + "charOffset": 37912, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "18bbcbc020736b99", + "equalIndicator/v1": "20968bcfa8c784e7b241a51cb1fd5a967376cae02c89ce6f93ea21458ed94c61" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1061, + "startColumn": 7, + "charOffset": 31969, + "charLength": 10, + "snippet": { + "text": "const auto" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1059, + "startColumn": 1, + "charOffset": 31887, + "charLength": 208, + "snippet": { + "text": "\tint index = 0;\r\n\tlua_createtable(L, monsterType->info.summons.size(), 0);\r\n\tfor (const auto &summonBlock : monsterType->info.summons) {\r\n\t\tlua_createtable(L, 0, 3);\r\n\t\tsetField(L, \"name\", summonBlock.name);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "946edb1c89e85609", + "equalIndicator/v1": "20e5e930196462484b14182465ba2d1b2d9b12c9b5a68aabc1a9aeece291b6cc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 567, + "startColumn": 61, + "charOffset": 15283, + "charLength": 23, + "snippet": { + "text": "(statsPercent[i] - 100)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 565, + "startColumn": 1, + "charOffset": 15192, + "charLength": 140, + "snippet": { + "text": "\r\n\t\t\tcase STAT_MAXMANAPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getMaxMana() * ((statsPercent[i] - 100) / 100.f));\r\n\t\t\t\tbreak;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "33cf6a50d7d49bb1", + "equalIndicator/v1": "2101e128ab860764df539abf22aac77789bebf0f3afbb3fad2b0fc9ab6a9c762" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2178, + "startColumn": 27, + "charOffset": 73789, + "charLength": 10, + "snippet": { + "text": "multiplier" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2176, + "startColumn": 1, + "charOffset": 73677, + "charLength": 169, + "snippet": { + "text": "\tif (chance != 0 && uniform_random(1, 10000) <= chance) {\r\n\t\tdamage.critical = true;\r\n\t\tdamage.primary.value *= multiplier;\r\n\t\tdamage.secondary.value *= multiplier;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db23db335550efc7", + "equalIndicator/v1": "211eae7c7c9839aa31d1eca298b9e5926865e271473b9abdfe1b6547ee029b1b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 272, + "startColumn": 29, + "charOffset": 7580, + "charLength": 4, + "snippet": { + "text": "door" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 270, + "startColumn": 1, + "charOffset": 7533, + "charLength": 129, + "snippet": { + "text": "\r\n\tint index = 0;\r\n\tfor (std::shared_ptr door : doors) {\r\n\t\tpushUserdata(L, door);\r\n\t\tsetItemMetatable(L, -1, door);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef2d773e35123cbf", + "equalIndicator/v1": "21328967236e9df90a9e2b6de34afa01c05a0966f06b2248c050b2de7b9f0bf8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use nullptr", + "markdown": "Use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 146, + "startColumn": 2, + "charOffset": 6295, + "charLength": 1477, + "snippet": { + "text": "auto _mm_sse2_min_epi32 = [](const __m128i a, const __m128i b) {\r\n\t\t__m128i mask = _mm_cmpgt_epi32(a, b);\r\n\t\treturn _mm_or_si128(_mm_and_si128(mask, b), _mm_andnot_si128(mask, a));\r\n\t};\r\n\r\n\tauto _mm_sse2_blendv_epi8 = [](const __m128i a, const __m128i b, __m128i mask) {\r\n\t\tmask = _mm_cmplt_epi8(mask, _mm_setzero_si128());\r\n\t\treturn _mm_or_si128(_mm_andnot_si128(mask, a), _mm_and_si128(mask, b));\r\n\t};\r\n\r\n\tconst __m128i increment = _mm_set1_epi32(4);\r\n\t__m128i indices = _mm_setr_epi32(0, 1, 2, 3);\r\n\t__m128i minindices = indices;\r\n\t__m128i minvalues = _mm_load_si128(reinterpret_cast(calculatedNodes));\r\n\tfor (int32_t pos = 4; pos < curNode; pos += 4) {\r\n\t\tconst __m128i values = _mm_load_si128(reinterpret_cast(&calculatedNodes[pos]));\r\n\t\tindices = _mm_add_epi32(indices, increment);\r\n\t\tminindices = _mm_sse2_blendv_epi8(minindices, indices, _mm_cmplt_epi32(values, minvalues));\r\n\t\tminvalues = _mm_sse2_min_epi32(values, minvalues);\r\n\t}\r\n\r\n\t__m128i res = _mm_sse2_min_epi32(minvalues, _mm_shuffle_epi32(minvalues, _MM_SHUFFLE(2, 3, 0, 1))); // Calculate horizontal minimum\r\n\tres = _mm_sse2_min_epi32(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 1, 2, 3))); // Calculate horizontal minimum\r\n\r\n\talignas(16) int32_t indices_array[4];\r\n\t_mm_store_si128(reinterpret_cast<__m128i*>(indices_array), minindices);\r\n\r\n\tint32_t best_node = indices_array[(_mm_ctz(_mm_movemask_epi8(_mm_cmpeq_epi32(minvalues, res))) >> 2)];\r\n\treturn (openNodes[best_node] " + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 144, + "startColumn": 1, + "charOffset": 6209, + "charLength": 1660, + "snippet": { + "text": "\treturn (openNodes[best_node] ? &nodes[best_node] : NULL);\r\n#elif defined(__SSE2__)\r\n\tauto _mm_sse2_min_epi32 = [](const __m128i a, const __m128i b) {\r\n\t\t__m128i mask = _mm_cmpgt_epi32(a, b);\r\n\t\treturn _mm_or_si128(_mm_and_si128(mask, b), _mm_andnot_si128(mask, a));\r\n\t};\r\n\r\n\tauto _mm_sse2_blendv_epi8 = [](const __m128i a, const __m128i b, __m128i mask) {\r\n\t\tmask = _mm_cmplt_epi8(mask, _mm_setzero_si128());\r\n\t\treturn _mm_or_si128(_mm_andnot_si128(mask, a), _mm_and_si128(mask, b));\r\n\t};\r\n\r\n\tconst __m128i increment = _mm_set1_epi32(4);\r\n\t__m128i indices = _mm_setr_epi32(0, 1, 2, 3);\r\n\t__m128i minindices = indices;\r\n\t__m128i minvalues = _mm_load_si128(reinterpret_cast(calculatedNodes));\r\n\tfor (int32_t pos = 4; pos < curNode; pos += 4) {\r\n\t\tconst __m128i values = _mm_load_si128(reinterpret_cast(&calculatedNodes[pos]));\r\n\t\tindices = _mm_add_epi32(indices, increment);\r\n\t\tminindices = _mm_sse2_blendv_epi8(minindices, indices, _mm_cmplt_epi32(values, minvalues));\r\n\t\tminvalues = _mm_sse2_min_epi32(values, minvalues);\r\n\t}\r\n\r\n\t__m128i res = _mm_sse2_min_epi32(minvalues, _mm_shuffle_epi32(minvalues, _MM_SHUFFLE(2, 3, 0, 1))); // Calculate horizontal minimum\r\n\tres = _mm_sse2_min_epi32(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 1, 2, 3))); // Calculate horizontal minimum\r\n\r\n\talignas(16) int32_t indices_array[4];\r\n\t_mm_store_si128(reinterpret_cast<__m128i*>(indices_array), minindices);\r\n\r\n\tint32_t best_node = indices_array[(_mm_ctz(_mm_movemask_epi8(_mm_cmpeq_epi32(minvalues, res))) >> 2)];\r\n\treturn (openNodes[best_node] ? &nodes[best_node] : NULL);\r\n#else\r\n\tint32_t best_node_f = std::numeric_limits::max();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "540101bb70293102", + "equalIndicator/v1": "2134cd5ad292ad008267bdc88ab1cf227cb9ad8349f4fa6c6b8d038153f3c4cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'addCondition' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'addCondition' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 336, + "startColumn": 66, + "charOffset": 8490, + "charLength": 12, + "snippet": { + "text": "addCondition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 334, + "startColumn": 1, + "charOffset": 8420, + "charLength": 153, + "snippet": { + "text": "}\r\n\r\nbool Condition::updateCondition(const std::shared_ptr addCondition) {\r\n\tif (conditionType != addCondition->getType()) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5472484c16977e7a", + "equalIndicator/v1": "215663a97be371a223947c3470f23bbe7f5f696b629e1a56b1d996634371314d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'lootContainer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'lootContainer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3057, + "startColumn": 110, + "charOffset": 113694, + "charLength": 13, + "snippet": { + "text": "lootContainer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3055, + "startColumn": 1, + "charOffset": 113580, + "charLength": 252, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::processMoveOrAddItemToLootContainer(std::shared_ptr item, std::shared_ptr lootContainer, uint32_t &remainderCount, std::shared_ptr player) {\r\n\tstd::shared_ptr moveItem = nullptr;\r\n\tReturnValue ret;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "48a753099094aa82", + "equalIndicator/v1": "216a60ea714df0c02a6295caed6ee26b6104862bdfd45e4db1e34b5a75cda71e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2092, + "startColumn": 15, + "charOffset": 57546, + "charLength": 10, + "snippet": { + "text": "difference" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2090, + "startColumn": 1, + "charOffset": 57411, + "charLength": 191, + "snippet": { + "text": "void ConditionSpeed::getFormulaValues(int32_t var, int32_t &min, int32_t &max) const {\r\n\tint32_t difference = var - 40;\r\n\tmin = mina * difference + minb;\r\n\tmax = maxa * difference + maxb;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2ab3db427aa8a53c", + "equalIndicator/v1": "217dade50c5c146fc42522e54078c4da7e5d2078b16810f1f0f15081790c5fdd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use nullptr", + "markdown": "Use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 134, + "startColumn": 31, + "charOffset": 4090, + "charLength": 4, + "snippet": { + "text": "NULL" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 132, + "startColumn": 1, + "charOffset": 3994, + "charLength": 214, + "snippet": { + "text": "\tStashContainerList toReturnList;\r\n\tfor (auto item : itemlist) {\r\n\t\tif (item->getContainer() != NULL) {\r\n\t\t\tauto subContainer = item->getContainer()->getStowableItems();\r\n\t\t\tfor (auto subContItem : subContainer) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fabe43de897f76d4", + "equalIndicator/v1": "21ad8c6a5828ce583f6790532320bc0ab7e3383f69a4ca4b6d1406294ad25a57" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 886, + "startColumn": 63, + "charOffset": 25906, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 884, + "startColumn": 1, + "charOffset": 25839, + "charLength": 186, + "snippet": { + "text": "}\r\n\r\nint GameFunctions::luaGameGetPublicAchievements(lua_State* L) {\r\n\t// Game.getPublicAchievements()\r\n\tconst std::vector &achievements = g_game().getPublicAchievements();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dd9fc8374449850f", + "equalIndicator/v1": "21c2981f041f5fb0a80e0cb230c0393c9a97b1aa5f2fd6b114a7c47076a8fa45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 775, + "startColumn": 51, + "charOffset": 21183, + "charLength": 13, + "snippet": { + "text": "getDepotChest" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 773, + "startColumn": 1, + "charOffset": 21040, + "charLength": 235, + "snippet": { + "text": "\tuint32_t depotId = getNumber(L, 2);\r\n\tbool autoCreate = getBoolean(L, 3, false);\r\n\tstd::shared_ptr depotChest = player->getDepotChest(depotId, autoCreate);\r\n\tif (depotChest) {\r\n\t\tplayer->setLastDepotId(depotId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b688cacd931d9bff", + "equalIndicator/v1": "21deeb6922fc3ecc381efb4287039f56ddd7451ba5c5f6cede0a3f81905fb1e5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 715, + "startColumn": 41, + "charOffset": 27603, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 713, + "startColumn": 1, + "charOffset": 27557, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "955a3734320e3650", + "equalIndicator/v1": "21e0a53ebfc7a04fcd73c30cc5bf30e0d78eb93bcbbd9ee13185407583641ad2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'event' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'event' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 57, + "startColumn": 49, + "charOffset": 1451, + "charLength": 5, + "snippet": { + "text": "event" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 55, + "startColumn": 1, + "charOffset": 1398, + "charLength": 140, + "snippet": { + "text": "}\r\n\r\nbool Weapons::registerLuaEvent(WeaponShared_ptr event, bool fromXML /*= false*/) {\r\n\tweapons[event->getID()] = event;\r\n\tif (fromXML) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e610cfc65efa8026", + "equalIndicator/v1": "21e0cb405ad316ca88fe6f96629fe4345966ff58964e1b4876573481f0ab8ff5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 26, + "startColumn": 7, + "charOffset": 942, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 24, + "startColumn": 1, + "charOffset": 784, + "charLength": 321, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\r\n\t// overrides\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e55ae830fb9184b", + "equalIndicator/v1": "21f0993d6d38a89b28321415df28b752b70d97c2b778580122d8bf3912752c79" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 199, + "startColumn": 15, + "charOffset": 8218, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 197, + "startColumn": 1, + "charOffset": 8065, + "charLength": 311, + "snippet": { + "text": "\r\n\tvirtual void postAddNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\tvirtual void postRemoveNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\r\n\tbool isPushable() override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4dbd0c2ffb896c0a", + "equalIndicator/v1": "21fbaf56fc39f2f9634b58c68b8b060692c70bb5e0560a9a23d0f8628f652765" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 211, + "startColumn": 6, + "charOffset": 7662, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 209, + "startColumn": 1, + "charOffset": 7606, + "charLength": 193, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, position);\r\n\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc53fdf462e931ff", + "equalIndicator/v1": "2200040b7ce19f202070bf4e8a13526236207e041b589e8440ac653e22539005" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 52, + "startColumn": 24, + "charOffset": 1442, + "charLength": 5, + "snippet": { + "text": "clone" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 50, + "startColumn": 1, + "charOffset": 1365, + "charLength": 170, + "snippet": { + "text": "\tContainer &operator=(const Container &) = delete;\r\n\r\n\tstd::shared_ptr clone() const override final;\r\n\r\n\tstd::shared_ptr getContainer() override final {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7cf20ab33482a2ee", + "equalIndicator/v1": "2211afbfbc45e82208b9022eab5ddc5a30c3da91e8bc690a558855918b245573" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 564, + "startColumn": 55, + "charOffset": 15687, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 562, + "startColumn": 1, + "charOffset": 15628, + "charLength": 203, + "snippet": { + "text": "}\r\n\r\nvoid Party::updatePlayerTicks(std::shared_ptr player, uint32_t points) {\r\n\tif (points != 0 && !player->hasFlag(PlayerFlags_t::NotGainInFight)) {\r\n\t\tticksMap[player->getID()] = OTSYS_TIME();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c48ec2bb7da0ba66", + "equalIndicator/v1": "221671541403cb8a4ea321207380acf29a2ab921192dc3f4f424a17aad7bd0ee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 711, + "startColumn": 121, + "charOffset": 23513, + "charLength": 27, + "snippet": { + "text": "spellSecondaryGroupCooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 709, + "startColumn": 1, + "charOffset": 23346, + "charLength": 280, + "snippet": { + "text": "\t\t}\r\n\t\tif (spellSecondaryGroupCooldown > 0) {\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellSecondaryGroupCooldown / rateCooldown, 0, false, secondaryGroup);\r\n\t\t\tplayer->addCondition(condition);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e4ffd29b9b8e6ebd", + "equalIndicator/v1": "2229f73d1bd8febe7313b33659b2731e1a2ffd2bb31440aa134499273c8a2aba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getUsedRunesBit' can be made const", + "markdown": "Method 'getUsedRunesBit' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1952, + "startColumn": 10, + "charOffset": 57573, + "charLength": 15, + "snippet": { + "text": "getUsedRunesBit" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1950, + "startColumn": 1, + "charOffset": 57537, + "charLength": 84, + "snippet": { + "text": "\t\tUsedRunesBit = bit;\r\n\t}\r\n\tint32_t getUsedRunesBit() {\r\n\t\treturn UsedRunesBit;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb89105af9f8fd0f", + "equalIndicator/v1": "222a2afd0b9003fc2eac5db6d9f2ac73828bc4d54796f6ab18374d088b235324" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6146, + "startColumn": 63, + "charOffset": 195419, + "charLength": 7, + "snippet": { + "text": "speaker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6144, + "startColumn": 1, + "charOffset": 195352, + "charLength": 165, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPrivateMessage(std::shared_ptr speaker, SpeakClasses type, const std::string &text) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0xAA);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d782654d5a33e7d", + "equalIndicator/v1": "224bba02c7ceb66a841d14830f31f95ed2601e1af498c3600ec5aa7262a809dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6422, + "startColumn": 68, + "charOffset": 221764, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6420, + "startColumn": 1, + "charOffset": 221692, + "charLength": 210, + "snippet": { + "text": "}\r\n\r\nvoid Game::internalCreatureChangeVisible(std::shared_ptr creature, bool visible) {\r\n\t// Send to clients\r\n\tfor (const auto &spectator : Spectators().find(creature->getPosition(), true)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a524aa84e334c7d7", + "equalIndicator/v1": "228f28283e5ddc29fc9c7360e43af88014480327e4d94e7da487201bff24f79c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1832, + "startColumn": 3, + "charOffset": 55847, + "charLength": 16, + "snippet": { + "text": "ObjectCategory_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1830, + "startColumn": 1, + "charOffset": 55742, + "charLength": 244, + "snippet": { + "text": "\t\tg_game().playerClearManagedContainer(player->getID(), category, false);\r\n\t} else if (action == 6) {\r\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tg_game().playerOpenManagedContainer(player->getID(), category, false);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8fb6392313449172", + "equalIndicator/v1": "22936bb82e932e93682d7476af9c0d6b92b272a389f9b8542b0becf1240e8452" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 292, + "startColumn": 15, + "charOffset": 7576, + "charLength": 12, + "snippet": { + "text": "std::toupper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 290, + "startColumn": 1, + "charOffset": 7524, + "charLength": 112, + "snippet": { + "text": "\t\t} else {\r\n\t\t\tif (capitalizeNext) {\r\n\t\t\t\tresult += std::toupper(ch);\r\n\t\t\t\tcapitalizeNext = false;\r\n\t\t\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f8be9f5e9cb67076", + "equalIndicator/v1": "229f1110388577dd4e513dab08df7e69c02e1ac9e8a294a45b460a9d03045aee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2195, + "startColumn": 27, + "charOffset": 74477, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2193, + "startColumn": 1, + "charOffset": 74422, + "charLength": 152, + "snippet": { + "text": "\t\t}\r\n\t} else if (monster) {\r\n\t\tdamage.primary.value *= monster->getAttackMultiplier();\r\n\t\tdamage.secondary.value *= monster->getAttackMultiplier();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e8de382fdb78a809", + "equalIndicator/v1": "22a33d10aa1b5fd80475cc0847a404b504776be95d46db953c5edaadf43b4359" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 915, + "startColumn": 14, + "charOffset": 29762, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 913, + "startColumn": 1, + "charOffset": 29578, + "charLength": 349, + "snippet": { + "text": "\tif (combatType != COMBAT_MANADRAIN && combatType != COMBAT_LIFEDRAIN && combatType != COMBAT_AGONYDAMAGE) { // Increase mitigate damage\r\n\t\tauto originalDamage = damage;\r\n\t\tdamage -= (damage * getMitigation()) / 100.;\r\n\t\tg_logger().trace(\"[mitigation] creature: {}, original damage: {}, mitigation damage: {}\", getName(), originalDamage, damage);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6bb08f7d5575c2f4", + "equalIndicator/v1": "22ae28dfee57028087efbb38361d1f79c9db43de8e92ffe266f91f71a0c471a1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1624, + "startColumn": 24, + "charOffset": 57254, + "charLength": 8, + "snippet": { + "text": "m_player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1622, + "startColumn": 1, + "charOffset": 57177, + "charLength": 162, + "snippet": { + "text": "\r\n\tif (m_player.getMana() > m_player.getMaxMana()) {\r\n\t\tint32_t difference = m_player.getMana() - m_player.getMaxMana();\r\n\t\tm_player.changeMana(-difference);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "37406bedeec7afb4", + "equalIndicator/v1": "22e8a610f505efd15d7826c99594ae4e382887f722f40f4284beca071aae477a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1012, + "startColumn": 7, + "charOffset": 38537, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1010, + "startColumn": 1, + "charOffset": 38365, + "charLength": 319, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::eventOnStorageUpdate - \"\r\n\t\t \"Player {} key {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6679ab75c83fc257", + "equalIndicator/v1": "22f2dd1e17efcdb1c0ca6734693af4140ccd85d4d4a9830b8f3f94ae72237e89" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'itemList' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'itemList' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 190, + "startColumn": 37, + "charOffset": 4590, + "charLength": 8, + "snippet": { + "text": "itemList" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 188, + "startColumn": 1, + "charOffset": 4549, + "charLength": 105, + "snippet": { + "text": "}\r\n\r\nuint16_t getStashSize(StashItemList itemList) {\r\n\tuint16_t size = 0;\r\n\tfor (auto item : itemList) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f759aa8df3b02d62", + "equalIndicator/v1": "22f8c620516dd64ad38514e0fb7f1ab58a4ce07cd00d7bc43b2b708eafe07246" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 155, + "startColumn": 56, + "charOffset": 4191, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 153, + "startColumn": 1, + "charOffset": 4131, + "charLength": 176, + "snippet": { + "text": "}\r\n\r\nvoid Module::executeOnRecvbyte(std::shared_ptr player, NetworkMessage &msg) {\r\n\t// onRecvbyte(player, msg, recvbyte)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71e00f59d611787f", + "equalIndicator/v1": "230186f0ab54795bd2a0d8c0b9e6305cc66a3519abf808e0b513d0b9122d07e8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 445, + "startColumn": 100, + "charOffset": 20014, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 443, + "startColumn": 1, + "charOffset": 19910, + "charLength": 203, + "snippet": { + "text": "}\r\n\r\nvoid ItemParse::parseInvisible(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\tstd::string stringValue = tmpStrValue;\r\n\tif (stringValue == \"invisible\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a414cc48be1fecf8", + "equalIndicator/v1": "2305093f72173ffd3dc1893b149c7c4182256670b4c04b245717a7ea7fa88584" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1956, + "startColumn": 2, + "charOffset": 59847, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1954, + "startColumn": 1, + "charOffset": 59749, + "charLength": 216, + "snippet": { + "text": "void ProtocolGame::parseRequestTrade(NetworkMessage &msg) {\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tuint32_t playerId = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1431eb0563e7bb52", + "equalIndicator/v1": "23067e2dffc883ea9073def66f176aff7096ced04a43a3f064f07f4ae04b83f0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1611, + "startColumn": 28, + "charOffset": 56563, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1609, + "startColumn": 1, + "charOffset": 56383, + "charLength": 312, + "snippet": { + "text": "\t\tif (shouldCalculateSecondaryDamage) {\r\n\t\t\tdouble factor = (double)elementAttack / (double)attackValue; // attack value here is phys dmg + element dmg\r\n\t\t\tint32_t elementDamage = std::round(defaultDmg * factor);\r\n\t\t\tint32_t physDmg = std::round(defaultDmg * (1.0 - factor));\r\n\t\t\tdamage.primary.value = physDmg;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0445f2315deec401", + "equalIndicator/v1": "23178e33dcac1572735f6e053234d781934c6f0af0954f6dfbbbdc21eb2d7784" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", + "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1168, + "startColumn": 28, + "charOffset": 32700, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1166, + "startColumn": 1, + "charOffset": 32644, + "charLength": 126, + "snippet": { + "text": "\t\t\t\tseparator = true;\r\n\t\t\t}\r\n\t\t\tif (int32_t hitChance = item->getHitChance();\r\n\t\t\t hitChance != 0) {\r\n\t\t\t\tif (separator) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1acd24922d0f0f77", + "equalIndicator/v1": "234ac8d7e50168f33811f372f53fb826089e9128a3a416603c6355312f5fffca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 126, + "startColumn": 47, + "charOffset": 3859, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 124, + "startColumn": 1, + "charOffset": 3808, + "charLength": 122, + "snippet": { + "text": "}\r\n\r\nvoid Container::addItem(std::shared_ptr item) {\r\n\titemlist.push_back(item);\r\n\titem->setParent(getContainer());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bdbc8ae5bd1588b0", + "equalIndicator/v1": "235f1d9c6af8bff20ea45596375e442482855f6a029cd5306e3f6162d88fc2d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 107, + "startColumn": 54, + "charOffset": 3995, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 105, + "startColumn": 1, + "charOffset": 3937, + "charLength": 218, + "snippet": { + "text": "}\r\n\r\nbool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result, bool disableIrrelevantInfo /* = false*/) {\r\n\tif (!result || !player) {\r\n\t\tstd::string nullptrType = !result ? \"Result\" : \"Player\";\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ba688eff9fb1f77", + "equalIndicator/v1": "2373d610a72db123570bf96151160b9e2e81a9c207630bd28e9283c225e19b92" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newTile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 212, + "startColumn": 76, + "charOffset": 6265, + "charLength": 7, + "snippet": { + "text": "newTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 210, + "startColumn": 1, + "charOffset": 6185, + "charLength": 220, + "snippet": { + "text": "}\r\n\r\nvoid Map::setTile(uint16_t x, uint16_t y, uint8_t z, std::shared_ptr newTile) {\r\n\tif (z >= MAP_MAX_LAYERS) {\r\n\t\tg_logger().error(\"Attempt to set tile on invalid coordinate: {}\", Position(x, y, z).toString());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d38a3a32ff5d8813", + "equalIndicator/v1": "238676e5b6f3350230b00adfd8ad77d63db1fe78f4956558f8e95d07325c0b14" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 913, + "startColumn": 48, + "charOffset": 29514, + "charLength": 3, + "snippet": { + "text": "max" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 911, + "startColumn": 1, + "charOffset": 29361, + "charLength": 164, + "snippet": { + "text": "\r\n\t// Returns the calculated maximum damage or a random value between the calculated minimum and maximum\r\n\treturn maxDamage ? -max : -normal_random(min, max);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "605ea9fe5336ff94", + "equalIndicator/v1": "238f882f0fad14dc6ae8ee4f5b75000a2d6048b768b091ce59ef052945d406a8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 493, + "startColumn": 8, + "charOffset": 12180, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 491, + "startColumn": 1, + "charOffset": 12066, + "charLength": 238, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetTransformEquipId(lua_State* L) {\r\n\t// itemType:getTransformEquipId()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->transformEquipTo);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f5c5f78303e32fb3", + "equalIndicator/v1": "239bb715ad6f589bc0a24922b4d10182a6dfad73d20f4e1074a317be013460f8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1226, + "startColumn": 7, + "charOffset": 43684, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1224, + "startColumn": 1, + "charOffset": 43672, + "charLength": 159, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnRequestQuestLine - \"\r\n\t\t \"Player {} questId {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9977737ed7e96f02", + "equalIndicator/v1": "239e3fe259219964955420266423dbfb2ed0f9450f23bcded8c04eb528a33e45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'MoveEvent' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'MoveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 616, + "startColumn": 66, + "charOffset": 18724, + "charLength": 9, + "snippet": { + "text": "MoveEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 614, + "startColumn": 1, + "charOffset": 18654, + "charLength": 257, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::DeEquipItem(const std::shared_ptr MoveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "936d0ececd2f6589", + "equalIndicator/v1": "23e3e5424886ff230c06fac28e0c480aa393a438a3bef0a58aad87ac7fdb14e5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 126, + "startColumn": 30, + "charOffset": 3450, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 124, + "startColumn": 1, + "charOffset": 3356, + "charLength": 157, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.actionId = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b60ed4e14e5adc5", + "equalIndicator/v1": "23fc7955b9b8a7a026a457ec089deccaa82f1022d8c8c80c62fcec70616ccc0c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1018, + "startColumn": 57, + "charOffset": 29359, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1016, + "startColumn": 1, + "charOffset": 29298, + "charLength": 112, + "snippet": { + "text": "}\r\n\r\nbool Player::canWalkthroughEx(std::shared_ptr creature) {\r\n\tif (group->access) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d1eea023bde11ae8", + "equalIndicator/v1": "240e5a20305bd60aaa7d7051da61e90a52a34b2df23e91fdd5bdc3570368bd93" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6922, + "startColumn": 31, + "charOffset": 240423, + "charLength": 38, + "snippet": { + "text": "(damage.secondary.value * damageBonus)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6920, + "startColumn": 1, + "charOffset": 240291, + "charLength": 190, + "snippet": { + "text": "\t\t\tif (damageBonus != 0) {\r\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\r\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c6f9c80210e166e", + "equalIndicator/v1": "24200ca09b96267eb2c770f602ed90fa09f0800574062505b0dde3856bcc097e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The 'empty' method should be used to check for emptiness instead of 'size'", + "markdown": "The 'empty' method should be used to check for emptiness instead of 'size'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4081, + "startColumn": 7, + "charOffset": 123090, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4079, + "startColumn": 1, + "charOffset": 123039, + "charLength": 104, + "snippet": { + "text": "\r\n\tfor (const auto &item : equippedItems) {\r\n\t\tif (item->getAugments().size() < 1) {\r\n\t\t\tcontinue;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a589b29c99a6ea68", + "equalIndicator/v1": "24233416e6602bddc3a7fec87e6587faea025efffcef170954d70e406c1800e7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6368, + "startColumn": 50, + "charOffset": 219907, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6366, + "startColumn": 1, + "charOffset": 219853, + "charLength": 188, + "snippet": { + "text": "}\r\n\r\nvoid Game::changeSpeed(std::shared_ptr creature, int32_t varSpeedDelta) {\r\n\tint32_t varSpeed = creature->getSpeed() - creature->getBaseSpeed();\r\n\tvarSpeed += varSpeedDelta;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "354123cb78a670b2", + "equalIndicator/v1": "242975d053f3b668e644ad2f48f10aa801a55a5803a20b95a00829dcccef9f42" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1335, + "startColumn": 58, + "charOffset": 45126, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1333, + "startColumn": 1, + "charOffset": 45064, + "charLength": 318, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatCondition(std::shared_ptr caster, const Position &position, const std::unique_ptr &area, const CombatParams ¶ms) {\r\n\tconst auto origin = caster ? caster->getPosition() : Position();\r\n\tCombatFunc(caster, origin, position, area, params, CombatConditionFunc, nullptr);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f243e01e915cb331", + "equalIndicator/v1": "2454d8260fc6e004177656075ae0124217e1c48db68b6ddbfaafa7e02b397dd5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 82, + "startColumn": 53, + "charOffset": 2657, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 80, + "startColumn": 1, + "charOffset": 2600, + "charLength": 234, + "snippet": { + "text": "}\r\n\r\nbool TalkAction::executeSay(std::shared_ptr player, const std::string &words, const std::string ¶m, SpeakClasses type) const {\r\n\t// onSay(player, words, param, type)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8ca51c0b4039e613", + "equalIndicator/v1": "24850be0c669693693043581db8eec2b986769a85bf6e9b07659ee4f7ba5c691" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2361, + "startColumn": 68, + "charOffset": 81659, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2359, + "startColumn": 1, + "charOffset": 81587, + "charLength": 210, + "snippet": { + "text": "}\r\n\r\nint32_t PlayerWheel::checkDrainBodyLeech(std::shared_ptr target, skills_t skill) const {\r\n\tif (!target || !target->getMonster() || target->getWheelOfDestinyDrainBodyDebuff() == 0) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "20455e009c267243", + "equalIndicator/v1": "24b554167b5c85e22fca8ca06cc27fa96d97c7373b6b76832b3d79bbe29b84c5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 185, + "startColumn": 22, + "charOffset": 7381, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 183, + "startColumn": 1, + "charOffset": 7321, + "charLength": 211, + "snippet": { + "text": "\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r\n\tvirtual ReturnValue queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr = nullptr) override {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb3d35a3e2819ca9", + "equalIndicator/v1": "24d97f34fb7182650accb84f04ed678178687d2c60de72da9c17ea5c0d7bbfb1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 577, + "startColumn": 51, + "charOffset": 17399, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 575, + "startColumn": 1, + "charOffset": 17303, + "charLength": 134, + "snippet": { + "text": "\r\n\t\t\tif (it.abilities->getManaGain() != 0) {\r\n\t\t\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, it.abilities->getManaGain());\r\n\t\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "19f7c73163de45cc", + "equalIndicator/v1": "24f3a78e10d53812cde521ca7950b71afbcaa2dc69f6b448f647f58224ace0cb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10568, + "startColumn": 52, + "charOffset": 367048, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10566, + "startColumn": 1, + "charOffset": 366992, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nAchievement Game::getAchievementByName(std::string name) {\r\n\tauto it = m_achievementsNameToId.find(name);\r\n\tif (it != m_achievementsNameToId.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7739729486773163", + "equalIndicator/v1": "24fb44631de37e67b8c6bee144ab47db834065c86f3c1641a1ab79ee001fa1cc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 165, + "startColumn": 7, + "charOffset": 5597, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 163, + "startColumn": 1, + "charOffset": 5436, + "charLength": 382, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\n\tvoid internalAddThing(std::shared_ptr thing) override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a221f73ab5d82f1f", + "equalIndicator/v1": "253e070c0a5894c31d772f8f6e0f6bcf50fe714bb6c17527859bbdde7d297e85" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 416, + "startColumn": 29, + "charOffset": 10556, + "charLength": 7, + "snippet": { + "text": "(b - a)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 414, + "startColumn": 1, + "charOffset": 10473, + "charLength": 98, + "snippet": { + "text": "\r\n\tauto &&[a, b] = std::minmax(minNumber, maxNumber);\r\n\treturn a + std::lround(v * (b - a));\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e1dfe65673a5579e", + "equalIndicator/v1": "2540dff56f256e3cec8c765631d9c14b6c634c8d21b3971efefeebf7d6dc732b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 281, + "startColumn": 6, + "charOffset": 10110, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 279, + "startColumn": 1, + "charOffset": 10076, + "charLength": 202, + "snippet": { + "text": "\r\n\tReturnValue returnValue;\r\n\tif (scriptInterface.protectedCall(L, 3, 1) != 0) {\r\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c1b17867d38f4552", + "equalIndicator/v1": "2557263c4a65bd7777fdf7eac4af77a55bee5216d81e3fc8c41c789d5bc824e6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 438, + "startColumn": 51, + "charOffset": 11803, + "charLength": 7, + "snippet": { + "text": "oldItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 436, + "startColumn": 1, + "charOffset": 11748, + "charLength": 396, + "snippet": { + "text": "}\r\n\r\nvoid Tile::onUpdateTileItem(std::shared_ptr oldItem, const ItemType &oldType, std::shared_ptr newItem, const ItemType &newType) {\r\n\tif ((newItem->hasProperty(CONST_PROP_MOVABLE) || newItem->getContainer()) || (newItem->isWrapable() && newItem->hasProperty(CONST_PROP_MOVABLE) && !oldItem->hasProperty(CONST_PROP_BLOCKPATH))) {\r\n\t\tauto it = g_game().browseFields.find(getTile());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "da501f91bd8bff64", + "equalIndicator/v1": "256072035a23cb41f8122059c3adc707a1854588d184d56e98a5a8dc7b7324af" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6253, + "startColumn": 58, + "charOffset": 216125, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6251, + "startColumn": 1, + "charOffset": 216063, + "charLength": 251, + "snippet": { + "text": "}\r\n\r\nbool Game::internalCreatureSay(std::shared_ptr creature, SpeakClasses type, const std::string &text, bool ghostMode, Spectators* spectatorsPtr /* = nullptr*/, const Position* pos /* = nullptr*/) {\r\n\tif (text.empty()) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f2a2a786f6ec48d1", + "equalIndicator/v1": "256652c687a8e23d72fc7371e976ab250d49dd59262ec89a5b13e9263de069e3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Result of integer division used in a floating point context; possible loss of precision", + "markdown": "Result of integer division used in a floating point context; possible loss of precision" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 421, + "startColumn": 3, + "charOffset": 13904, + "charLength": 6, + "snippet": { + "text": "return" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 419, + "startColumn": 1, + "charOffset": 13853, + "charLength": 110, + "snippet": { + "text": "\t\treturn 4;\r\n\t} else if (chanceInPercent < 1) {\r\n\t\treturn 3;\r\n\t} else if (chanceInPercent < 5) {\r\n\t\treturn 2;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e23f62820cc50220", + "equalIndicator/v1": "25670d8221f53bc214cd895a952fb66208989f9c69506b8e09656145e6c384ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 313, + "startColumn": 94, + "charOffset": 9415, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 311, + "startColumn": 1, + "charOffset": 9317, + "charLength": 166, + "snippet": { + "text": "}\r\n\r\nvoid LuaFunctionsLoader::setItemMetatable(lua_State* L, int32_t index, std::shared_ptr item) {\r\n\tif (validateDispatcherContext(__FUNCTION__)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ea847b0d07ea53b2", + "equalIndicator/v1": "257a4b69140f365d6f705a1738f172345236296d35e7d93426cb37e3ef630a42" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 645, + "startColumn": 53, + "charOffset": 20382, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 643, + "startColumn": 1, + "charOffset": 20180, + "charLength": 357, + "snippet": { + "text": "\t\t\t\t\tconst float augmentPercent = augment->value / 100.0;\r\n\t\t\t\t\tdamage.primary.value += static_cast(damage.primary.value * augmentPercent);\r\n\t\t\t\t\tdamage.secondary.value += static_cast(damage.secondary.value * augmentPercent);\r\n\t\t\t\t} else if (augment->type != Augment_t::Cooldown) {\r\n\t\t\t\t\tconst int32_t augmentValue = augment->value * 100;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6620b1d1f96b3a3f", + "equalIndicator/v1": "258f35c82eab6e5cb8d9f9819a54795fb374908ba4608a9e4d8feb8ba37c8ac6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 90, + "startColumn": 59, + "charOffset": 2596, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 88, + "startColumn": 1, + "charOffset": 2533, + "charLength": 177, + "snippet": { + "text": "}\r\n\r\nvoid WaitingList::addPlayerToList(std::shared_ptr player) {\r\n\tauto it = info->playerReferences.find(player->getGUID());\r\n\tif (it != info->playerReferences.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f66d4a912ba6587", + "equalIndicator/v1": "2597aca85ca7060d201aee39351aa6c2bbd2fce35d648b4c60ab3ff70ea79e62" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 49, + "startColumn": 1, + "charOffset": 1364, + "charLength": 4, + "snippet": { + "text": "void" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 47, + "startColumn": 1, + "charOffset": 1359, + "charLength": 228, + "snippet": { + "text": "}\r\n\r\nvoid Reward::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr localParent = getParent();\r\n\tif (localParent != nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c968a18a98141463", + "equalIndicator/v1": "259ae1c4d8ecaabdea1f72fe615e05f612bab3dc3dff2a5116ce675f564fbf7f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Vector_iterator>>::value_type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Vector_iterator\\>\\>::value_type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 105, + "startColumn": 32, + "charOffset": 3140, + "charLength": 8, + "snippet": { + "text": "uniqueId" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 103, + "startColumn": 1, + "charOffset": 3059, + "charLength": 150, + "snippet": { + "text": "\r\n\tfor (const auto &uniqueId : uniqueIdVector) {\r\n\t\tif (registerEvent(moveEvent, uniqueId, uniqueIdMap)) {\r\n\t\t\ttmpVector.emplace_back(uniqueId);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75bdb316db2747da", + "equalIndicator/v1": "25b3332b17eed292cf325168ea9d5749e009ac5dfd714310e585834f68370b9b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'destination' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'destination' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 83, + "startColumn": 51, + "charOffset": 1949, + "charLength": 11, + "snippet": { + "text": "destination" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 81, + "startColumn": 1, + "charOffset": 1893, + "charLength": 175, + "snippet": { + "text": "};\r\n\r\nbool Bank::transferTo(const std::shared_ptr destination, uint64_t amount) {\r\n\tif (!destination) {\r\n\t\tg_logger().error(\"Bank::transferTo: destination is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79457339d77c6bf6", + "equalIndicator/v1": "25dd8d4b18a875834b11c0cfafe064e2c299201c9f7f790cdaeb6f5fdd168509" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1084, + "startColumn": 83, + "charOffset": 35438, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1082, + "startColumn": 1, + "charOffset": 35351, + "charLength": 230, + "snippet": { + "text": "}\r\n\r\nbool Combat::doCombat(std::shared_ptr caster, std::shared_ptr target, const Position &origin, int affected /* = 1 */) const {\r\n\t// target combat callback function\r\n\tif (params.combatType != COMBAT_NONE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f34a7f68ba4d508c", + "equalIndicator/v1": "262d82a7e60dab8ea2c94c1e0f7a9f8afef6b4d33d0d79815b754c7331ef677f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 207, + "startColumn": 23, + "charOffset": 6466, + "charLength": 8, + "snippet": { + "text": "interval" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 205, + "startColumn": 1, + "charOffset": 6320, + "charLength": 163, + "snippet": { + "text": "\tif (callback.startScriptInterface(npcType->info.thinkEvent)) {\r\n\t\tcallback.pushSpecificCreature(static_self_cast());\r\n\t\tcallback.pushNumber(interval);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e9385139f202934b", + "equalIndicator/v1": "262f2a819635cb6393c90f3f60a4beb0ae683d36333f0e3d8877f91a664c3f52" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'name' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'name' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 325, + "startColumn": 19, + "charOffset": 12128, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 323, + "startColumn": 1, + "charOffset": 12002, + "charLength": 270, + "snippet": { + "text": "\tbool getInstant(WheelInstant_t type) const;\r\n\tbool getHealingLinkUpgrade(const std::string &spell) const;\r\n\tuint8_t getStage(const std::string name) const;\r\n\tuint8_t getStage(WheelStage_t type) const;\r\n\tWheelSpellGrade_t getSpellUpgrade(const std::string &name) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8a0486c2ed307a3b", + "equalIndicator/v1": "269750ad278e3d2a0115778f562784362e1e068969b211fe8273830cb6b10a79" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 707, + "startColumn": 7, + "charOffset": 27247, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 705, + "startColumn": 1, + "charOffset": 27064, + "charLength": 332, + "snippet": { + "text": "\r\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"\r\n\t\t \"Player {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2aa26a20e1d2cb3", + "equalIndicator/v1": "26f394706871d6be6fefa59aaa1c21e4faa1806258838736b661d51238e59ccb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8473, + "startColumn": 17, + "charOffset": 295048, + "charLength": 12, + "snippet": { + "text": "loyaltyTitle" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8471, + "startColumn": 1, + "charOffset": 294878, + "charLength": 507, + "snippet": { + "text": "\t\t\t\tconst auto &voc = g_vocations().getVocation(result->getNumber(\"vocation\"));\r\n\t\t\t\tuint8_t characterVocation = voc ? voc->getClientId() : 0;\r\n\t\t\t\tstd::string loyaltyTitle = \"\"; // todo get loyalty title from player\r\n\t\t\t\tcharacters.emplace_back(std::move(result->getString(\"name\")), result->getNumber(\"points\"), result->getNumber(\"id\"), result->getNumber(\"rank\"), result->getNumber(\"level\"), characterVocation, loyaltyTitle);\r\n\t\t\t} while (result->next());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a6a0028b1ec49817", + "equalIndicator/v1": "272c5b0c8be3d8ebf75706582bacbbaa690899ed0ae8318d98285261e1b67e53" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 690, + "startColumn": 54, + "charOffset": 21399, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 688, + "startColumn": 1, + "charOffset": 21341, + "charLength": 135, + "snippet": { + "text": "}\r\n\r\nvoid Party::updatePlayerMana(std::shared_ptr player, uint8_t manaPercent) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fe8f2323704027b5", + "equalIndicator/v1": "273a6f2995ed7cfc4b56cea28e3d88829acdb48ade79facd62f0ae53ee8f064e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2087, + "startColumn": 22, + "charOffset": 80417, + "charLength": 1, + "snippet": { + "text": "m" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2085, + "startColumn": 1, + "charOffset": 80389, + "charLength": 88, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tint32_t newCount = m - n;\r\n\t\tif (newCount > 0) {\r\n\t\t\tmoveItem = item->clone();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5d5b10a8b57f800f", + "equalIndicator/v1": "27440b3dd627f18779d6c438ba414896e7161268b7fed28129aa18ea638343c4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7506, + "startColumn": 28, + "charOffset": 261421, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7504, + "startColumn": 1, + "charOffset": 261356, + "charLength": 191, + "snippet": { + "text": "\r\nvoid Game::buildMessageAsAttacker(\r\n\tstd::shared_ptr target, const CombatDamage &damage, TextMessage &message,\r\n\tstd::stringstream &ss, const std::string &damageString\r\n) const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "27be09c19c82b87d", + "equalIndicator/v1": "274679c47f7facd87a0e33a465b63c7e33d433d39fb47db5bda916a46d478bd8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 501, + "startColumn": 54, + "charOffset": 15541, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 499, + "startColumn": 1, + "charOffset": 15435, + "charLength": 187, + "snippet": { + "text": "\tvirtual void onFollowCreatureDisappear(bool) { }\r\n\r\n\tvirtual void onCreatureSay(std::shared_ptr, SpeakClasses, const std::string &) { }\r\n\r\n\tvirtual void onPlacedCreature() { }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2cadd361b605b56f", + "equalIndicator/v1": "275cd2af332eb154af4551ca1cf9c52d2da58045556c3396260c854d279daf48" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6726, + "startColumn": 91, + "charOffset": 198268, + "charLength": 8, + "snippet": { + "text": "duration" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6724, + "startColumn": 1, + "charOffset": 197924, + "charLength": 472, + "snippet": { + "text": "\tif (getZoneType() != ZONE_PROTECTION && checkLastAggressiveActionWithin(2000) && ((OTSYS_TIME() / 1000) % 2) == 0 && chance > 0 && randomChance < chance) {\r\n\t\tint64_t duration = g_configManager().getNumber(TRANSCENDANCE_AVATAR_DURATION, __FUNCTION__);\r\n\t\tauto outfitCondition = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_OUTFIT, duration, 0)->static_self_cast();\r\n\t\tOutfit_t outfit;\r\n\t\toutfit.lookType = getVocation()->getAvatarLookType();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ef56c3b965ba8f3", + "equalIndicator/v1": "27621f6b8a0d0194e29ace5e4242806a7f87edb5c7aa10f07d85fc9dbabc3a69" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7522, + "startColumn": 28, + "charOffset": 261948, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7520, + "startColumn": 1, + "charOffset": 261894, + "charLength": 179, + "snippet": { + "text": "\r\nvoid Game::sendEffects(\r\n\tstd::shared_ptr target, const CombatDamage &damage, const Position &targetPos, TextMessage &message,\r\n\tconst CreatureVector &spectators\r\n) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e6ef13b30d1254b", + "equalIndicator/v1": "2776cd7803683a194b2eeae119f347befa2302603c50f09029c52bb8d01d8dec" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 454, + "startColumn": 26, + "charOffset": 24101, + "charLength": 31, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 452, + "startColumn": 1, + "charOffset": 23926, + "charLength": 345, + "snippet": { + "text": "\tvoid internalCreatureChangeVisible(std::shared_ptr creature, bool visible);\r\n\tvoid changeLight(const std::shared_ptr creature);\r\n\tvoid updateCreatureIcon(const std::shared_ptr creature);\r\n\tvoid reloadCreature(const std::shared_ptr creature);\r\n\tvoid updateCreatureSkull(std::shared_ptr player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d2483b4ecaf91f85", + "equalIndicator/v1": "27b3555e99e6252baada8c12a8e20a5b3e2283f685e38fdb45440f08fd425beb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 126, + "startColumn": 4, + "charOffset": 4150, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 124, + "startColumn": 1, + "charOffset": 4139, + "charLength": 157, + "snippet": { + "text": "\t\t\t}\r\n\r\n\t\t\tuint16_t category = pugi::cast(categorybase.value());\r\n\t\t\tauto category_p = getCategoryByID(category);\r\n\t\t\tif (category_p == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eb0c613821ef2386", + "equalIndicator/v1": "27b38204122a2ce960f619e69d0f6a8233db8461a0584816f028e9b1aad45b04" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6883, + "startColumn": 28, + "charOffset": 238609, + "charLength": 91, + "snippet": { + "text": "(damage.primary.value * attackerPlayer->wheel()->checkBlessingGroveHealingByTarget(target))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6881, + "startColumn": 1, + "charOffset": 238509, + "charLength": 209, + "snippet": { + "text": "\r\n\t\tif (attackerPlayer->wheel()->getInstant(\"Blessing of the Grove\")) {\r\n\t\t\tdamage.primary.value += (damage.primary.value * attackerPlayer->wheel()->checkBlessingGroveHealingByTarget(target)) / 100.;\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d4e7bb8d5e8d067d", + "equalIndicator/v1": "27b3c20259f7ee66db237fdaaf5546ab901fd40afdfe488b3fbacc95b6716f2d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1323, + "startColumn": 27, + "charOffset": 46942, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1321, + "startColumn": 1, + "charOffset": 46910, + "charLength": 128, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.monsterOnDropLoot, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "41e283729587845a", + "equalIndicator/v1": "27d3e25a045ca3c2538be6def47832030a7817182a6c1b31ddfdfb9419ab738d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: type", + "markdown": "Constructor does not initialize these fields: type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 19, + "startColumn": 7, + "charOffset": 564, + "charLength": 5, + "snippet": { + "text": "Charm" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 17, + "startColumn": 1, + "charOffset": 543, + "charLength": 59, + "snippet": { + "text": "class Game;\r\n\r\nclass Charm {\r\npublic:\r\n\tCharm() = default;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "12c3d66f9473ce1d", + "equalIndicator/v1": "27edb2249eefdeae6f4288c082b0d2039e74162f06e932da4e0b4c8f80006a0d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", + "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 735, + "startColumn": 12, + "charOffset": 23778, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 733, + "startColumn": 1, + "charOffset": 23751, + "charLength": 47, + "snippet": { + "text": "\t\t}\r\n\t} else {\r\n\t\tchance = it.hitChance;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "423ec0b3c8eb3c6d", + "equalIndicator/v1": "2823338925935ff8dbdfc0df47df06e399ff8fe4b20904a1b82af7d57ddd8831" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 192, + "startColumn": 15, + "charOffset": 7715, + "charLength": 8, + "snippet": { + "text": "addThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 190, + "startColumn": 1, + "charOffset": 7695, + "charLength": 220, + "snippet": { + "text": "\t}\r\n\r\n\tvirtual void addThing(std::shared_ptr) override { }\r\n\tvirtual void addThing(int32_t, std::shared_ptr) override { }\r\n\tvirtual void updateThing(std::shared_ptr, uint16_t, uint32_t) override { }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "56ca6e6ff50602af", + "equalIndicator/v1": "2828fe5e99fc8c2f21a3c2ce1fc54e4728430970035254025a1da3ec68baf8eb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper_proto.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 110, + "startColumn": 9, + "charOffset": 3793, + "charLength": 12, + "snippet": { + "text": "ValueWrapper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 108, + "startColumn": 1, + "charOffset": 3770, + "charLength": 58, + "snippet": { + "text": "\t\t\tbreak;\r\n\t}\r\n\treturn ValueWrapper(data, timestamp);\r\n}\r\n" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8f9fc373df583e72", + "equalIndicator/v1": "283bf45a2fdcbd350dc43d1f0477af4f02567459e44e30041814eafa5bf6a266" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 206, + "startColumn": 43, + "charOffset": 6565, + "charLength": 9, + "snippet": { + "text": "lua_State" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 204, + "startColumn": 1, + "charOffset": 6518, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nint GameFunctions::luaGameGetMonsterCount(lua_State* L) {\r\n\t// Game.getMonsterCount()\r\n\tlua_pushnumber(L, g_game().getMonstersOnline());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0e8d47f46675542b", + "equalIndicator/v1": "285e9a2c5cec1e5e4c162fad37e9302232c6102e2c8addde32b79a4daeea8721" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 299, + "startColumn": 6, + "charOffset": 10252, + "charLength": 80, + "snippet": { + "text": "// We will only return the MonsterType if it match the exact name of the monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 297, + "startColumn": 1, + "charOffset": 10174, + "charLength": 241, + "snippet": { + "text": "\tif (auto it = monsters.find(lowerCaseName);\r\n\t it != monsters.end()\r\n\t // We will only return the MonsterType if it match the exact name of the monster\r\n\t && it->first.find(lowerCaseName) != it->first.npos) {\r\n\t\treturn it->second;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a016dae5ac3f77c1", + "equalIndicator/v1": "286209001eca15b4dc4b5cf21386fbf04b6dae3bc8e295c3e7544e8764c1b842" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8998, + "startColumn": 15, + "charOffset": 314566, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8996, + "startColumn": 1, + "charOffset": 314504, + "charLength": 106, + "snippet": { + "text": "\t\t\tint32_t subType;\r\n\t\t\tif (it.charges != 0) {\r\n\t\t\t\tsubType = it.charges;\r\n\t\t\t} else {\r\n\t\t\t\tsubType = -1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "624e044ee240cb18", + "equalIndicator/v1": "286225f936f4ce73d25aaf4df1b383b7343e29db102fee6b9e7eff659bb374b6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'unsigned long long'", + "markdown": "Narrowing conversion from 'float' to 'unsigned long long'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 190, + "startColumn": 3, + "charOffset": 5444, + "charLength": 6, + "snippet": { + "text": "return" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 188, + "startColumn": 1, + "charOffset": 5435, + "charLength": 28, + "snippet": { + "text": "\t\t}\r\n\r\n\t\treturn list;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "12db9b05e8de7764", + "equalIndicator/v1": "286502dd89459eea88574cd29a7ca2b1f5a92c35ccdba2764e5f7cb7e1414e0b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newParty' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newParty' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5697, + "startColumn": 56, + "charOffset": 168363, + "charLength": 8, + "snippet": { + "text": "newParty" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5695, + "startColumn": 1, + "charOffset": 168303, + "charLength": 190, + "snippet": { + "text": "}\r\n\r\nbool Player::addPartyInvitation(std::shared_ptr newParty) {\r\n\tauto it = std::find(invitePartyList.begin(), invitePartyList.end(), newParty);\r\n\tif (it != invitePartyList.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "02f08b537ef3aa81", + "equalIndicator/v1": "287e59bd86896e48c17d647839ea5ecacd020cb9a104057a312fc9897af0c648" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Qualified name 'Item::readAttr' refers to a member overridden in subclass; did you mean 'Container'?", + "markdown": "Qualified name 'Item::readAttr' refers to a member overridden in subclass; did you mean 'Container'?" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 24, + "startColumn": 9, + "charOffset": 788, + "charLength": 14, + "snippet": { + "text": "Item::readAttr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 746, + "charLength": 81, + "snippet": { + "text": "\t\treturn ATTR_READ_CONTINUE;\r\n\t}\r\n\treturn Item::readAttr(attr, propStream);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bf9e89c796e03a71", + "equalIndicator/v1": "28e17c27594ddc9233a9527e5596de1d91348b374d65df0b21137c00f8a0dc55" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 741, + "startColumn": 51, + "charOffset": 23357, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 739, + "startColumn": 1, + "charOffset": 23302, + "charLength": 139, + "snippet": { + "text": "}\r\n\r\nvoid Party::addPlayerLoot(std::shared_ptr player, std::shared_ptr item) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd3c2210d715b3f2", + "equalIndicator/v1": "28f272517721f59482201afa0b0a64b6b38cca96f0f6c48408e96013bdc69840" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::any_of()'", + "markdown": "Replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1160, + "startColumn": 2, + "charOffset": 35027, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1158, + "startColumn": 1, + "charOffset": 34954, + "charLength": 228, + "snippet": { + "text": "\tstd::shuffle(dirList.begin(), dirList.end(), getRandomGenerator());\r\n\r\n\tfor (Direction dir : dirList) {\r\n\t\tconst Position &tryPos = Spells::getCasterPosition(creature, dir);\r\n\t\tconst auto toTile = g_game().map.getTile(tryPos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67e5f16ea5930ca1", + "equalIndicator/v1": "28fb25ef35e6b6f2b5268199bd99ba15bae5b3bc008d57dde3a4c764d7dbd93a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 565, + "startColumn": 3, + "charOffset": 13246, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 563, + "startColumn": 1, + "charOffset": 13180, + "charLength": 182, + "snippet": { + "text": "\tstd::shared_ptr thing = getThing(L, 2);\r\n\tif (thing) {\r\n\t\tuint32_t flags = getNumber(L, 3, 0);\r\n\t\tlua_pushnumber(L, tile->queryAdd(0, thing, 1, flags));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "52183bd3d39ac243", + "equalIndicator/v1": "291bc8165c06d7da7589f67c8cfb00aff077dd55fb426efe742aeaf056a5ad60" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'sep' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'sep' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 51, + "startColumn": 15, + "charOffset": 1311, + "charLength": 3, + "snippet": { + "text": "sep" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 49, + "startColumn": 1, + "charOffset": 1254, + "charLength": 68, + "snippet": { + "text": "\t}\r\n\tvoid setSeparator(std::string sep) {\r\n\t\tseparator = sep;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71e085cd43da236a", + "equalIndicator/v1": "29259d16cc263d3aba99401a30f860e13a74bd623ab6184e2f2569d8fe848fd5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10269, + "startColumn": 54, + "charOffset": 357047, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10267, + "startColumn": 1, + "charOffset": 356989, + "charLength": 179, + "snippet": { + "text": "}\r\n\r\nbool Game::addItemStoreInbox(std::shared_ptr player, uint32_t itemId) {\r\n\tstd::shared_ptr decoKit = Item::CreateItem(ITEM_DECORATION_KIT, 1);\r\n\tif (!decoKit) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "832e62204c238652", + "equalIndicator/v1": "29511d753d8ebd2d695830341f64c6a4402f2dce56e524b9c6b9eff5a37781c5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 140, + "startColumn": 75, + "charOffset": 4407, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 138, + "startColumn": 1, + "charOffset": 4285, + "charLength": 145, + "snippet": { + "text": "\tif (it.hasSubType()) {\r\n\t\tif (it.stackable) {\r\n\t\t\titemCount = static_cast(std::ceil(static_cast(count) / it.stackSize));\r\n\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ed09e21d8ba953c2", + "equalIndicator/v1": "29654af01d2b0301004bc979e9eeadfb1ded3726f8b1edf129af25d6ace53a6e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1208, + "startColumn": 27, + "charOffset": 43117, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1206, + "startColumn": 1, + "charOffset": 43085, + "charLength": 134, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnRequestQuestLog, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "330357aac5eb3ceb", + "equalIndicator/v1": "29a090c25814c2f07bae2ed59fc1ad746c5caa97e033ca5494d478ce30a95d41" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1372, + "startColumn": 3, + "charOffset": 39974, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1370, + "startColumn": 1, + "charOffset": 39912, + "charLength": 173, + "snippet": { + "text": "\r\n\tif (const CreatureVector* creatures = getCreatures()) {\r\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\r\n\t\t\tif (*it == creature) {\r\n\t\t\t\treturn n;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "973dfd0537f61d0b", + "equalIndicator/v1": "29a9e0edfac93f09626bb87ef3883524cf924f58afa3c0fc7c48e59afec13719" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 66, + "startColumn": 8, + "charOffset": 1773, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 64, + "startColumn": 1, + "charOffset": 1665, + "charLength": 231, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsFluidContainer(lua_State* L) {\r\n\t// itemType:isFluidContainer()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isFluidContainer());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d122d1fda38fbb34", + "equalIndicator/v1": "29d7939266029e5555040c32ea29b0af35178d73ae5301f682eea9d08c49b3b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 897, + "startColumn": 19, + "charOffset": 27084, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 895, + "startColumn": 1, + "charOffset": 27002, + "charLength": 107, + "snippet": { + "text": "\titem->setParent(getContainer());\r\n\titemlist.push_front(item);\r\n\tupdateItemWeight(item->getWeight());\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eddd52c2bdd4c52e", + "equalIndicator/v1": "29fcd513f23e8c9a076324e31921a2fc6972f803d7d1943c20cd481973091b98" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6429, + "startColumn": 50, + "charOffset": 222034, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6427, + "startColumn": 1, + "charOffset": 221980, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nvoid Game::changeLight(std::shared_ptr creature) {\r\n\t// Send to clients\r\n\tfor (const auto &spectator : Spectators().find(creature->getPosition(), true)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d17603c0a08bece", + "equalIndicator/v1": "29fdf714f2317ede41072a4d404ac711d70c5ba6a49d887da2b47db4a5ed81a2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 268, + "startColumn": 45, + "charOffset": 9934, + "charLength": 5, + "snippet": { + "text": "party" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 266, + "startColumn": 1, + "charOffset": 9835, + "charLength": 161, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, party);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b0bb047a13c69f8b", + "equalIndicator/v1": "2a733927013da26a991ecfee4bf605279892344db29a2d8fe64050d1a2874d1c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 170, + "startColumn": 60, + "charOffset": 4040, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 168, + "startColumn": 1, + "charOffset": 3976, + "charLength": 131, + "snippet": { + "text": "}\r\n\r\nbool Condition::executeCondition(std::shared_ptr creature, int32_t interval) {\r\n\tif (ticks == -1) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3a5b7a4682bc0533", + "equalIndicator/v1": "2a7b904d6cf46b78835bf38f9ab07495b38e7d8d1dc69fd751139a079628a714" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6945, + "startColumn": 57, + "charOffset": 241364, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6943, + "startColumn": 1, + "charOffset": 241303, + "charLength": 231, + "snippet": { + "text": "}\r\n\r\nbool Game::combatChangeHealth(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage, bool isEvent /*= false*/) {\r\n\tusing namespace std;\r\n\tconst Position &targetPos = target->getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3fcdd55d15be53fa", + "equalIndicator/v1": "2aafa068ceb73f6bd60dad7a1b7584454d3202e391e887b7be3f10145070435d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 182, + "startColumn": 22, + "charOffset": 7222, + "charLength": 13, + "snippet": { + "text": "queryMaxCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 180, + "startColumn": 1, + "charOffset": 7162, + "charLength": 197, + "snippet": { + "text": "\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r\n\tvirtual ReturnValue queryMaxCount(int32_t, const std::shared_ptr &, uint32_t, uint32_t &, uint32_t) override {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cd24754635429e96", + "equalIndicator/v1": "2ae250fc4fe1ead707d65201528e7dd094a231fcfe3f5dddf3cf12670bcffbc8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 440, + "startColumn": 9, + "charOffset": 12213, + "charLength": 26, + "snippet": { + "text": "(defenseSkill / 4. + 2.23)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 438, + "startColumn": 1, + "charOffset": 12199, + "charLength": 120, + "snippet": { + "text": "\t}\r\n\r\n\treturn (defenseSkill / 4. + 2.23) * defenseValue * 0.15 * getDefenseFactor() * vocation->defenseMultiplier;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef05246437d4b792", + "equalIndicator/v1": "2ae78c6634ca30b0faacdc2170f8957e78aa8bd96f98c5f5e44b1e6da0655258" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3010, + "startColumn": 29, + "charOffset": 80369, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3008, + "startColumn": 1, + "charOffset": 80289, + "charLength": 181, + "snippet": { + "text": "\r\n\tstd::shared_ptr tile = player->getTile();\r\n\tconst Position &position = player->getPosition();\r\n\r\n\tfor (const auto &spectator : Spectators().find(position, true)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "022ca6acc643a135", + "equalIndicator/v1": "2b1d293178e22dd7b85859a21e6b8aecc1dfe6560eb39fdad3b8239df9ba553e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Return type 'const Outfit_t' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness", + "markdown": "Return type 'const Outfit_t' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 275, + "startColumn": 2, + "charOffset": 6794, + "charLength": 14, + "snippet": { + "text": "const Outfit_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 273, + "startColumn": 1, + "charOffset": 6769, + "charLength": 96, + "snippet": { + "text": "\tvoid iconChanged();\r\n\r\n\tconst Outfit_t getCurrentOutfit() const {\r\n\t\treturn currentOutfit;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab321d1afefe6f40", + "equalIndicator/v1": "2b356d37e9800c50965d644d4792ad2518db1005293087754e869253ff010528" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 394, + "startColumn": 61, + "charOffset": 13858, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 392, + "startColumn": 1, + "charOffset": 13793, + "charLength": 275, + "snippet": { + "text": "}\r\n\r\nvoid IOPrey::parseTaskHuntingAction(std::shared_ptr player, PreySlot_t slotId, PreyTaskAction_t action, bool upgrade, uint16_t raceId) const {\r\n\tconst auto &slot = player->getTaskHuntingSlotById(slotId);\r\n\tif (!slot || slot->state == PreyTaskDataState_Locked) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5c94e940c876d1a", + "equalIndicator/v1": "2b3b0c2e248e2e310daddf22ff4c4255fd6857dbfb4750a23d1d62de97b462fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 955, + "startColumn": 126, + "charOffset": 34511, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 953, + "startColumn": 1, + "charOffset": 34381, + "charLength": 220, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) {\r\n\t// Player:onTradeRequest(target, item)\r\n\tif (info.playerOnTradeRequest == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ec25cdbf7bc3a3f7", + "equalIndicator/v1": "2b4971f48cc273d5bc04cc2ce31e6420715e4725958c794739ccbf9b8bba56d7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1912, + "startColumn": 2, + "charOffset": 58137, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1910, + "startColumn": 1, + "charOffset": 58079, + "charLength": 216, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseFollow(NetworkMessage &msg) {\r\n\tuint32_t creatureId = msg.get();\r\n\t// msg.get(); creatureId (same as above)\r\n\tg_game().playerFollowCreature(player->getID(), creatureId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bfb342996dd95560", + "equalIndicator/v1": "2b4d6e76ede29447092f36768a6c519b3d98961ed545b8b27962cd396c610525" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 61, + "startColumn": 31, + "charOffset": 1597, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 59, + "startColumn": 1, + "charOffset": 1548, + "charLength": 139, + "snippet": { + "text": "\r\n\tint index = 0;\r\n\tfor (std::shared_ptr player : members) {\r\n\t\tpushUserdata(L, player);\r\n\t\tsetMetatable(L, -1, \"Player\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "632ec081d46e80eb", + "equalIndicator/v1": "2b623f5e4b0b14e7ec9b3f336a2e8e37f37c8c162555ce8d8af213cb544d614b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 233, + "startColumn": 2, + "charOffset": 6463, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 231, + "startColumn": 1, + "charOffset": 6456, + "charLength": 134, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t subType = getNumber(L, 3, -1);\r\n\tlua_pushnumber(L, container->getItemTypeCount(itemId, subType));\r\n\treturn 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bfd2ae08fec24839", + "equalIndicator/v1": "2b94a9427c08a5526126de39d726205b3681c6bf09df255f53f03c2671cc5a21" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2389, + "startColumn": 57, + "charOffset": 70628, + "charLength": 6, + "snippet": { + "text": "rawExp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2387, + "startColumn": 1, + "charOffset": 70494, + "charLength": 227, + "snippet": { + "text": "\t\tg_metrics().addCounter(\"player_experience_actual\", exp, attrs);\r\n\t} else {\r\n\t\tg_metrics().addCounter(\"player_experience_bonus_raw\", rawExp, attrs);\r\n\t\tg_metrics().addCounter(\"player_experience_bonus_actual\", exp, attrs);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "828e82e63b8894f0", + "equalIndicator/v1": "2b9afbb2c267e03ae569cee2d7d3ae91fe54824fc95f00ec58ec425ed0279474" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2314, + "startColumn": 14, + "charOffset": 66592, + "charLength": 4, + "snippet": { + "text": "text" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2312, + "startColumn": 1, + "charOffset": 66403, + "charLength": 226, + "snippet": { + "text": "\r\nstd::string Item::getDescription(const ItemType &it, int32_t lookDistance, std::shared_ptr item /*= nullptr*/, int32_t subType /*= -1*/, bool addArticle /*= true*/) {\r\n\tstd::string text = \"\";\r\n\r\n\tstd::ostringstream s;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "18f82c9fd9504e92", + "equalIndicator/v1": "2bbc100a6b884d11b3401146b319b8fecd13249a2760b4f10a56b949854683cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Passing result of std::move() as a const reference argument; no move will actually happen", + "markdown": "Passing result of std::move() as a const reference argument; no move will actually happen" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3791, + "startColumn": 34, + "charOffset": 113566, + "charLength": 9, + "snippet": { + "text": "std::move" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3789, + "startColumn": 1, + "charOffset": 113482, + "charLength": 169, + "snippet": { + "text": "\t\t\tcount += itemCount;\r\n\t\t\tif (count >= amount) {\r\n\t\t\t\tg_game().internalRemoveItems(std::move(itemList), amount, Item::items[itemId].stackable);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cf885bd080a84ce0", + "equalIndicator/v1": "2be895c2aa8829cc2e974caedea756921b7fc767ebf866aa5118e290ec8f75ea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 61, + "startColumn": 2, + "charOffset": 1803, + "charLength": 7, + "snippet": { + "text": "int64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 59, + "startColumn": 1, + "charOffset": 1796, + "charLength": 170, + "snippet": { + "text": "\t}\r\n\r\n\tint64_t expiresAt = result->getNumber(\"expires_at\");\r\n\tif (expiresAt != 0 && time(nullptr) > expiresAt) {\r\n\t\t// Move the ban to history if it has expired\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "211a56ceaae55117", + "equalIndicator/v1": "2beb90151916aaaef4f8e80352a1fd9bb9cadaf6cddc42e208b20946f2855577" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1719, + "startColumn": 2, + "charOffset": 51519, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1717, + "startColumn": 1, + "charOffset": 51426, + "charLength": 201, + "snippet": { + "text": "void ProtocolGame::parseUseItem(NetworkMessage &msg) {\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tuint8_t index = msg.getByte();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ec8db8e2a4b29217", + "equalIndicator/v1": "2bed0b78780cb9638c3d88b02c4497187758a979c3b1acb60c1ef0e248df94d5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1220, + "startColumn": 31, + "charOffset": 35923, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1218, + "startColumn": 1, + "charOffset": 35812, + "charLength": 131, + "snippet": { + "text": "\tvoid sendCreatureShield(std::shared_ptr creature) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureShield(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3191de1f2a11a81e", + "equalIndicator/v1": "2c00eab67dd8e4df372c66576bb9991b6a9398b46bd2c548ab1b192e1cbf6170" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 144, + "startColumn": 28, + "charOffset": 4352, + "charLength": 16, + "snippet": { + "text": "queryDestination" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 142, + "startColumn": 1, + "charOffset": 4018, + "charLength": 534, + "snippet": { + "text": "\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override final;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override final;\r\n\r\n\tvoid addThing(std::shared_ptr thing) override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5bb15842f42256d5", + "equalIndicator/v1": "2c1697e99e300c551398cefd27141df74335c8f09d56efe235c9330c23b07cf3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 877, + "startColumn": 27, + "charOffset": 31843, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 875, + "startColumn": 1, + "charOffset": 31811, + "charLength": 138, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnReportRuleViolation, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b082a7a5d65e9d83", + "equalIndicator/v1": "2c46a4ed5c9b064c0f7ebf016810809186cf107c35058f1ac12bfd3d7430e953" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6474, + "startColumn": 148, + "charOffset": 223503, + "charLength": 5, + "snippet": { + "text": "actor" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6472, + "startColumn": 1, + "charOffset": 223351, + "charLength": 287, + "snippet": { + "text": "}\r\n\r\nvoid Game::sendDoubleSoundEffect(const Position &pos, SoundEffect_t mainSoundEffect, SoundEffect_t secondarySoundEffect, std::shared_ptr actor /* = nullptr*/) {\r\n\tif (secondarySoundEffect == SoundEffect_t::SILENCE) {\r\n\t\tsendSingleSoundEffect(pos, mainSoundEffect, actor);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f085532007af75b", + "equalIndicator/v1": "2c4c53d5593f933f481b9a5a34dde9e8958fdcdea5d90a4f8b41c5abfc84e03d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 887, + "startColumn": 21, + "charOffset": 24708, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 885, + "startColumn": 1, + "charOffset": 24682, + "charLength": 77, + "snippet": { + "text": "\t}\r\n\r\n\tlua_createtable(L, creature->getSummonCount(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8f2b8ab940ab02b9", + "equalIndicator/v1": "2c4d3eeb9dd7c947f0eced1229a3234191661c019f291d89fb6a9b842d4f1edb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/position.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 94, + "startColumn": 10, + "charOffset": 3121, + "charLength": 8, + "snippet": { + "text": "Position" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 92, + "startColumn": 1, + "charOffset": 3061, + "charLength": 106, + "snippet": { + "text": "\r\n\tPosition operator-(const Position &p1) const {\r\n\t\treturn Position(x - p1.x, y - p1.y, z - p1.z);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "03763ca0d07c7af6", + "equalIndicator/v1": "2c5c5dd78d6ede7657a99f3a9e6fe9aefb17921a5915985f2e8f81e2ef82a067" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5692, + "startColumn": 59, + "charOffset": 168223, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5690, + "startColumn": 1, + "charOffset": 168160, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nvoid Player::sendPlayerPartyIcons(std::shared_ptr player) {\r\n\tsendPartyCreatureShield(player);\r\n\tsendPartyCreatureSkull(player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2042ea58fee600a", + "equalIndicator/v1": "2c8fd558e70a369bf88c8224eb7e868f20e6815390221e1776a10002a6ab0d26" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 229, + "startColumn": 10, + "charOffset": 6576, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 227, + "startColumn": 1, + "charOffset": 6527, + "charLength": 107, + "snippet": { + "text": "\t}\r\n\tif (row[it->second] == nullptr) {\r\n\t\treturn std::string();\r\n\t}\r\n\treturn std::string(row[it->second]);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fd67b1352325e7fd", + "equalIndicator/v1": "2ca54248d6283e17fa3fc74e807393f06e63b65618278c1aa06398c4c398604d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 247, + "startColumn": 89, + "charOffset": 7522, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 245, + "startColumn": 1, + "charOffset": 7429, + "charLength": 210, + "snippet": { + "text": "}\r\n\r\nReturnValue Combat::canDoCombat(std::shared_ptr caster, std::shared_ptr tile, bool aggressive) {\r\n\tif (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {\r\n\t\treturn RETURNVALUE_NOTENOUGHROOM;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e868eec7783a1aed", + "equalIndicator/v1": "2ce797960eecb5af127db0bcd2ba61518da0c05950907ff0a7ecf3cc537658ff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 210, + "startColumn": 68, + "charOffset": 5766, + "charLength": 6, + "snippet": { + "text": "action" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 208, + "startColumn": 1, + "charOffset": 5693, + "charLength": 135, + "snippet": { + "text": "\t}\r\n\r\n\tvoid setActionId(uint16_t actionId, const std::shared_ptr action) {\r\n\t\tactionItemMap.try_emplace(actionId, action);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bbf870f4a86531f3", + "equalIndicator/v1": "2d138927d381728b57d290403e3d45581289df49fd10891c1550bc881ea5cb5e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 209, + "startColumn": 17, + "charOffset": 5151, + "charLength": 3, + "snippet": { + "text": "key" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 207, + "startColumn": 1, + "charOffset": 5063, + "charLength": 102, + "snippet": { + "text": "\tfor (uint8_t i = 0; i < key.length(); ++i) {\r\n\t\tiKeyPad[i] ^= key[i];\r\n\t\toKeyPad[i] ^= key[i];\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "72fe595218e5ba87", + "equalIndicator/v1": "2d3ad2afda1681d95d7319c4083b9693503436937e1ab3d4c10585c0984f3eef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", + "markdown": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 663, + "startColumn": 57, + "charOffset": 17768, + "charLength": 9, + "snippet": { + "text": "std::atoi" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 661, + "startColumn": 1, + "charOffset": 17635, + "charLength": 180, + "snippet": { + "text": "\t\t\t\tremoveAttribute(ItemAttribute_t::SPECIAL);\r\n\t\t\t\t// Add custom attribute\r\n\t\t\t\tsetCustomAttribute(\"Hireling\", static_cast(std::atoi(special.c_str())));\r\n\t\t\t}\r\n\t\t\tbreak;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "21d736268e0f4d35", + "equalIndicator/v1": "2d3da65c6274e299b31c836bfe2d3102bbda3a2430f0f8d98af65c97711a4402" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1730, + "startColumn": 2, + "charOffset": 51928, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1728, + "startColumn": 1, + "charOffset": 51849, + "charLength": 267, + "snippet": { + "text": "\tuint8_t fromStackPos = msg.getByte();\r\n\tPosition toPos = msg.getPosition();\r\n\tuint16_t toItemId = msg.get();\r\n\tuint8_t toStackPos = msg.getByte();\r\n\tg_game().playerUseItemEx(player->getID(), fromPos, fromStackPos, fromItemId, toPos, toStackPos, toItemId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8e50088f57a192ca", + "equalIndicator/v1": "2d42ea1713ef5be27464019c7e55dc4daff42a5a40633cf23f1e51c3fe76ca99" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6198, + "startColumn": 53, + "charOffset": 214298, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6196, + "startColumn": 1, + "charOffset": 214241, + "charLength": 188, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerSpeakToNpc(std::shared_ptr player, const std::string &text) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[Game::playerSpeakToNpc] - Player is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "772e7fda692f8a42", + "equalIndicator/v1": "2d57b004b73d59359af05a67e1a350b4e8af7cf378822b0f92985811a409c21b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 360, + "startColumn": 8, + "charOffset": 8992, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 358, + "startColumn": 1, + "charOffset": 8892, + "charLength": 217, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetHitChance(lua_State* L) {\r\n\t// itemType:getHitChance()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->hitChance);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e08f5fbbc3363ec7", + "equalIndicator/v1": "2d5b6bab69b826b864ea3f93fbed14767f86c29f5f3f424a852be00a83d51ada" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'AddItem' can be made const", + "markdown": "Method 'AddItem' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 254, + "startColumn": 20, + "charOffset": 10097, + "charLength": 7, + "snippet": { + "text": "AddItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 252, + "startColumn": 1, + "charOffset": 10073, + "charLength": 139, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::AddItem(NetworkMessage &msg, uint16_t id, uint8_t count, uint8_t tier) {\r\n\tconst ItemType &it = Item::items[id];\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8e695e19ae023d34", + "equalIndicator/v1": "2d5ee958a923f0a7d8f4f7b3fed0612085ab140460ac2016d991a7ed7f9d28a1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6858, + "startColumn": 20, + "charOffset": 237669, + "charLength": 15, + "snippet": { + "text": "levelDifference" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6856, + "startColumn": 1, + "charOffset": 237516, + "charLength": 205, + "snippet": { + "text": "\t} else {\r\n\t\tfloat rateDamageReductionByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, __FUNCTION__) / 100;\r\n\t\tlevelDiffRate -= levelDifference * rateDamageReductionByLevel;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cdbec88089ec0c9b", + "equalIndicator/v1": "2d92b4c91da3253c5fb509063c67597a0a2001e86e42a0429ad55a03f77eac7e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'mount' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'mount' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5949, + "startColumn": 52, + "charOffset": 174927, + "charLength": 5, + "snippet": { + "text": "mount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5947, + "startColumn": 1, + "charOffset": 174871, + "charLength": 113, + "snippet": { + "text": "}\r\n\r\nbool Player::hasMount(const std::shared_ptr mount) const {\r\n\tif (isAccessPlayer()) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9e6c7d576338c5d6", + "equalIndicator/v1": "2e032cad7b12d043a5e551390c78e3c2e71e162f5329df507237c656910c515c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1054, + "startColumn": 20, + "charOffset": 38052, + "charLength": 6, + "snippet": { + "text": "rawExp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1052, + "startColumn": 1, + "charOffset": 38005, + "charLength": 111, + "snippet": { + "text": "\r\n\tlua_pushnumber(L, exp);\r\n\tlua_pushnumber(L, rawExp);\r\n\r\n\tif (scriptInterface.protectedCall(L, 4, 1) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0ff246aac40d4230", + "equalIndicator/v1": "2e1957ec451a846848693088d92c066f78b90a08fffc68fdb1e2ed1d63040b11" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use nullptr", + "markdown": "Use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 507, + "startColumn": 20, + "charOffset": 29451, + "charLength": 1, + "snippet": { + "text": "0" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 505, + "startColumn": 1, + "charOffset": 29402, + "charLength": 117, + "snippet": { + "text": "\tserviceManager = manager;\r\n\r\n\ttime_t now = time(0);\r\n\tconst tm* tms = localtime(&now);\r\n\tint minutes = tms->tm_min;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "22ac3d33f0b80737", + "equalIndicator/v1": "2e32303df4cdf2f2a5dfc5f68e0b4acca7831d08e1a87698686800ac9c889fe3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6657, + "startColumn": 27, + "charOffset": 231422, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6655, + "startColumn": 1, + "charOffset": 231347, + "charLength": 127, + "snippet": { + "text": "\r\n\tif (damage.primary.type == COMBAT_HEALING) {\r\n\t\tdamage.primary.value *= target->getBuff(BUFF_HEALINGRECEIVED) / 100.;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2af49459099c0b72", + "equalIndicator/v1": "2e37f9ad1be84700b15b1a4fec14d21e49d1024e221888b587cf6eb2ff6e21bd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8375, + "startColumn": 61, + "charOffset": 265510, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8373, + "startColumn": 1, + "charOffset": 265445, + "charLength": 128, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::reloadCreature(std::shared_ptr creature) {\r\n\tif (!creature || !canSee(creature)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f41507ada27c09f7", + "equalIndicator/v1": "2e6c057a20d1c1a2a5c8d8789e96c48d8150ebd85f2e41ee3a996cdd9ec02ba6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 306, + "startColumn": 95, + "charOffset": 9640, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 304, + "startColumn": 1, + "charOffset": 9541, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nReturnValue Combat::canDoCombat(std::shared_ptr attacker, std::shared_ptr target, bool aggressive) {\r\n\tif (!aggressive) {\r\n\t\treturn RETURNVALUE_NOERROR;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc8fe02ed675195e", + "equalIndicator/v1": "2e8a7f9289e7319106ca3a3a40bac451bb23f364efd776a2e8e399120cac8c64" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6495, + "startColumn": 75, + "charOffset": 224156, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6493, + "startColumn": 1, + "charOffset": 224077, + "charLength": 273, + "snippet": { + "text": "}\r\n\r\nbool Game::combatBlockHit(CombatDamage &damage, std::shared_ptr attacker, std::shared_ptr target, bool checkDefense, bool checkArmor, bool field) {\r\n\tif (damage.primary.type == COMBAT_NONE && damage.secondary.type == COMBAT_NONE) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0d63c89ed2938f8b", + "equalIndicator/v1": "2e925c7e0f27158782e85052748f801e706f2f2766474a2ceed7161f61cfabe3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3122, + "startColumn": 2, + "charOffset": 95750, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3120, + "startColumn": 1, + "charOffset": 95639, + "charLength": 246, + "snippet": { + "text": "void ProtocolGame::parseMarketCancelOffer(NetworkMessage &msg) {\r\n\tuint32_t timestamp = msg.get();\r\n\tuint16_t counter = msg.get();\r\n\tif (counter > 0) {\r\n\t\tg_game().playerCancelMarketOffer(player->getID(), timestamp, counter);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e2d70091d85e53d2", + "equalIndicator/v1": "2e931276f40852678f626787baffbc846540164d31e49ac85c5add6540a9f9bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'addThing' is within a recursive call chain", + "markdown": "Function 'addThing' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 990, + "startColumn": 12, + "charOffset": 30152, + "charLength": 8, + "snippet": { + "text": "addThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 988, + "startColumn": 1, + "charOffset": 30136, + "charLength": 121, + "snippet": { + "text": "}\r\n\r\nvoid Tile::addThing(int32_t, std::shared_ptr thing) {\r\n\tif (!thing) {\r\n\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d129fe84b1479bff", + "equalIndicator/v1": "2ea8a7d6e6dae367104247ab058474426776c9299d0530272607dcc0820ccb63" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 233, + "startColumn": 7, + "charOffset": 8038, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 231, + "startColumn": 1, + "charOffset": 8005, + "charLength": 120, + "snippet": { + "text": "\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tint32_t bonus = pugi::cast(attr.value());\r\n\r\n\t\t\t\t\t\tif (usenormalskill == 1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cf95055e230e71ae", + "equalIndicator/v1": "2ebc53711dfad69663de2d08c10e6e3e0698c24f64fab52f7da7d81fb82404d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1076, + "startColumn": 49, + "charOffset": 35092, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1074, + "startColumn": 1, + "charOffset": 35039, + "charLength": 214, + "snippet": { + "text": "}\r\n\r\nbool Combat::doCombat(std::shared_ptr caster, std::shared_ptr target) const {\r\n\tif (caster != nullptr && params.chainCallback) {\r\n\t\treturn doCombatChain(caster, target, params.aggressive);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b85e299a3a7e55fe", + "equalIndicator/v1": "2ecefdb7147dae97bfdc1f8c3c4cfe8df73bf222de4ad492e8f3acdf052eed2f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6818, + "startColumn": 74, + "charOffset": 213927, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6816, + "startColumn": 1, + "charOffset": 213849, + "charLength": 122, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendInventoryItem(Slots_t slot, std::shared_ptr item) {\r\n\tNetworkMessage msg;\r\n\tif (item) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9b91b0c732974d57", + "equalIndicator/v1": "2edaefbcc9e6ddc7cba29725ebf02f93e834c608e8a8d02c7985b01d54d99d86" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 189, + "startColumn": 73, + "charOffset": 5939, + "charLength": 5, + "snippet": { + "text": "thing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 187, + "startColumn": 1, + "charOffset": 5862, + "charLength": 146, + "snippet": { + "text": "}\r\n\r\nvoid LuaFunctionsLoader::pushThing(lua_State* L, std::shared_ptr thing) {\r\n\tif (validateDispatcherContext(__FUNCTION__)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0ba6b0f511997369", + "equalIndicator/v1": "2efe32d327d1fd95b2227da095dc9a2298cf8c68f3fabb8734351233671e0b87" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'applyWheelOfDestinyHealing' is within a recursive call chain", + "markdown": "Function 'applyWheelOfDestinyHealing' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6865, + "startColumn": 12, + "charOffset": 237798, + "charLength": 26, + "snippet": { + "text": "applyWheelOfDestinyHealing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6863, + "startColumn": 1, + "charOffset": 237749, + "charLength": 260, + "snippet": { + "text": "\r\n// Wheel of destiny combat helpers\r\nvoid Game::applyWheelOfDestinyHealing(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) {\r\n\tdamage.primary.value += (damage.primary.value * damage.healingMultiplier) / 100.;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9c0cacec1fc9315f", + "equalIndicator/v1": "2f39b3d878f0849cbfb538dedf4c2b0c8549dbff4564885ba4e346d782e54498" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 836, + "startColumn": 7, + "charOffset": 26818, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 834, + "startColumn": 1, + "charOffset": 26749, + "charLength": 231, + "snippet": { + "text": "\t// onaddItem(moveitem, pos)\r\n\t// onRemoveItem(moveitem, pos)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[MoveEvent::executeAddRemItem - \"\r\n\t\t \"Item {} item on tile x: {} y: {} z: {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b0d94b27f4f59ccd", + "equalIndicator/v1": "2f470433602c07e3c980ed84af5bb68cadd1f071295984e60a6bea473483fa22" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 198, + "startColumn": 15, + "charOffset": 8081, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 196, + "startColumn": 1, + "charOffset": 7991, + "charLength": 354, + "snippet": { + "text": "\tvirtual void removeThing(std::shared_ptr, uint32_t) override { }\r\n\r\n\tvirtual void postAddNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\tvirtual void postRemoveNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3f042b2848f49453", + "equalIndicator/v1": "2f53376349e4d9a7f598f1fec9cd1468927dce7b60ba39ee92f2c24b034b7fa3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1064, + "startColumn": 7, + "charOffset": 34815, + "charLength": 6, + "snippet": { + "text": "combat" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1062, + "startColumn": 1, + "charOffset": 34704, + "charLength": 264, + "snippet": { + "text": "\t\t\t\tdelay, [combat, caster, nextTarget, from, affected]() {\r\n\t\t\t\t\tif (combat && caster && nextTarget) {\r\n\t\t\t\t\t\tcombat->doChainEffect(from, nextTarget->getPosition(), combat->params.chainEffect);\r\n\t\t\t\t\t\tcombat->doCombat(caster, nextTarget, from, affected);\r\n\t\t\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5569c4415683c5d3", + "equalIndicator/v1": "2f548a058a49b9235268514499166a7b9e321e597ec7f0a699d18eae50189a0a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7593, + "startColumn": 108, + "charOffset": 265091, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7591, + "startColumn": 1, + "charOffset": 264941, + "charLength": 282, + "snippet": { + "text": "// Life leech\r\nvoid Game::applyLifeLeech(\r\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\r\n) const {\r\n\t// Wheel of destiny bonus - life leech chance and amount\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dcd28aa9a2940b30", + "equalIndicator/v1": "2f5e399cb46ba22039651da731b117ce7709f7eb46a94c41737652c73cee5d7c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6443, + "startColumn": 53, + "charOffset": 222521, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6441, + "startColumn": 1, + "charOffset": 222464, + "charLength": 151, + "snippet": { + "text": "}\r\n\r\nvoid Game::reloadCreature(std::shared_ptr creature) {\r\n\tif (!creature) {\r\n\t\tg_logger().error(\"[{}] Creature is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "af6a4be9083ca96b", + "equalIndicator/v1": "2f6249e710dba9779c8f2ae8a47085bc9487abbe8c52d27740a976431a81db08" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 657, + "startColumn": 7, + "charOffset": 25223, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 655, + "startColumn": 1, + "charOffset": 25120, + "charLength": 235, + "snippet": { + "text": "\r\nbool EventCallback::playerOnTurn(std::shared_ptr player, Direction direction) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTurn - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db189e5ec7fe2327", + "equalIndicator/v1": "2f7b62c387f8da7e3ac3b22e48a9daa0ed0df5a74221a55a20b0bb3e3c4a8676" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1595, + "startColumn": 62, + "charOffset": 47623, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1593, + "startColumn": 1, + "charOffset": 47546, + "charLength": 146, + "snippet": { + "text": "\r\n// container\r\nvoid Player::sendAddContainerItem(std::shared_ptr container, std::shared_ptr item) {\r\n\tif (!client) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2fdfd5a39d16e619", + "equalIndicator/v1": "2fc5e8446ecf34c2b640a6cd7df1c83491b60d8c6d942192e0cc29ea248da8bc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 825, + "startColumn": 6, + "charOffset": 31604, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 823, + "startColumn": 1, + "charOffset": 31569, + "charLength": 178, + "snippet": { + "text": "\tlua_pushnumber(L, tries);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 3, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9f5537fa2db83cb7", + "equalIndicator/v1": "2fc76c02f912e34755c366bdd4121e03bdf9e2ba0c8d9d78006fce03796d6a8b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 214, + "startColumn": 30, + "charOffset": 8485, + "charLength": 10, + "snippet": { + "text": "std::clamp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 212, + "startColumn": 1, + "charOffset": 8415, + "charLength": 356, + "snippet": { + "text": "\r\n\t\t\tif (damageModifiers[i] != 10000) {\r\n\t\t\t\tint16_t clientModifier = std::clamp(10000 - static_cast(damageModifiers[i]), -10000, 10000);\r\n\t\t\t\tg_logger().debug(\"[{}] CombatType: {}, Damage Modifier: {}, Resulting Client Modifier: {}\", __FUNCTION__, i, damageModifiers[i], clientModifier);\r\n\t\t\t\tmsg.addByte(getCipbiaElement(indexToCombatType(i)));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e81023683120b932", + "equalIndicator/v1": "2fdf7f90d19eda166889d66d4e93d5b9f39af8420e1e39d33de6fb762c343bf5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 80, + "startColumn": 10, + "charOffset": 2025, + "charLength": 13, + "snippet": { + "text": "gainSoulTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 78, + "startColumn": 1, + "charOffset": 1976, + "charLength": 136, + "snippet": { + "text": "\r\n\tuint32_t getSoulGainTicks() const {\r\n\t\treturn gainSoulTicks / g_configManager().getFloat(RATE_SOUL_REGEN_SPEED, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c2973b7a30d23123", + "equalIndicator/v1": "2fe9ee0621493647d12b6a2e722ca148d715dd299a8ec55cb66d1ed40ac6a156" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'res' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'res' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 158, + "startColumn": 32, + "charOffset": 4076, + "charLength": 3, + "snippet": { + "text": "res" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 156, + "startColumn": 1, + "charOffset": 3984, + "charLength": 123, + "snippet": { + "text": "\r\nuint32_t ScriptEnvironment::addResult(DBResult_ptr res) {\r\n\ttempResults[++lastResultId] = res;\r\n\treturn lastResultId;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2eabe3e91e2da9ba", + "equalIndicator/v1": "2ff07dd55e995707c1427b1d3d294363576a1008981ca7a2d110545cce9a2390" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::all_of()'", + "markdown": "Replace loop by 'std::ranges::all_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 87, + "startColumn": 9, + "charOffset": 2571, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 85, + "startColumn": 1, + "charOffset": 2522, + "charLength": 190, + "snippet": { + "text": "\tuint32_t oldLevel,\r\n\tuint32_t newLevel\r\n) const {\r\n\tfor ([[maybe_unused]] const auto &[eventName, eventPtr] : creatureEvents) {\r\n\t\tif (eventPtr->getEventType() == CREATURE_EVENT_ADVANCE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "664cdfec7161b7a2", + "equalIndicator/v1": "2ff240d2bb3b03de896a9da7b6f2ab0db96e7343d1fd3afb4f3555a8b9c61e03" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 59, + "startColumn": 38, + "charOffset": 1830, + "charLength": 3, + "snippet": { + "text": "get" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 57, + "startColumn": 1, + "charOffset": 1788, + "charLength": 175, + "snippet": { + "text": "}\r\n\r\nstd::optional KVStore::get(const std::string &key, bool forceLoad /*= false */) {\r\n\tlogger.trace(\"KVStore::get({})\", key);\r\n\tstd::scoped_lock lock(mutex_);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d5a07b3014bc6552", + "equalIndicator/v1": "300417850627a4b2ee35ab1e7c5d3441392d7a021891b8a8476f07ebae4fa92a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2150, + "startColumn": 2, + "charOffset": 66176, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2148, + "startColumn": 1, + "charOffset": 66104, + "charLength": 188, + "snippet": { + "text": "\tuint8_t action = msg.getByte();\r\n\tbool upgrade = msg.getByte() != 0;\r\n\tuint16_t raceId = msg.get();\r\n\r\n\tif (!g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d0b210d8c8cac3cf", + "equalIndicator/v1": "301cda11835a62b612086d28d8168eadecb4fc0304f8ca69b3389ddb17f208b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6356, + "startColumn": 70, + "charOffset": 201199, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6354, + "startColumn": 1, + "charOffset": 201125, + "charLength": 159, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPartyCreatureShield(std::shared_ptr target) {\r\n\tuint32_t cid = target->getID();\r\n\tif (!knownCreatureSet.contains(cid)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c891f070824fd4db", + "equalIndicator/v1": "304cd7db72902e303cb9de14be024863811a3441ff35c1a3b74771013465fdf6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 835, + "startColumn": 94, + "charOffset": 31971, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 833, + "startColumn": 1, + "charOffset": 31873, + "charLength": 271, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnCombat - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ff03a288e4cc2cd2", + "equalIndicator/v1": "30502476078e4750a6446c0239e647cb7358fcdbf7d2a907386ebc86b53955cf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 706, + "startColumn": 155, + "charOffset": 27220, + "charLength": 10, + "snippet": { + "text": "targetItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 704, + "startColumn": 1, + "charOffset": 27061, + "charLength": 291, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a3cba6cb942bdfb9", + "equalIndicator/v1": "305174c396f63d39b1af2da9cf2902c709bcc3d7517f294cc343fc720f369944" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 55, + "startColumn": 7, + "charOffset": 2275, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 53, + "startColumn": 1, + "charOffset": 2114, + "charLength": 322, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\nprivate:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f752a861f91f4a21", + "equalIndicator/v1": "3052f9b9806658bfc5d15dc75bd4ab3aefc93ed83fba54f98df6501da470be00" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 667, + "startColumn": 50, + "charOffset": 20407, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 665, + "startColumn": 1, + "charOffset": 20353, + "charLength": 218, + "snippet": { + "text": "}\r\n\r\nbool Monster::isTarget(std::shared_ptr creature) {\r\n\tif (creature->isRemoved() || !creature->isAttackable() || creature->getZoneType() == ZONE_PROTECTION || !canSeeCreature(creature)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d6f7b4c9201976bf", + "equalIndicator/v1": "3081a89ff127dc624e2b90032ea4c5d0f21ed9056906e262f4b167c8ea43cab8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 194, + "startColumn": 46, + "charOffset": 5081, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 192, + "startColumn": 1, + "charOffset": 5031, + "charLength": 97, + "snippet": { + "text": "}\r\n\r\nvoid BedItem::wakeUp(std::shared_ptr player) {\r\n\tif (house == nullptr) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5b72f648cbbdda44", + "equalIndicator/v1": "309c6fd7c701ff033d35caf5d818024adc20bd464848934a4fdc44b88515ed83" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6152, + "startColumn": 47, + "charOffset": 212608, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6150, + "startColumn": 1, + "charOffset": 212557, + "charLength": 215, + "snippet": { + "text": "}\r\n\r\nbool Game::playerYell(std::shared_ptr player, const std::string &text) {\r\n\tif (player->getLevel() == 1) {\r\n\t\tplayer->sendTextMessage(MESSAGE_FAILURE, \"You may not yell as long as you are on level 1.\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "04b8fcf0ceb61577", + "equalIndicator/v1": "30cb2355afe21229af975f53e6785415f37c080e9d94f360482ee6d2b70460ab" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3960, + "startColumn": 82, + "charOffset": 119080, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3958, + "startColumn": 1, + "charOffset": 118943, + "charLength": 268, + "snippet": { + "text": "\r\nvoid Player::updateDamageReductionFromItemImbuement(\r\n\tstd::array &combatReductionArray, std::shared_ptr item, uint16_t combatTypeIndex\r\n) const {\r\n\tfor (uint8_t imbueSlotId = 0; imbueSlotId < item->getImbuementSlot(); imbueSlotId++) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b8b6edbb4a3de549", + "equalIndicator/v1": "30d2b220b63a6b6392ffaa17bcdf9656d73e1676c4d0ab270169c739d9238d2c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1210, + "startColumn": 31, + "charOffset": 35618, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1208, + "startColumn": 1, + "charOffset": 35501, + "charLength": 137, + "snippet": { + "text": "\tvoid sendUpdateCreature(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendUpdateCreature(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4fc51aa6596a1abe", + "equalIndicator/v1": "311812e0db12ad733fb988f3bfd5f8a40796cc85bec56ea7dbeb4f3d7822f83c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'vipGroupsId' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'vipGroupsId' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5853, + "startColumn": 55, + "charOffset": 204838, + "charLength": 11, + "snippet": { + "text": "vipGroupsId" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5851, + "startColumn": 1, + "charOffset": 204778, + "charLength": 79, + "snippet": { + "text": "\t}\r\n\r\n\tplayer->vip()->edit(guid, description, icon, notify, vipGroupsId);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "37b337e8dbc755a9", + "equalIndicator/v1": "311c272847441e5002a67cd60d45c054feb67f4d76e15d85de2cfa23a14c826b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1261, + "startColumn": 10, + "charOffset": 34947, + "charLength": 9, + "snippet": { + "text": "manaTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1259, + "startColumn": 1, + "charOffset": 34899, + "charLength": 129, + "snippet": { + "text": "\r\n\tif (player != nullptr && isBuff) {\r\n\t\treturn manaTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6957928e76c4b50e", + "equalIndicator/v1": "31235fc7258b507d53909cc6635a17f28bc95c2cab1fbf4bc056ede392e6c97b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'monster' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'monster' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 476, + "startColumn": 86, + "charOffset": 25159, + "charLength": 30, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 474, + "startColumn": 1, + "charOffset": 25045, + "charLength": 346, + "snippet": { + "text": "\r\n\t// Hazard combat helpers\r\n\tvoid handleHazardSystemAttack(CombatDamage &damage, std::shared_ptr player, const std::shared_ptr monster, bool isPlayerAttacker);\r\n\tvoid notifySpectators(const CreatureVector &spectators, const Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetMonster);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6110e8c33daea2d", + "equalIndicator/v1": "3123c948c13447f6b405c472ab242a7e2c87d3cfb298160225df97f8652c651f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 939, + "startColumn": 15, + "charOffset": 30537, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 937, + "startColumn": 1, + "charOffset": 30447, + "charLength": 137, + "snippet": { + "text": "\t\t\tvalue = attacker->getIncreasePercent(combatType);\r\n\t\t\tif (value != 0) {\r\n\t\t\t\tdamage += std::round(damage * value / 100.f);\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b953564791a9c1ee", + "equalIndicator/v1": "312800ab77171ebe7869cb3225437abc982b0085b0e75dfa6b36dab63df51880" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1237, + "startColumn": 54, + "charOffset": 49709, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1235, + "startColumn": 1, + "charOffset": 49651, + "charLength": 234, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerInspectItem(std::shared_ptr player, const Position &pos) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tstd::shared_ptr thing = internalGetThing(player, pos, 0, 0, STACKPOS_TOPDOWN_ITEM);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29ef35c12c7408fa", + "equalIndicator/v1": "312a9fc7a8ce9665e2b0d2d2181e73a00e09ccaf9c56737f6c8b1d43febdb271" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1931, + "startColumn": 2, + "charOffset": 58838, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1929, + "startColumn": 1, + "charOffset": 58776, + "charLength": 187, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseLookInShop(NetworkMessage &msg) {\r\n\tuint16_t id = msg.get();\r\n\tuint8_t count = msg.getByte();\r\n\tg_game().playerLookInShop(player->getID(), id, count);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "09732926dbf93a9e", + "equalIndicator/v1": "314b5de421e25d99077460cb031f9d5c0978589d475d67bad7bc44b4a281b42d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 494, + "startColumn": 26, + "charOffset": 23837, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 492, + "startColumn": 1, + "charOffset": 23635, + "charLength": 348, + "snippet": { + "text": "// SLOT_GREEN_BOTTOM_150 = 7\r\nvoid IOWheel::slotGreenBottom150(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\taddVesselResonance(player, bonusData, WheelSlots_t::SLOT_GREEN_BOTTOM_150, WheelGemAffinity_t::Green, points);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb1b4ae82d717291", + "equalIndicator/v1": "3154430b0d5f54e74324fa02be2ae985740a98ee3c103ebd7dd3ebf7dc0b11d8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8437, + "startColumn": 2, + "charOffset": 266941, + "charLength": 22, + "snippet": { + "text": "Supply_Stash_Actions_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8435, + "startColumn": 1, + "charOffset": 266934, + "charLength": 152, + "snippet": { + "text": "\t}\r\n\r\n\tSupply_Stash_Actions_t action = static_cast(msg.getByte());\r\n\tswitch (action) {\r\n\t\tcase SUPPLY_STASH_ACTION_STOW_ITEM: {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e7ec31ed0a518fc", + "equalIndicator/v1": "31687076a9eacc19f3bb47dcb0afdb874ff668b32e5b9f972c8f368e2817da92" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1822, + "startColumn": 3, + "charOffset": 55204, + "charLength": 16, + "snippet": { + "text": "ObjectCategory_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1820, + "startColumn": 1, + "charOffset": 55098, + "charLength": 246, + "snippet": { + "text": "\t\tg_game().playerSetQuickLootFallback(player->getID(), useMainAsFallback);\r\n\t} else if (action == 4) {\r\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tPosition pos = msg.getPosition();\r\n\t\tuint16_t itemId = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "021293f302eb722b", + "equalIndicator/v1": "31760ab5a475739fad72c999f0c08d1a19f810c032c0c7e16de20fecf2336bc0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 591, + "startColumn": 54, + "charOffset": 16418, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 589, + "startColumn": 1, + "charOffset": 16360, + "charLength": 235, + "snippet": { + "text": "}\r\n\r\nvoid Party::showPlayerStatus(std::shared_ptr player, std::shared_ptr member, bool showStatus) {\r\n\tplayer->sendPartyCreatureShowStatus(member, showStatus);\r\n\tmember->sendPartyCreatureShowStatus(player, showStatus);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "90b1bd8eed413a5c", + "equalIndicator/v1": "3194b78d350311b9a145c7bcbc26f82b723433db8163aa47a423b9b8524d8081" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::any_of()'", + "markdown": "Replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1118, + "startColumn": 2, + "charOffset": 33333, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1116, + "startColumn": 1, + "charOffset": 33195, + "charLength": 338, + "snippet": { + "text": "bool Monster::pushItem(std::shared_ptr item, const Direction &nextDirection) {\r\n\tconst Position ¢erPos = item->getPosition();\r\n\tfor (const auto &[x, y] : getPushItemLocationOptions(nextDirection)) {\r\n\t\tPosition tryPos(centerPos.x + x, centerPos.y + y, centerPos.z);\r\n\t\tstd::shared_ptr tile = g_game().map.getTile(tryPos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "820c9416d1dc2248", + "equalIndicator/v1": "31c163e80e1ab2da9fe55a3b0de2478edbb06b0d6ef03a6ad3e45af9c6c4848c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 39, + "startColumn": 18, + "charOffset": 1286, + "charLength": 12, + "snippet": { + "text": "ValueWrapper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 37, + "startColumn": 1, + "charOffset": 1119, + "charLength": 404, + "snippet": { + "text": "\texplicit(false) ValueWrapper(const std::string &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(bool value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(int value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(double value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const phmap::flat_hash_map &value, uint64_t timestamp = 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "74765a567eb1bd8b", + "equalIndicator/v1": "31d43d031db8373da14bf89146e3a043d6197f34251d175a88ab7d3b1d88c512" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 680, + "startColumn": 7, + "charOffset": 26109, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 678, + "startColumn": 1, + "charOffset": 25959, + "charLength": 300, + "snippet": { + "text": "\r\nbool EventCallback::playerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeRequest - \"\r\n\t\t \"Player {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ca4f857380f7fb5f", + "equalIndicator/v1": "31da07c970451e978392e9ba7e823c8aacf2c8ccd26089c4218673b0f9571fce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 63, + "startColumn": 33, + "charOffset": 1632, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 61, + "startColumn": 1, + "charOffset": 1595, + "charLength": 307, + "snippet": { + "text": "}\r\n\r\nReturnValue HouseTile::queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr actor /* = nullptr*/) {\r\n\tif (std::shared_ptr creature = thing->getCreature()) {\r\n\t\tif (std::shared_ptr player = creature->getPlayer()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71f6ecc849f6cd2f", + "equalIndicator/v1": "31ec5ddda46cc4a16bec6dbeb51baa6b78419a2e46b9d23103a4d1007824c5ed" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 987, + "startColumn": 125, + "charOffset": 35671, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 985, + "startColumn": 1, + "charOffset": 35542, + "charLength": 263, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) {\r\n\t// Player:onTradeAccept(target, item, targetItem)\r\n\tif (info.playerOnTradeAccept == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db4c9e750b9890c3", + "equalIndicator/v1": "31fd5dd3f033a24beb89f0e298adcdf221e9e0f37f7dacab770187dfb7fb36de" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'newGuildRank' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'newGuildRank' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 290, + "startColumn": 15, + "charOffset": 7581, + "charLength": 12, + "snippet": { + "text": "newGuildRank" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 288, + "startColumn": 1, + "charOffset": 7513, + "charLength": 88, + "snippet": { + "text": "\t}\r\n\tvoid setGuildRank(GuildRank_ptr newGuildRank) {\r\n\t\tguildRank = newGuildRank;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29a32bc0ffce72d5", + "equalIndicator/v1": "32346594c9d54f5c50828926511626e9f09c5cdeb1b7b21aa60899ec2a28fd94" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 221, + "startColumn": 68, + "charOffset": 7945, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 219, + "startColumn": 1, + "charOffset": 7863, + "charLength": 239, + "snippet": { + "text": "\r\n// Creature\r\nbool Events::eventCreatureOnChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) {\r\n\t// Creature:onChangeOutfit(outfit) or Creature.onChangeOutfit(self, outfit)\r\n\tif (info.creatureOnChangeOutfit == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3469800bab0b7baf", + "equalIndicator/v1": "3247bb10c43d5f009a4027a019736068ef446ab0bc74fe1070a58a2fe127c8b6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6756, + "startColumn": 63, + "charOffset": 211311, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6754, + "startColumn": 1, + "charOffset": 211244, + "charLength": 240, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendMoveCreature(std::shared_ptr creature, const Position &newPos, int32_t newStackPos, const Position &oldPos, int32_t oldStackPos, bool teleport) {\r\n\tif (creature == player) {\r\n\t\tif (oldStackPos >= 10) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0164160561c9f723", + "equalIndicator/v1": "3247d181d77bb69930129dda55d8c2b0f7a3a4525dce9a0eee1881d54fe38e80" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1330, + "startColumn": 64, + "charOffset": 39113, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1328, + "startColumn": 1, + "charOffset": 39045, + "charLength": 149, + "snippet": { + "text": "}\r\n\r\nint32_t Tile::getClientIndexOfCreature(std::shared_ptr player, std::shared_ptr creature) const {\r\n\tint32_t n;\r\n\tif (ground) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d06f66173341cf46", + "equalIndicator/v1": "324b715c54fe5ed7e5b8697a052220f9c27a80c1a9529e5d5d6601d5d0db0a85" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 126, + "startColumn": 10, + "charOffset": 3170, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 124, + "startColumn": 1, + "charOffset": 3136, + "charLength": 55, + "snippet": { + "text": "\r\n\tif (input.empty()) {\r\n\t\treturn std::string();\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9772480ddae4dacf", + "equalIndicator/v1": "3251a7a4e040a485a20506c2a89272bd6b4f483140402a4cdaba70096e0b8ab3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'bool'", + "markdown": "Narrowing conversion from 'double' to 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 995, + "startColumn": 53, + "charOffset": 31982, + "charLength": 18, + "snippet": { + "text": "weaponSkillFormula" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 993, + "startColumn": 1, + "charOffset": 31767, + "charLength": 364, + "snippet": { + "text": "\tauto setCommonValues = [this, weapon](double formula, SoundEffect_t impactSound, uint32_t effect) {\r\n\t\tdouble weaponSkillFormula = weapon->getChainSkillValue();\r\n\t\tsetPlayerCombatValues(COMBAT_FORMULA_SKILL, 0, 0, weaponSkillFormula ? weaponSkillFormula : formula, 0);\r\n\t\tsetParam(COMBAT_PARAM_IMPACTSOUND, impactSound);\r\n\t\tsetParam(COMBAT_PARAM_EFFECT, effect);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6bf99b359aa471d2", + "equalIndicator/v1": "3257f45504233b5112b8ae4f9f09073f15343598d926bd04414fb24c5f56dcce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::list\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 239, + "startColumn": 21, + "charOffset": 6821, + "charLength": 4, + "snippet": { + "text": "beds" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 237, + "startColumn": 1, + "charOffset": 6761, + "charLength": 96, + "snippet": { + "text": "\r\n\tconst auto beds = house->getBeds();\r\n\tlua_createtable(L, beds.size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b15ce0769c4c17d3", + "equalIndicator/v1": "3280f69d3be9eb540842fa77c9f32f4c47e25a91a3d1bc019a0c52e640c3ba74" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 548, + "startColumn": 8, + "charOffset": 13555, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 546, + "startColumn": 1, + "charOffset": 13463, + "charLength": 186, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetSpeed(lua_State* L) {\r\n\t// itemType:getSpeed()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (!itemType) {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "069f2b597d127c77", + "equalIndicator/v1": "32b0f62c9fbeaf1b832248a6bb44a6535cb3140029ec72d3a327663809906119" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 987, + "startColumn": 95, + "charOffset": 35641, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 985, + "startColumn": 1, + "charOffset": 35542, + "charLength": 263, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) {\r\n\t// Player:onTradeAccept(target, item, targetItem)\r\n\tif (info.playerOnTradeAccept == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ebb2d216a435051", + "equalIndicator/v1": "32b1e194b6a673832e53683cb2461c88ad854c35b99889322165580c0eb08818" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 469, + "startColumn": 82, + "charOffset": 13273, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 467, + "startColumn": 1, + "charOffset": 13187, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nSharedExpStatus_t Party::getMemberSharedExperienceStatus(std::shared_ptr player) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "70c67220a8769ea4", + "equalIndicator/v1": "32c2b135fdd040b3af0da8d79b393e2fcb90e2e46dea526a3ac08a625d9fb0bd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Nested namespaces can be concatenated", + "markdown": "Nested namespaces can be concatenated" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper_proto.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 24, + "startColumn": 1, + "charOffset": 806, + "charLength": 9, + "snippet": { + "text": "namespace" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 761, + "charLength": 105, + "snippet": { + "text": "\r\n// Forward declaration for protobuf class\r\nnamespace Canary {\r\n\tnamespace protobuf {\r\n\t\tnamespace kv {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79bc887732bbb4cb", + "equalIndicator/v1": "32ea8bfc3a6f879faf32699387c018c62ca6d68ac488ca36d6902769476c70e4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 861, + "startColumn": 14, + "charOffset": 43168, + "charLength": 15, + "snippet": { + "text": "boostedCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 859, + "startColumn": 1, + "charOffset": 43105, + "charLength": 136, + "snippet": { + "text": "\r\n\tstd::map BestiaryList;\r\n\tstd::string boostedCreature = \"\";\r\n\r\n\tstd::vector> CharmList;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e2e035837b41ce6b", + "equalIndicator/v1": "333dea48e5fe1b77ec3bab3825591d1490fb89eb61ebfd1045a11077c0db2aae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 255, + "startColumn": 81, + "charOffset": 6430, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 253, + "startColumn": 1, + "charOffset": 6345, + "charLength": 180, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Tile::getTopVisibleCreature(std::shared_ptr creature) const {\r\n\tif (const CreatureVector* creatures = getCreatures()) {\r\n\t\tif (creature) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2b9cea5d64c632c", + "equalIndicator/v1": "333df90e78553a1ad9ccd92983c301bbc797efc5a690adf02f840ff2131242e6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Move constructors should be marked noexcept", + "markdown": "Move constructors should be marked noexcept" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1488, + "startColumn": 2, + "charOffset": 38813, + "charLength": 13, + "snippet": { + "text": "MarketOfferEx" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1486, + "startColumn": 1, + "charOffset": 38759, + "charLength": 139, + "snippet": { + "text": "struct MarketOfferEx {\r\n\tMarketOfferEx() = default;\r\n\tMarketOfferEx(MarketOfferEx &&other) :\r\n\t\tid(other.id),\r\n\t\tplayerId(other.playerId),\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "437d8f799c581c99", + "equalIndicator/v1": "3347aeee74873507122d18b471000357c7e3d75ebf12bcb5e39ffedadde3fd03" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1840, + "startColumn": 67, + "charOffset": 71693, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1838, + "startColumn": 1, + "charOffset": 71622, + "charLength": 279, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\r\n\tif (!player || !toCylinder || !item) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7e48ab433b64c7ca", + "equalIndicator/v1": "336212db702fd0c7b8ec60048d49a9cafd72286bd68fa2ba14385c5cb8f4a27f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 696, + "startColumn": 37, + "charOffset": 22733, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 694, + "startColumn": 1, + "charOffset": 22671, + "charLength": 128, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.55f);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f644cf5b2a9212a1", + "equalIndicator/v1": "33639e238b9d620ad88cab2f3bf8de2ca75bb3eaed998754d21c81cfe02a30a5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'isEnemyFaction' is within a recursive call chain", + "markdown": "Function 'isEnemyFaction' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 92, + "startColumn": 7, + "charOffset": 2433, + "charLength": 14, + "snippet": { + "text": "isEnemyFaction" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 90, + "startColumn": 1, + "charOffset": 2421, + "charLength": 125, + "snippet": { + "text": "\t}\r\n\r\n\tbool isEnemyFaction(Faction_t faction) const {\r\n\t\tauto master = getMaster();\r\n\t\tif (master && master->getMonster()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d2dd8e3b8afa0dc", + "equalIndicator/v1": "336d4e2e59e1cc15e2b5c1f00a08c5f8aadd906e53b65a73703f229e5adb3b94" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: m_type", + "markdown": "Constructor does not initialize these fields: m_type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 17, + "startColumn": 8, + "charOffset": 472, + "charLength": 5, + "snippet": { + "text": "Badge" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 15, + "startColumn": 1, + "charOffset": 452, + "charLength": 76, + "snippet": { + "text": "class KV;\r\n\r\nstruct Badge {\r\n\tuint8_t m_id = 0;\r\n\tCyclopediaBadge_t m_type;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "56793c6859226e17", + "equalIndicator/v1": "338ccdca6661610d57c09fb5d416f778975273315eeb7c02513b1ad0ee116a2c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 395, + "startColumn": 10, + "charOffset": 11804, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 393, + "startColumn": 1, + "charOffset": 11716, + "charLength": 141, + "snippet": { + "text": "\tconst char* c_str = lua_tolstring(L, arg, &len);\r\n\tif (!c_str || len == 0) {\r\n\t\treturn std::string();\r\n\t}\r\n\treturn std::string(c_str, len);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f7cfb885810e181b", + "equalIndicator/v1": "339fdc1c8a0fb80c40e37586fbb608a9daf845b03a3b222572233b40a0bc289d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1727, + "startColumn": 2, + "charOffset": 51805, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1725, + "startColumn": 1, + "charOffset": 51706, + "charLength": 220, + "snippet": { + "text": "void ProtocolGame::parseUseItemEx(NetworkMessage &msg) {\r\n\tPosition fromPos = msg.getPosition();\r\n\tuint16_t fromItemId = msg.get();\r\n\tuint8_t fromStackPos = msg.getByte();\r\n\tPosition toPos = msg.getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "04a31cb80f797921", + "equalIndicator/v1": "33d7d9eb6632781bfdc7fb1480ca4cd377ea2a1bd1b970e00a860624fe979c06" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 927, + "startColumn": 56, + "charOffset": 33547, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 925, + "startColumn": 1, + "charOffset": 33487, + "charLength": 188, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnTurn(std::shared_ptr player, Direction direction) {\r\n\t// Player:onTurn(direction) or Player.onTurn(self, direction)\r\n\tif (info.playerOnTurn == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "28f2e2bfc127754d", + "equalIndicator/v1": "33f103fd1667b405707a8ce99f9db65e7ba4ea11f93bd3e4889018bab52d9230" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 228, + "startColumn": 10, + "charOffset": 7055, + "charLength": 13, + "snippet": { + "text": "getThingIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 226, + "startColumn": 1, + "charOffset": 6985, + "charLength": 229, + "snippet": { + "text": "\tvoid removeCreature(std::shared_ptr creature);\r\n\r\n\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r\n\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f3786b5533425cb3", + "equalIndicator/v1": "33f9445728184cbb03d6b0f55489f4f6b7f6781325b8859946e82d938b5ccd45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 23, + "startColumn": 48, + "charOffset": 731, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 21, + "startColumn": 1, + "charOffset": 664, + "charLength": 148, + "snippet": { + "text": "\tid(houseId) { }\r\n\r\nvoid House::addTile(std::shared_ptr tile) {\r\n\ttile->setFlag(TILESTATE_PROTECTIONZONE);\r\n\thouseTiles.push_back(tile);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "679e4e6a68112830", + "equalIndicator/v1": "3400c749f282fd6e6b42bc5f53d7ccdff10d8ef7dc5dfa167c26eca56d64c590" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 80, + "startColumn": 48, + "charOffset": 3344, + "charLength": 34, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 78, + "startColumn": 1, + "charOffset": 3148, + "charLength": 397, + "snippet": { + "text": "\r\n\tstd::map getBestiaryKillCountByMonsterIDs(std::shared_ptr player, std::map mtype_list) const;\r\n\tstd::map getMonsterElements(const std::shared_ptr mtype) const;\r\n\tstd::map findRaceByName(const std::string &race, bool Onlystring = true, BestiaryType_t raceNumber = BESTY_RACE_NONE) const;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dd42228bbf0202f5", + "equalIndicator/v1": "341610e2017c89c17378240dde67d717756c186e75e6cce237399851b87cd403" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 229, + "startColumn": 87, + "charOffset": 8406, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 227, + "startColumn": 1, + "charOffset": 8308, + "charLength": 218, + "snippet": { + "text": "\r\n// Party\r\nbool EventCallback::partyOnJoin(std::shared_ptr party, std::shared_ptr player) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::partyOnJoin - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "64f7e9b4638453e5", + "equalIndicator/v1": "342621b5c4755cdb6264325078324d67009d3c4f56f3822a13141637bb4edb83" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 171, + "startColumn": 22, + "charOffset": 4937, + "charLength": 6, + "snippet": { + "text": "g_game" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 169, + "startColumn": 1, + "charOffset": 4879, + "charLength": 138, + "snippet": { + "text": "\r\nbool GameReload::reloadGroups() {\r\n\tconst bool result = g_game().groups.reload();\r\n\tlogReloadStatus(\"Groups\", result);\r\n\treturn result;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "88879e9f07e50f1f", + "equalIndicator/v1": "34333e774c2700193a20d6d6c2c02b3b2e95f1227df159711c5a2923f31cd4b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6476, + "startColumn": 45, + "charOffset": 189543, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6474, + "startColumn": 1, + "charOffset": 189494, + "charLength": 188, + "snippet": { + "text": "}\r\n\r\nvoid Player::stowItem(std::shared_ptr item, uint32_t count, bool allItems) {\r\n\tif (!item || !item->isItemStorable()) {\r\n\t\tsendCancelMessage(\"This item cannot be stowed here.\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "78e504ca90a14b40", + "equalIndicator/v1": "3435f97aaca96ad099586446b19e39389be239be04f8d0ad11a16459e6e3647b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 540, + "startColumn": 53, + "charOffset": 15524, + "charLength": 5, + "snippet": { + "text": "spawn" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 538, + "startColumn": 1, + "charOffset": 15378, + "charLength": 282, + "snippet": { + "text": "bool AreaSpawnEvent::executeEvent() {\r\n\tfor (const MonsterSpawn &spawn : spawnMonsterList) {\r\n\t\tuint32_t amount = uniform_random(spawn.minAmount, spawn.maxAmount);\r\n\t\tfor (uint32_t i = 0; i < amount; ++i) {\r\n\t\t\tstd::shared_ptr monster = Monster::createMonster(spawn.name);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ff697a50f18da69a", + "equalIndicator/v1": "3445244a2035f89609bbc8df7c2aae211027026f56885f04fd192ea909326e01" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'guild' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'guild' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 117, + "startColumn": 52, + "charOffset": 3388, + "charLength": 5, + "snippet": { + "text": "guild" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 115, + "startColumn": 1, + "charOffset": 3332, + "charLength": 145, + "snippet": { + "text": "}\r\n\r\nvoid SaveManager::saveGuild(std::shared_ptr guild) {\r\n\tif (!guild) {\r\n\t\tlogger.debug(\"Failed to save guild because guild is null.\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "283f071688eefa3d", + "equalIndicator/v1": "3446449593d6eced0dfdc32b0c642785c1a2ff959312df491b983742d942d417" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2563, + "startColumn": 18, + "charOffset": 76602, + "charLength": 23, + "snippet": { + "text": "Player::getPercentLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2561, + "startColumn": 1, + "charOffset": 76487, + "charLength": 228, + "snippet": { + "text": "\tuint64_t nextLevelExp = Player::getExpForLevel(level + 1);\r\n\tif (nextLevelExp > currLevelExp) {\r\n\t\tlevelPercent = Player::getPercentLevel(experience - currLevelExp, nextLevelExp - currLevelExp);\r\n\t} else {\r\n\t\tlevelPercent = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b87b97a0b12a9f38", + "equalIndicator/v1": "3457f0073e50f1f4d2f6935da2ece35adc7181bb1c9b2488966ce918c9f7f2c9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/db_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 105, + "startColumn": 20, + "charOffset": 3234, + "charLength": 21, + "snippet": { + "text": "Database::getInstance" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 103, + "startColumn": 1, + "charOffset": 3155, + "charLength": 138, + "snippet": { + "text": "\r\nint DBFunctions::luaDatabaseLastInsertId(lua_State* L) {\r\n\tlua_pushnumber(L, Database::getInstance().getLastInsertId());\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5483de1941090e0", + "equalIndicator/v1": "345ea1923d4817c1b8b8d1e01c4c7c1f5dccdeeb435de346631ec20844c7f877" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: channelId", + "markdown": "Constructor does not initialize these fields: channelId" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 8, + "charOffset": 1119, + "charLength": 11, + "snippet": { + "text": "TextMessage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1053, + "charLength": 170, + "snippet": { + "text": "using ProtocolGame_ptr = std::shared_ptr;\r\n\r\nstruct TextMessage {\r\n\tTextMessage() = default;\r\n\tTextMessage(MessageClasses initType, std::string initText) :\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bee6439c34f217d2", + "equalIndicator/v1": "34adc6639b56bf21f0834ae9ae8d97441aa791906bf58696294c842b2f134f2d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'tile' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'tile' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/mapsector.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 51, + "charOffset": 815, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 694, + "charLength": 133, + "snippet": { + "text": "\r\n\tvoid setTile(uint16_t x, uint16_t y, std::shared_ptr tile) {\r\n\t\ttiles[x & SECTOR_MASK][y & SECTOR_MASK].first = tile;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "190ce71137cefd8c", + "equalIndicator/v1": "34bcc5c796444d580e26cf5c289eb4123b28bafce7ae643b750aa1bd02e81a36" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 713, + "startColumn": 15, + "charOffset": 23142, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 711, + "startColumn": 1, + "charOffset": 23102, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 30) * 3.20f) + 4;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "90199f3689687000", + "equalIndicator/v1": "34c204d50aff85ba512ed394567193fa88821cf89579c19f1d8604523cd84be7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 977, + "startColumn": 53, + "charOffset": 26621, + "charLength": 6, + "snippet": { + "text": "Player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 975, + "startColumn": 1, + "charOffset": 26455, + "charLength": 217, + "snippet": { + "text": "int PlayerFunctions::luaPlayerAddMana(lua_State* L) {\r\n\t// player:addMana(manaChange[, animationOnLoss = false])\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (!player) {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6e5dc581b400a29c", + "equalIndicator/v1": "34c4d6327624e86631ed876734f4dc7630b12774bbfe3e9cd0dce64e8539d607" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 25, + "charOffset": 1655, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1625, + "charLength": 174, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t levelFormula = player->getLevel() * 2 + (player->getMagicLevel() + player->getSpecializedMagicLevel(damage.primary.type, true)) * 3;\r\n\treturn levelFormula;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "64edc00beb5bbcb3", + "equalIndicator/v1": "34f80b96588968b2a20c9663938c6bcc1c39edf169d237ebb415716a95b968d3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1739, + "startColumn": 2, + "charOffset": 52308, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1737, + "startColumn": 1, + "charOffset": 52226, + "charLength": 222, + "snippet": { + "text": "\tuint16_t itemId = msg.get();\r\n\tuint8_t fromStackPos = msg.getByte();\r\n\tuint32_t creatureId = msg.get();\r\n\tg_game().playerUseWithCreature(player->getID(), fromPos, fromStackPos, creatureId, itemId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9576b3a2eca84d2c", + "equalIndicator/v1": "35110e79c8aa0b70132b0a603179093960be103347ce37bcd1681bbdb3d28efa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 899, + "startColumn": 14, + "charOffset": 24878, + "charLength": 8, + "snippet": { + "text": "blockHit" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 897, + "startColumn": 1, + "charOffset": 24841, + "charLength": 288, + "snippet": { + "text": "\t\treturn pzLocked;\r\n\t}\r\n\tBlockType_t blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense = false, bool checkArmor = false, bool field = false) override;\r\n\tvoid doAttacking(uint32_t interval) override;\r\n\tbool hasExtraSwing() override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ffd5630ad3571c37", + "equalIndicator/v1": "3528adb2862ca4fc640069213bdc11de9ac7402b8629022730cc5854236d1bb4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 515, + "startColumn": 8, + "charOffset": 12752, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 513, + "startColumn": 1, + "charOffset": 12652, + "charLength": 217, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetDestroyId(lua_State* L) {\r\n\t// itemType:getDestroyId()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->destroyTo);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b3e9e3f932cf41ae", + "equalIndicator/v1": "352a1a86c6fdcaf0fc6434c3f362206ad458260fb0ce587528de06e533b710b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 131, + "startColumn": 11, + "charOffset": 3651, + "charLength": 9, + "snippet": { + "text": "getWeight" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 129, + "startColumn": 1, + "charOffset": 3575, + "charLength": 140, + "snippet": { + "text": "\tuint32_t getContainerHoldingCount();\r\n\tuint16_t getFreeSlots();\r\n\tuint32_t getWeight() const override final;\r\n\r\n\tbool isUnlocked() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e71562d59253294", + "equalIndicator/v1": "357412fc130d9f11294b07aaffaa8453442f888d83ad255a67b2d83f44a258e1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 137, + "startColumn": 30, + "charOffset": 4488, + "charLength": 3, + "snippet": { + "text": "get" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 135, + "startColumn": 1, + "charOffset": 4453, + "charLength": 151, + "snippet": { + "text": "\t}\r\n\r\n\tstd::optional get(const std::string &key, bool forceLoad = false) override {\r\n\t\treturn rootKV_.get(buildKey(key), forceLoad);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "423fc3eed3f8cff4", + "equalIndicator/v1": "35a179ebb883584c51ff0d4cc80807e970d98a8f7a2f60d56226f901a435ed32" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 665, + "startColumn": 79, + "charOffset": 18090, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 663, + "startColumn": 1, + "charOffset": 18007, + "charLength": 198, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updateCharmChanceModifier(std::shared_ptr creature) const {\r\n\tcreature->setCharmChanceModifier(creature->getCharmChanceModifier() + charmChanceModifier);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2fcca19c7d2fb684", + "equalIndicator/v1": "35a9e225f81b56f1e9b4a7d36d13eed78543649b42aac16dc3b8f1b70bec3df5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1382, + "startColumn": 35, + "charOffset": 41523, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1380, + "startColumn": 1, + "charOffset": 41398, + "charLength": 145, + "snippet": { + "text": "\tvoid sendPartyCreatureSkull(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyCreatureSkull(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9a0a96b4437f1e27", + "equalIndicator/v1": "35ba105d31f2d0917384017ddab0dcce35742e4acacb9b3bda728a3722b774d4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1554, + "startColumn": 2, + "charOffset": 46049, + "charLength": 7, + "snippet": { + "text": "uint8_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1552, + "startColumn": 1, + "charOffset": 45974, + "charLength": 170, + "snippet": { + "text": "void capitalizeWords(std::string &source) {\r\n\ttoLowerCaseString(source);\r\n\tuint8_t size = (uint8_t)source.size();\r\n\tfor (uint8_t i = 0; i < size; i++) {\r\n\t\tif (i == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7e8f56c7c4cf8a8a", + "equalIndicator/v1": "35d4782c7c26e448d846f3bcacb8654ee278274374f600ead916c71a76bbad94" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 688, + "startColumn": 41, + "charOffset": 26466, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 686, + "startColumn": 1, + "charOffset": 26420, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "06502f70e80f318a", + "equalIndicator/v1": "35e008969ba230a3a03e237fc00ac430ec807488306529a818b16364ea0824bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 670, + "startColumn": 15, + "charOffset": 21930, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 668, + "startColumn": 1, + "charOffset": 21890, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.25f) + 3;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0ce13fcbe5a7bb13", + "equalIndicator/v1": "35e3f78dc176a190ceb718ccad73352a4bb9e6acb72fe94f7ccf1a067252e6de" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3952, + "startColumn": 127, + "charOffset": 118657, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3950, + "startColumn": 1, + "charOffset": 118526, + "charLength": 323, + "snippet": { + "text": "}\r\n\r\nvoid Player::calculateDamageReductionFromItem(std::array &combatReductionArray, std::shared_ptr item) const {\r\n\tfor (uint16_t combatTypeIndex = 0; combatTypeIndex < COMBAT_COUNT; combatTypeIndex++) {\r\n\t\tupdateDamageReductionFromItemImbuement(combatReductionArray, item, combatTypeIndex);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "309aa41fba2e12eb", + "equalIndicator/v1": "35e9c3e75799e731929eb30fa81aef18732bc2f4c45b782ca4099c89266882a1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Vector_iterator>>::value_type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Vector_iterator\\>\\>::value_type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 86, + "startColumn": 32, + "charOffset": 2625, + "charLength": 8, + "snippet": { + "text": "actionId" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 84, + "startColumn": 1, + "charOffset": 2544, + "charLength": 150, + "snippet": { + "text": "\r\n\tfor (const auto &actionId : actionIdVector) {\r\n\t\tif (registerEvent(moveEvent, actionId, actionIdMap)) {\r\n\t\t\ttmpVector.emplace_back(actionId);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "03c4acfe0d4d3c33", + "equalIndicator/v1": "35f22517cca2ed2820d10e01e947e1c5242efecdfd800958322f051e89a161e4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 123, + "startColumn": 16, + "charOffset": 3993, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 121, + "startColumn": 1, + "charOffset": 3973, + "charLength": 223, + "snippet": { + "text": "}\r\n\r\nvoid Teleport::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tgetParent()->postRemoveNotification(thing, newParent, index, LINK_PARENT);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a90da50f72ca0869", + "equalIndicator/v1": "35f31ab26324c00ff2196474bee16157efcc6cdeb385f008b8d54795a1712939" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 214, + "startColumn": 79, + "charOffset": 6584, + "charLength": 8, + "snippet": { + "text": "cylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 212, + "startColumn": 1, + "charOffset": 6501, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nvoid LuaFunctionsLoader::pushCylinder(lua_State* L, std::shared_ptr cylinder) {\r\n\tif (validateDispatcherContext(__FUNCTION__)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "571f1a3125aac472", + "equalIndicator/v1": "35f6777515ae43cc6c2cd72d4b2bc9f0e7475e7cdb249acc6d7328cec5a5cbe0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 25, + "startColumn": 14, + "charOffset": 938, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 23, + "startColumn": 1, + "charOffset": 765, + "charLength": 380, + "snippet": { + "text": "\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r\n\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid addThing(int32_t index, std::shared_ptr thing) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "42d6e9975c892a69", + "equalIndicator/v1": "3615a1ad3c9ebeeb239dbea18230d7d99ebcf5db4fbce4554d4bc61dbb3cc2b9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 38, + "startColumn": 21, + "charOffset": 992, + "charLength": 4, + "snippet": { + "text": "bank" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 36, + "startColumn": 1, + "charOffset": 940, + "charLength": 87, + "snippet": { + "text": "\t}\r\n\tif (lua_gettop(L) == 1) {\r\n\t\tlua_pushnumber(L, bank->balance());\r\n\t\treturn 1;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "99b5b2acf921dc93", + "equalIndicator/v1": "361651e90b6ac1a70da3425881816a2aee78a8e408651dc47583ab97853f0f3b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1644, + "startColumn": 3, + "charOffset": 57786, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1642, + "startColumn": 1, + "charOffset": 57668, + "charLength": 168, + "snippet": { + "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r\n\t\treturn;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6c12262419bf2628", + "equalIndicator/v1": "3620504309b833070cd29a41d13632587b0cfc4a921cfd34dcdea029797fd841" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 341, + "startColumn": 10, + "charOffset": 9576, + "charLength": 15, + "snippet": { + "text": "getWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 339, + "startColumn": 1, + "charOffset": 9512, + "charLength": 346, + "snippet": { + "text": "\tvoid configureWeapon(const ItemType &it) override;\r\n\r\n\tint32_t getWeaponDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, bool maxDamage = false) const override;\r\n\tint32_t getElementDamage(std::shared_ptr, std::shared_ptr, std::shared_ptr) const override {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2637e9e745472959", + "equalIndicator/v1": "3625a1062d62aa4aabcef90351863ca69510c66d83335889c9432cc41fc01c22" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8030, + "startColumn": 91, + "charOffset": 252239, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8028, + "startColumn": 1, + "charOffset": 252144, + "charLength": 148, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendUpdateInputAnalyzer(CombatType_t type, int32_t amount, std::string target) {\r\n\tif (!player || oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb023ad7871b4621", + "equalIndicator/v1": "3626789c8a418503d4bb322cd5b9fdccbbc539880ddfbee8442315af4105be56" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1797, + "startColumn": 52, + "charOffset": 48530, + "charLength": 3, + "snippet": { + "text": "med" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1795, + "startColumn": 1, + "charOffset": 48412, + "charLength": 151, + "snippet": { + "text": "\r\n\t\t\tx1 = std::fabs(1.0 - ((static_cast(sum)) + i) / med);\r\n\t\t\tx2 = std::fabs(1.0 - (static_cast(sum) / med));\r\n\t\t} while (x1 < x2);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "047060ceaafdd96e", + "equalIndicator/v1": "3639759d33ce8b063914006e5a81250052b726da95f1fab647ce579b2a011b97" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4216, + "startColumn": 14, + "charOffset": 126934, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4214, + "startColumn": 1, + "charOffset": 126916, + "charLength": 222, + "snippet": { + "text": "}\r\n\r\nvoid Player::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link /*= LINK_OWNER*/) {\r\n\tif (link == LINK_OWNER) {\r\n\t\t// calling movement scripts\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fd537e5c281dc735", + "equalIndicator/v1": "363b9f168586ef737bbf321bb0ea599acc31d9f3f2dbe317d305528b52ea7fcc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3478, + "startColumn": 20, + "charOffset": 106844, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3476, + "startColumn": 1, + "charOffset": 106722, + "charLength": 233, + "snippet": { + "text": "\tmsg.add(player->getBaseMagicLevel());\r\n\tmsg.add(player->getLoyaltyMagicLevel());\r\n\tmsg.add(player->getMagicLevelPercent() * 100);\r\n\r\n\tfor (uint8_t i = SKILL_FIRST; i < SKILL_CRITICAL_HIT_CHANCE; ++i) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71c3cd35df808aa3", + "equalIndicator/v1": "3640d42fe3a9b7918803bdd0cf1b11da01e58f64213826433859c7d088ee0bd0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'long long' to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'long long' to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/result_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 20, + "charOffset": 719, + "charLength": 3, + "snippet": { + "text": "res" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 656, + "charLength": 107, + "snippet": { + "text": "\r\n\tconst std::string &s = getString(L, 2);\r\n\tlua_pushnumber(L, res->getNumber(s));\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fa137ed0ed214d3a", + "equalIndicator/v1": "3673208f8622326839ea5f42db075dfe7ad00d9401ab084cb89ce36187129911" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 423, + "startColumn": 147, + "charOffset": 13873, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 421, + "startColumn": 1, + "charOffset": 13722, + "charLength": 328, + "snippet": { + "text": "}\r\n\r\nbool Actions::useItemEx(std::shared_ptr player, const Position &fromPos, const Position &toPos, uint8_t toStackPos, std::shared_ptr item, bool isHotkey, std::shared_ptr creature /* = nullptr*/) {\r\n\tconst ItemType &it = Item::items[item->getID()];\r\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4a1d35a4ed83b8bc", + "equalIndicator/v1": "36a267d0821b8e6f47e7dd0c2be661a01fd7042f7a1474a4298bf773870e48b7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 285, + "startColumn": 52, + "charOffset": 8777, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 283, + "startColumn": 1, + "charOffset": 8721, + "charLength": 188, + "snippet": { + "text": "}\r\n\r\nbool Combat::isInPvpZone(std::shared_ptr attacker, std::shared_ptr target) {\r\n\treturn attacker->getZoneType() == ZONE_PVP && target->getZoneType() == ZONE_PVP;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e63d2485726347d8", + "equalIndicator/v1": "36c8d72af91522912ff234aae3b61019978f4b9fd06dac5502af58328420f448" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1159, + "startColumn": 31, + "charOffset": 34133, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1157, + "startColumn": 1, + "charOffset": 34001, + "charLength": 159, + "snippet": { + "text": "\tvoid sendCreatureSquare(std::shared_ptr creature, SquareColor_t color) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureSquare(creature, color);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "669eeabc107f6fe5", + "equalIndicator/v1": "36e42bd0cecaaf282441ea9b8ff73d7a4f6103252ad7cafa160ce6cae9b1fb6b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1039, + "startColumn": 7, + "charOffset": 39507, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1037, + "startColumn": 1, + "charOffset": 39373, + "charLength": 279, + "snippet": { + "text": "// Monster\r\nvoid EventCallback::monsterOnDropLoot(std::shared_ptr monster, std::shared_ptr corpse) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::monsterOnDropLoot - \"\r\n\t\t \"Monster corpse {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d5487655ce8737c6", + "equalIndicator/v1": "36f8be059bbf2d81ca9ecc096454079b75b59ff3d689027c19e09c964fd142cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1164, + "startColumn": 31, + "charOffset": 34302, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1162, + "startColumn": 1, + "charOffset": 34161, + "charLength": 169, + "snippet": { + "text": "\tvoid sendCreatureChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureOutfit(creature, outfit);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3aea5ab01483e8e6", + "equalIndicator/v1": "36fe908b0096a325ea26e51b50b3f16baafa1b7bc830ef29ab4ba98ac0d6601f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7403, + "startColumn": 93, + "charOffset": 257851, + "charLength": 12, + "snippet": { + "text": "targetPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7401, + "startColumn": 1, + "charOffset": 257633, + "charLength": 320, + "snippet": { + "text": "void Game::sendMessages(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\r\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\r\n) const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ccf5e476e6b69b9", + "equalIndicator/v1": "370751d1f9cd9bc7be5927ddd92680762b465600f0156b082091c2a97ff929d4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2931, + "startColumn": 3, + "charOffset": 89513, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2929, + "startColumn": 1, + "charOffset": 89488, + "charLength": 231, + "snippet": { + "text": "\r\n\tif (search == 1) {\r\n\t\tuint16_t monsterAmount = msg.get();\r\n\t\tstd::map mtype_list = g_game().getBestiaryList();\r\n\t\tfor (uint16_t monsterCount = 1; monsterCount <= monsterAmount; monsterCount++) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "995776f7828a344c", + "equalIndicator/v1": "3712e733047bd44c6ad055342faf0ea58d05d66d87aefd82a9f732783fd16b72" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 144, + "startColumn": 113, + "charOffset": 4020, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 142, + "startColumn": 1, + "charOffset": 3903, + "charLength": 215, + "snippet": { + "text": "}\r\n\r\nCombatDamage Weapon::getCombatDamage(CombatDamage combat, std::shared_ptr player, std::shared_ptr item, int32_t damageModifier) const {\r\n\t// Local variables\r\n\tuint32_t level = player->getLevel();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "52c4efeb88949720", + "equalIndicator/v1": "371b27cb6aa5cd7d9907ca2b13098862cb80bc779266f6a3113bd7ca5fe1e8f9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'removeCreature' is within a recursive call chain", + "markdown": "Function 'removeCreature' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1147, + "startColumn": 12, + "charOffset": 46888, + "charLength": 14, + "snippet": { + "text": "removeCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1145, + "startColumn": 1, + "charOffset": 46872, + "charLength": 192, + "snippet": { + "text": "}\r\n\r\nbool Game::removeCreature(std::shared_ptr creature, bool isLogout /* = true*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!creature || creature->isRemoved()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d7f83589b5b35c1c", + "equalIndicator/v1": "3727d2800c900da9643a4b35ce0f2a113dfb510ad01b8a3cf285152c57fb4c84" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 151, + "startColumn": 7, + "charOffset": 5297, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 149, + "startColumn": 1, + "charOffset": 5129, + "charLength": 315, + "snippet": { + "text": "\r\nvoid EventCallback::creatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnHear - \"\r\n\t\t \"Creature {} speaker {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9b793f2ed47c1ac5", + "equalIndicator/v1": "3799afb4b20c1369039d5a3342ad248c52370239fdca9750db7bd2ecd867078d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2696, + "startColumn": 2, + "charOffset": 83035, + "charLength": 21, + "snippet": { + "text": "PartyAnalyzerAction_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2694, + "startColumn": 1, + "charOffset": 83028, + "charLength": 161, + "snippet": { + "text": "\t}\r\n\r\n\tPartyAnalyzerAction_t action = static_cast(msg.getByte());\r\n\tif (action == PARTYANALYZERACTION_RESET) {\r\n\t\tparty->resetAnalyzer();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f4ee5d4382e267a9", + "equalIndicator/v1": "379bbdf7bbd4f39d1c6a02659cb171638436012fe003f9bad3afdd2b9c1bcd95" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6896, + "startColumn": 29, + "charOffset": 239199, + "charLength": 52, + "snippet": { + "text": "(damage.secondary.value * (damage.damageMultiplier))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6894, + "startColumn": 1, + "charOffset": 239048, + "charLength": 218, + "snippet": { + "text": "\tif (damage.damageMultiplier > 0) {\r\n\t\tdamage.primary.value += (damage.primary.value * (damage.damageMultiplier)) / 100.;\r\n\t\tdamage.secondary.value += (damage.secondary.value * (damage.damageMultiplier)) / 100.;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4e423c53f236d486", + "equalIndicator/v1": "37cc5ded1b22413a0333bf5e915ccd31be0a292adf0566695101583e12998f75" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 293, + "startColumn": 111, + "charOffset": 10555, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 291, + "startColumn": 1, + "charOffset": 10440, + "charLength": 246, + "snippet": { + "text": "}\r\n\r\nReturnValue Events::eventCreatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) {\r\n\t// Creature:onTargetCombat(target) or Creature.onTargetCombat(self, target)\r\n\tif (info.creatureOnTargetCombat == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cc7d691849bdf6b4", + "equalIndicator/v1": "37dae1963685ec92b03400e8718890150225c076b5e22319dfbecc0d1e0fde79" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 122, + "startColumn": 46, + "charOffset": 3136, + "charLength": 6, + "snippet": { + "text": "amount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 120, + "startColumn": 1, + "charOffset": 3062, + "charLength": 169, + "snippet": { + "text": "\r\n\tif (destinationPlayer) {\r\n\t\tg_metrics().addCounter(\"balance_increase\", amount, { { \"player\", destinationPlayer->getName() }, { \"context\", \"bank_transfer\" } });\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d654df2567e8da37", + "equalIndicator/v1": "37e49ad5fecd1798f5ad91ad836e74d99845d622a8eb4c9d25b11439d3a484fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'std::list\\>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 283, + "startColumn": 21, + "charOffset": 7880, + "charLength": 5, + "snippet": { + "text": "house" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 281, + "startColumn": 1, + "charOffset": 7774, + "charLength": 163, + "snippet": { + "text": "\t// house:getDoorCount()\r\n\tif (const auto &house = getUserdataShared(L, 1)) {\r\n\t\tlua_pushnumber(L, house->getDoors().size());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9e0a4456a45a65ec", + "equalIndicator/v1": "380d7ca63d6cf2c743ff936b8ed3dab762c8fc51099ef661f3607c54d8973a88" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 15, + "charOffset": 1240, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1106, + "charLength": 202, + "snippet": { + "text": "\tif (item->getTopParent().get() != this) { // MY\r\n\t\tif (std::shared_ptr container = item->getContainer()) {\r\n\t\t\taddCount = container->getItemHoldingCount() + 1;\r\n\t\t} else {\r\n\t\t\taddCount = 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5904e1e691f3fc3f", + "equalIndicator/v1": "38464be0b86bd901df599160d4862b553e966d0efeafe3eabc8fe898c5073848" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 381, + "startColumn": 27, + "charOffset": 13781, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 379, + "startColumn": 1, + "charOffset": 13749, + "charLength": 132, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.creatureOnDrainHealth, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "567fa7de4ee34f71", + "equalIndicator/v1": "388836dd34947a7674d913667866a9150d577792ef55d06972463ab1ac4a9a3f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float_t' (aka 'float')", + "markdown": "Narrowing conversion from 'int' to 'float_t' (aka 'float')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 318, + "startColumn": 2, + "charOffset": 9417, + "charLength": 2, + "snippet": { + "text": "if" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 316, + "startColumn": 1, + "charOffset": 9370, + "charLength": 151, + "snippet": { + "text": "\r\n\tconst ItemType &it = Item::items[itemId];\r\n\tif (it.hasSubType()) {\r\n\t\tif (it.stackable) {\r\n\t\t\titemCount = std::ceil(count / (float_t)it.stackSize);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "42f5f57135d796c9", + "equalIndicator/v1": "389334791cd9eb4ced6368a30f136684da887027849909172e42f0a5b389cb0c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3417, + "startColumn": 59, + "charOffset": 125998, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3415, + "startColumn": 1, + "charOffset": 125935, + "charLength": 176, + "snippet": { + "text": "}\r\n\r\nbool Game::playerBroadcastMessage(std::shared_ptr player, const std::string &text) const {\r\n\tif (!player->hasFlag(PlayerFlags_t::CanBroadcast)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4252e90f51ae8de2", + "equalIndicator/v1": "38b130d656003e825ea89019f8fbf7465d9fcc74cfd41254e79ad38f979b564c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 437, + "startColumn": 23, + "charOffset": 15251, + "charLength": 9, + "snippet": { + "text": "totalCost" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 435, + "startColumn": 1, + "charOffset": 15157, + "charLength": 112, + "snippet": { + "text": "\t\tcallback.pushBoolean(ignore);\r\n\t\tcallback.pushString(itemType.name);\r\n\t\tcallback.pushNumber(totalCost);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75453edc1fc43fc9", + "equalIndicator/v1": "38c1e99b6a26d4739007ed001f1c9fbbca61e84ff1ed038005913745428898d8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 228, + "startColumn": 3, + "charOffset": 5759, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 226, + "startColumn": 1, + "charOffset": 5702, + "charLength": 185, + "snippet": { + "text": "\r\n\tif (const TileItemVector* items = getItemList()) {\r\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\r\n\t\t\tif ((*it)->getBed()) {\r\n\t\t\t\treturn (*it)->getBed();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6c1640281eff2afe", + "equalIndicator/v1": "38d60c6d04d55d625cd85962292e8f75fa0669876d6850707b310cd54864011f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 711, + "startColumn": 121, + "charOffset": 23513, + "charLength": 27, + "snippet": { + "text": "spellSecondaryGroupCooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 709, + "startColumn": 1, + "charOffset": 23346, + "charLength": 280, + "snippet": { + "text": "\t\t}\r\n\t\tif (spellSecondaryGroupCooldown > 0) {\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellSecondaryGroupCooldown / rateCooldown, 0, false, secondaryGroup);\r\n\t\t\tplayer->addCondition(condition);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e4ffd29b9b8e6ebd", + "equalIndicator/v1": "3907af3482ae78ed2afb56031f4183a00209d0b8c669999c20e19303e98d6c14" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 486, + "startColumn": 68, + "charOffset": 19375, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 484, + "startColumn": 1, + "charOffset": 19303, + "charLength": 183, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerDepotItems(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6fe96ce7af5cb171", + "equalIndicator/v1": "390ccd42403ee1e7659e3cd2b057ab419ddaeea2717c1633d503a12b408853fe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 638, + "startColumn": 63, + "charOffset": 22713, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 636, + "startColumn": 1, + "charOffset": 22646, + "charLength": 306, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) {\r\n\t// Player:onLookInTrade(partner, item, distance) or Player.onLookInTrade(self, partner, item, distance)\r\n\tif (info.playerOnLookInTrade == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "89ff57bf68e8b7f3", + "equalIndicator/v1": "3916ba15bb027820ff5bdc357b38c5a3114155bcdcaf59c3ad2c62a0b4c8eaac" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 185, + "startColumn": 22, + "charOffset": 7381, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 183, + "startColumn": 1, + "charOffset": 7321, + "charLength": 211, + "snippet": { + "text": "\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r\n\tvirtual ReturnValue queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr = nullptr) override {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb3d35a3e2819ca9", + "equalIndicator/v1": "39215b3c99a56913b595d9373ffdf9a1649da7b0dcbd33ba4997c1cb7f712314" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 734, + "startColumn": 19, + "charOffset": 22450, + "charLength": 10, + "snippet": { + "text": "-oldWeight" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 732, + "startColumn": 1, + "charOffset": 22382, + "charLength": 130, + "snippet": { + "text": "\titem->setID(itemId);\r\n\titem->setSubType(count);\r\n\tupdateItemWeight(-oldWeight + item->getWeight());\r\n\r\n\t// send change to client\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9974e2e5b5fdeae0", + "equalIndicator/v1": "3945c287217f0d7f105f8422d9ee846a5506188d6aeffcc73877ea850d05b992" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2515, + "startColumn": 70, + "charOffset": 95908, + "charLength": 8, + "snippet": { + "text": "cylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2513, + "startColumn": 1, + "charOffset": 95834, + "charLength": 245, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Game::findItemOfType(std::shared_ptr cylinder, uint16_t itemId, bool depthSearch /*= true*/, int32_t subType /*= -1*/) const {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (cylinder == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9b809aa061b7735e", + "equalIndicator/v1": "3945cb96beb3543c98d6bb45c1b9bfc6fe742e236f0683bdd68f3ed3727071cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 574, + "startColumn": 3, + "charOffset": 27034, + "charLength": 73, + "snippet": { + "text": "abilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 572, + "startColumn": 1, + "charOffset": 26917, + "charLength": 342, + "snippet": { + "text": "\t\tint16_t value = pugi::cast(valueAttribute.value());\r\n\t\tAbilities &abilities = itemType.getAbilities();\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2a763f157f99ea92", + "equalIndicator/v1": "39692f3424f0c6e5a909f977fa4af870d76185be29f7333a7c2f1d594698d409" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 464, + "startColumn": 58, + "charOffset": 15947, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 462, + "startColumn": 1, + "charOffset": 15885, + "charLength": 149, + "snippet": { + "text": "}\r\n\r\nvoid Npc::onPlayerCloseChannel(std::shared_ptr creature) {\r\n\tstd::shared_ptr player = creature->getPlayer();\r\n\tif (!player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fcd49e320a697a14", + "equalIndicator/v1": "3970bd4f27ba02c8978b3b0ac6dc6c4b8bb23c560d2c015548c7358b0c7bfd22" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2283, + "startColumn": 26, + "charOffset": 79602, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2281, + "startColumn": 1, + "charOffset": 79484, + "charLength": 276, + "snippet": { + "text": "\tint32_t healingBonus = 0;\r\n\tuint8_t stage = getStage(WheelStage_t::BLESSING_OF_THE_GROVE);\r\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\r\n\tif (healthPercent <= 30) {\r\n\t\tif (stage >= 3) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fe019caed52a5dd5", + "equalIndicator/v1": "39c274ed6c5eef32eb031a2306408de897da4126a0c2c9bfa87a549fcec74439" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 774, + "startColumn": 52, + "charOffset": 25167, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 772, + "startColumn": 1, + "charOffset": 25053, + "charLength": 232, + "snippet": { + "text": "\t\t\tauto conditionCopy = condition->clone();\r\n\t\t\tif (caster) {\r\n\t\t\t\tconditionCopy->setParam(CONDITION_PARAM_OWNER, caster->getID());\r\n\t\t\t\tconditionCopy->setPositionParam(CONDITION_PARAM_CASTER_POSITION, caster->getPosition());\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d748b1f90d9019ae", + "equalIndicator/v1": "39e056391954c198f671da5e592e593c66b3ad233e079ec7bc924ee8d8c95eee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 72, + "startColumn": 31, + "charOffset": 2806, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 70, + "startColumn": 1, + "charOffset": 2687, + "charLength": 260, + "snippet": { + "text": "\tint32_t bitToggle(int32_t input, const std::shared_ptr charm, bool on) const;\r\n\r\n\tbool hasCharmUnlockedRuneBit(const std::shared_ptr charm, int32_t input) const;\r\n\r\n\tstd::list getCharmUsedRuneBitAll(std::shared_ptr player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e4ce3bc1e8932837", + "equalIndicator/v1": "39f596abc408242c3354662c03b9da610a0b2cc3f70b2b8910500aa96dd40be8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use '= default' to define a trivial destructor", + "markdown": "Use '= default' to define a trivial destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 107, + "startColumn": 11, + "charOffset": 2622, + "charLength": 4, + "snippet": { + "text": "Tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 105, + "startColumn": 1, + "charOffset": 2544, + "charLength": 109, + "snippet": { + "text": "\tTile(uint16_t x, uint16_t y, uint8_t z) :\r\n\t\ttilePos(x, y, z) { }\r\n\tvirtual ~Tile() {};\r\n\r\n\t// non-copyable\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1703faaf0983e531", + "equalIndicator/v1": "3a0dbff7671ca0b8a062e65d7c3a16edfaa5042bf7d5795696bc8a4d21d59197" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 66, + "startColumn": 15, + "charOffset": 1967, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 64, + "startColumn": 1, + "charOffset": 1948, + "charLength": 216, + "snippet": { + "text": "}\r\n\r\nvoid Mailbox::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tgetParent()->postAddNotification(thing, oldParent, index, LINK_PARENT);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc331311e39a5dc6", + "equalIndicator/v1": "3a2500e778bd126468a28fc512a1cdbd41c3908450f5beb17fce1d3ad8a3a90a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 495, + "startColumn": 99, + "charOffset": 14779, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 493, + "startColumn": 1, + "charOffset": 14676, + "charLength": 263, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool isCheck) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e00063da595c6b31", + "equalIndicator/v1": "3a755c28a62405d7d5cb6a1e17e95eda0bcd0c74140896e58846fd096c592ff1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 124, + "startColumn": 10, + "charOffset": 3561, + "charLength": 6, + "snippet": { + "text": "health" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 122, + "startColumn": 1, + "charOffset": 3520, + "charLength": 83, + "snippet": { + "text": "\r\n\tint32_t getHealth() const {\r\n\t\treturn health;\r\n\t}\r\n\tvoid setHealth(int32_t h) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b75267324fdc7c58", + "equalIndicator/v1": "3aa48705bd621f0faea460cb1bee843b98a1d3c1e137ba7b87f90f79af2a7f4c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 466, + "startColumn": 17, + "charOffset": 12301, + "charLength": 9, + "snippet": { + "text": "shopBlock" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 464, + "startColumn": 1, + "charOffset": 12173, + "charLength": 237, + "snippet": { + "text": "\tauto playerGUID = getNumber(L, 2, 0);\r\n\tconst auto &shopItems = npc->getShopItemVector(playerGUID);\r\n\tfor (ShopBlock shopBlock : shopItems) {\r\n\t\tsetField(L, \"id\", shopBlock.itemId);\r\n\t\tsetField(L, \"name\", shopBlock.itemName);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "92f12847ce43e177", + "equalIndicator/v1": "3ac5c98a2210217d41564ef4d8eccc1365d0b4867577ee8badaad9290f28ab29" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with new to avoid duplicating the type name", + "markdown": "Use auto when initializing with new to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 216, + "startColumn": 4, + "charOffset": 7097, + "charLength": 18, + "snippet": { + "text": "ItemClassification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 214, + "startColumn": 1, + "charOffset": 7054, + "charLength": 191, + "snippet": { + "text": "\t\t\treturn *it;\r\n\t\t} else if (create) {\r\n\t\t\tItemClassification* itemClassification = new ItemClassification(id);\r\n\t\t\taddItemsClassification(itemClassification);\r\n\t\t\treturn itemClassification;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "588e318879a8ef69", + "equalIndicator/v1": "3ac7597e93de4c93f9e130d1a7a01ad14c63bea0040e40787de86b2a7bf6796d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10331, + "startColumn": 60, + "charOffset": 359055, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10329, + "startColumn": 1, + "charOffset": 358991, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nvoid Game::removePlayerUniqueLogin(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().error(\"Attempted to remove null player from unique player names list.\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5844c775e972047f", + "equalIndicator/v1": "3adce66d3cea6a804294df8310f289e2a067a2b38d6721591be2d8c1af15db3d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 627, + "startColumn": 26, + "charOffset": 29475, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 625, + "startColumn": 1, + "charOffset": 29277, + "charLength": 346, + "snippet": { + "text": "// SLOT_RED_50 = 16\r\nvoid IOWheel::slotRed50(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\tif (isKnight(vocationCipId)) {\r\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_RED_50, points, \"Fierce Berserk\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "33a9112f080fbf1d", + "equalIndicator/v1": "3af5239363679d74997899cb22d46e3be8edbd16845b894369237892983692e3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 917, + "startColumn": 29, + "charOffset": 27612, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 915, + "startColumn": 1, + "charOffset": 27517, + "charLength": 249, + "snippet": { + "text": "\tuint16_t counter = std::max(0, capacity() - size());\r\n\r\n\tfor (std::shared_ptr item : itemlist) {\r\n\t\tif (std::shared_ptr container = item->getContainer()) {\r\n\t\t\tcounter += std::max(0, container->getFreeSlots());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "837ea3b357a04b33", + "equalIndicator/v1": "3af68a056af047e19440df2e71cf24880c9cc9b86ca820c6311fb9a5b5e0a726" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2786, + "startColumn": 44, + "charOffset": 82933, + "charLength": 10, + "snippet": { + "text": "experience" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2784, + "startColumn": 1, + "charOffset": 82871, + "charLength": 311, + "snippet": { + "text": "\r\n\t\t// Level loss\r\n\t\tuint64_t expLoss = static_cast(experience * deathLossPercent);\r\n\t\tg_events().eventPlayerOnLoseExperience(static_self_cast(), expLoss);\r\n\t\tg_callbacks().executeCallback(EventCallback_t::playerOnLoseExperience, &EventCallback::playerOnLoseExperience, getPlayer(), expLoss);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f1c9bccf117cf1a", + "equalIndicator/v1": "3b197a37a9226d03c9c8719033d919b7d9f6010d621d49f5b1fd217fa15e486c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5718, + "startColumn": 63, + "charOffset": 168940, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5716, + "startColumn": 1, + "charOffset": 168873, + "charLength": 128, + "snippet": { + "text": "}\r\n\r\nGuildEmblems_t Player::getGuildEmblem(std::shared_ptr player) const {\r\n\tif (!player) {\r\n\t\treturn GUILDEMBLEM_NONE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "26587da9c5fa57e7", + "equalIndicator/v1": "3b268b21c874079c3273123e8f3834d9f3c0fdeeee1c00e9ae7bf2bb0cff5d43" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1274, + "startColumn": 69, + "charOffset": 39174, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1272, + "startColumn": 1, + "charOffset": 39101, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nbool Creature::deprecatedOnKilledCreature(std::shared_ptr target, bool lastHit) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tauto master = getMaster();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8581ef0c68924efa", + "equalIndicator/v1": "3b38f29a2335c8f2c706241c235af5d64624fe4614dd865776583bfce0a61ae4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1065, + "startColumn": 50, + "charOffset": 34949, + "charLength": 8, + "snippet": { + "text": "affected" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1063, + "startColumn": 1, + "charOffset": 34765, + "charLength": 211, + "snippet": { + "text": "\t\t\t\t\tif (combat && caster && nextTarget) {\r\n\t\t\t\t\t\tcombat->doChainEffect(from, nextTarget->getPosition(), combat->params.chainEffect);\r\n\t\t\t\t\t\tcombat->doCombat(caster, nextTarget, from, affected);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eac454a00fd58203", + "equalIndicator/v1": "3b4f68ef70345b2f37d71981a02cbdd66f448a2e2726e1d076c0e5cf5d2fca07" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 989, + "startColumn": 26, + "charOffset": 26930, + "charLength": 10, + "snippet": { + "text": "manaChange" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 987, + "startColumn": 1, + "charOffset": 26870, + "charLength": 159, + "snippet": { + "text": "\t} else {\r\n\t\tCombatDamage damage;\r\n\t\tdamage.primary.value = manaChange;\r\n\t\tdamage.origin = ORIGIN_NONE;\r\n\t\tg_game().combatChangeMana(nullptr, player, damage);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dae2fe36e4a8393a", + "equalIndicator/v1": "3b51a04c39f72be6aed8bcc9b8536b2bb8bbeea5e8fab979d279234077409d75" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 495, + "startColumn": 129, + "charOffset": 14809, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 493, + "startColumn": 1, + "charOffset": 14676, + "charLength": 263, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool isCheck) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f55dcf8b98a5e739", + "equalIndicator/v1": "3b656ce6e1324f45532c1b0a248308f1d8239a4e8c0790a7ed9d1543f770fc8f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 231, + "startColumn": 51, + "charOffset": 6970, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 229, + "startColumn": 1, + "charOffset": 6915, + "charLength": 241, + "snippet": { + "text": "}\r\n\r\nvoid Npc::onPlayerBuyItem(std::shared_ptr player, uint16_t itemId, uint8_t subType, uint16_t amount, bool ignore, bool inBackpacks) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[Npc::onPlayerBuyItem] - Player is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "afb90c4faf46c160", + "equalIndicator/v1": "3b6dcbddbb22797200651351630f93cd7b54bc88349a4cd014d3f4c8b9c88e35" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 294, + "startColumn": 67, + "charOffset": 8598, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 292, + "startColumn": 1, + "charOffset": 8526, + "charLength": 133, + "snippet": { + "text": "\t}\r\n\r\n\tstatic std::string parseAugmentDescription(std::shared_ptr item, bool inspect = false) {\r\n\t\tif (!item) {\r\n\t\t\treturn \"\";\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e50a4786a147ef5b", + "equalIndicator/v1": "3b8ca3ee9aae0cee1a9b060056661177887c6eba5688966ed15d42042a22cbd0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 655, + "startColumn": 69, + "charOffset": 17772, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 653, + "startColumn": 1, + "charOffset": 17699, + "charLength": 185, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updateIncreases(std::shared_ptr creature) const {\r\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\r\n\t\tauto increaseValue = getIncreaseByIndex(i);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9ad39b94463e0e55", + "equalIndicator/v1": "3b8d7f02c4398a39f0d2ad241031b059b0441a937af7a4e36d7b5da2590297ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 360, + "startColumn": 62, + "charOffset": 10261, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 358, + "startColumn": 1, + "charOffset": 10195, + "charLength": 190, + "snippet": { + "text": "}\r\n\r\nbool CombatSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var) const {\r\n\t// onCastSpell(creature, var)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c1f02907cb10da30", + "equalIndicator/v1": "3b946eebddc657bf7c7ee5140e3cd4cf3759275dbedbfab5fbbd81d485f268e6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6908, + "startColumn": 31, + "charOffset": 239766, + "charLength": 38, + "snippet": { + "text": "(damage.secondary.value * damageBonus)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6906, + "startColumn": 1, + "charOffset": 239634, + "charLength": 190, + "snippet": { + "text": "\t\t\tif (damageBonus != 0) {\r\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\r\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cf3fc91446068c8a", + "equalIndicator/v1": "3bac1831738bd2efd90bd314d07d4dd65d9b8de900c7b305f1173815786a55d3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/shop_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 120, + "startColumn": 36, + "charOffset": 3401, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 118, + "startColumn": 1, + "charOffset": 3275, + "charLength": 189, + "snippet": { + "text": "\t// shop:setStorageKey(storage)\r\n\tif (const auto &shop = getUserdataShared(L, 1)) {\r\n\t\tshop->shopBlock.itemStorageKey = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eb2f60b31e1cf1a2", + "equalIndicator/v1": "3bc94a5b84c26b3422e1afcf2d9a5056720368addd0d1d6dfab893c1962419f0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 574, + "startColumn": 3, + "charOffset": 27034, + "charLength": 9, + "snippet": { + "text": "abilities" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 572, + "startColumn": 1, + "charOffset": 26917, + "charLength": 342, + "snippet": { + "text": "\t\tint16_t value = pugi::cast(valueAttribute.value());\r\n\t\tAbilities &abilities = itemType.getAbilities();\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2a49346af508d3a9", + "equalIndicator/v1": "3bf3858dcd6a8b1573607a7554bed717868056d3968df8c7b23ab4bfd73f22fd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 592, + "startColumn": 13, + "charOffset": 28611, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 590, + "startColumn": 1, + "charOffset": 28419, + "charLength": 417, + "snippet": { + "text": "\t} else if (stringValue == \"absorbpercentdeath\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentlifedrain\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_LIFEDRAIN)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentmanadrain\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7106fcd6f00ff50f", + "equalIndicator/v1": "3bf428823e437bca7cb39f97c7196d81bfce2e81da4d127a79e102900474b173" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/position.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 60, + "startColumn": 10, + "charOffset": 2171, + "charLength": 8, + "snippet": { + "text": "std::abs" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 58, + "startColumn": 1, + "charOffset": 2086, + "charLength": 208, + "snippet": { + "text": "\t}\r\n\tstatic int16_t getDistanceZ(const Position &p1, const Position &p2) {\r\n\t\treturn std::abs(Position::getOffsetZ(p1, p2));\r\n\t}\r\n\tstatic int32_t getDiagonalDistance(const Position &p1, const Position &p2) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "64ba9e376746bb51", + "equalIndicator/v1": "3c16a41f1f2a99dac4d2f24f4ab3b76ddfe062cb7aeacd64842a431fcfcdf7f2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::vector::size_type'", + "markdown": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::vector::size_type'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 912, + "startColumn": 22, + "charOffset": 31636, + "charLength": 1, + "snippet": { + "text": "i" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 910, + "startColumn": 1, + "charOffset": 31515, + "charLength": 190, + "snippet": { + "text": "uint8_t PlayerWheel::getGemIndex(const std::string &uuid) const {\r\n\tauto gems = getRevealedGems();\r\n\tfor (uint8_t i = 0; i < gems.size(); ++i) {\r\n\t\tif (gems[i].uuid == uuid) {\r\n\t\t\treturn i;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8a8ad58db5c594fe", + "equalIndicator/v1": "3c4329a9b5e1c3574ccae47568837f34eaac13743aea5d2c76ec87e24493de8f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2144, + "startColumn": 54, + "charOffset": 63056, + "charLength": 4, + "snippet": { + "text": "task" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2142, + "startColumn": 1, + "charOffset": 62998, + "charLength": 174, + "snippet": { + "text": "}\r\n\r\nvoid Player::setNextActionTask(std::shared_ptr task, bool resetIdleTime /*= true */) {\r\n\tif (actionTaskEvent != 0) {\r\n\t\tg_dispatcher().stopEvent(actionTaskEvent);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e4e96456bd3c282", + "equalIndicator/v1": "3c504971573c35a17bc7557dd24d3dfe0ecb901b07712540bdd662e1097f87bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6549, + "startColumn": 28, + "charOffset": 226041, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6547, + "startColumn": 1, + "charOffset": 225973, + "charLength": 189, + "snippet": { + "text": "\t\t\t\tdamageIncreaseMessage = true;\r\n\t\t\t}\r\n\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t}\r\n\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5bd51413a044fb0b", + "equalIndicator/v1": "3c5c4119e875f5e0d1e2ae45cc4a7f5e1583ec0e5f475679b91d7bd043f7f8c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9847, + "startColumn": 30, + "charOffset": 344213, + "charLength": 6, + "snippet": { + "text": "amount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9845, + "startColumn": 1, + "charOffset": 344085, + "charLength": 162, + "snippet": { + "text": "\t\tfor (const std::shared_ptr &item : itemVector) {\r\n\t\t\tif (item->getItemCount() > amount) {\r\n\t\t\t\tinternalRemoveItem(item, amount);\r\n\t\t\t\tbreak;\r\n\t\t\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2fd1a63ead55dcfc", + "equalIndicator/v1": "3c7dd4abf17a464884c39ac74276f3101a58ab02b6813d1987dd0e480b893322" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 847, + "startColumn": 24, + "charOffset": 24180, + "charLength": 1, + "snippet": { + "text": "7" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 845, + "startColumn": 1, + "charOffset": 24102, + "charLength": 188, + "snippet": { + "text": "\t\t} else {\r\n\t\t\tif (house->getPayRentWarnings() < 7) {\r\n\t\t\t\tint32_t daysLeft = 7 - house->getPayRentWarnings();\r\n\r\n\t\t\t\tstd::shared_ptr letter = Item::CreateItem(ITEM_LETTER_STAMPED);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e234b31c2303b1a8", + "equalIndicator/v1": "3c95bc7f99e55a170c7ff444f1530dd7f59ef004b6175362cd34cede60f5e251" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 881, + "startColumn": 41, + "charOffset": 28684, + "charLength": 10, + "snippet": { + "text": "getMaxMana" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 879, + "startColumn": 1, + "charOffset": 28571, + "charLength": 197, + "snippet": { + "text": "void Creature::changeMana(int32_t manaChange) {\r\n\tif (manaChange > 0) {\r\n\t\tmana += std::min(manaChange, getMaxMana() - mana);\r\n\t} else {\r\n\t\tmana = std::max(0, mana + manaChange);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75d3222aa2432c06", + "equalIndicator/v1": "3ca165a9967cc059dfbdfc74500908f39fe1310ce39f18298fe028d3778a2626" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 234, + "startColumn": 31, + "charOffset": 5948, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 232, + "startColumn": 1, + "charOffset": 5853, + "charLength": 158, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.hitChance = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f1a7314ffc484f38", + "equalIndicator/v1": "3cae86459cfe72e115680fd1478475bfa231e0d30da7e548b37e86e1e5ae5b7c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 798, + "startColumn": 38, + "charOffset": 28878, + "charLength": 12, + "snippet": { + "text": "fromCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 796, + "startColumn": 1, + "charOffset": 28788, + "charLength": 158, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, toPosition);\r\n\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7487257be3518b82", + "equalIndicator/v1": "3cca1cac21a45552ed86ff710fc93cda447d6c5a16eaea21cb8166ce451cb6df" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1329, + "startColumn": 95, + "charOffset": 39200, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1327, + "startColumn": 1, + "charOffset": 39101, + "charLength": 193, + "snippet": { + "text": "}\r\n\r\nstd::vector> Player::getRewardsFromContainer(std::shared_ptr container) const {\r\n\tstd::vector> rewardItemsVector;\r\n\tif (container) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "675cb78c1591e28b", + "equalIndicator/v1": "3cda93a6176f9ea8c5536a40039ef6bee980a69a4a45604b33328fef5e027246" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 365, + "startColumn": 48, + "charOffset": 9563, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 363, + "startColumn": 1, + "charOffset": 9511, + "charLength": 310, + "snippet": { + "text": "}\r\n\r\nvoid Tile::onAddTileItem(std::shared_ptr item) {\r\n\tif ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) {\r\n\t\tauto it = g_game().browseFields.find(static_self_cast());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "374205e66337ef2e", + "equalIndicator/v1": "3ce7c003b2596c7eb8d20de2eb5869486e41e7c38a153da0ac42be0047108b17" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 514, + "startColumn": 49, + "charOffset": 16904, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 512, + "startColumn": 1, + "charOffset": 16851, + "charLength": 315, + "snippet": { + "text": "}\r\n\r\nbool Action::executeUse(std::shared_ptr player, std::shared_ptr item, const Position &fromPosition, std::shared_ptr target, const Position &toPosition, bool isHotkey) {\r\n\t// onUse(player, item, fromPosition, target, toPosition, isHotkey)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f91ade895e1c56a7", + "equalIndicator/v1": "3cec7ec8aee9a2c3a342369200a904346b0e1fc62df30c3dee3a36cd87e4a211" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 142, + "startColumn": 25, + "charOffset": 4573, + "charLength": 4, + "snippet": { + "text": "rune" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 140, + "startColumn": 1, + "charOffset": 4508, + "charLength": 168, + "snippet": { + "text": "\t\t\t\tiType.name = rune->getName();\r\n\t\t\t}\r\n\t\t\tiType.runeMagLevel = rune->getMagicLevel();\r\n\t\t\tiType.runeLevel = rune->getLevel();\r\n\t\t\tiType.charges = rune->getCharges();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e101facb128e28d7", + "equalIndicator/v1": "3d07227d3fda1feb6a4b071843d916627012c1386d47a1a5f149f91c2814e759" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 201, + "startColumn": 27, + "charOffset": 7318, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 199, + "startColumn": 1, + "charOffset": 7286, + "charLength": 121, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.npcOnSpawn, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a65b7a884ce835a0", + "equalIndicator/v1": "3d12d7553663327b03310fd9674ffe0b6cd081f2db56972828280e83776ca740" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 21, + "charOffset": 590, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 565, + "charLength": 200, + "snippet": { + "text": "}\r\n\r\nReturnValue Reward::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t, std::shared_ptr actor /* = nullptr*/) {\r\n\tif (actor) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d5230716367a8d8b", + "equalIndicator/v1": "3d27dbf34411c047da24de5a1dc86c646277c70852b7df1aafa952c8920a6113" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3105, + "startColumn": 48, + "charOffset": 93217, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3103, + "startColumn": 1, + "charOffset": 93165, + "charLength": 149, + "snippet": { + "text": "}\r\n\r\nbool Player::hasCapacity(std::shared_ptr item, uint32_t count) const {\r\n\tif (hasFlag(PlayerFlags_t::CannotPickupItem)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fd5338683ba881e4", + "equalIndicator/v1": "3d50ce3c66cb5893f7245793c46272ea8f4ebb4979b7058a27c1058cc65c73cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 407, + "startColumn": 27, + "charOffset": 12433, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 405, + "startColumn": 1, + "charOffset": 12311, + "charLength": 176, + "snippet": { + "text": "\tif (it.isFluidContainer() || it.isSplash()) {\r\n\t\tsetAttribute(ItemAttribute_t::FLUIDTYPE, n);\r\n\t} else if (it.stackable) {\r\n\t\tsetItemCount(n);\r\n\t} else if (it.charges != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7af9e671944377cd", + "equalIndicator/v1": "3d5260a101e34606f0ac26d3075b51e814e592d714fedf839d047404e0ffee27" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 375, + "startColumn": 63, + "charOffset": 14949, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 373, + "startColumn": 1, + "charOffset": 14882, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerKills(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d59e156357ecfe17", + "equalIndicator/v1": "3d7773c65c5ffd1d09f1194291e2f3b5f3bcafb78e13fc3ec33dbfd57026d4ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3121, + "startColumn": 21, + "charOffset": 93659, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3119, + "startColumn": 1, + "charOffset": 93634, + "charLength": 221, + "snippet": { + "text": "}\r\n\r\nReturnValue Player::queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr) {\r\n\tstd::shared_ptr item = thing->getItem();\r\n\tif (item == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5482d7758a703331", + "equalIndicator/v1": "3d832514ea962c6f9f9f7c5cf4ba5cf663bf0aa16af9592dc0218c290dfdbfc3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 583, + "startColumn": 67, + "charOffset": 22272, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 581, + "startColumn": 1, + "charOffset": 22201, + "charLength": 182, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerPreyClass(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c8c4401dd7d37f10", + "equalIndicator/v1": "3d98cf804f88958f544dbfb33fa01c283d51cb2867ce1647eb8fbc5ac5317f66" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9793, + "startColumn": 43, + "charOffset": 342799, + "charLength": 3, + "snippet": { + "text": "npc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9791, + "startColumn": 1, + "charOffset": 342752, + "charLength": 85, + "snippet": { + "text": "}\r\n\r\nvoid Game::removeNpc(std::shared_ptr npc) {\r\n\tnpcs.erase(npc->getID());\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "962f0acda8125d89", + "equalIndicator/v1": "3da605df30fef5e4c462969297c59f1d04fce2baa19e450b80e94cca58e0dac6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 112, + "startColumn": 35, + "charOffset": 3537, + "charLength": 10, + "snippet": { + "text": "loadPrefix" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 110, + "startColumn": 1, + "charOffset": 3355, + "charLength": 242, + "snippet": { + "text": "\tvirtual std::optional load(const std::string &key) = 0;\r\n\tvirtual bool save(const std::string &key, const ValueWrapper &value) = 0;\r\n\tvirtual std::vector loadPrefix(const std::string &prefix = \"\") = 0;\r\n\r\nprivate:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e60946919aa430a3", + "equalIndicator/v1": "3db2caf55e99c570d779ce717068fec36efcfb40b87d0210d19babbe424a7be8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3693, + "startColumn": 18, + "charOffset": 110682, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3691, + "startColumn": 1, + "charOffset": 110660, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nuint32_t Player::getItemTypeCount(uint16_t itemId, int32_t subType /*= -1*/) const {\r\n\tuint32_t count = 0;\r\n\tfor (int32_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; i++) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75a9c725c4b138cb", + "equalIndicator/v1": "3db9418b5ad7a8a5cf7fc0c25a0016bbe8fdc5a1bfa0aceac22d76dbf6bb6092" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified variable 'realPath' is copy-constructed from a const reference; consider making it a const reference", + "markdown": "The const qualified variable 'realPath' is copy-constructed from a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/scripts.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 75, + "startColumn": 14, + "charOffset": 2730, + "charLength": 8, + "snippet": { + "text": "realPath" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 73, + "startColumn": 1, + "charOffset": 2588, + "charLength": 279, + "snippet": { + "text": "\tfor (const auto &entry : std::filesystem::recursive_directory_iterator(dir)) {\r\n\t\t// Get the filename of the entry as a string\r\n\t\tconst auto realPath = entry.path();\r\n\t\tstd::string fileFolder = realPath.parent_path().filename().string();\r\n\t\t// Script folder, example: \"actions\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "44ee16e04b2590b5", + "equalIndicator/v1": "3dc4e1ea590f2a6d35a6ac4a20292dc1dd71b9ef1e7f9a097f16e2988b5ef33c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6891, + "startColumn": 80, + "charOffset": 215752, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6889, + "startColumn": 1, + "charOffset": 215668, + "charLength": 167, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendTextWindow(uint32_t windowTextId, std::shared_ptr item, uint16_t maxlen, bool canWrite) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0x96);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ac20ca7ff9214142", + "equalIndicator/v1": "3dde9da93d96fd95dd20b4b776096f0b5b1a256a0189ddc5171285a0019afa52" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1393, + "startColumn": 55, + "charOffset": 55116, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1391, + "startColumn": 1, + "charOffset": 55057, + "charLength": 264, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerMoveCreature(std::shared_ptr player, std::shared_ptr movingCreature, const Position &movingCreatureOrigPos, std::shared_ptr toTile) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!player->canDoAction()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e35bd27937a2adf1", + "equalIndicator/v1": "3e0db3bbed9334b1289df8cff97cf25aa819097999c2748d0053cfe171a13f86" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 40, + "startColumn": 7, + "charOffset": 1713, + "charLength": 11, + "snippet": { + "text": "removeThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 38, + "startColumn": 1, + "charOffset": 1629, + "charLength": 307, + "snippet": { + "text": "\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override;\r\n\r\n\tvoid removeThing(std::shared_ptr thing, uint32_t count) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "19a8662b1580dd01", + "equalIndicator/v1": "3e1e9386a170630c7d9bef3e9d098f65917e31731afcef7b7681581d08180b7d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2531, + "startColumn": 35, + "charOffset": 75545, + "charLength": 7, + "snippet": { + "text": "manaMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2529, + "startColumn": 1, + "charOffset": 75361, + "charLength": 312, + "snippet": { + "text": "\t\t\tconst auto &noneVocation = g_vocations().getVocation(VOCATION_NONE);\r\n\t\t\thealthMax = std::max(0, healthMax - noneVocation->getHPGain());\r\n\t\t\tmanaMax = std::max(0, manaMax - noneVocation->getManaGain());\r\n\t\t\tcapacity = std::max(0, capacity - noneVocation->getCapGain());\r\n\t\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2a6fb4fa13bd0ce9", + "equalIndicator/v1": "3e3b6da74ec4266f67afe2916231097a1fc63295d3c1dd57f08e5d2379d955a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'combatChangeHealth' is within a recursive call chain", + "markdown": "Function 'combatChangeHealth' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6945, + "startColumn": 12, + "charOffset": 241319, + "charLength": 18, + "snippet": { + "text": "combatChangeHealth" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6943, + "startColumn": 1, + "charOffset": 241303, + "charLength": 231, + "snippet": { + "text": "}\r\n\r\nbool Game::combatChangeHealth(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage, bool isEvent /*= false*/) {\r\n\tusing namespace std;\r\n\tconst Position &targetPos = target->getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "21020065985204f5", + "equalIndicator/v1": "3e494e2b885d1c51049b7700af051723853a0d63b801f4fd80503e19aaeb8777" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2834, + "startColumn": 36, + "charOffset": 84686, + "charLength": 7, + "snippet": { + "text": "manaMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2832, + "startColumn": 1, + "charOffset": 84563, + "charLength": 238, + "snippet": { + "text": "\t\t\t\t--level;\r\n\t\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r\n\t\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\r\n\t\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "73120a62e350c272", + "equalIndicator/v1": "3e58bff6aadca36033eeb65ffe81e916268dc70623f8e1ae07d8c45c4d2ab84d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5770, + "startColumn": 27, + "charOffset": 170386, + "charLength": 8, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5768, + "startColumn": 1, + "charOffset": 170199, + "charLength": 301, + "snippet": { + "text": "\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\r\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\r\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);\r\n\t\tuint8_t skullDuration = 0;\r\n\t\tif (skullTicks != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e215d414c99678f7", + "equalIndicator/v1": "3e5ca81c469e0002561f48ff4c9e43134f8740fcce22e33d524ba27aa1c20984" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'newCombat' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'newCombat' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 263, + "startColumn": 56, + "charOffset": 7748, + "charLength": 9, + "snippet": { + "text": "newCombat" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 261, + "startColumn": 1, + "charOffset": 7688, + "charLength": 183, + "snippet": { + "text": "}\r\n\r\nCombatSpell::CombatSpell(const std::shared_ptr newCombat, bool newNeedTarget, bool newNeedDirection) :\r\n\tScript(&g_spells().getScriptInterface()),\r\n\tm_combat(newCombat),\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59ceea0a3c73da9f", + "equalIndicator/v1": "3e5fd6f52006ea3e2dcc84c09deb749e9defc2d6628f8e3d9f8b6b6451040e7e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 798, + "startColumn": 26, + "charOffset": 36761, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 796, + "startColumn": 1, + "charOffset": 36558, + "charLength": 370, + "snippet": { + "text": "// SLOT_PURPLE_BOTTOM_75 = 28\r\nvoid IOWheel::slotPurpleBottom75(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\tif (isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_PURPLE_BOTTOM_75)) {\r\n\t\tbonusData.leech.manaLeech += MANA_LEECH_INCREASE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d3bddff9da377e2e", + "equalIndicator/v1": "3e67b670078e2ba9cfc86d87df4e829ee91c238176268306ce59d2a56b77690b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1309, + "startColumn": 98, + "charOffset": 46533, + "charLength": 6, + "snippet": { + "text": "corpse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1307, + "startColumn": 1, + "charOffset": 46422, + "charLength": 191, + "snippet": { + "text": "\r\n// Monster\r\nvoid Events::eventMonsterOnDropLoot(std::shared_ptr monster, std::shared_ptr corpse) {\r\n\t// Monster:onDropLoot(corpse)\r\n\tif (info.monsterOnDropLoot == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c120e7a01fc2c600", + "equalIndicator/v1": "3e6bbd867d1728143a732bf5a41fe329184a05ff88f21c5a3aae67146a47e2b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 457, + "startColumn": 59, + "charOffset": 13604, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 455, + "startColumn": 1, + "charOffset": 13541, + "charLength": 123, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::StepOutField(std::shared_ptr, std::shared_ptr, const Position &) {\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c7bb62315d7556db", + "equalIndicator/v1": "3e6be90b03d97a6d07ffa89e2a7eee0f41a2d1e69b2a489e1d74eafe1cb9ecaa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Tree, std::less, std::allocator>>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Tree, std::less, std::allocator\\>\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 253, + "startColumn": 13, + "charOffset": 7764, + "charLength": 6, + "snippet": { + "text": "houses" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 251, + "startColumn": 1, + "charOffset": 7677, + "charLength": 171, + "snippet": { + "text": "int GameFunctions::luaGameGetHouses(lua_State* L) {\r\n\t// Game.getHouses()\r\n\tconst auto houses = g_game().map.houses.getHouses();\r\n\tlua_createtable(L, houses.size(), 0);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f58e43111add61be", + "equalIndicator/v1": "3e78cb3d824455714c8f81fa7e5efbfefcbc32c3bcae302f0b6e418e586b5f7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 124, + "startColumn": 2, + "charOffset": 3848, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 122, + "startColumn": 1, + "charOffset": 3788, + "charLength": 168, + "snippet": { + "text": "\tuint32_t precachedControlSum[32][2];\r\n\tuint32_t sum = 0;\r\n\tfor (int32_t i = 0; i < 32; ++i) {\r\n\t\tprecachedControlSum[i][0] = (sum + newKey[sum & 3]);\r\n\t\tsum -= delta;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6c145cc0fa9774b6", + "equalIndicator/v1": "3e7937e5c01a4373bc44b08592088486819b70f2b7de722ec5427efaf7215f50" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 334, + "startColumn": 8, + "charOffset": 8311, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 332, + "startColumn": 1, + "charOffset": 8253, + "charLength": 152, + "snippet": { + "text": "\tuint16_t count = getNumber(L, 2, 1);\r\n\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (!itemType) {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "51d46fcc64f36852", + "equalIndicator/v1": "3ecc99b05245099b5695e05ae1474a2a20789eb74dadc0f154186a106bc2ce53" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6804, + "startColumn": 155, + "charOffset": 235276, + "charLength": 13, + "snippet": { + "text": "targetMonster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6802, + "startColumn": 1, + "charOffset": 235117, + "charLength": 251, + "snippet": { + "text": "}\r\n\r\nvoid Game::notifySpectators(const CreatureVector &spectators, const Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetMonster) {\r\n\tif (!spectators.empty()) {\r\n\t\tfor (const auto &spectator : spectators) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ce7513af86f431f1", + "equalIndicator/v1": "3ed787311e5d57495d7ed0a416941a6573c0bacd77cdd86940364bd212f845a6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 633, + "startColumn": 2, + "charOffset": 14831, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 631, + "startColumn": 1, + "charOffset": 14824, + "charLength": 172, + "snippet": { + "text": "\t}\r\n\r\n\tuint32_t flags = getNumber(L, 3, 0);\r\n\tReturnValue ret = g_game().internalAddItem(tile, item, INDEX_WHEREEVER, flags);\r\n\tif (ret == RETURNVALUE_NOERROR) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2bbdb05890a87831", + "equalIndicator/v1": "3ef2adf0b0a26e8ff2015b907ff724799cdce03b2062ed4e9167f10d18a21dcc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 708, + "startColumn": 4, + "charOffset": 33826, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 706, + "startColumn": 1, + "charOffset": 33708, + "charLength": 228, + "snippet": { + "text": "\t\t\tstd::list damageList;\r\n\t\t\tConditionDamage::generateDamageList(combatDamage, combatStart, damageList);\r\n\t\t\tfor (int32_t damageValue : damageList) {\r\n\t\t\t\tconditionDamage->addDamage(1, combatTicks, -damageValue);\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "97b95824ef9cde7e", + "equalIndicator/v1": "3f2321a10d85447d76965686c4a3a0b52af659c267b73ce39cada8a739ce2c37" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'task' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'task' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2129, + "startColumn": 13, + "charOffset": 62733, + "charLength": 4, + "snippet": { + "text": "task" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2127, + "startColumn": 1, + "charOffset": 62715, + "charLength": 29, + "snippet": { + "text": "\t}\r\n\r\n\twalkTask = task;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "33e1ae84f6921747", + "equalIndicator/v1": "3f2cd65364f16b8ed464681f0793be60addc8bd2dd6858ba061f2aed76b3555f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3974, + "startColumn": 82, + "charOffset": 119744, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3972, + "startColumn": 1, + "charOffset": 119609, + "charLength": 192, + "snippet": { + "text": "\r\nvoid Player::updateDamageReductionFromItemAbility(\r\n\tstd::array &combatReductionArray, std::shared_ptr item, uint16_t combatTypeIndex\r\n) const {\r\n\tif (!item) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "731f6a608ed9da93", + "equalIndicator/v1": "3f32dd418254e98f8173de2f758f1c37b72604f2f38884334cf1dd4f788479b8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 810, + "startColumn": 7, + "charOffset": 29173, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 808, + "startColumn": 1, + "charOffset": 29161, + "charLength": 142, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnChangeZone - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4cd3a35469ccb9be", + "equalIndicator/v1": "3f42e3daa1a9b19edd15c185cb71aa29fc8611ac6c8f3a5d648ebc3586975677" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4899, + "startColumn": 55, + "charOffset": 175156, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4897, + "startColumn": 1, + "charOffset": 175097, + "charLength": 332, + "snippet": { + "text": "}\r\n\r\nbool Game::internalStartTrade(std::shared_ptr player, std::shared_ptr tradePartner, std::shared_ptr tradeItem) {\r\n\tif (player->tradeState != TRADE_NONE && !(player->tradeState == TRADE_ACKNOWLEDGE && player->tradePartner == tradePartner)) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREALREADYTRADING);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4690968e3f9bb6e7", + "equalIndicator/v1": "3fad4846d8a7fac9e44b6f19417a22261db70258d087eab9d85263ef2b08a9eb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'itemDict' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'itemDict' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3716, + "startColumn": 48, + "charOffset": 111340, + "charLength": 8, + "snippet": { + "text": "itemDict" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3714, + "startColumn": 1, + "charOffset": 111288, + "charLength": 154, + "snippet": { + "text": "}\r\n\r\nvoid Player::stashContainer(StashContainerList itemDict) {\r\n\tStashItemList stashItemDict; // ItemID - Count\r\n\tfor (const auto &it_dict : itemDict) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "52a94ed60b283225", + "equalIndicator/v1": "3fd54b7d899c273041ec1ad0dee1c1c904312470e4691ca3556525f9947c8acc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 57, + "charOffset": 1000, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 895, + "charLength": 220, + "snippet": { + "text": "#include \"lua/callbacks/events_callbacks.hpp\"\r\n\r\nint32_t Combat::getLevelFormula(std::shared_ptr player, const std::shared_ptr wheelSpell, const CombatDamage &damage) const {\r\n\tif (!player) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c833d3cbf4778cb", + "equalIndicator/v1": "4036e47e24b77737ede628033db84e6b9855e3ff3bd1fdef9c14dd3821d9a610" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5335, + "startColumn": 40, + "charOffset": 157558, + "charLength": 20, + "snippet": { + "text": "getLoyaltyMagicLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5333, + "startColumn": 1, + "charOffset": 157475, + "charLength": 243, + "snippet": { + "text": "\r\nuint32_t Player::getMagicLevel() const {\r\n\tuint32_t magic = std::max(0, getLoyaltyMagicLevel() + varStats[STAT_MAGICPOINTS]);\r\n\t// Wheel of destiny magic bonus\r\n\tmagic += m_wheelPlayer->getStat(WheelStat_t::MAGIC); // Regular bonus\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "003f9d639a0decfc", + "equalIndicator/v1": "4043e3b6034f016ce8e4121499e134ed0f62097e32d67cc6f9168addad0a199a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getCallback' can be made const", + "markdown": "Method 'getCallback' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 543, + "startColumn": 19, + "charOffset": 17407, + "charLength": 11, + "snippet": { + "text": "getCallback" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 541, + "startColumn": 1, + "charOffset": 17384, + "charLength": 115, + "snippet": { + "text": "}\r\n\r\nCallBack* Combat::getCallback(CallBackParam_t key) {\r\n\tswitch (key) {\r\n\t\tcase CALLBACK_PARAM_LEVELMAGICVALUE:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "53b0dd1e2831790e", + "equalIndicator/v1": "4054bc07a1314e2efbd18d2a1812e4b5acda9a5a33cc4db9592de8fb7b10d8a8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1032, + "startColumn": 31, + "charOffset": 29889, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1030, + "startColumn": 1, + "charOffset": 29772, + "charLength": 137, + "snippet": { + "text": "\tvoid sendCreatureEmblem(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureEmblem(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b55b32df9bc012cb", + "equalIndicator/v1": "405e23c03519193774a09f71a24ccddf6f1355d0c6662011c492f1abe2dbc9f3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 703, + "startColumn": 93, + "charOffset": 25107, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 701, + "startColumn": 1, + "charOffset": 25010, + "charLength": 166, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) {\r\n\t// Player:onMove()\r\n\tif (info.playerOnRemoveCount == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a56f9f269be8f1b0", + "equalIndicator/v1": "407bdcbb702a7ec9fec90bc6b12c9b6258d81a713de1509218666f9256818557" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 569, + "startColumn": 91, + "charOffset": 18041, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 567, + "startColumn": 1, + "charOffset": 17946, + "charLength": 236, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatHealthFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\r\n\tif (!data) {\r\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3260be18472be01c", + "equalIndicator/v1": "408f0ba41e0426fc07540bfc8b4f75eb98c041b76590dcf63b0cf5fd2499f24f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1766, + "startColumn": 103, + "charOffset": 61618, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1764, + "startColumn": 1, + "charOffset": 61511, + "charLength": 206, + "snippet": { + "text": "}\r\n\r\nbool ChainPickerCallback::onChainCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\t// onChainCombat(creature, target)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9f287db82dfa8c61", + "equalIndicator/v1": "40b3b22320b4e530d820aa31dfd4db2130f79b553d0a0959c673327f7bd9a369" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "String concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead", + "markdown": "String concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 45, + "startColumn": 33, + "charOffset": 1501, + "charLength": 44, + "snippet": { + "text": "coreFolder + \"/events/scripts/\" + scriptName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 43, + "startColumn": 1, + "charOffset": 1332, + "charLength": 375, + "snippet": { + "text": "\t\t\tconst std::string &scriptName = lowercase + \".lua\";\r\n\t\t\tauto coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__);\r\n\t\t\tif (scriptInterface.loadFile(coreFolder + \"/events/scripts/\" + scriptName, scriptName) != 0) {\r\n\t\t\t\tg_logger().warn(\"{} - Can not load script: {}.lua\", __FUNCTION__, lowercase);\r\n\t\t\t\tg_logger().warn(scriptInterface.getLastLuaError());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b7589741483e540", + "equalIndicator/v1": "40c00c840292cf8fa3ef4c22b54cf6afaeed2caff89357049763964c9be86d6a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 292, + "startColumn": 8, + "charOffset": 9502, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 290, + "startColumn": 1, + "charOffset": 9374, + "charLength": 300, + "snippet": { + "text": "\t\t// onCreatureSay(self, creature, type, message)\r\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\r\n\t\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\t\tg_logger().error(\"Monster {} creature {}] Call stack overflow. Too many lua \"\r\n\t\t\t \"script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ae8e4675eec743e0", + "equalIndicator/v1": "40c958637579a5261c35a35957d3f405d2c1fe520416a0833832d8eb5df9fb15" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3054, + "startColumn": 2, + "charOffset": 93109, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3052, + "startColumn": 1, + "charOffset": 93044, + "charLength": 168, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseInviteToParty(NetworkMessage &msg) {\r\n\tuint32_t targetId = msg.get();\r\n\tg_game().playerInviteToParty(player->getID(), targetId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "89fc36f1e45c5dbe", + "equalIndicator/v1": "40e08aa56a38f247ec8c53667696f03c209d65b88a7e249ab8e0743e7aed5c9b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 911, + "startColumn": 27, + "charOffset": 33004, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 909, + "startColumn": 1, + "charOffset": 32972, + "charLength": 128, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnReportBug, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1cc7c37fe4dc7557", + "equalIndicator/v1": "4102e4a1fdae5840d81598edec124e535278f1961cb2cbbd43e7f6938a786242" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 823, + "startColumn": 15, + "charOffset": 25069, + "charLength": 5, + "snippet": { + "text": "death" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 821, + "startColumn": 1, + "charOffset": 24959, + "charLength": 448, + "snippet": { + "text": "\t}\r\n\tvirtual void getPathSearchParams(const std::shared_ptr &, FindPathParams &fpp);\r\n\tvirtual void death(std::shared_ptr) { }\r\n\tvirtual bool dropCorpse(std::shared_ptr lastHitCreature, std::shared_ptr mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified);\r\n\tvirtual std::shared_ptr getCorpse(std::shared_ptr lastHitCreature, std::shared_ptr mostDamageCreature);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc81072fa820e771", + "equalIndicator/v1": "410eb464be9bb1a6f9a866472379798f411fa19c039f656a521ff5786919d608" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 33, + "startColumn": 8, + "charOffset": 979, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 31, + "startColumn": 1, + "charOffset": 887, + "charLength": 205, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsCorpse(lua_State* L) {\r\n\t// itemType:isCorpse()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isCorpse);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5df427df7e52a811", + "equalIndicator/v1": "4114c37858b2cf720e0471936cac06c6efc4ebc5d2954941a69a6677dd756817" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 231, + "startColumn": 8, + "charOffset": 5757, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 229, + "startColumn": 1, + "charOffset": 5671, + "charLength": 196, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetId(lua_State* L) {\r\n\t// itemType:getId()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->id);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2a7e7ca37500f80b", + "equalIndicator/v1": "411de6a2e960975f68cea156ade5cf18d36c2f09e0efc73d3f483e19c5644592" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'short' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'short' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 268, + "startColumn": 56, + "charOffset": 9391, + "charLength": 7, + "snippet": { + "text": "percent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 266, + "startColumn": 1, + "charOffset": 9292, + "charLength": 232, + "snippet": { + "text": "\r\n\t\t\t\t\t\timbuement.combatType = combatType;\r\n\t\t\t\t\t\timbuement.elementDamage = std::min(100, percent);\r\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"reduction\") == 0) {\r\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"combat\"))) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d3d8f11b9af397ff", + "equalIndicator/v1": "4132fbee87f429e884eeaa632cdcad5b21510fb45e29775ae1a3310ee69c9bf6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 500, + "startColumn": 41, + "charOffset": 19002, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 498, + "startColumn": 1, + "charOffset": 18956, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1ec04c02d2a60a6c", + "equalIndicator/v1": "4152eeb54663a8a7de1a6239d5151cc44c23db711c1e226e2baa0d22eac4aa5a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Nested namespaces can be concatenated", + "markdown": "Nested namespaces can be concatenated" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 30, + "startColumn": 1, + "charOffset": 1044, + "charLength": 9, + "snippet": { + "text": "namespace" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 28, + "startColumn": 1, + "charOffset": 999, + "charLength": 114, + "snippet": { + "text": "\r\n// Forward declaration for protobuf class\r\nnamespace Canary {\r\n\tnamespace protobuf {\r\n\t\tnamespace appearances {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "12072fad1c06efbb", + "equalIndicator/v1": "415396496f51d42ee5fc4085fea72c4a6eb3283d3be4c318874b1b152b3dc6b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 63, + "startColumn": 62, + "charOffset": 2402, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 61, + "startColumn": 1, + "charOffset": 2117, + "charLength": 376, + "snippet": { + "text": "\tvoid sendBuyCharmRune(std::shared_ptr player, charmRune_t runeID, uint8_t action, uint16_t raceid);\r\n\tvoid setCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm, uint16_t raceid);\r\n\tvoid resetCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm);\r\n\r\n\tint8_t calculateDifficult(uint32_t chance) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e3f92236c89219fa", + "equalIndicator/v1": "4153bfa9cbe6a8c6b720e723ffec33b10017c90727f5c5d91d178807e59c2597" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9321, + "startColumn": 62, + "charOffset": 325814, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9319, + "startColumn": 1, + "charOffset": 325748, + "charLength": 104, + "snippet": { + "text": "}\r\n\r\nvoid Game::sendOfflineTrainingDialog(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "02feb816b624359c", + "equalIndicator/v1": "415905b5aa8aabf34369661760c5960505f034e301775c99816eacc9ba0f10bd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 504, + "startColumn": 8, + "charOffset": 12474, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 502, + "startColumn": 1, + "charOffset": 12356, + "charLength": 244, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetTransformDeEquipId(lua_State* L) {\r\n\t// itemType:getTransformDeEquipId()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->transformDeEquipTo);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "41a8839d2f167460", + "equalIndicator/v1": "4164d9c4beb553abce49f526a2fef57efb441ed147c5496673deb404bf063c0c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2416, + "startColumn": 3, + "charOffset": 75208, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2414, + "startColumn": 1, + "charOffset": 75168, + "charLength": 191, + "snippet": { + "text": "\r\n\t\tnewmsg.addByte(elements.size());\r\n\t\tfor (auto it = std::begin(elements), end = std::end(elements); it != end; it++) {\r\n\t\t\tnewmsg.addByte(it->first);\r\n\t\t\tnewmsg.add(it->second);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "451d46bb2e28b957", + "equalIndicator/v1": "417cfbdeb1c0db6baf06c3b8728a699284bdf088ef5a23025ff20737f779e87a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 332, + "startColumn": 2, + "charOffset": 11901, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 330, + "startColumn": 1, + "charOffset": 11894, + "charLength": 66, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n\treturn returnValue;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1d010418e41f56a1", + "equalIndicator/v1": "419338101ca383260e69b79c6fdf9a9457f6146e9ba56a0fb54bbf5673e74687" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3121, + "startColumn": 2, + "charOffset": 95706, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3119, + "startColumn": 1, + "charOffset": 95637, + "charLength": 174, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseMarketCancelOffer(NetworkMessage &msg) {\r\n\tuint32_t timestamp = msg.get();\r\n\tuint16_t counter = msg.get();\r\n\tif (counter > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d91fc8a5cba5fc02", + "equalIndicator/v1": "41aba64e0618d172dbac64bbab0d600859583747246f9376eec0b59865b28390" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1834, + "startColumn": 59, + "charOffset": 49447, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1832, + "startColumn": 1, + "charOffset": 49384, + "charLength": 184, + "snippet": { + "text": "}\r\n\r\nbool ConditionFeared::canWalkTo(std::shared_ptr creature, Position pos, Direction moveDirection) const {\r\n\tpos = getNextPosition(moveDirection, pos);\r\n\tif (!creature) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ae363c3bdb949aee", + "equalIndicator/v1": "41b1fc0002f286a5edc6468c67028dc589d0e4f7bab3bdece8f761cfbb52135d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 125, + "startColumn": 70, + "charOffset": 3787, + "charLength": 6, + "snippet": { + "text": "action" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 123, + "startColumn": 1, + "charOffset": 3713, + "charLength": 170, + "snippet": { + "text": "}\r\n\r\nbool Actions::registerLuaPositionEvent(const std::shared_ptr action) {\r\n\tauto positionVector = action->getPositionsVector();\r\n\tif (positionVector.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a8cb9a0f78254949", + "equalIndicator/v1": "41cd61a3eb266e1c12a7e4c63fc32db4cffd8642cc3bcc6b596a919ee75b4c94" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 886, + "startColumn": 58, + "charOffset": 28718, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 884, + "startColumn": 1, + "charOffset": 28656, + "charLength": 270, + "snippet": { + "text": "}\r\n\r\nvoid Combat::postCombatEffects(std::shared_ptr caster, const Position &origin, const Position &pos, const CombatParams ¶ms) {\r\n\tif (caster && params.distanceEffect != CONST_ANI_NONE) {\r\n\t\taddDistanceEffect(caster, origin, pos, params.distanceEffect);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "92e6518c7220aaeb", + "equalIndicator/v1": "41dbe6a1b9662ae51bc37c61c62fc0d009fa4c27376a7baed7c3d1b72d310a57" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 611, + "startColumn": 41, + "charOffset": 23541, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 609, + "startColumn": 1, + "charOffset": 23495, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "26ff33a21f5f67a1", + "equalIndicator/v1": "41ea107453be376b9e84ba3849ab9848742ac2748f67d82c5eae50716de08b4e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3131, + "startColumn": 67, + "charOffset": 116609, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3129, + "startColumn": 1, + "charOffset": 116538, + "charLength": 231, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::collectRewardChestItems(std::shared_ptr player, uint32_t maxMoveItems /* = 0*/) {\r\n\t// Check if have item on player reward chest\r\n\tstd::shared_ptr rewardChest = player->getRewardChest();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "df688f2841f53b56", + "equalIndicator/v1": "41ebbcaaae524e92d03cadd4d1af88af098b73d05dbe189b82563012e222597c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 193, + "startColumn": 15, + "charOffset": 7776, + "charLength": 8, + "snippet": { + "text": "addThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 191, + "startColumn": 1, + "charOffset": 7699, + "charLength": 291, + "snippet": { + "text": "\r\n\tvirtual void addThing(std::shared_ptr) override { }\r\n\tvirtual void addThing(int32_t, std::shared_ptr) override { }\r\n\tvirtual void updateThing(std::shared_ptr, uint16_t, uint32_t) override { }\r\n\tvirtual void replaceThing(uint32_t, std::shared_ptr) override { }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f2b0c6d60c7371fd", + "equalIndicator/v1": "41ee6f43316def89e81044f0662a25c46c768c8d56a28b37f8af668ebb462288" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7537, + "startColumn": 79, + "charOffset": 235741, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7535, + "startColumn": 1, + "charOffset": 235625, + "charLength": 273, + "snippet": { + "text": "\r\n////////////// Add common messages\r\nvoid ProtocolGame::AddCreature(NetworkMessage &msg, std::shared_ptr creature, bool known, uint32_t remove) {\r\n\tCreatureType_t creatureType = creature->getType();\r\n\tstd::shared_ptr otherPlayer = creature->getPlayer();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "21fcd8037bbfe189", + "equalIndicator/v1": "41fb895486b1d3dbf3973aa5f934c2c5b762107deae62fad9f2179fc75bcacf2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 317, + "startColumn": 10, + "charOffset": 8704, + "charLength": 15, + "snippet": { + "text": "getWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 315, + "startColumn": 1, + "charOffset": 8566, + "charLength": 474, + "snippet": { + "text": "\tbool useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const override;\r\n\r\n\tint32_t getWeaponDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, bool maxDamage = false) const override;\r\n\tint32_t getElementDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const override;\r\n\tCombatType_t getElementType() const override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "58bbb0d6936792dd", + "equalIndicator/v1": "420e12b415f12a0126d0676b01a88ef5b8c176d8aa9005424f0944cf6d824fe3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'healer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'healer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 887, + "startColumn": 53, + "charOffset": 28830, + "charLength": 6, + "snippet": { + "text": "healer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 885, + "startColumn": 1, + "charOffset": 28773, + "charLength": 131, + "snippet": { + "text": "}\r\n\r\nvoid Creature::gainHealth(std::shared_ptr healer, int32_t healthGain) {\r\n\tchangeHealth(healthGain);\r\n\tif (healer) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c35e9de55c2247e2", + "equalIndicator/v1": "42361825b63ab5eb2dca2358075b216cf5016698e2fb16556d8d797248a01b0c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 504, + "startColumn": 21, + "charOffset": 27243, + "charLength": 29, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 502, + "startColumn": 1, + "charOffset": 27050, + "charLength": 357, + "snippet": { + "text": "\tvoid addCreatureHealth(const std::shared_ptr target);\r\n\tstatic void addCreatureHealth(const CreatureVector &spectators, const std::shared_ptr target);\r\n\tvoid addPlayerMana(const std::shared_ptr target);\r\n\tvoid addPlayerVocation(const std::shared_ptr target);\r\n\tvoid addMagicEffect(const Position &pos, uint16_t effect);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cd31d6e8cb9a20bb", + "equalIndicator/v1": "42637a6867dbf156da62122918614138e371185ed173d81150d74523f1985246" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 565, + "startColumn": 42, + "charOffset": 18417, + "charLength": 27, + "snippet": { + "text": "Weapons::getMaxWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 563, + "startColumn": 1, + "charOffset": 18335, + "charLength": 246, + "snippet": { + "text": "\tuint32_t level = player->getLevel();\r\n\r\n\tint32_t maxValue = static_cast(Weapons::getMaxWeaponDamage(level, attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\r\n\r\n\tint32_t minValue = level / 5;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6c0549890e26ba7a", + "equalIndicator/v1": "429fa8a22dafc18570152b360771ef4c31a818109e0d68c74722f8e1b18dcb19" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6845, + "startColumn": 28, + "charOffset": 236961, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6843, + "startColumn": 1, + "charOffset": 236816, + "charLength": 300, + "snippet": { + "text": "\r\nfloat Game::pvpLevelDifferenceDamageMultiplier(std::shared_ptr attacker, std::shared_ptr target) {\r\n\tint32_t levelDifference = target->getLevel() - attacker->getLevel();\r\n\tlevelDifference = std::abs(levelDifference);\r\n\tbool isLowerLevel = target->getLevel() < attacker->getLevel();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c78b85bd9e210482", + "equalIndicator/v1": "42aaf985ab8b010e14fb8261a4b6d30a35d88b46ee60dfc64cc32441cae24ced" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 619, + "startColumn": 8, + "charOffset": 15278, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 617, + "startColumn": 1, + "charOffset": 15168, + "charLength": 228, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetVocationString(lua_State* L) {\r\n\t// itemType:getVocationString()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushString(L, itemType->vocationString);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3fc6e2d996512d3f", + "equalIndicator/v1": "42be6b8620389977e361d669dc48fdef150c126709a55d3c961673944bfae9b7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1638, + "startColumn": 14, + "charOffset": 41941, + "charLength": 8, + "snippet": { + "text": "itemName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1636, + "startColumn": 1, + "charOffset": 41876, + "charLength": 377, + "snippet": { + "text": "\tstd::vector childShop;\r\n\tShopBlock() :\r\n\t\titemId(0), itemName(\"\"), itemSubType(0), itemBuyPrice(0), itemSellPrice(0), itemStorageKey(0), itemStorageValue(0) { }\r\n\r\n\texplicit ShopBlock(uint16_t newItemId, std::string newName = \"\", int32_t newSubType = 0, uint32_t newBuyPrice = 0, uint32_t newSellPrice = 0, int32_t newStorageKey = 0, int32_t newStorageValue = 0) :\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5f2462a8d727e077", + "equalIndicator/v1": "42efff8effbf0fd5e2563bd86a354f99170884c1f615f3a3d6b079941a223a67" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 66, + "startColumn": 24, + "charOffset": 2517, + "charLength": 34, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 64, + "startColumn": 1, + "charOffset": 2440, + "charLength": 244, + "snippet": { + "text": "\r\n\tint8_t calculateDifficult(uint32_t chance) const;\r\n\tuint8_t getKillStatus(const std::shared_ptr mtype, uint32_t killAmount) const;\r\n\r\n\tuint16_t getBestiaryRaceUnlocked(std::shared_ptr player, BestiaryType_t race) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ab9731a6e00d528", + "equalIndicator/v1": "432cdc95eab390b5c0b7bb3a7f5017ed5b87b5b722cc4fef9da996c285ddaa24" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 72, + "startColumn": 107, + "charOffset": 2349, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 70, + "startColumn": 1, + "charOffset": 2238, + "charLength": 255, + "snippet": { + "text": "}\r\n\r\nReturnValue EventCallback::creatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnAreaCombat - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "979d833fe4afdac2", + "equalIndicator/v1": "43480bd7592e5de77a10b907263f09bee7e75d2f7521d3f7f433272201d470aa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newTile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 290, + "startColumn": 54, + "charOffset": 7630, + "charLength": 7, + "snippet": { + "text": "newTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 288, + "startColumn": 1, + "charOffset": 7572, + "charLength": 226, + "snippet": { + "text": "}\r\n\r\nvoid Creature::updateTileCache(std::shared_ptr newTile, int32_t dx, int32_t dy) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (std::abs(dx) <= maxWalkCacheWidth && std::abs(dy) <= maxWalkCacheHeight) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6bd4309d0f4e826c", + "equalIndicator/v1": "43676b58d28b3add37b6da1201165646c888cdd44c9cdc3ee0d21334e7450f85" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'long long' to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'long long' to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 57, + "startColumn": 44, + "charOffset": 1669, + "charLength": 8, + "snippet": { + "text": "duration" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 55, + "startColumn": 1, + "charOffset": 1541, + "charLength": 199, + "snippet": { + "text": "\t\t\t\tg_dispatcher().stopEvent(eventId);\r\n\t\t\t\teventId = g_dispatcher().scheduleEvent(\r\n\t\t\t\t\tstd::max(SCHEDULER_MINTICKS, duration), [this] { checkDecay(); }, \"Decay::checkDecay\"\r\n\t\t\t\t);\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3396627604aab0ba", + "equalIndicator/v1": "436abb4bcfc3ad1addf86fc43604271766bf1ac90002bcac6264ad98cb60b6a9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 141, + "startColumn": 22, + "charOffset": 3871, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 139, + "startColumn": 1, + "charOffset": 3818, + "charLength": 506, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tvirtual ReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e9421f4031cf4086", + "equalIndicator/v1": "436c4328e8b08711c76be4e4f582c5168730a8e25c465066b405bb4e710ed32a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 357, + "startColumn": 94, + "charOffset": 17098, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 355, + "startColumn": 1, + "charOffset": 16837, + "charLength": 565, + "snippet": { + "text": "\tvoid playerUpdateContainer(uint32_t playerId, uint8_t cid);\r\n\tvoid playerRotateItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerConfigureShowOffSocket(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t podiumVisible, uint8_t direction);\r\n\tvoid playerWrapableItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1a985db0c292fc35", + "equalIndicator/v1": "4393e0d836561ea9da58a28446c1261a37bc7bed4c0a0b08fa5218f0f44547e9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'double' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 584, + "startColumn": 92, + "charOffset": 15863, + "charLength": 6, + "snippet": { + "text": "amount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 582, + "startColumn": 1, + "charOffset": 15766, + "charLength": 199, + "snippet": { + "text": "\t}\r\n\r\n\tconst auto &[_, itemsPurchased, backpacksPurchased] = g_game().createItem(player, itemId, amount, subType, actionId, ignoreCap, inBackpacks ? ITEM_SHOPPING_BAG : 0);\r\n\r\n\tstd::stringstream ss;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e6714af543c8e45", + "equalIndicator/v1": "43a289bbe691521d2d30bf975ba643ec4eeed03e145e92e3213b3a6900627380" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_CRT_SECURE_NO_WARNINGS', which is a reserved identifier", + "markdown": "Declaration uses identifier '_CRT_SECURE_NO_WARNINGS', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 16, + "startColumn": 1, + "charOffset": 459, + "charLength": 7, + "snippet": { + "text": "#ifndef" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 449, + "charLength": 84, + "snippet": { + "text": "#endif\r\n\r\n#ifndef _CRT_SECURE_NO_WARNINGS\r\n\t#define _CRT_SECURE_NO_WARNINGS\r\n#endif\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5d24aa2ac5f37a99", + "equalIndicator/v1": "43c9a3854388f18b674bce795a41388d2e8b8407ef766e1dd0a1c73376436223" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 231, + "startColumn": 11, + "charOffset": 7225, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 229, + "startColumn": 1, + "charOffset": 7122, + "charLength": 253, + "snippet": { + "text": "\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "47db0f95390397f0", + "equalIndicator/v1": "43e850e2fa3a946f16c6a31e827431a82ef4193f92607da927b2a862c61753f2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 31, + "startColumn": 14, + "charOffset": 1137, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 29, + "startColumn": 1, + "charOffset": 817, + "charLength": 614, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b445af53ef44374a", + "equalIndicator/v1": "441e91f6200e76e4174b00def76802cb403da502051e9d501ac6e13e077ae080" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 499, + "startColumn": 62, + "charOffset": 16334, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 497, + "startColumn": 1, + "charOffset": 16247, + "charLength": 187, + "snippet": { + "text": "\tScript(interface) { }\r\n\r\nReturnValue Action::canExecuteAction(std::shared_ptr player, const Position &toPos) {\r\n\tif (!allowFarUse) {\r\n\t\treturn g_actions().canUse(player, toPos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5fdfa36f24f1f4b9", + "equalIndicator/v1": "44359924c116f61018806f96828a58620a0f257ffb06f134d82c4fdbc4f224eb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 836, + "startColumn": 7, + "charOffset": 32044, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 834, + "startColumn": 1, + "charOffset": 31876, + "charLength": 312, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnCombat - \"\r\n\t\t \"Player {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e7d94030d548a872", + "equalIndicator/v1": "4437b4a20c69dbff4d9e84b99aadd1ba920a3f65ff7020ca660f477e33e453fa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 687, + "startColumn": 37, + "charOffset": 22447, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 685, + "startColumn": 1, + "charOffset": 22385, + "charLength": 132, + "snippet": { + "text": "\t\t\t\tcase 1:\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 74) * 1.20f) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "44672b5486bfad55", + "equalIndicator/v1": "443dd37a22687766b6da269c64b04b1259c6c6e8861d261bd39eca4987c634ea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1161, + "startColumn": 10, + "charOffset": 34684, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1159, + "startColumn": 1, + "charOffset": 34668, + "charLength": 64, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tpos -= static_cast(creatures->size());\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d21dfdb26fe80310", + "equalIndicator/v1": "4440f844bb8e6fe66873302d480e1b6dcd092877a45c3d4598544bcc1cfc7db1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1947, + "startColumn": 64, + "charOffset": 56256, + "charLength": 10, + "snippet": { + "text": "toCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1945, + "startColumn": 1, + "charOffset": 56188, + "charLength": 153, + "snippet": { + "text": "}\r\n\r\nSoundEffect_t Item::getMovementSound(std::shared_ptr toCylinder) const {\r\n\tif (!toCylinder) {\r\n\t\treturn SoundEffect_t::ITEM_MOVE_DEFAULT;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f3eae41610451ce8", + "equalIndicator/v1": "4457da6638fb64c5282ad0c91bd4d9d5aaa519bfd6f8a9a9c7061a8f9ac131d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 600, + "startColumn": 123, + "charOffset": 18243, + "charLength": 37, + "snippet": { + "text": "(it.abilities->statsPercent[s] - 100)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 598, + "startColumn": 1, + "charOffset": 18078, + "charLength": 226, + "snippet": { + "text": "\r\n\t\t\tif (it.abilities->statsPercent[s]) {\r\n\t\t\t\tplayer->setVarStats(static_cast(s), static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a445419c6b0189f9", + "equalIndicator/v1": "4489cf3fd0d4add8cb6b8eb1ee1f36b3da384891a95561db9f1dd56ab28ad589" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 700, + "startColumn": 15, + "charOffset": 22827, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 698, + "startColumn": 1, + "charOffset": 22787, + "charLength": 98, + "snippet": { + "text": "\t\t\t\tcase 6:\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tchance = std::min(skill, 90);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3388d19863e5d42e", + "equalIndicator/v1": "4490773aa7ecdaf175b77da502ed861c89570c0cb632dad57f854ba5d43560ab" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 818, + "startColumn": 21, + "charOffset": 24515, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 816, + "startColumn": 1, + "charOffset": 24490, + "charLength": 164, + "snippet": { + "text": "}\r\n\r\nuint32_t Container::getItemTypeCount(uint16_t itemId, int32_t subType /* = -1*/) const {\r\n\tuint32_t count = 0;\r\n\tfor (std::shared_ptr item : itemlist) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "080d670491961f0f", + "equalIndicator/v1": "449668c9864f056268ad54837b6b7f7fca7cc2c188545d47cf215e906fd1b3e7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'mount' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'mount' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 182, + "startColumn": 16, + "charOffset": 4742, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 180, + "startColumn": 1, + "charOffset": 4655, + "charLength": 194, + "snippet": { + "text": "\tbool tameMount(uint8_t mountId);\r\n\tbool untameMount(uint8_t mountId);\r\n\tbool hasMount(const std::shared_ptr mount) const;\r\n\tbool hasAnyMount() const;\r\n\tuint8_t getRandomMountId() const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75ec49ae81059e3a", + "equalIndicator/v1": "449bcbc5e24267be4455ffe09952c7e757cb647169a58bc864a017051199e0e2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 573, + "startColumn": 54, + "charOffset": 17263, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 571, + "startColumn": 1, + "charOffset": 17161, + "charLength": 143, + "snippet": { + "text": "\r\n\t\t\tif (it.abilities->getHealthTicks() != 0) {\r\n\t\t\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, it.abilities->getHealthTicks());\r\n\t\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7a6072e070f73f08", + "equalIndicator/v1": "44c7870fd23b363eaffb676e301cc9f1841a49908ecc72f4ecaa316fd2b846ae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Where', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Where', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorset.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 56, + "charOffset": 2102, + "charLength": 6, + "snippet": { + "text": "_Where" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2003, + "charLength": 211, + "snippet": { + "text": "\r\n\t\ttemplate \r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, _Iter _First, _Iter _Last) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, _First, _Last);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "53908a457391f2a0", + "equalIndicator/v1": "450793c89621a3e4ef939ab39a3c6d7595dc3465e27c233af565786c8b5775fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2861, + "startColumn": 58, + "charOffset": 106929, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2859, + "startColumn": 1, + "charOffset": 106867, + "charLength": 172, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerQuickLootCorpse(std::shared_ptr player, std::shared_ptr corpse, const Position &position) {\r\n\tif (!player || !corpse) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b97593bc3f32ad80", + "equalIndicator/v1": "452ae2f90e81497c01c79d6758cacd5d17176ecfbb559008d8a6b96846214ee7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1047, + "startColumn": 41, + "charOffset": 39834, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1045, + "startColumn": 1, + "charOffset": 39788, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7bceb677072db636", + "equalIndicator/v1": "454eecb03b94cca7f9f738385c0c6c6fbf9ce87321cf40c231f7cbda9d332446" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'signed char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'signed char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 121, + "startColumn": 54, + "charOffset": 4505, + "charLength": 9, + "snippet": { + "text": "centerPos" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 119, + "startColumn": 1, + "charOffset": 4309, + "charLength": 332, + "snippet": { + "text": "\t\tif (centerPos.z > MAP_INIT_SURFACE_LAYER) {\r\n\t\t\tminRangeZ = static_cast(std::max(centerPos.z - MAP_LAYER_VIEW_LIMIT, 0u));\r\n\t\t\tmaxRangeZ = static_cast(std::min(centerPos.z + MAP_LAYER_VIEW_LIMIT, MAP_MAX_LAYERS - 1));\r\n\t\t} else if (centerPos.z == MAP_INIT_SURFACE_LAYER - 1) {\r\n\t\t\tminRangeZ = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b8858c44924da010", + "equalIndicator/v1": "455ff528b9b1410e9ae0c073b296ecbd57577c71c5eae0e7802ff44db3f95ef5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 664, + "startColumn": 37, + "charOffset": 21738, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 662, + "startColumn": 1, + "charOffset": 21676, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 2.40f) + 8;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29f715d8e4b8779e", + "equalIndicator/v1": "456ca079d5a97757559f1660f245a86756f047afa73f52df29edc996e1dce2b3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 485, + "startColumn": 39, + "charOffset": 12872, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 483, + "startColumn": 1, + "charOffset": 12828, + "charLength": 135, + "snippet": { + "text": "\t}\r\n\r\n\tcreature->health = std::min(getNumber(L, 2), creature->healthMax);\r\n\tg_game().addCreatureHealth(creature);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0a8ccd1ce86ee3dc", + "equalIndicator/v1": "457b7dcc5d68436dfa54c2927b49d26701c7b2171e1599df645bdf8cae1f9766" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 358, + "startColumn": 4, + "charOffset": 11840, + "charLength": 87, + "snippet": { + "text": "case COMBAT_FIREDAMAGE:\r\n\t\t\t\tdefaultMap[1] -= static_cast(elementEntry.second)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 356, + "startColumn": 1, + "charOffset": 11760, + "charLength": 210, + "snippet": { + "text": "\t\t\t\tdefaultMap[0] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_FIREDAMAGE:\r\n\t\t\t\tdefaultMap[1] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_EARTHDAMAGE:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e4c6412cb31603d7", + "equalIndicator/v1": "459d52cc55a9334cb1e0ca814b9973534adb7bebbfd6f762b2f614e41ee6bafc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 187, + "startColumn": 55, + "charOffset": 5836, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 185, + "startColumn": 1, + "charOffset": 5777, + "charLength": 114, + "snippet": { + "text": "}\r\n\r\nbool Combat::isPlayerCombat(std::shared_ptr target) {\r\n\tif (target->getPlayer()) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "69c3b3d76c7b8c93", + "equalIndicator/v1": "45b5f5190debcddab005d909bddcbb25d7ad06ab7296b2afb92b4ce6296c41ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1971, + "startColumn": 2, + "charOffset": 52732, + "charLength": 77, + "snippet": { + "text": "// player:removeItem(itemId, count[, subType = -1[, ignoreEquipped = false]])" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1969, + "startColumn": 1, + "charOffset": 52671, + "charLength": 224, + "snippet": { + "text": "\r\nint PlayerFunctions::luaPlayerRemoveItem(lua_State* L) {\r\n\t// player:removeItem(itemId, count[, subType = -1[, ignoreEquipped = false]])\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (!player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1f5c6819c978f847", + "equalIndicator/v1": "45d1093a75245f2ab0dd47e288a217fc96989bbd057afb8f9ce78b7cff23f369" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 612, + "startColumn": 18, + "charOffset": 18549, + "charLength": 17, + "snippet": { + "text": "getReflectPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 610, + "startColumn": 1, + "charOffset": 18456, + "charLength": 176, + "snippet": { + "text": "\t * @return The reflection percentage for the specified combat type.\r\n\t */\r\n\tvirtual int32_t getReflectPercent(CombatType_t combatType, bool useCharges = false) const;\r\n\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d0ecdcd288286679", + "equalIndicator/v1": "4602240ebc929f7e361e79c0fef3b2896c0a0a66ea9dbdb491e94acc3538593f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 621, + "startColumn": 18, + "charOffset": 18915, + "charLength": 14, + "snippet": { + "text": "getReflectFlat" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 619, + "startColumn": 1, + "charOffset": 18822, + "charLength": 173, + "snippet": { + "text": "\t * @return The flat reflection value for the specified combat type.\r\n\t */\r\n\tvirtual int32_t getReflectFlat(CombatType_t combatType, bool useCharges = false) const;\r\n\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fa991b138dab685e", + "equalIndicator/v1": "4621b8aa39a5b98544030da491abbbca3b6d962627ecbac8fac7f171b2991a7d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2803, + "startColumn": 4, + "charOffset": 83670, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2801, + "startColumn": 1, + "charOffset": 83627, + "charLength": 213, + "snippet": { + "text": "\t\t\tsumSkillTries += skills[i].tries;\r\n\r\n\t\t\tuint32_t lostSkillTries = static_cast(sumSkillTries * deathLossPercent);\r\n\t\t\twhile (lostSkillTries > skills[i].tries) {\r\n\t\t\t\tlostSkillTries -= skills[i].tries;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fa9686173b1a16da", + "equalIndicator/v1": "4665265f54082c34352a4ed98494ad5ce964632cf8f41044721b30157e55a780" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7687, + "startColumn": 39, + "charOffset": 240631, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7685, + "startColumn": 1, + "charOffset": 240482, + "charLength": 311, + "snippet": { + "text": "\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\t} else {\r\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r\n\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f2fb5066820d019", + "equalIndicator/v1": "468cf10316dec0005590ddacad2bc6d9956396575297241e15caf857318120b2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 444, + "startColumn": 45, + "charOffset": 15937, + "charLength": 5, + "snippet": { + "text": "party" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 442, + "startColumn": 1, + "charOffset": 15841, + "charLength": 158, + "snippet": { + "text": "\tscriptInterface.pushFunction(info.partyOnJoin);\r\n\r\n\tLuaScriptInterface::pushUserdata(L, party);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7fb147236cf49068", + "equalIndicator/v1": "46ab75fe8f73611bead815a417ce6dd4a1465d6b3ff6a67b68fa85b26b6404db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 523, + "startColumn": 26, + "charOffset": 14180, + "charLength": 14, + "snippet": { + "text": "const uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 521, + "startColumn": 1, + "charOffset": 14060, + "charLength": 220, + "snippet": { + "text": "\r\n\tvoid addStorageValue(const uint32_t key, const int32_t value, const bool isLogin = false);\r\n\tint32_t getStorageValue(const uint32_t key) const;\r\n\r\n\tint32_t getStorageValueByName(const std::string &storageName) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0b59e87c166727c9", + "equalIndicator/v1": "46bf5a4d18ecd77c0441bb181370a15fff2ff2376c6fad04bed4ca091d36c305" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7678, + "startColumn": 28, + "charOffset": 268655, + "charLength": 14, + "snippet": { + "text": "realManaChange" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7676, + "startColumn": 1, + "charOffset": 268569, + "charLength": 152, + "snippet": { + "text": "\t\t\tTextMessage message;\r\n\t\t\tmessage.position = targetPos;\r\n\t\t\tmessage.primary.value = realManaChange;\r\n\t\t\tmessage.primary.color = TEXTCOLOR_MAYABLUE;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ee7881d860713151", + "equalIndicator/v1": "46e903cecb48f4d1546421b4cc4d429825d446756baf6ef7e07d75b01f387f34" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'podium' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'podium' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8933, + "startColumn": 66, + "charOffset": 283945, + "charLength": 6, + "snippet": { + "text": "podium" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8931, + "startColumn": 1, + "charOffset": 283875, + "charLength": 232, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendMonsterPodiumWindow(std::shared_ptr podium, const Position &position, uint16_t itemId, uint8_t stackPos) {\r\n\tif (!podium || oldProtocol) {\r\n\t\tg_logger().error(\"[{}] item is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c9292f5cbfd59421", + "equalIndicator/v1": "47087be17f857ab98eeb12c2ec8061b74bd54223f0543220cdd973573e07f49b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 679, + "startColumn": 43, + "charOffset": 19254, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 677, + "startColumn": 1, + "charOffset": 19207, + "charLength": 95, + "snippet": { + "text": "}\r\n\r\nbool Door::canUse(std::shared_ptr player) const {\r\n\tif (!house) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e083c334d1ba45d5", + "equalIndicator/v1": "471d98744487a30ffe4cca3e5757c31d987e170324153d72737fcb7e9aff427b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::basic_string::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::basic_string::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1918, + "startColumn": 12, + "charOffset": 56472, + "charLength": 15, + "snippet": { + "text": "formattedNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1916, + "startColumn": 1, + "charOffset": 56360, + "charLength": 199, + "snippet": { + "text": "std::string formatNumber(uint64_t number) {\r\n\tstd::string formattedNumber = std::to_string(number);\r\n\tint pos = formattedNumber.length() - 3;\r\n\twhile (pos > 0) {\r\n\t\tformattedNumber.insert(pos, \",\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "92fd1185f5809789", + "equalIndicator/v1": "4725bf0d26f5daae1587ed0e28558d074a8e37d35b274d68e82385dc8286b31d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'partner' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'partner' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 661, + "startColumn": 46, + "charOffset": 23637, + "charLength": 7, + "snippet": { + "text": "partner" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 659, + "startColumn": 1, + "charOffset": 23537, + "charLength": 165, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r\n\tLuaScriptInterface::pushUserdata(L, partner);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5dae28effd2dc25", + "equalIndicator/v1": "4730eece65509557ddb346ab101d41b226a3ba8a5603e57c7e70d145e054a6b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Passing result of std::move() as a const reference argument; no move will actually happen", + "markdown": "Passing result of std::move() as a const reference argument; no move will actually happen" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3810, + "startColumn": 36, + "charOffset": 114359, + "charLength": 9, + "snippet": { + "text": "std::move" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3808, + "startColumn": 1, + "charOffset": 114242, + "charLength": 186, + "snippet": { + "text": "\t\t\t\t\t// It will remove items and stop the iteration\r\n\t\t\t\t\tif (count >= amount) {\r\n\t\t\t\t\t\tg_game().internalRemoveItems(std::move(itemList), amount, stackable);\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a783b249b88f5dd8", + "equalIndicator/v1": "4734b390e6be40d01a7ded04b6f78e4aa1f59db5bebe5d7abbfedd3764521d49" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 341, + "startColumn": 20, + "charOffset": 8535, + "charLength": 6, + "snippet": { + "text": "weight" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 339, + "startColumn": 1, + "charOffset": 8423, + "charLength": 136, + "snippet": { + "text": "\r\n\tuint64_t weight = static_cast(itemType->weight) * std::max(1, count);\r\n\tlua_pushnumber(L, weight);\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ea4826604f52bcd9", + "equalIndicator/v1": "47996c63a1304d6c53459065f6a4077dc2858c56bba0f6196ac7906d650d74ef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 84, + "startColumn": 59, + "charOffset": 2376, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 82, + "startColumn": 1, + "charOffset": 2313, + "charLength": 239, + "snippet": { + "text": "}\r\n\r\nint32_t Weapon::playerWeaponCheck(std::shared_ptr player, std::shared_ptr target, uint8_t shootRange) const {\r\n\tconst Position &playerPos = player->getPosition();\r\n\tconst Position &targetPos = target->getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9c3b3b734819be78", + "equalIndicator/v1": "47b507ef65ea6c04a7c8b2d8d97ad9b954d4eed0e728673de9e5dafc67efb8fe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 111, + "startColumn": 30, + "charOffset": 3272, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 109, + "startColumn": 1, + "charOffset": 3168, + "charLength": 301, + "snippet": { + "text": "\r\n\tbool registerLuaItemEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaActionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr moveEvent);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3a50235118eb91f8", + "equalIndicator/v1": "47e63104efc7b938bd47e7fad54f60f65dca13723f7906b52d48fb1046fb295f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 885, + "startColumn": 60, + "charOffset": 30773, + "charLength": 16, + "snippet": { + "text": "supremeModifiers" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 883, + "startColumn": 1, + "charOffset": 30634, + "charLength": 235, + "snippet": { + "text": "\t}\r\n\tif (quality >= WheelGemQuality_t::Greater && !supremeModifiers.empty()) {\r\n\t\tgem.supremeModifier = supremeModifiers[uniform_random(0, supremeModifiers.size() - 1)];\r\n\t}\r\n\tg_logger().debug(\"[{}] {}\", __FUNCTION__, gem.toString());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "285c21a29e06f330", + "equalIndicator/v1": "47f4c48a46f4cd28e427bd2fca85f988b3f8914f5482bcad054a6707045c0d13" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 195, + "startColumn": 9, + "charOffset": 7031, + "charLength": 21, + "snippet": { + "text": "itemType.charges != 0" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 193, + "startColumn": 1, + "charOffset": 6988, + "charLength": 116, + "snippet": { + "text": "\t\t\t} else {\r\n\t\t\t\tint32_t subType;\r\n\t\t\t\tif (itemType.charges != 0) {\r\n\t\t\t\t\tsubType = itemType.charges;\r\n\t\t\t\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e98e913c95a257a3", + "equalIndicator/v1": "47ff9b31e31666c1c76a86dbe1b024d18697515d9af017e15fed9e68032265f2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1040, + "startColumn": 11, + "charOffset": 30048, + "charLength": 7, + "snippet": { + "text": "toupper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1038, + "startColumn": 1, + "charOffset": 30032, + "charLength": 109, + "snippet": { + "text": "\t}\r\n\r\n\tstr[0] = toupper(str.front());\r\n\tfor (size_t i = 1; i < strLength; ++i) {\r\n\t\tif (str[i - 1] == ' ') {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a6b628729f307220", + "equalIndicator/v1": "480d43ca2485ffaa99ed2a53d82087e8a2a1ddefec72634730947ae8bc105ec1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 406, + "startColumn": 57, + "charOffset": 12695, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 404, + "startColumn": 1, + "charOffset": 12634, + "charLength": 154, + "snippet": { + "text": "}\r\n\r\nvoid Monster::onCreatureFound(std::shared_ptr creature, bool pushFront /* = false*/) {\r\n\tif (isFriend(creature)) {\r\n\t\taddFriend(creature);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "528da43e8e39f4e1", + "equalIndicator/v1": "480f32d4904063486d6b87272501a73c06ebbf78079ee50fbb57d99bca76c639" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 224, + "startColumn": 2, + "charOffset": 6894, + "charLength": 4, + "snippet": { + "text": "Item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 222, + "startColumn": 1, + "charOffset": 6864, + "charLength": 164, + "snippet": { + "text": "\r\n\t// Constructor for items\r\n\tItem(const uint16_t type, uint16_t count = 0);\r\n\tItem(const std::shared_ptr &i);\r\n\tvirtual std::shared_ptr clone() const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d380e2341e6afe3e", + "equalIndicator/v1": "481ac36109201eb36148453b76cfd50703f91dd41e30c5daad7abd1b399691b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 72, + "startColumn": 10, + "charOffset": 1835, + "charLength": 16, + "snippet": { + "text": "gainHealthAmount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 70, + "startColumn": 1, + "charOffset": 1783, + "charLength": 138, + "snippet": { + "text": "\r\n\tuint32_t getHealthGainAmount() const {\r\n\t\treturn gainHealthAmount * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9deeba4c3fb7cac8", + "equalIndicator/v1": "48398e8ec55a0287f1f9d3421bb4782301f599f9d770d82664cffdeae9c69fec" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'rune' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'rune' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 141, + "startColumn": 68, + "charOffset": 4588, + "charLength": 4, + "snippet": { + "text": "rune" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 139, + "startColumn": 1, + "charOffset": 4516, + "charLength": 134, + "snippet": { + "text": "}\r\n\r\nbool Spells::registerRuneLuaEvent(const std::shared_ptr rune) {\r\n\tif (rune) {\r\n\t\tuint16_t id = rune->getRuneItemId();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4517340156710613", + "equalIndicator/v1": "483e864cfd40182cba6e920b07e55ff6a34e1510f52de8177e097e55bbcd23d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1247, + "startColumn": 74, + "charOffset": 34515, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1245, + "startColumn": 1, + "charOffset": 34437, + "charLength": 156, + "snippet": { + "text": "}\r\n\r\nuint32_t ConditionRegeneration::getHealthTicks(std::shared_ptr creature) const {\r\n\tstd::shared_ptr player = creature->getPlayer();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d242c1342727c60a", + "equalIndicator/v1": "4847acc64ccfa72b9582ccecc975a842bd2cf93935c2bfbde2e8e9ff89f04e96" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 79, + "startColumn": 34, + "charOffset": 2465, + "charLength": 11, + "snippet": { + "text": "getCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 77, + "startColumn": 1, + "charOffset": 2388, + "charLength": 158, + "snippet": { + "text": "\t\treturn static_self_cast();\r\n\t}\r\n\tstd::shared_ptr getCreature() const override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "44db797ca05f6ae0", + "equalIndicator/v1": "484995cc799170a193db7d43900575b505a8a87b5ce9a26c23baafd4c53367c7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 777, + "startColumn": 67, + "charOffset": 22564, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 775, + "startColumn": 1, + "charOffset": 22493, + "charLength": 114, + "snippet": { + "text": "}\r\n\r\nvoid Player::addContainer(uint8_t cid, std::shared_ptr container) {\r\n\tif (cid > 0xF) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1ef29293e27aa744", + "equalIndicator/v1": "4850516b5acd210da8d29052302b0cec4c8e2c33c9ce8f7840f3e895edc3bd72" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 831, + "startColumn": 98, + "charOffset": 29954, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 829, + "startColumn": 1, + "charOffset": 29852, + "charLength": 343, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) {\r\n\t// Player:onMoveCreature(creature, fromPosition, toPosition) or Player.onMoveCreature(self, creature, fromPosition, toPosition)\r\n\tif (info.playerOnMoveCreature == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "00d4d67c8a39f642", + "equalIndicator/v1": "48505bdffa3077e8fab95257323fdc7a1b52ffc3c4f120b54e44d4e0c22bf80f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/metrics/metrics.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 190, + "startColumn": 2, + "charOffset": 7034, + "charLength": 20, + "snippet": { + "text": "DEFINE_LATENCY_CLASS" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 188, + "startColumn": 1, + "charOffset": 6929, + "charLength": 198, + "snippet": { + "text": "\tDEFINE_LATENCY_CLASS(lua, \"lua\", \"scope\");\r\n\tDEFINE_LATENCY_CLASS(query, \"query\", \"truncated_query\");\r\n\tDEFINE_LATENCY_CLASS(task, \"task\", \"task\");\r\n\tDEFINE_LATENCY_CLASS(lock, \"lock\", \"scope\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bb2e875fbb41b2ac", + "equalIndicator/v1": "485ac41b4f226a9a795057a59941ce6607dd919f79ec46a451316f665c02cf9d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1194, + "startColumn": 67, + "charOffset": 42704, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1192, + "startColumn": 1, + "charOffset": 42633, + "charLength": 157, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnRequestQuestLog(std::shared_ptr player) {\r\n\t// Player:onRequestQuestLog()\r\n\tif (info.playerOnRequestQuestLog == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "33dd2262321335c6", + "equalIndicator/v1": "48696ed7904bc59637d5e6a718f186e86e1fc1ae6ff41727cd3854ec525159c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'id' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'id' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 179, + "startColumn": 31, + "charOffset": 6255, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 177, + "startColumn": 1, + "charOffset": 6145, + "charLength": 144, + "snippet": { + "text": "\tbool isAnyKindOfRewardContainer();\r\n\tbool isBrowseFieldAndHoldsRewardChest();\r\n\tbool isInsideContainerWithId(const uint16_t id);\r\n\r\nprotected:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f81f15638a611ffd", + "equalIndicator/v1": "4882fdf1a6c2708f8dc3f33cf690444697642db22e4b62cca84896fd72478f45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 505, + "startColumn": 25, + "charOffset": 27307, + "charLength": 29, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 503, + "startColumn": 1, + "charOffset": 27116, + "charLength": 412, + "snippet": { + "text": "\tstatic void addCreatureHealth(const CreatureVector &spectators, const std::shared_ptr target);\r\n\tvoid addPlayerMana(const std::shared_ptr target);\r\n\tvoid addPlayerVocation(const std::shared_ptr target);\r\n\tvoid addMagicEffect(const Position &pos, uint16_t effect);\r\n\tstatic void addMagicEffect(const std::vector> &players, const Position &pos, uint16_t effect);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7a3d2956513a9679", + "equalIndicator/v1": "48b001bc76935e9f4d2e8b0d96e02e20f4460e5a7aa921ea606539cbf7af8026" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'setAttackedCreature' is within a recursive call chain", + "markdown": "Function 'setAttackedCreature' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1010, + "startColumn": 16, + "charOffset": 32219, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1008, + "startColumn": 1, + "charOffset": 32199, + "charLength": 128, + "snippet": { + "text": "}\r\n\r\nbool Creature::setAttackedCreature(std::shared_ptr creature) {\r\n\tif (creature) {\r\n\t\tauto monster = getMonster();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "58a2fd7bc0f1a265", + "equalIndicator/v1": "48c291c3caae9a88ec0d92473afb9f82f0f54cc5e1d4d8f0a8b94fe7182febf0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'isImmuneCleanse' can be made const", + "markdown": "Method 'isImmuneCleanse' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1965, + "startColumn": 7, + "charOffset": 57922, + "charLength": 15, + "snippet": { + "text": "isImmuneCleanse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1963, + "startColumn": 1, + "charOffset": 57861, + "charLength": 195, + "snippet": { + "text": "\t\tcleanseCondition.second = OTSYS_TIME() + 10000;\r\n\t}\r\n\tbool isImmuneCleanse(ConditionType_t conditiontype) {\r\n\t\tuint64_t timenow = OTSYS_TIME();\r\n\t\tif ((cleanseCondition.first == conditiontype)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "84a747f9251097af", + "equalIndicator/v1": "48c55d351d54c7323e43d24fd0eac8566af62d3512683f4997d8f350890b1e75" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'isSupplyStashMenuAvailable' can be made const", + "markdown": "Method 'isSupplyStashMenuAvailable' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 576, + "startColumn": 7, + "charOffset": 15775, + "charLength": 26, + "snippet": { + "text": "isSupplyStashMenuAvailable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 574, + "startColumn": 1, + "charOffset": 15742, + "charLength": 91, + "snippet": { + "text": "\t\treturn depotSearch;\r\n\t}\r\n\tbool isSupplyStashMenuAvailable() {\r\n\t\treturn supplyStash;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "24ba172ec9fd958f", + "equalIndicator/v1": "48f187989f1024502011b56d1bd336dd4a1c0e29db82c921da4ada263d5d6281" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Move constructor should not be declared explicit", + "markdown": "Move constructor should not be declared explicit" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 31, + "startColumn": 14, + "charOffset": 716, + "charLength": 5, + "snippet": { + "text": "scope" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 29, + "startColumn": 1, + "charOffset": 607, + "charLength": 260, + "snippet": { + "text": "#if !defined(BOOST_DI_NOT_THREAD_SAFE)\r\n\t\t\t\t//<>\r\n\t\t\t\texplicit scope(scope &&other) noexcept :\r\n\t\t\t\t\tscope(std::move(other), std::scoped_lock(other.mutex_)) { }\r\n\t\t\t\t//<>\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "92fbd106d7e2ab92", + "equalIndicator/v1": "490c055d11038d933f7c8673fbe1efe1cc28ed34fd512db89f5b9a9d6c643e40" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'getFreeSlots' is within a recursive call chain", + "markdown": "Function 'getFreeSlots' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 914, + "startColumn": 21, + "charOffset": 27499, + "charLength": 12, + "snippet": { + "text": "getFreeSlots" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 912, + "startColumn": 1, + "charOffset": 27474, + "charLength": 109, + "snippet": { + "text": "}\r\n\r\nuint16_t Container::getFreeSlots() {\r\n\tuint16_t counter = std::max(0, capacity() - size());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab0fdc1e1cc0b6de", + "equalIndicator/v1": "49143e70fc6c7a18f535863404ca7c9e087052556f5e9b2d37f75b7d11bee868" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 186, + "startColumn": 29, + "charOffset": 4805, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 184, + "startColumn": 1, + "charOffset": 4712, + "charLength": 156, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.defense = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b40b7489af5cb3c1", + "equalIndicator/v1": "491ef4965dabfac3a4be69a2f4fc636d2b2e15d41cae655da15ed94634b3c018" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 597, + "startColumn": 47, + "charOffset": 30629, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 595, + "startColumn": 1, + "charOffset": 30548, + "charLength": 122, + "snippet": { + "text": "\t\ttilesToClean.emplace(tile);\r\n\t}\r\n\tvoid removeTileToClean(std::shared_ptr tile) {\r\n\t\ttilesToClean.erase(tile);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dc4af76d170dcb7e", + "equalIndicator/v1": "4924d215daa57b92c5f9cfd5fb55f84615f9457163f6e1fbc1cafd36cb44298d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3533, + "startColumn": 63, + "charOffset": 106804, + "charLength": 1, + "snippet": { + "text": "n" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3531, + "startColumn": 1, + "charOffset": 106734, + "charLength": 176, + "snippet": { + "text": "\t\t\t}\r\n\r\n\t\t\tif (n < tmpContainer->capacity() && tmpContainer->queryAdd(n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\r\n\t\t\t\tindex = n;\r\n\t\t\t\t*destItem = nullptr;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2a5428162904bae6", + "equalIndicator/v1": "49255c88f1535c86447c89de69167a4fd18c4804ef17ad0548d1a36aa121c57c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 686, + "startColumn": 27, + "charOffset": 24501, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 684, + "startColumn": 1, + "charOffset": 24469, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnLookInShop, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b3fbc660df3292e6", + "equalIndicator/v1": "493782a75e247da2e77411c3196305039dce6d85979f0673b943f3cedaf8967e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'time_t' (aka 'long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'time_t' (aka 'long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 254, + "startColumn": 18, + "charOffset": 6730, + "charLength": 6, + "snippet": { + "text": "Player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 252, + "startColumn": 1, + "charOffset": 6616, + "charLength": 231, + "snippet": { + "text": "int PlayerFunctions::luaPlayerGetLastLoginSaved(lua_State* L) {\r\n\t// player:getLastLoginSaved()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player) {\r\n\t\tlua_pushnumber(L, player->getLastLoginSaved());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b2a6a4083c645be4", + "equalIndicator/v1": "495d4db35d0e372191c011e9e0ebcdf23b1169ed5ec5e5e0821695542591af09" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 644, + "startColumn": 7, + "charOffset": 22976, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 642, + "startColumn": 1, + "charOffset": 22964, + "charLength": 143, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnLookInTrade - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "309057b50eba770a", + "equalIndicator/v1": "498326d03137e02bbb360c15b16c5cf62b320671fc4b74945ef6807cb0617131" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 239, + "startColumn": 3, + "charOffset": 7213, + "charLength": 14, + "snippet": { + "text": "lua_pushnumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 237, + "startColumn": 1, + "charOffset": 7123, + "charLength": 172, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\r\n\tif (monster) {\r\n\t\tlua_pushnumber(L, monster->getFriendList().size());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6850574d9de02153", + "equalIndicator/v1": "4991e8535cc250ddb9f3bbe3e87af2e74a160e35c110e1b561d949dc96c7f981" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 394, + "startColumn": 35, + "charOffset": 11580, + "charLength": 4, + "snippet": { + "text": "info" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 392, + "startColumn": 1, + "charOffset": 11496, + "charLength": 176, + "snippet": { + "text": "\tif (monsterType) {\r\n\t\tif (lua_gettop(L) == 1) {\r\n\t\t\tlua_pushnumber(L, monsterType->info.experience);\r\n\t\t} else {\r\n\t\t\tmonsterType->info.experience = getNumber(L, 2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e1b105f0cfaa3bb9", + "equalIndicator/v1": "499281be825ce11c24d3305f4ab9b35b51f7d4ec2599febf4214428e18366d71" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 529, + "startColumn": 6, + "charOffset": 18811, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 527, + "startColumn": 1, + "charOffset": 18778, + "charLength": 170, + "snippet": { + "text": "\tlua_pushnumber(L, exp);\r\n\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "770850c9bc6d1082", + "equalIndicator/v1": "49a38967541e273ea77f5ba7bb2dc001c41a01a1ee0c9a88d7b8f9f2c9be83e8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 525, + "startColumn": 19, + "charOffset": 15602, + "charLength": 8, + "snippet": { + "text": "newOwner" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 523, + "startColumn": 1, + "charOffset": 15577, + "charLength": 99, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tsetNewOwnerGuid(newOwner->getGUID(), false);\r\n\t} else {\r\n\t\tsetOwner(newOwner->getGUID());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4ddd21e9d6c225b4", + "equalIndicator/v1": "49c039e4780bf4bbab854610ebc79a36dcc92ef6ebc33288ff61b02b4f4db5f5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 25, + "startColumn": 7, + "charOffset": 792, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 23, + "startColumn": 1, + "charOffset": 627, + "charLength": 463, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1e157cdd4f5b88d", + "equalIndicator/v1": "49c97260dc413ad534c927160e636bf161e57c4f0c18f27b5c24073aea418cf3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2078, + "startColumn": 89, + "charOffset": 61435, + "charLength": 7, + "snippet": { + "text": "newItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2076, + "startColumn": 1, + "charOffset": 61331, + "charLength": 178, + "snippet": { + "text": "\r\n// inventory\r\nvoid Player::onUpdateInventoryItem(std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tif (oldItem != newItem) {\r\n\t\tonRemoveInventoryItem(oldItem);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "031025a87b712db7", + "equalIndicator/v1": "49cba00fa1986afc76c89ee949d99fdc8460ee7e5c771c49430c612cb5ec3a74" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1822, + "startColumn": 19, + "charOffset": 54616, + "charLength": 14, + "snippet": { + "text": "getReflectFlat" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1820, + "startColumn": 1, + "charOffset": 54593, + "charLength": 166, + "snippet": { + "text": "}\r\n\r\nint32_t Creature::getReflectFlat(CombatType_t combatType, bool useCharges /* = false*/) const {\r\n\ttry {\r\n\t\treturn reflectFlat.at(combatTypeToIndex(combatType));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a31de34f5143f2a1", + "equalIndicator/v1": "49e9afe9df0263c327a54f8d7e059fd4c2c59ee5cc01a76b61895961f02aa245" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1484, + "startColumn": 66, + "charOffset": 58953, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1482, + "startColumn": 1, + "charOffset": 58883, + "charLength": 181, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalMoveCreature(std::shared_ptr creature, Direction direction, uint32_t flags /*= 0*/) {\r\n\tif (!creature) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "487a77d928bd4661", + "equalIndicator/v1": "49f471c46d5edcd063737b7377035fb889cca172e122842ede7f73d76da7f3ec" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1397, + "startColumn": 40, + "charOffset": 42050, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1395, + "startColumn": 1, + "charOffset": 41898, + "charLength": 184, + "snippet": { + "text": "\tvoid sendPartyCreatureShowStatus(std::shared_ptr creature, bool showStatus) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyCreatureShowStatus(creature, showStatus);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8df3c79bd4411c2c", + "equalIndicator/v1": "4a1674dab55cabca458c3f2dc70671f959e5b8fbd9b191391cd79685dceb5e39" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 156, + "startColumn": 29, + "charOffset": 4385, + "charLength": 8, + "snippet": { + "text": "getPrice" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 154, + "startColumn": 1, + "charOffset": 4302, + "charLength": 216, + "snippet": { + "text": "\r\n\tss << \" It is \" << getSize() << \" square meters.\";\r\n\tconst int32_t housePrice = getPrice();\r\n\tif (housePrice != -1) {\r\n\t\tif (g_configManager().getBoolean(HOUSE_PURSHASED_SHOW_PRICE, __FUNCTION__) || owner == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c188db107029f53", + "equalIndicator/v1": "4a3556fac4032a14efe69ff6410b61f55be2787fde96cc04550cac934a766bd8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 772, + "startColumn": 32, + "charOffset": 20813, + "charLength": 11, + "snippet": { + "text": "getCapacity" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 770, + "startColumn": 1, + "charOffset": 20721, + "charLength": 135, + "snippet": { + "text": "\t\t\treturn std::numeric_limits::max();\r\n\t\t} else {\r\n\t\t\treturn std::max(0, getCapacity() - inventoryWeight);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "68e70339d9ce10d4", + "equalIndicator/v1": "4a36e38a3c4cebf8c2bf2886f998dc5a0a4566e5e55fe4ce6af34fd8d07d5749" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6234, + "startColumn": 59, + "charOffset": 215645, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6232, + "startColumn": 1, + "charOffset": 215582, + "charLength": 148, + "snippet": { + "text": "}\r\n\r\nbool Game::internalCreatureTurn(std::shared_ptr creature, Direction dir) {\r\n\tif (creature->getDirection() == dir) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2581be5538cef3e2", + "equalIndicator/v1": "4a7b67e5aaed247d4ba329bef803ecd53ec3278a227915ff24e1cbae590aeea9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 526, + "startColumn": 61, + "charOffset": 14341, + "charLength": 13, + "snippet": { + "text": "const int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 524, + "startColumn": 1, + "charOffset": 14208, + "charLength": 220, + "snippet": { + "text": "\r\n\tint32_t getStorageValueByName(const std::string &storageName) const;\r\n\tvoid addStorageValueByName(const std::string &storageName, const int32_t value, const bool isLogin = false);\r\n\r\n\tstd::shared_ptr kv() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "054d96a8409cc701", + "equalIndicator/v1": "4a88c76b734f16e639411de4c8a1848a2978b755c5812e0d746da3350d794499" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2047, + "startColumn": 3, + "charOffset": 62761, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2045, + "startColumn": 1, + "charOffset": 62624, + "charLength": 334, + "snippet": { + "text": "\t\tg_game().playerInspectItem(player, pos);\r\n\t} else if (inspectionType == INSPECT_NPCTRADE || inspectionType == INSPECT_CYCLOPEDIA) {\r\n\t\tuint16_t itemId = msg.get();\r\n\t\tuint16_t itemCount = msg.getByte();\r\n\t\tg_game().playerInspectItem(player, itemId, static_cast(itemCount), (inspectionType == INSPECT_CYCLOPEDIA));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ca14c8217f3e508e", + "equalIndicator/v1": "4a9d2a2df4e8284882da5ddb5477d630cf8a7035958c1d1bf41a2cbfb59ae637" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1549, + "startColumn": 27, + "charOffset": 54469, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1547, + "startColumn": 1, + "charOffset": 54437, + "charLength": 159, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "44852728f660e9ad", + "equalIndicator/v1": "4ab0b6bab44ca3f53c9a7be50ae722b799391ffc2fc38f67bc97b4a63475a6a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 235, + "startColumn": 7, + "charOffset": 7541, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 233, + "startColumn": 1, + "charOffset": 7374, + "charLength": 388, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\r\n\tvoid internalAddThing(std::shared_ptr thing) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "697eef31aa7df9db", + "equalIndicator/v1": "4ac21b76b7152b52e0f5dcc6154037ffed41f964cd8b6ea493c6606d64084fa5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'updateTile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'updateTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1072, + "startColumn": 48, + "charOffset": 31197, + "charLength": 10, + "snippet": { + "text": "updateTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1070, + "startColumn": 1, + "charOffset": 31141, + "charLength": 224, + "snippet": { + "text": "\t\t}\r\n\t}\r\n\tvoid sendUpdateTileItem(std::shared_ptr updateTile, const Position &pos, std::shared_ptr item) {\r\n\t\tif (client) {\r\n\t\t\tint32_t stackpos = updateTile->getStackposOfItem(static_self_cast(), item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5a3d1bf7bbfec3f5", + "equalIndicator/v1": "4acea45cdbd395d4b7886606d65386d2b266f788b1f1dd63d9a4fc40f6795701" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Val', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Val', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorset.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 72, + "startColumn": 68, + "charOffset": 1912, + "charLength": 4, + "snippet": { + "text": "_Val" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 70, + "startColumn": 1, + "charOffset": 1838, + "charLength": 159, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, T &&_Val) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, std::move(_Val));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "677f6d12e0124f8d", + "equalIndicator/v1": "4aefd58fef4ae6fbd02cad3c34d6152c24b7c5aff89cc65a60d475c220540aa8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 5, + "charOffset": 1301, + "charLength": 8, + "snippet": { + "text": "addCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1181, + "charLength": 201, + "snippet": { + "text": "\t\tif (item->getTopParent().get() != this) {\r\n\t\t\tif (std::shared_ptr container = item->getContainer()) {\r\n\t\t\t\taddCount = container->getItemHoldingCount() + 1;\r\n\t\t\t} else {\r\n\t\t\t\taddCount = 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a5629c801ec8425d", + "equalIndicator/v1": "4af60f92efa4112564e0a7759f0a55a15f4e5b9751a8f5ebfcb7ed3d6fb67a17" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 65, + "charOffset": 713, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 615, + "charLength": 146, + "snippet": { + "text": "Weapons::~Weapons() = default;\r\n\r\nconst WeaponShared_ptr Weapons::getWeapon(std::shared_ptr item) const {\r\n\tif (!item) {\r\n\t\treturn nullptr;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a3f07a0233d6da00", + "equalIndicator/v1": "4af7dfa84913933630ffa9563b62f35da99390a5e973b9088b8c0c3284dfb8fe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 585, + "startColumn": 59, + "charOffset": 18880, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 583, + "startColumn": 1, + "charOffset": 18817, + "charLength": 173, + "snippet": { + "text": "}\r\n\r\nvoid Npc::removePlayerInteraction(std::shared_ptr player) {\r\n\tif (playerInteractions.contains(player->getID())) {\r\n\t\tplayerInteractions.erase(player->getID());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "456233d07cb8b33c", + "equalIndicator/v1": "4b67be18d9354ee74d662fca808ac36b391779ea79ebe571c1c6cdca8d79eb71" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 522, + "startColumn": 43, + "charOffset": 14104, + "charLength": 13, + "snippet": { + "text": "const int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 520, + "startColumn": 1, + "charOffset": 14014, + "charLength": 195, + "snippet": { + "text": "\tbool canOpenCorpse(uint32_t ownerId) const;\r\n\r\n\tvoid addStorageValue(const uint32_t key, const int32_t value, const bool isLogin = false);\r\n\tint32_t getStorageValue(const uint32_t key) const;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b99d537436bf41e", + "equalIndicator/v1": "4b6d69ae0117ad430b215fbd323839c4392151f1276937aa613496b51f9eb759" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 253, + "startColumn": 88, + "charOffset": 9326, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 251, + "startColumn": 1, + "charOffset": 9234, + "charLength": 213, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::partyOnLeave(std::shared_ptr party, std::shared_ptr player) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::partyOnLeave - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f4b6177e49cd6db8", + "equalIndicator/v1": "4b6f887d619dd83dab7298f54ff6935dc831eff776172fde019505a4ac2d3659" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1944, + "startColumn": 151, + "charOffset": 75849, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1942, + "startColumn": 1, + "charOffset": 75694, + "charLength": 444, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalMoveItem(std::shared_ptr fromCylinder, std::shared_ptr toCylinder, int32_t index, std::shared_ptr item, uint32_t count, std::shared_ptr* movedItem, uint32_t flags /*= 0*/, std::shared_ptr actor /*=nullptr*/, std::shared_ptr tradeItem /* = nullptr*/, bool checkTile /* = true*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (fromCylinder == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6b0d4ac5794df445", + "equalIndicator/v1": "4b8f1e64a06edfaac0485e0b8da6b73ce7352e8fd5b3bef939a0cb655d06c763" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 72, + "startColumn": 75, + "charOffset": 2317, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 70, + "startColumn": 1, + "charOffset": 2238, + "charLength": 255, + "snippet": { + "text": "}\r\n\r\nReturnValue EventCallback::creatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnAreaCombat - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d9c8e968b105a7e9", + "equalIndicator/v1": "4b90f23889712061fa16a634af0e5406e70d9f76da322c057632c0b3ddb5033a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::any_of()'", + "markdown": "Replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5158, + "startColumn": 2, + "charOffset": 152227, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5156, + "startColumn": 1, + "charOffset": 152160, + "charLength": 302, + "snippet": { + "text": "\r\nbool Player::hasKilled(std::shared_ptr player) const {\r\n\tfor (const auto &kill : unjustifiedKills) {\r\n\t\tif (kill.target == player->getGUID() && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60 && kill.unavenged) {\r\n\t\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5dcce8e8ad9ce384", + "equalIndicator/v1": "4bb441924062d4c12402e29b36a30903fd66c57cec9b2b7cb59b87ae89528f14" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Val', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Val', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/arraylist.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 97, + "startColumn": 23, + "charOffset": 2202, + "charLength": 4, + "snippet": { + "text": "_Val" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 95, + "startColumn": 1, + "charOffset": 2173, + "charLength": 107, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tvoid push_front(T &&_Val) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\tfrontContainer.push_back(std::move(_Val));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6d01226d1ecd32a", + "equalIndicator/v1": "4bd93aaf65d4feebfd11fbfd1be633aaea63c718fefc7ede9c7ca3a153778ad8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'vocName' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'vocName' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 165, + "startColumn": 35, + "charOffset": 4238, + "charLength": 7, + "snippet": { + "text": "vocName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 163, + "startColumn": 1, + "charOffset": 4198, + "charLength": 140, + "snippet": { + "text": "\t}\r\n\r\n\tvoid addVocWeaponMap(std::string vocName) {\r\n\t\tint32_t vocationId = g_vocations().getVocationId(vocName);\r\n\t\tif (vocationId != -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3cefefb4587a8dfd", + "equalIndicator/v1": "4be0b679a15da5a2acab9d883029e647ebd566625001754a146866e7fadef006" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 172, + "startColumn": 2, + "charOffset": 5606, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 170, + "startColumn": 1, + "charOffset": 5599, + "charLength": 122, + "snippet": { + "text": "\t}\r\n\r\n\tuint16_t innerLength = msg.get();\r\n\tif (std::cmp_greater(innerLength, msgLength - 2)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eb81a5f907dd2dff", + "equalIndicator/v1": "4bead31fdd6a31d116421ac1a191b8672b7007180c5a85ad44cda11a98379274" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1143, + "startColumn": 99, + "charOffset": 43421, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1141, + "startColumn": 1, + "charOffset": 43318, + "charLength": 237, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::zoneBeforeCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureEnter - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0751c91e2737c77c", + "equalIndicator/v1": "4bfcbacdd796bd9d3aec9a7637646e8d722d100376a0c70a7e94e632e7e77c33" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #5 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #5 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 339, + "startColumn": 157, + "charOffset": 9231, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 337, + "startColumn": 1, + "charOffset": 9070, + "charLength": 223, + "snippet": { + "text": "}\r\n\r\nvoid Creature::onUpdateTileItem(std::shared_ptr updateTile, const Position &pos, std::shared_ptr, const ItemType &oldType, std::shared_ptr, const ItemType &newType) {\r\n\tif (!isMapLoaded) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "812ae60a824901bf", + "equalIndicator/v1": "4c2289b6dcc5588e1fceb19180964760f88167d11d562bd87d5e934b89e2eed5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 733, + "startColumn": 60, + "charOffset": 23553, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 731, + "startColumn": 1, + "charOffset": 23489, + "charLength": 272, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatConditionFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\r\n\tif (params.origin == ORIGIN_MELEE && data && data->primary.value == 0 && data->secondary.value == 0) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef652b8659ed04cf", + "equalIndicator/v1": "4c33e4ff282627692523f00f9680a7f653c3a5f7f46e3e7f56d156995756d978" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5685, + "startColumn": 50, + "charOffset": 168062, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5683, + "startColumn": 1, + "charOffset": 168008, + "charLength": 114, + "snippet": { + "text": "}\r\n\r\nbool Player::isGuildMate(std::shared_ptr player) const {\r\n\tif (!player || !guild) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "abbe2fc26f75e1d2", + "equalIndicator/v1": "4c42fce3eb1c8112e07cc3ec4f0eb70ba40f397c5a5c49d09517150281007b50" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?", + "markdown": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2496, + "startColumn": 7, + "charOffset": 69698, + "charLength": 25, + "snippet": { + "text": "Condition::startCondition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2494, + "startColumn": 1, + "charOffset": 69602, + "charLength": 156, + "snippet": { + "text": "\r\nbool ConditionSpellGroupCooldown::startCondition(std::shared_ptr creature) {\r\n\tif (!Condition::startCondition(creature)) {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "657723440c8607e4", + "equalIndicator/v1": "4c51226dfe1b01268c5513d8f9b42e627d4b736592e8aa0f88f410cc4406b8b9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 225, + "startColumn": 2, + "charOffset": 6943, + "charLength": 4, + "snippet": { + "text": "Item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 223, + "startColumn": 1, + "charOffset": 6866, + "charLength": 164, + "snippet": { + "text": "\t// Constructor for items\r\n\tItem(const uint16_t type, uint16_t count = 0);\r\n\tItem(const std::shared_ptr &i);\r\n\tvirtual std::shared_ptr clone() const;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0268ccc5edda4196", + "equalIndicator/v1": "4c53538cc364e81449d9814b0b92982c40f146f0ff02cffe10aeb19c3d489c6a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 167, + "startColumn": 50, + "charOffset": 5884, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 165, + "startColumn": 1, + "charOffset": 5809, + "charLength": 195, + "snippet": { + "text": "\r\n\ttemplate \r\n\tT getCustomAttributeValue(std::shared_ptr item, const std::string &attributeName) {\r\n\t\tstatic_assert(std::is_integral::value, \"T must be an integral type\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "912d5ca23755b3b3", + "equalIndicator/v1": "4c5a7529c79faf765a4d7a9af7fcdcb08732548f760c31a068bd76d59b2716db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2386, + "startColumn": 51, + "charOffset": 70477, + "charLength": 6, + "snippet": { + "text": "rawExp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2384, + "startColumn": 1, + "charOffset": 70261, + "charLength": 310, + "snippet": { + "text": "\tstd::map attrs({ { \"player\", getName() }, { \"level\", std::to_string(getLevel()) }, { \"rate\", std::to_string(rate) } });\r\n\tif (sendText) {\r\n\t\tg_metrics().addCounter(\"player_experience_raw\", rawExp, attrs);\r\n\t\tg_metrics().addCounter(\"player_experience_actual\", exp, attrs);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7a03374d95622f57", + "equalIndicator/v1": "4c6c260287f442056188f4580d510eb5c866906d8a395bcfc7fd966eb6d266d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8456, + "startColumn": 4, + "charOffset": 267684, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8454, + "startColumn": 1, + "charOffset": 267601, + "charLength": 238, + "snippet": { + "text": "\t\tcase SUPPLY_STASH_ACTION_STOW_STACK: {\r\n\t\t\tPosition pos = msg.getPosition();\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint8_t stackpos = msg.getByte();\r\n\t\t\tg_game().playerStowItem(player->getID(), pos, itemId, stackpos, 0, true);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "661e4e504254432b", + "equalIndicator/v1": "4c7be62b9c1a54dc3e05b93cf3b4d7f388b3771379a88c2ed27eb6ad90240ca3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint64_t' (aka 'unsigned long long')", + "markdown": "Narrowing conversion from 'double' to 'uint64_t' (aka 'unsigned long long')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2397, + "startColumn": 10, + "charOffset": 70993, + "charLength": 112, + "snippet": { + "text": "(exp * (1.75 * getHazardSystemPoints() * g_configManager().getFloat(HAZARD_EXP_BONUS_MULTIPLIER, __FUNCTION__)))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2395, + "startColumn": 1, + "charOffset": 70856, + "charLength": 264, + "snippet": { + "text": "\tbool handleHazardExperience = monster && monster->getHazard() && getHazardSystemPoints() > 0;\r\n\tif (handleHazardExperience) {\r\n\t\texp += (exp * (1.75 * getHazardSystemPoints() * g_configManager().getFloat(HAZARD_EXP_BONUS_MULTIPLIER, __FUNCTION__))) / 100.;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b2b0ceeb68e11860", + "equalIndicator/v1": "4c92dc3fee214c07474324436d8bb1f8075e46c2400a731e532c6d00ba6ed6f0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1088, + "startColumn": 39, + "charOffset": 32269, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1086, + "startColumn": 1, + "charOffset": 32109, + "charLength": 260, + "snippet": { + "text": "\r\n\t\tif (!mType->info.voiceVector.empty() && (mType->info.yellChance >= static_cast(uniform_random(1, 100)))) {\r\n\t\t\tuint32_t index = uniform_random(0, mType->info.voiceVector.size() - 1);\r\n\t\t\tconst voiceBlock_t &vb = mType->info.voiceVector[index];\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cf8540c2cd142643", + "equalIndicator/v1": "4c9daffffc2aeed1822c82013e6d3854d391e8416b0c4b41f3e001832d3f8442" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'monsterType' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'monsterType' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 169, + "startColumn": 111, + "charOffset": 5551, + "charLength": 11, + "snippet": { + "text": "monsterType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 167, + "startColumn": 1, + "charOffset": 5436, + "charLength": 225, + "snippet": { + "text": "}\r\n\r\nbool SpawnMonster::spawnMonster(uint32_t spawnMonsterId, spawnBlock_t &sb, const std::shared_ptr monsterType, bool startup /*= false*/) {\r\n\tif (spawnedMonsterMap.contains(spawnMonsterId)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f5ab66acaed4771a", + "equalIndicator/v1": "4cb6ab4ef661f625e183b75903d069fb25fba5fe71598fcba865f9f290ba9bea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1191, + "startColumn": 2, + "charOffset": 42598, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1189, + "startColumn": 1, + "charOffset": 42591, + "charLength": 46, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "74d135433be5eb42", + "equalIndicator/v1": "4cbed029e4aaf39de2ace61a5e4210fbfc820d034ebfe23054f568ba833ab115" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1111, + "startColumn": 2, + "charOffset": 42274, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1109, + "startColumn": 1, + "charOffset": 42267, + "charLength": 52, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c166beb5edf7f0dc", + "equalIndicator/v1": "4cc04f000d626af03eaf9ca07f8fdff8caeb610ccc4d8cbf402370753b402786" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6370, + "startColumn": 69, + "charOffset": 201568, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6368, + "startColumn": 1, + "charOffset": 201495, + "charLength": 145, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPartyCreatureSkull(std::shared_ptr target) {\r\n\tif (g_game().getWorldType() != WORLD_TYPE_PVP) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "83035903335c0385", + "equalIndicator/v1": "4ce3c895b5af789d3f1d4edeb6769a9300f420051319bbe64a7ad06ec1fd3322" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 869, + "startColumn": 54, + "charOffset": 39484, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 867, + "startColumn": 1, + "charOffset": 39426, + "charLength": 126, + "snippet": { + "text": "}\r\n\r\nvoid Game::internalGetPosition(std::shared_ptr item, Position &pos, uint8_t &stackpos) {\r\n\tpos.x = 0;\r\n\tpos.y = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "83df64020b72a146", + "equalIndicator/v1": "4cf19ba10297fb0c7d401397903c85abbe69b4cc3ad646809f1e0c6a74f4fcee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 374, + "startColumn": 31, + "charOffset": 12849, + "charLength": 8, + "snippet": { + "text": "listItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 372, + "startColumn": 1, + "charOffset": 12683, + "charLength": 327, + "snippet": { + "text": "\t\tif (container && containerType == 0 && item->isQuiver() && player->getThing(CONST_SLOT_RIGHT) == item) {\r\n\t\t\tuint16_t ammoTotal = 0;\r\n\t\t\tfor (std::shared_ptr listItem : container->getItemList()) {\r\n\t\t\t\tif (player->getLevel() >= Item::items[listItem->getID()].minReqLevel) {\r\n\t\t\t\t\tammoTotal += listItem->getItemCount();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d4bbc4a716e8cb28", + "equalIndicator/v1": "4cf7310725648ed61114fbd05e354243a72d4c8b741960518a3a6164a2e610d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1496, + "startColumn": 21, + "charOffset": 44643, + "charLength": 3, + "snippet": { + "text": "npc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1494, + "startColumn": 1, + "charOffset": 44556, + "charLength": 102, + "snippet": { + "text": "\tvoid sendShop(std::shared_ptr npc) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendShop(npc);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dfde05029836be22", + "equalIndicator/v1": "4cff83ca4fadf19a25b50ae6ae92e65fb5c03801abe0f3ba5261c213d2ca81e2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 429, + "startColumn": 77, + "charOffset": 12699, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 427, + "startColumn": 1, + "charOffset": 12618, + "charLength": 172, + "snippet": { + "text": "}\r\n\r\nvoid Container::onRemoveContainerItem(uint32_t index, std::shared_ptr item) {\r\n\tauto spectators = Spectators().find(getPosition(), false, 2, 2, 2, 2);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d5c034fca05b8e3f", + "equalIndicator/v1": "4d687b25b3b632b12eb6a938a080aa6fdcb69ffc77aeae14fa52baba8b8267bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1250, + "startColumn": 13, + "charOffset": 56449, + "charLength": 14, + "snippet": { + "text": "vocationString" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1248, + "startColumn": 1, + "charOffset": 56350, + "charLength": 250, + "snippet": { + "text": "\t\tif (weapon->getWieldInfo() != 0) {\r\n\t\t\titemType.wieldInfo = weapon->getWieldInfo();\r\n\t\t\titemType.vocationString = weapon->getVocationString();\r\n\t\t\titemType.minReqLevel = weapon->getReqLevel();\r\n\t\t\titemType.minReqMagicLevel = weapon->getReqMagLv();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8e7ef42c35d189f4", + "equalIndicator/v1": "4daa76feceb45f8b934f680092ce316ae40632612cb875acd21291e9843fdb08" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 639, + "startColumn": 22, + "charOffset": 19412, + "charLength": 8, + "snippet": { + "text": "blockHit" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 637, + "startColumn": 1, + "charOffset": 19386, + "charLength": 307, + "snippet": { + "text": "}\r\n\r\nBlockType_t Monster::blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense /* = false*/, bool checkArmor /* = false*/, bool /* field = false */) {\r\n\tBlockType_t blockType = Creature::blockHit(attacker, combatType, damage, checkDefense, checkArmor);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "12214a189d50f3ef", + "equalIndicator/v1": "4dae9ed06858543268c85d0ba034724b1287d3aed94411fc113fb61d40a970e1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 210, + "startColumn": 27, + "charOffset": 5374, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 208, + "startColumn": 1, + "charOffset": 5283, + "charLength": 154, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.armor = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d1687e71fc339c5e", + "equalIndicator/v1": "4dc3670353cf585287e0d3832ac3451bd757a4e442eef674400fb8a079b184db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6104, + "startColumn": 60, + "charOffset": 194152, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6102, + "startColumn": 1, + "charOffset": 194088, + "charLength": 183, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendToChannel(std::shared_ptr creature, SpeakClasses type, const std::string &text, uint16_t channelId) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0xAA);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "39d14f5c04473234", + "equalIndicator/v1": "4df0b7e87a858e3e6f23b298540a0c942b1ff1df8a902871f935cb2a0f4a3bdd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 605, + "startColumn": 17, + "charOffset": 29532, + "charLength": 17, + "snippet": { + "text": "parseSupressDrunk" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 603, + "startColumn": 1, + "charOffset": 29511, + "charLength": 204, + "snippet": { + "text": "}\r\n\r\nvoid ItemParse::parseSupressDrunk(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\tstd::string stringValue = tmpStrValue;\r\n\tif (valueAttribute.as_bool()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8a2933fbf40a4844", + "equalIndicator/v1": "4df34adb3fe2a38dc244416d0df664b0178807cf7e55c8ba66fd12bd01ca9ba5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 67, + "startColumn": 53, + "charOffset": 2042, + "charLength": 5, + "snippet": { + "text": "range" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 65, + "startColumn": 1, + "charOffset": 1969, + "charLength": 86, + "snippet": { + "text": "\t\treturn false;\r\n\t}\r\n\treturn Creature::canSee(getPosition(), pos, range, range);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "84535aebc230ac3e", + "equalIndicator/v1": "4e1c394abe327cdc211bf2874d5f534fe6f8a21c15d96d043930ae8390e76993" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 248, + "startColumn": 73, + "charOffset": 8921, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 246, + "startColumn": 1, + "charOffset": 8844, + "charLength": 269, + "snippet": { + "text": "}\r\n\r\nReturnValue Events::eventCreatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) {\r\n\t// Creature:onAreaCombat(tile, aggressive) or Creature.onAreaCombat(self, tile, aggressive)\r\n\tif (info.creatureOnAreaCombat == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1090194e43d3e82", + "equalIndicator/v1": "4e338ae870575c1ac55cacfb58c25a623a43dd34455ba007ea8be4f01c1b2009" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 254, + "startColumn": 22, + "charOffset": 6791, + "charLength": 5, + "snippet": { + "text": "regen" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 252, + "startColumn": 1, + "charOffset": 6667, + "charLength": 198, + "snippet": { + "text": "\r\n\t\tplayer->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false);\r\n\t\tplayer->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__));\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c8b5093a106586b1", + "equalIndicator/v1": "4e37a3c9ea7f0458e63f84176fd723811dc8d8d4e6c0f8ec711bed8f621e46a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 231, + "startColumn": 11, + "charOffset": 7225, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 229, + "startColumn": 1, + "charOffset": 7122, + "charLength": 253, + "snippet": { + "text": "\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "47db0f95390397f0", + "equalIndicator/v1": "4e51aae1ffd0ad60e072d02c5508117abfde2a6345feac070302bef1c53a33c3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 391, + "startColumn": 47, + "charOffset": 12558, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 389, + "startColumn": 1, + "charOffset": 12507, + "charLength": 243, + "snippet": { + "text": "}\r\n\r\nbool Actions::useItem(std::shared_ptr player, const Position &pos, uint8_t index, std::shared_ptr item, bool isHotkey) {\r\n\tconst ItemType &it = Item::items[item->getID()];\r\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9d53f8940e1144a5", + "equalIndicator/v1": "4e5b5437035b257b1f23a75ab31515cbbdb7194995c4bd15ed974d7347163e0e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 687, + "startColumn": 15, + "charOffset": 22425, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 685, + "startColumn": 1, + "charOffset": 22385, + "charLength": 132, + "snippet": { + "text": "\t\t\t\tcase 1:\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 74) * 1.20f) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "492a8fac155073b9", + "equalIndicator/v1": "4e5e43df04594341b9417bf52e68888434c327dea10e7c857ad816aa260462a9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The 'empty' method should be used to check for emptiness instead of 'size'", + "markdown": "The 'empty' method should be used to check for emptiness instead of 'size'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1824, + "startColumn": 16, + "charOffset": 51361, + "charLength": 5, + "snippet": { + "text": "items" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1822, + "startColumn": 1, + "charOffset": 51248, + "charLength": 157, + "snippet": { + "text": "std::shared_ptr Tile::getDoorItem() const {\r\n\tconst TileItemVector* items = getItemList();\r\n\tif (!items || items->size() == 0) {\r\n\t\treturn ground;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8ad8134904d38221", + "equalIndicator/v1": "4e688ec29158d992079ead9b9ae6717255aedc76b30322ac4ad8b81615f5f8f7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3219, + "startColumn": 67, + "charOffset": 96930, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3217, + "startColumn": 1, + "charOffset": 96764, + "charLength": 271, + "snippet": { + "text": "\t\t\t\tif (leftItem->getSlotPosition() & SLOTP_TWO_HAND) {\r\n\t\t\t\t\tret = RETURNVALUE_DROPTWOHANDEDITEM;\r\n\t\t\t\t} else if (item == leftItem && count == item->getItemCount()) {\r\n\t\t\t\t\tret = RETURNVALUE_NOERROR;\r\n\t\t\t\t} else if (leftType == WEAPON_SHIELD && type == WEAPON_SHIELD) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a602eba61fe110fd", + "equalIndicator/v1": "4e7046b27bf2babf4be050ebb9fa225f3ed0b47d2b9a68327f5fe5a23adc9c54" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 150, + "startColumn": 7, + "charOffset": 4686, + "charLength": 11, + "snippet": { + "text": "updateThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 148, + "startColumn": 1, + "charOffset": 4630, + "charLength": 231, + "snippet": { + "text": "\tvoid addItemBack(std::shared_ptr item);\r\n\r\n\tvoid updateThing(std::shared_ptr thing, uint16_t itemId, uint32_t count) override final;\r\n\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "268c320350f4752b", + "equalIndicator/v1": "4e744810293ca65f1f5a501d265f9448491c6d20da6960f12f888b33c309d31f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getScheduledSaleUpdate' can be made const", + "markdown": "Method 'getScheduledSaleUpdate' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1794, + "startColumn": 7, + "charOffset": 53614, + "charLength": 22, + "snippet": { + "text": "getScheduledSaleUpdate" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1792, + "startColumn": 1, + "charOffset": 53602, + "charLength": 74, + "snippet": { + "text": "\t}\r\n\r\n\tbool getScheduledSaleUpdate() {\r\n\t\treturn scheduledSaleUpdate;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0b8be354cef530dc", + "equalIndicator/v1": "4e810159255ac1032cef228dbc32b8350d4f3b42174640c0ff2254baa9b397cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1037, + "startColumn": 27, + "charOffset": 37514, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1035, + "startColumn": 1, + "charOffset": 37482, + "charLength": 133, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnGainExperience, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9927af386cbd390b", + "equalIndicator/v1": "4ea3fed105b61d2a8ca1032c1cb81298538793f40f543117d31b38b1f7575fca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 736, + "startColumn": 68, + "charOffset": 28388, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 734, + "startColumn": 1, + "charOffset": 28316, + "charLength": 269, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnGainExperience - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d7b64a89d16f98bc", + "equalIndicator/v1": "4ecd121d06032cd158727a4b59db294bdebb0fa215b039a263a6140e94e608e7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 518, + "startColumn": 27, + "charOffset": 18458, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 516, + "startColumn": 1, + "charOffset": 18426, + "charLength": 133, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.partyOnShareExperience, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "482c1ebadf5617e2", + "equalIndicator/v1": "4ed50c6404d8c742867b37afac89f5eda33580801572aa2689f7b7d3a1848fc2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 286, + "startColumn": 10, + "charOffset": 10124, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 284, + "startColumn": 1, + "charOffset": 10025, + "charLength": 154, + "snippet": { + "text": "\tDBResult_ptr result = Database::getInstance().storeQuery(query.str());\r\n\tif (!result) {\r\n\t\treturn std::string();\r\n\t}\r\n\treturn result->getString(\"name\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b9b1e67cfb788b3f", + "equalIndicator/v1": "4ed679199b700a4989f382b14a4b78319f2a41975c5b561f2fa53b4261313308" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 495, + "startColumn": 27, + "charOffset": 17632, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 493, + "startColumn": 1, + "charOffset": 17600, + "charLength": 125, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.partyOnDisband, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f46f413e2ced4508", + "equalIndicator/v1": "4ef2fee8b215b72198e14c938a35c35bb50bf6e0c61c2e3a7e759140984dc105" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Escaped string literal can be written as a raw string literal", + "markdown": "Escaped string literal can be written as a raw string literal" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 128, + "startColumn": 14, + "charOffset": 4037, + "charLength": 15, + "snippet": { + "text": "\"\\\"title\\\": \\\"\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 126, + "startColumn": 1, + "charOffset": 3974, + "charLength": 185, + "snippet": { + "text": "\tif (embed) {\r\n\t\tpayload << \"{ \\\"embeds\\\": [{ \";\r\n\t\tpayload << \"\\\"title\\\": \\\"\" << title << \"\\\", \";\r\n\t\tif (!message.empty()) {\r\n\t\t\tpayload << \"\\\"description\\\": \\\"\" << message << \"\\\", \";\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4732b9576c16492f", + "equalIndicator/v1": "4effe9193fcacd5228e55a1dda3ed782228918b1dc18fadbc52e6e0a82ecd1d3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 939, + "startColumn": 26, + "charOffset": 30548, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 937, + "startColumn": 1, + "charOffset": 30447, + "charLength": 137, + "snippet": { + "text": "\t\t\tvalue = attacker->getIncreasePercent(combatType);\r\n\t\t\tif (value != 0) {\r\n\t\t\t\tdamage += std::round(damage * value / 100.f);\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "07ef22c4dd91676d", + "equalIndicator/v1": "4f0af09ce1ccbf580e37e54a26801df5fc58c4ac4a48a37bdd3f9124ce3f35fc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1817, + "startColumn": 22, + "charOffset": 52089, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1815, + "startColumn": 1, + "charOffset": 52041, + "charLength": 101, + "snippet": { + "text": "\r\n\t\tif (it.showCharges) {\r\n\t\t\tint32_t charges = it.charges;\r\n\t\t\tif (charges != 0) {\r\n\t\t\t\tss.str(\"\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2d1f8027eb2aa82", + "equalIndicator/v1": "4f2a4c235b070516330dda7ea35a801b94fb7701e1ab75919c049168d3ac3fe5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'deprecatedOnKilledCreature' is within a recursive call chain", + "markdown": "Function 'deprecatedOnKilledCreature' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1274, + "startColumn": 16, + "charOffset": 39121, + "charLength": 26, + "snippet": { + "text": "deprecatedOnKilledCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1272, + "startColumn": 1, + "charOffset": 39101, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nbool Creature::deprecatedOnKilledCreature(std::shared_ptr target, bool lastHit) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tauto master = getMaster();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "15bafa3c754a4db6", + "equalIndicator/v1": "4f4d0fe47a6ed34d87a9758f2fe537300d717a73fc0ed78338d293e00a1ade45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1542, + "startColumn": 7, + "charOffset": 54160, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1540, + "startColumn": 1, + "charOffset": 54004, + "charLength": 358, + "snippet": { + "text": "void ValueCallback::getMinMaxValues(std::shared_ptr player, CombatDamage &damage, bool useCharges) const {\r\n\t// onGetPlayerMinMaxValues(...)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[ValueCallback::getMinMaxValues - Player {} formula {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "11f9fd00fe08c4bc", + "equalIndicator/v1": "4f650122717af54ef6027b7869074a71ae12718cc415520d98a0245645d611ce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3147, + "startColumn": 10, + "charOffset": 87295, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3145, + "startColumn": 1, + "charOffset": 87232, + "charLength": 121, + "snippet": { + "text": "\tuint32_t weight = getWeight();\r\n\tif (weight == 0) {\r\n\t\treturn std::string();\r\n\t}\r\n\treturn getWeightDescription(weight);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6c7d1ec2ba93d055", + "equalIndicator/v1": "4f76c8cc3711c2390ad52f50faf935b1376489295c9762aa565d484592193218" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1526, + "startColumn": 53, + "charOffset": 45337, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1524, + "startColumn": 1, + "charOffset": 45280, + "charLength": 105, + "snippet": { + "text": "}\r\n\r\nvoid Player::onClearImbuement(std::shared_ptr item, uint8_t slot) {\r\n\tif (!item) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "318e9b0b3c6c98ca", + "equalIndicator/v1": "4f8d40b166bb4025fb96f15adb960d79ba95bf15bb92366c742b90200503cc02" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Ilist', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Ilist', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/arraylist.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 30, + "startColumn": 47, + "charOffset": 885, + "charLength": 6, + "snippet": { + "text": "_Ilist" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 28, + "startColumn": 1, + "charOffset": 832, + "charLength": 102, + "snippet": { + "text": "\t\t}\r\n\r\n\t\texplicit arraylist(std::initializer_list _Ilist) {\r\n\t\t\tbackContainer.assign(_Ilist);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0523d512b4d9c0c6", + "equalIndicator/v1": "4f92ff48f8703c70fc4321073ba76b535828763192f3ec4115fbb25089ac2930" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6833, + "startColumn": 73, + "charOffset": 236194, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6831, + "startColumn": 1, + "charOffset": 236083, + "charLength": 329, + "snippet": { + "text": "\r\n// Custom PvP System combat helpers\r\nvoid Game::applyPvPDamage(CombatDamage &damage, std::shared_ptr attacker, std::shared_ptr target) {\r\n\tfloat targetDamageReceivedMultiplier = target->vocation->pvpDamageReceivedMultiplier;\r\n\tfloat attackerDamageDealtMultiplier = attacker->vocation->pvpDamageDealtMultiplier;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d999aa6c7fd15529", + "equalIndicator/v1": "50416f2bebd49c61b243141fdb5bd4685697922dc9c602766174bd986e7c2fff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2139, + "startColumn": 90, + "charOffset": 72236, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2137, + "startColumn": 1, + "charOffset": 72142, + "charLength": 284, + "snippet": { + "text": "}\r\n\r\nvoid Combat::applyExtensions(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (damage.extension || !caster || damage.primary.type == COMBAT_HEALING) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "43d0b556ceeac45f", + "equalIndicator/v1": "5047b64f94bae6401ea97e07989f8333b73c12a7c044afdbcbfe5c8dfe1d4288" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3081, + "startColumn": 80, + "charOffset": 85675, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3079, + "startColumn": 1, + "charOffset": 85591, + "charLength": 207, + "snippet": { + "text": "}\r\n\r\nstd::string Item::getNameDescription(const ItemType &it, std::shared_ptr item /*= nullptr*/, int32_t subType /*= -1*/, bool addArticle /*= true*/) {\r\n\tif (item) {\r\n\t\tsubType = item->getSubType();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "889791cd2d262e89", + "equalIndicator/v1": "50514af916a4b489e2d4082bfacf157d68f225d994c22b66538f21e5bd86de8b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Val', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Val', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorsort.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 76, + "startColumn": 22, + "charOffset": 1587, + "charLength": 4, + "snippet": { + "text": "_Val" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 74, + "startColumn": 1, + "charOffset": 1559, + "charLength": 101, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tvoid push_back(T &&_Val) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\tcontainer.push_back(std::move(_Val));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4942f860e6f66cc4", + "equalIndicator/v1": "509fc01897468c2865a507ab239fe8cdef9d4e1da5ffb6ff1105977d98dedc30" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'internalAddItem' is within a recursive call chain", + "markdown": "Function 'internalAddItem' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2197, + "startColumn": 19, + "charOffset": 83853, + "charLength": 15, + "snippet": { + "text": "internalAddItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2195, + "startColumn": 1, + "charOffset": 83830, + "charLength": 326, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalAddItem(std::shared_ptr toCylinder, std::shared_ptr item, int32_t index /*= INDEX_WHEREEVER*/, uint32_t flags /* = 0*/, bool test /* = false*/) {\r\n\tuint32_t remainderCount = 0;\r\n\treturn internalAddItem(std::move(toCylinder), std::move(item), index, flags, test, remainderCount);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d17a14efbe99549b", + "equalIndicator/v1": "50b82e39225a85724fd2596cc0901a442ed9fdfb6ebf8e0253b8b28bc9b3484a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'callback' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'callback' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasetasks.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 34, + "startColumn": 93, + "charOffset": 1217, + "charLength": 8, + "snippet": { + "text": "callback" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 1120, + "charLength": 223, + "snippet": { + "text": "}\r\n\r\nvoid DatabaseTasks::store(const std::string &query, std::function callback /* nullptr */) {\r\n\tthreadPool.detach_task([this, query, callback]() {\r\n\t\tDBResult_ptr result = db.storeQuery(query);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d306a889f2890c3c", + "equalIndicator/v1": "50f5740a7892830d6f60f65725c36c2d55b022bcfaa045277891d7053a785c9d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'initInt64Value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'initInt64Value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 19, + "startColumn": 52, + "charOffset": 557, + "charLength": 13, + "snippet": { + "text": "const int64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 17, + "startColumn": 1, + "charOffset": 482, + "charLength": 278, + "snippet": { + "text": "\t~CustomAttribute();\r\n\r\n\tCustomAttribute(const std::string &initStringKey, const int64_t initInt64Value);\r\n\tCustomAttribute(const std::string &initStringKey, const std::string &initStringValue);\r\n\tCustomAttribute(const std::string &initStringKey, const double initDoubleValue);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e669c39ac22c0761", + "equalIndicator/v1": "511e4ba79d2efa63a467753a37b5352b0c0391653656b84e31fac05e8a474bd2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 289, + "startColumn": 2, + "charOffset": 10383, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 287, + "startColumn": 1, + "charOffset": 10376, + "charLength": 66, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n\treturn returnValue;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5a1b748e1ce809d7", + "equalIndicator/v1": "51439a97d9b81bc45dab70e9109da53657d1994050d1d20307d7d499de0160ab" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 419, + "startColumn": 21, + "charOffset": 9953, + "charLength": 10, + "snippet": { + "text": "itemVector" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 417, + "startColumn": 1, + "charOffset": 9927, + "charLength": 69, + "snippet": { + "text": "\t}\r\n\r\n\tlua_createtable(L, itemVector->size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8be67a2ccb6df4b8", + "equalIndicator/v1": "51456e2ece5ca668ed8e2e9968899ea2aadd4e986f8df26fe7e37d70809faf20" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 111, + "startColumn": 18, + "charOffset": 3268, + "charLength": 17, + "snippet": { + "text": "getReflectPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 109, + "startColumn": 1, + "charOffset": 3246, + "charLength": 218, + "snippet": { + "text": "}\r\n\r\nint32_t Monster::getReflectPercent(CombatType_t reflectType, bool useCharges) const {\r\n\tint32_t result = Creature::getReflectPercent(reflectType, useCharges);\r\n\tauto it = mType->info.reflectMap.find(reflectType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5f8f6c7176d86c04", + "equalIndicator/v1": "516484b78d9707de50b0e6f00bada7af80ecf0d7cbd29c8def3f72c2b8c579c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::list\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 269, + "startColumn": 21, + "charOffset": 7514, + "charLength": 5, + "snippet": { + "text": "doors" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 267, + "startColumn": 1, + "charOffset": 7452, + "charLength": 99, + "snippet": { + "text": "\r\n\tconst auto doors = house->getDoors();\r\n\tlua_createtable(L, doors.size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "349de30d1bc65bb0", + "equalIndicator/v1": "518a7d0cea247e168d26cf71d21587e1a21484f8883cb7c0de3207ea80948a72" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 253, + "startColumn": 11, + "charOffset": 6425, + "charLength": 12, + "snippet": { + "text": "CreatureIcon" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 251, + "startColumn": 1, + "charOffset": 6313, + "charLength": 166, + "snippet": { + "text": "\tvirtual CreatureIcon getIcon(const std::string &key) const {\r\n\t\tif (!creatureIcons.contains(key)) {\r\n\t\t\treturn CreatureIcon();\r\n\t\t}\r\n\t\treturn creatureIcons.at(key);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2cbb720e22bd0c11", + "equalIndicator/v1": "518b8ef75d72da7a346a1b01e13341ecc209d53eb56e9213edf9d693d2c0e6a4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 397, + "startColumn": 9, + "charOffset": 11832, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 395, + "startColumn": 1, + "charOffset": 11795, + "charLength": 67, + "snippet": { + "text": "\t\treturn std::string();\r\n\t}\r\n\treturn std::string(c_str, len);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "05cc1b5cec28d1a4", + "equalIndicator/v1": "518f4cfbc4644795b0b872eb99e1f399355b12c26abd6e5047f219dc8a870856" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 778, + "startColumn": 62, + "charOffset": 25431, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 776, + "startColumn": 1, + "charOffset": 25365, + "charLength": 148, + "snippet": { + "text": "}\r\n\r\nbool InstantSpell::playerCastInstant(std::shared_ptr player, std::string ¶m) {\r\n\tif (!playerSpellCheck(player)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "23675ad72f52ff89", + "equalIndicator/v1": "519a6afadd10cbb08c3c196ce4fc0f3abb03fff77f5756f0026c9cee2eeb9287" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 282, + "startColumn": 84, + "charOffset": 7181, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 280, + "startColumn": 1, + "charOffset": 7093, + "charLength": 183, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Tile::getBottomVisibleCreature(std::shared_ptr creature) const {\r\n\tif (const CreatureVector* creatures = getCreatures()) {\r\n\t\tif (creature) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "094ae64eb9d32b99", + "equalIndicator/v1": "519eb666007e1f94bb2f7735732d1ae91afab90253c423bfc56af3b4d958067e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2076, + "startColumn": 15, + "charOffset": 61763, + "charLength": 12, + "snippet": { + "text": "changeHealth" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2074, + "startColumn": 1, + "charOffset": 61744, + "charLength": 289, + "snippet": { + "text": "}\r\n\r\nvoid Monster::changeHealth(int32_t healthChange, bool sendHealthChange /* = true*/) {\r\n\tif (mType && !mType->info.soundVector.empty() && mType->info.soundChance >= static_cast(uniform_random(1, 100))) {\r\n\t\tauto index = uniform_random(0, mType->info.soundVector.size() - 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0e6367beb65e674f", + "equalIndicator/v1": "51a7af034d367e205dc96e32bd5a67b3a503a6a4bd8527ddcee385bad70781ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2705, + "startColumn": 4, + "charOffset": 83468, + "charLength": 8, + "snippet": { + "text": "uint64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2703, + "startColumn": 1, + "charOffset": 83380, + "charLength": 178, + "snippet": { + "text": "\t\tfor (uint16_t i = 1; i <= size; i++) {\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint64_t price = msg.get();\r\n\t\t\tplayer->setItemCustomPrice(itemId, price);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e4ef03ce83d13c1", + "equalIndicator/v1": "51b280787dccdc7c5e337e54ede306a0dec58edc46ad5dd96258ae4440544cdd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 66, + "startColumn": 18, + "charOffset": 2103, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 64, + "startColumn": 1, + "charOffset": 2081, + "charLength": 232, + "snippet": { + "text": "}\r\n\r\nvoid DepotChest::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr localParent = getParent();\r\n\tif (localParent != nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bf40502f22404c40", + "equalIndicator/v1": "51c78c642d94932a469e1092e3cb34935d02f0ca9c70dc631ade0f705adf7f5d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7684, + "startColumn": 39, + "charOffset": 240423, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7682, + "startColumn": 1, + "charOffset": 240361, + "charLength": 231, + "snippet": { + "text": "\r\n\tif (!oldProtocol) {\r\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r\n\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fafa93fc5faccd06", + "equalIndicator/v1": "51f0b348240c6df35f45f22654026c99f07fbb7065396dddb7c08667828baf80" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 300, + "startColumn": 112, + "charOffset": 12460, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 298, + "startColumn": 1, + "charOffset": 12259, + "charLength": 414, + "snippet": { + "text": "\r\n\tvoid playerBosstiarySlot(uint32_t playerId, uint8_t slotId, uint32_t selectedBossId);\r\n\tvoid playerSetMonsterPodium(uint32_t playerId, uint32_t monsterRaceId, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t direction, const std::pair &podiumAndMonsterVisible);\r\n\tvoid playerRotatePodium(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b85fb9cfb7e95df2", + "equalIndicator/v1": "51f2f9efd5e2f91170cc5283135ca6e1927c4c3ebf9af818f285d78b4a38f6ea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 580, + "startColumn": 13, + "charOffset": 27497, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 578, + "startColumn": 1, + "charOffset": 27334, + "charLength": 383, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentenergy\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentfire\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0edc503b5836fc77", + "equalIndicator/v1": "51fa1cd8681d1e8dc2f3ee394b86cf4a622430055e7b48e829fc8a45819c747d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 572, + "startColumn": 19, + "charOffset": 16330, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 570, + "startColumn": 1, + "charOffset": 16307, + "charLength": 212, + "snippet": { + "text": "}\r\n\r\nReturnValue Tile::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t tileFlags, std::shared_ptr) {\r\n\tif (hasBitSet(FLAG_NOLIMIT, tileFlags)) {\r\n\t\treturn RETURNVALUE_NOERROR;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3a37531338c6d2aa", + "equalIndicator/v1": "52059bfa2e48c0889b21cd81688e01349eafe92ee790876d360aed938268d947" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3106, + "startColumn": 2, + "charOffset": 95142, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3104, + "startColumn": 1, + "charOffset": 95043, + "charLength": 233, + "snippet": { + "text": "void ProtocolGame::parseMarketCreateOffer(NetworkMessage &msg) {\r\n\tuint8_t type = msg.getByte();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t itemTier = 0;\r\n\tif (!oldProtocol && Item::items[itemId].upgradeClassification > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2dbbc7f565961df9", + "equalIndicator/v1": "523fd05b6716f04ec0a4a21dba316fcac381d046e051415de39a736ad0abf89b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 186, + "startColumn": 64, + "charOffset": 5159, + "charLength": 6, + "snippet": { + "text": "action" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 184, + "startColumn": 1, + "charOffset": 5090, + "charLength": 126, + "snippet": { + "text": "\t}\r\n\r\n\tvoid setItemId(uint16_t itemId, const std::shared_ptr action) {\r\n\t\tuseItemMap.try_emplace(itemId, action);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4b699050e92062f0", + "equalIndicator/v1": "5250e9560a22e5afe2c77ab96cef3a757f9cf550ffe29be7bec67ca11051e7be" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3071, + "startColumn": 60, + "charOffset": 114230, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3069, + "startColumn": 1, + "charOffset": 114166, + "charLength": 275, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::processLootItems(std::shared_ptr player, std::shared_ptr lootContainer, std::shared_ptr item, bool &fallbackConsumed) {\r\n\tstd::shared_ptr lastSubContainer = nullptr;\r\n\tuint32_t remainderCount = item->getItemCount();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f2f029635c371580", + "equalIndicator/v1": "5260db933403767cef60889c1ccc2658971fbd9d34d5410e7c4f643912d37696" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 263, + "startColumn": 29, + "charOffset": 7416, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 261, + "startColumn": 1, + "charOffset": 7369, + "charLength": 101, + "snippet": { + "text": "\r\n\tint index = 0;\r\n\tfor (std::shared_ptr item : items) {\r\n\t\tindex++;\r\n\t\tpushUserdata(L, item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "410185cc97fa24b9", + "equalIndicator/v1": "52afcef95609999700cf08f8159b6e42cbf3d585b137e6adcb4455e184dc0dc4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: recvbyte, delay", + "markdown": "Constructor does not initialize these fields: recvbyte, delay" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 96, + "startColumn": 9, + "charOffset": 2688, + "charLength": 6, + "snippet": { + "text": "Module" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 94, + "startColumn": 1, + "charOffset": 2675, + "charLength": 117, + "snippet": { + "text": "}\r\n\r\nModule::Module(LuaScriptInterface* interface) :\r\n\tEvent(interface), type(MODULE_TYPE_NONE), loaded(false) { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9c67a51fac0118e3", + "equalIndicator/v1": "52d6c8d8190b36517eddf546dd41cfe0f06c2d56bf278ad6231d6031e7ba0216" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1143, + "startColumn": 67, + "charOffset": 43389, + "charLength": 4, + "snippet": { + "text": "zone" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1141, + "startColumn": 1, + "charOffset": 43318, + "charLength": 237, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::zoneBeforeCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureEnter - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d9160335c2be92ae", + "equalIndicator/v1": "53085fcda9b242d4d77049130e5aa332698aa3cc1cd29d99cb3ea8a562775e96" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'creature' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'creature' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6526, + "startColumn": 115, + "charOffset": 205511, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6524, + "startColumn": 1, + "charOffset": 205392, + "charLength": 164, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendUpdateTileCreature(const Position &pos, uint32_t stackpos, const std::shared_ptr creature) {\r\n\tif (!canSee(pos)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "168a043a8138ab30", + "equalIndicator/v1": "531a3e9cfdb8af63b8fb6fd8c43b17d8821728cf803f55044b55ee2843206c32" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'spellName' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'spellName' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 258, + "startColumn": 30, + "charOffset": 6301, + "charLength": 9, + "snippet": { + "text": "spellName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 256, + "startColumn": 1, + "charOffset": 6169, + "charLength": 306, + "snippet": { + "text": "\tstd::string getFormattedAugmentDescription(const std::shared_ptr &augmentInfo) const;\r\n\r\n\tvoid addAugment(std::string spellName, Augment_t augmentType, int32_t value) {\r\n\t\tauto augmentInfo = std::make_shared(spellName, augmentType, value);\r\n\t\taugments.emplace_back(augmentInfo);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7b333420827668ac", + "equalIndicator/v1": "531b492696827af3fab809b507d92905fea8e0ee9f8c4de9645a5612cb4e7aa3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 802, + "startColumn": 55, + "charOffset": 25981, + "charLength": 8, + "snippet": { + "text": "maxValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 800, + "startColumn": 1, + "charOffset": 25921, + "charLength": 123, + "snippet": { + "text": "\t}\r\n\r\n\treturn -normal_random(minValue, static_cast(maxValue * player->getVocation()->distDamageMultiplier));\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "39cd3afef408fe2f", + "equalIndicator/v1": "532a5733625e51fbf59203cf34039e2f2d9bbdb02c365eabef37234ca3f2b772" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'getValueWrapper' is within a recursive call chain", + "markdown": "Function 'getValueWrapper' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 121, + "startColumn": 42, + "charOffset": 3042, + "charLength": 15, + "snippet": { + "text": "getValueWrapper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 119, + "startColumn": 1, + "charOffset": 2996, + "charLength": 147, + "snippet": { + "text": "}\r\n\r\nstd::optional KVFunctions::getValueWrapper(lua_State* L) {\r\n\tif (isBoolean(L, -1)) {\r\n\t\treturn ValueWrapper(getBoolean(L, -1));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4dc16dd0f7de1163", + "equalIndicator/v1": "5338e7fb008fad768e69bbbb60bac8a6ccd165524012abf4ecf098b56293469b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 112, + "startColumn": 77, + "charOffset": 3797, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 110, + "startColumn": 1, + "charOffset": 3716, + "charLength": 248, + "snippet": { + "text": "}\r\n\r\nReturnValue EventCallback::creatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnTargetCombat - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "226f91c4035c14af", + "equalIndicator/v1": "5363e4e16c200ecd4d0244f959ef52cae3a21d8727f2effdf6c8b6314b1415b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 797, + "startColumn": 92, + "charOffset": 26051, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 795, + "startColumn": 1, + "charOffset": 25955, + "charLength": 226, + "snippet": { + "text": "}\r\n\r\nvoid Combat::combatTileEffects(const CreatureVector &spectators, std::shared_ptr caster, std::shared_ptr tile, const CombatParams ¶ms) {\r\n\tif (params.itemId != 0) {\r\n\t\tuint16_t itemId = params.itemId;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "80eb49a841109e1f", + "equalIndicator/v1": "537436ce3e8306a4514fd9c30529c69d4868542c8cd0ad461d1ee744e606d016" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4681, + "startColumn": 7, + "charOffset": 147659, + "charLength": 31, + "snippet": { + "text": "auto [category, containersPair]" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4679, + "startColumn": 1, + "charOffset": 147533, + "charLength": 325, + "snippet": { + "text": "\r\n\tstd::map, std::shared_ptr>> managedContainersMap;\r\n\tfor (auto [category, containersPair] : player->m_managedContainers) {\r\n\t\tif (containersPair.first && !containersPair.first->isRemoved()) {\r\n\t\t\tmanagedContainersMap[category].first = containersPair.first;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9350fec88460b306", + "equalIndicator/v1": "5375c10c6452aba335d2c670daf256e709c03404322c741c5da724e80ce71533" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 153, + "startColumn": 7, + "charOffset": 4868, + "charLength": 11, + "snippet": { + "text": "removeThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 151, + "startColumn": 1, + "charOffset": 4778, + "charLength": 242, + "snippet": { + "text": "\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override final;\r\n\r\n\tvoid removeThing(std::shared_ptr thing, uint32_t count) override final;\r\n\r\n\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb507c7c98cb7ad0", + "equalIndicator/v1": "53b2e7e1a635f96e4652ce1dae69ab99c293b11c7177e1d2c27f2cbac66e5e17" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1405, + "startColumn": 9, + "charOffset": 40710, + "charLength": 5, + "snippet": { + "text": "items" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1403, + "startColumn": 1, + "charOffset": 40684, + "charLength": 87, + "snippet": { + "text": "\t\t\t}\r\n\t\t} else {\r\n\t\t\tn += items->getTopItemCount();\r\n\t\t\tif (n >= 10) {\r\n\t\t\t\treturn -1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "32da73a669fc7de4", + "equalIndicator/v1": "53b5e8a8021c2080ed6203e24d0aa19f599a3f0cd6e785f96f83a3442cbe2f69" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 804, + "startColumn": 68, + "charOffset": 30797, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 802, + "startColumn": 1, + "charOffset": 30725, + "charLength": 236, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnGainSkillTries(std::shared_ptr player, skills_t skill, uint64_t &tries) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnGainSkillTries - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1d78094c0ec14ef", + "equalIndicator/v1": "53be4937e6877ea490758cf77ece1b0da7fa9360590483fe4f132f5d885092bc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Hash, std::equal_to>, std::allocator>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Hash, std::equal_to\\>, std::allocator\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 727, + "startColumn": 2, + "charOffset": 20624, + "charLength": 305, + "snippet": { + "text": "/**\r\n\t * @brief Retrieve dummy IDs categorized by type.\r\n\t * @details This function provides a table containing two sub-tables: one for free dummies and one for house (or premium) dummies.\r\n\r\n\t* @note usage on lua:\r\n\t local dummies = Game.getDummies()\r\n\t local rate = dummies[1] -- Retrieve dummy ra" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 725, + "startColumn": 1, + "charOffset": 20567, + "charLength": 372, + "snippet": { + "text": "\r\nint GameFunctions::luaGameGetDummies(lua_State* L) {\r\n\t/**\r\n\t * @brief Retrieve dummy IDs categorized by type.\r\n\t * @details This function provides a table containing two sub-tables: one for free dummies and one for house (or premium) dummies.\r\n\r\n\t* @note usage on lua:\r\n\t local dummies = Game.getDummies()\r\n\t local rate = dummies[1] -- Retrieve dummy rate\r\n\t*/\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d85ef15921df9568", + "equalIndicator/v1": "53e27a36a84e7168545ebff4b3a072c3f96793c957ee5c1ec2b76b6612b82187" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6310, + "startColumn": 52, + "charOffset": 184934, + "charLength": 8, + "snippet": { + "text": "vocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6308, + "startColumn": 1, + "charOffset": 184779, + "charLength": 350, + "snippet": { + "text": "\tif (condition) {\r\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, vocation->getHealthGainAmount());\r\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, vocation->getManaGainTicks());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4e95bbc0e54345b1", + "equalIndicator/v1": "53e576d45160dac125bd2ef64a9c10e69e4daf02f4221d7ae66273ea7097944e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5769, + "startColumn": 26, + "charOffset": 170303, + "charLength": 8, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5767, + "startColumn": 1, + "charOffset": 170197, + "charLength": 277, + "snippet": { + "text": "\r\n\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\r\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\r\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);\r\n\t\tuint8_t skullDuration = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2f07e5522fc8876e", + "equalIndicator/v1": "53e9379a639e77ff5ad6eb79905b733147f1216c807dd92b062265512ff8502c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1408, + "startColumn": 14, + "charOffset": 37154, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1406, + "startColumn": 1, + "charOffset": 37118, + "charLength": 100, + "snippet": { + "text": "\r\n\tuint32_t guid = 0;\r\n\tstd::string name = \"\";\r\n\tstd::string description = \"\";\r\n\tuint32_t icon = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ed7efdc343cdd82e", + "equalIndicator/v1": "540635abc7eeceae82ffa275c5c190ca74b0e399cba7025b938024580158b8c3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?", + "markdown": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 532, + "startColumn": 7, + "charOffset": 14300, + "charLength": 25, + "snippet": { + "text": "Condition::startCondition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 530, + "startColumn": 1, + "charOffset": 14212, + "charLength": 148, + "snippet": { + "text": "\r\nbool ConditionAttributes::startCondition(std::shared_ptr creature) {\r\n\tif (!Condition::startCondition(creature)) {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a4bc6d65bd2bc8a6", + "equalIndicator/v1": "541c1d99c106f095d05dbdc49752abec8397f3a11e718f5e0b132bb08b2b50dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3462, + "startColumn": 19, + "charOffset": 104561, + "charLength": 9, + "snippet": { + "text": "slotIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3460, + "startColumn": 1, + "charOffset": 104449, + "charLength": 314, + "snippet": { + "text": "\t\t\t\tif (autoStack && isStackable) {\r\n\t\t\t\t\t// try find an already existing item to stack with\r\n\t\t\t\t\tif (queryAdd(slotIndex, item, item->getItemCount(), 0) == RETURNVALUE_NOERROR) {\r\n\t\t\t\t\t\tif (inventoryItem->equals(item) && inventoryItem->getItemCount() < inventoryItem->getStackSize()) {\r\n\t\t\t\t\t\t\tindex = slotIndex;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "72b173e663f67c78", + "equalIndicator/v1": "543197101bfb90befa262afc3cce15ca13af9b04f6a26fd3ae27a90f855b5cf6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 404, + "startColumn": 8, + "charOffset": 10062, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 402, + "startColumn": 1, + "charOffset": 9956, + "charLength": 226, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetExtraDefense(lua_State* L) {\r\n\t// itemType:getExtraDefense()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->extraDefense);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c5c75ecbb56a256", + "equalIndicator/v1": "54973398887b0ca0a5e0455ba728591993148b3ab84adca0a6bee939e1898d3c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1642, + "startColumn": 27, + "charOffset": 57694, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1640, + "startColumn": 1, + "charOffset": 57662, + "charLength": 159, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb71ba682e06db8d", + "equalIndicator/v1": "54a475664a98d9f680c04d01cf0e1f79dd98ff447fad887fe4888d3d789d5673" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv_sql.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 33, + "charOffset": 1362, + "charLength": 10, + "snippet": { + "text": "loadPrefix" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1325, + "charLength": 177, + "snippet": { + "text": "}\r\n\r\nstd::vector KVSQL::loadPrefix(const std::string &prefix /* = \"\"*/) {\r\n\tstd::vector keys;\r\n\tstd::string keySearch = db.escapeString(prefix + \"%\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cd489c5b555e73c8", + "equalIndicator/v1": "54a93d5c59afcd09e5ffb57150e69dc275c39f26b0492083bf49323b1ca168d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 91, + "startColumn": 41, + "charOffset": 3164, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 89, + "startColumn": 1, + "charOffset": 3118, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "325535fa0e914331", + "equalIndicator/v1": "54c5ff8b876bbfcce4b5961e08778f83530eeab5e0c5bbac76d3635817cc468d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3482, + "startColumn": 3, + "charOffset": 107032, + "charLength": 8, + "snippet": { + "text": "skills_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3480, + "startColumn": 1, + "charOffset": 106886, + "charLength": 300, + "snippet": { + "text": "\tfor (uint8_t i = SKILL_FIRST; i < SKILL_CRITICAL_HIT_CHANCE; ++i) {\r\n\t\tstatic const uint8_t HardcodedSkillIds[] = { 11, 9, 8, 10, 7, 6, 13 };\r\n\t\tskills_t skill = static_cast(i);\r\n\t\tif (!oldProtocol && (skill == SKILL_LIFE_LEECH_CHANCE || skill == SKILL_MANA_LEECH_CHANCE)) {\r\n\t\t\tcontinue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ccb0dc438f1e2c8f", + "equalIndicator/v1": "54edbf9e5657184d62ba4baaa6764e8c5588735c8c4da5e340a22b4b4442dbbb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 340, + "startColumn": 18, + "charOffset": 9679, + "charLength": 27, + "snippet": { + "text": "(1.35 + (stacks - 1) * 0.1)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 338, + "startColumn": 1, + "charOffset": 9558, + "charLength": 177, + "snippet": { + "text": "\t\tfloat multiplier = mType->getAttackMultiplier();\r\n\t\tif (auto stacks = getForgeStack(); stacks > 0) {\r\n\t\t\tmultiplier *= (1.35 + (stacks - 1) * 0.1);\r\n\t\t}\r\n\t\treturn multiplier;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1cad02c475b1a1fc", + "equalIndicator/v1": "54ef398c51ff91d10f715bf92b777a72a667efcf230148f7c712dc132d400c6e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1134, + "startColumn": 6, + "charOffset": 43108, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1132, + "startColumn": 1, + "charOffset": 43052, + "charLength": 199, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, position);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d4999975948997d5", + "equalIndicator/v1": "55320d463e47741b2c86eb346612b6cf12091f0c85d05da419864fd82f668b5d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 894, + "startColumn": 54, + "charOffset": 29048, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 892, + "startColumn": 1, + "charOffset": 28990, + "charLength": 120, + "snippet": { + "text": "}\r\n\r\nvoid Creature::drainHealth(std::shared_ptr attacker, int32_t damage) {\r\n\tchangeHealth(-damage, false);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "14b6b546173a7432", + "equalIndicator/v1": "554933b970d2957314462353a627730b7519b7a6e103b133f8d670a8316aaf59" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 15, + "charOffset": 1160, + "charLength": 16, + "snippet": { + "text": "internalAddThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 1073, + "charLength": 209, + "snippet": { + "text": "\r\n\tvoid addThing(int32_t index, std::shared_ptr thing) override;\r\n\tvoid virtual internalAddThing(uint32_t index, std::shared_ptr thing) override;\r\n\r\n\tstd::shared_ptr getHouse() override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "de5bee2f6cc2ad95", + "equalIndicator/v1": "5570fca0a10ebef57a79685786c276d4ba941671152b62106fb50501f1cd76a6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 60, + "startColumn": 10, + "charOffset": 1425, + "charLength": 13, + "snippet": { + "text": "gainManaTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 58, + "startColumn": 1, + "charOffset": 1376, + "charLength": 136, + "snippet": { + "text": "\r\n\tuint32_t getManaGainTicks() const {\r\n\t\treturn gainManaTicks / g_configManager().getFloat(RATE_MANA_REGEN_SPEED, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd457d6b81d46a1e", + "equalIndicator/v1": "557d88b0becd74c9dfab33900f4fd4d7ceb40a18a6b3951f3696d036373f3f55" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 95, + "startColumn": 34, + "charOffset": 2902, + "charLength": 4, + "snippet": { + "text": "keys" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 93, + "startColumn": 1, + "charOffset": 2796, + "charLength": 158, + "snippet": { + "text": "\r\n\tstd::shared_ptr scoped(const std::string &scope) override final;\r\n\tstd::unordered_set keys(const std::string &prefix = \"\");\r\n\r\nprotected:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dab161a9d384b6b8", + "equalIndicator/v1": "5598a6a5d26d9c8bb6b813a13ddbc5dcb2d28df972a810417b9ff1601d4d1d7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1152, + "startColumn": 54, + "charOffset": 34820, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1150, + "startColumn": 1, + "charOffset": 34762, + "charLength": 132, + "snippet": { + "text": "}\r\n\r\nbool Monster::pushCreature(std::shared_ptr creature) {\r\n\tstatic std::vector dirList {\r\n\t\tDIRECTION_NORTH,\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b313edb24c2eea56", + "equalIndicator/v1": "55999daf8e7dcf4f162952a9706fae1f82fd68105fae003a97b8d65dcac3929a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 192, + "startColumn": 58, + "charOffset": 5995, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 190, + "startColumn": 1, + "charOffset": 5933, + "charLength": 195, + "snippet": { + "text": "}\r\n\r\nReturnValue Actions::canUseFar(std::shared_ptr creature, const Position &toPos, bool checkLineOfSight, bool checkFloor) {\r\n\tif (toPos.x == 0xFFFF) {\r\n\t\treturn RETURNVALUE_NOERROR;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7e6ebbe611a044e2", + "equalIndicator/v1": "55a482b2629c57d850918c96670d79743a9e101f2914fee77634237554cb4183" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1143, + "startColumn": 7, + "charOffset": 40944, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1141, + "startColumn": 1, + "charOffset": 40932, + "charLength": 148, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnCombat - \"\r\n\t\t \"Player {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "613e576970800c8f", + "equalIndicator/v1": "55aceabd7dfd0710bf8f8c56ba7156b8e8bd76ffc49705f51f1f771aa6c57bf5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9000, + "startColumn": 2, + "charOffset": 286766, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8998, + "startColumn": 1, + "charOffset": 286671, + "charLength": 207, + "snippet": { + "text": "\tuint16_t monsterRaceId = (uint16_t)msg.get();\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tuint8_t direction = msg.getByte();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "814b7dd84e447201", + "equalIndicator/v1": "55ebe99b509259ab3662d4326174a134cecb1f3029586e5b7e34b4435f0cd3ed" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/metrics/metrics.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 189, + "startColumn": 2, + "charOffset": 6975, + "charLength": 20, + "snippet": { + "text": "DEFINE_LATENCY_CLASS" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 187, + "startColumn": 1, + "charOffset": 6877, + "charLength": 248, + "snippet": { + "text": "\tDEFINE_LATENCY_CLASS(method, \"method\", \"method\");\r\n\tDEFINE_LATENCY_CLASS(lua, \"lua\", \"scope\");\r\n\tDEFINE_LATENCY_CLASS(query, \"query\", \"truncated_query\");\r\n\tDEFINE_LATENCY_CLASS(task, \"task\", \"task\");\r\n\tDEFINE_LATENCY_CLASS(lock, \"lock\", \"scope\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dbadd63ce48721b3", + "equalIndicator/v1": "55f98898fbe27f5b25dfff541acc352247b8798bc95c86de1a1c7ddb716070fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 47, + "startColumn": 22, + "charOffset": 1804, + "charLength": 28, + "snippet": { + "text": "CONDITION_PARAM_TICKINTERVAL" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 45, + "startColumn": 1, + "charOffset": 1452, + "charLength": 517, + "snippet": { + "text": "std::shared_ptr Monsters::getDamageCondition(ConditionType_t conditionType, int32_t maxDamage, int32_t minDamage, int32_t startDamage, uint32_t tickInterval) {\r\n\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, 0, 0)->static_self_cast();\r\n\tcondition->setParam(CONDITION_PARAM_TICKINTERVAL, tickInterval);\r\n\tcondition->setParam(CONDITION_PARAM_MINVALUE, minDamage);\r\n\tcondition->setParam(CONDITION_PARAM_MAXVALUE, maxDamage);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "936a24a58ce103aa", + "equalIndicator/v1": "5611b7d3b378dbcc361d90bee58d611557a6fbe0852a99c2e7748bce68ca5e96" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1251, + "startColumn": 10, + "charOffset": 34640, + "charLength": 11, + "snippet": { + "text": "healthTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1249, + "startColumn": 1, + "charOffset": 34592, + "charLength": 131, + "snippet": { + "text": "\r\n\tif (player != nullptr && isBuff) {\r\n\t\treturn healthTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2b408c742833826c", + "equalIndicator/v1": "561ea8a815ce356ed40848fa7311ca1bb41eba7fef122786b5b78492062b2f2a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 158, + "startColumn": 37, + "charOffset": 5170, + "charLength": 11, + "snippet": { + "text": "frame_group" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 156, + "startColumn": 1, + "charOffset": 5023, + "charLength": 229, + "snippet": { + "text": "\t\tif (supportAnimation) {\r\n\t\t\tfor (uint32_t frame_it = 0; frame_it < object.frame_group_size(); ++frame_it) {\r\n\t\t\t\tFrameGroup objectFrame = object.frame_group(frame_it);\r\n\t\t\t\tif (!objectFrame.has_sprite_info()) {\r\n\t\t\t\t\tcontinue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "88916cc66624a9b7", + "equalIndicator/v1": "5643a93a8e5dce82d6c317ef0073223c89dd47df14725819000fcb5399d55f37" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 150, + "startColumn": 98, + "charOffset": 5228, + "charLength": 7, + "snippet": { + "text": "speaker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 148, + "startColumn": 1, + "charOffset": 5126, + "charLength": 271, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::creatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnHear - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "df9058f0f00f3374", + "equalIndicator/v1": "564bcdf435d6b744a8cceb4c28581f2776c30c195df763ea68fd0b554b23af63" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1144, + "startColumn": 7, + "charOffset": 43446, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1142, + "startColumn": 1, + "charOffset": 43321, + "charLength": 278, + "snippet": { + "text": "\r\nbool EventCallback::zoneBeforeCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureEnter - \"\r\n\t\t \"Zone {} Creature {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fbd518e4cdfd9c10", + "equalIndicator/v1": "565a19e9385c4d6c74c35c9fc58b9a681c174eadecbcd0dec10479c90b945544" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 137, + "startColumn": 45, + "charOffset": 3626, + "charLength": 6, + "snippet": { + "text": "amount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 135, + "startColumn": 1, + "charOffset": 3541, + "charLength": 181, + "snippet": { + "text": "\t}\r\n\tg_game().addMoney(player, amount);\r\n\tg_metrics().addCounter(\"balance_decrease\", amount, { { \"player\", player->getName() }, { \"context\", \"bank_withdraw\" } });\r\n\treturn true;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "08a8d2537de1f897", + "equalIndicator/v1": "56677defd85f105f911ab8789ad7001c30b3643f6a122a8d7d89bbd252f8f73d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant return statement at the end of a function with a void return type", + "markdown": "Redundant return statement at the end of a function with a void return type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1589, + "startColumn": 2, + "charOffset": 47193, + "charLength": 6, + "snippet": { + "text": "return" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1587, + "startColumn": 1, + "charOffset": 47174, + "charLength": 32, + "snippet": { + "text": "\t\tgetchar();\r\n\t}\r\n\treturn;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "02147ae4f255b6f8", + "equalIndicator/v1": "56913809ea79e4f32e6a3fb901e02f28f2c3c412354e672c25e2f511ac3403df" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1101, + "startColumn": 49, + "charOffset": 35993, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1099, + "startColumn": 1, + "charOffset": 35940, + "charLength": 206, + "snippet": { + "text": "}\r\n\r\nbool Combat::doCombat(std::shared_ptr caster, const Position &position) const {\r\n\tif (caster != nullptr && params.chainCallback) {\r\n\t\treturn doCombatChain(caster, caster, params.aggressive);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "60d4b23fe045f368", + "equalIndicator/v1": "5696bd70339aec1c6118178c5bb045d47e97ac9ad91e5338988ffb16329c8d45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 685, + "startColumn": 20, + "charOffset": 20518, + "charLength": 22, + "snippet": { + "text": "std::hash" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 683, + "startColumn": 1, + "charOffset": 20460, + "charLength": 132, + "snippet": { + "text": "\r\n\t// className.metatable['h'] = hash\r\n\tlua_pushnumber(L, std::hash()(className));\r\n\tlua_rawseti(L, metatable, 'h');\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e996bae86c5767ca", + "equalIndicator/v1": "56a8c344e6d8a2705ed01f433e01b6b4932d4bcec4ebb97dcfd040b97c884fc0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 322, + "startColumn": 18, + "charOffset": 9085, + "charLength": 21, + "snippet": { + "text": "getElementDamageValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 320, + "startColumn": 1, + "charOffset": 9041, + "charLength": 96, + "snippet": { + "text": "\t\treturn elementType;\r\n\t}\r\n\tvirtual int16_t getElementDamageValue() const override;\r\n\r\nprivate:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "514097b64ee535c0", + "equalIndicator/v1": "56b5b82f07383ddc3e5fca59062d3c2b4d14a246f8db1ffb01eec67a059a4909" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1493, + "startColumn": 51, + "charOffset": 45615, + "charLength": 8, + "snippet": { + "text": "interval" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1491, + "startColumn": 1, + "charOffset": 45496, + "charLength": 183, + "snippet": { + "text": "\twhile (it != end) {\r\n\t\tstd::shared_ptr condition = *it;\r\n\t\tif (!condition->executeCondition(getCreature(), interval)) {\r\n\t\t\tConditionType_t type = condition->getType();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f2312085b46d24fa", + "equalIndicator/v1": "570fcdafea3868399476e3804c20300340d5484506e08cf69d90f2ce01b1a969" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: m_value", + "markdown": "Constructor does not initialize these fields: m_value" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 214, + "startColumn": 11, + "charOffset": 6500, + "charLength": 29, + "snippet": { + "text": "GemModifierRevelationStrategy" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 212, + "startColumn": 1, + "charOffset": 6413, + "charLength": 260, + "snippet": { + "text": "class GemModifierRevelationStrategy : public GemModifierStrategy {\r\npublic:\r\n\texplicit GemModifierRevelationStrategy(PlayerWheel &wheel, WheelGemAffinity_t affinity, [[maybe_unused]] uint16_t value) :\r\n\t\tGemModifierStrategy(wheel),\r\n\t\tm_affinity(affinity) { }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4aaa2e9c9cefa346", + "equalIndicator/v1": "5711f49998254f7fc9a210231eaec0bc0eb459befaa3d80734be5755448e262e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 365, + "startColumn": 108, + "charOffset": 10537, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 363, + "startColumn": 1, + "charOffset": 10425, + "charLength": 284, + "snippet": { + "text": "}\r\n\r\nvoid House::handleWrapableItem(ItemList &moveItemList, std::shared_ptr item, std::shared_ptr player, std::shared_ptr houseTile) const {\r\n\tif (item->isWrapContainer()) {\r\n\t\tg_logger().debug(\"[{}] found wrapable item '{}'\", __FUNCTION__, item->getName());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "651b35710a81e8e7", + "equalIndicator/v1": "57173845b53dda9263e63191b77e0bf2bb87d7a78e2a3234b28538dd102ab7e4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5671, + "startColumn": 49, + "charOffset": 167680, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5669, + "startColumn": 1, + "charOffset": 167627, + "charLength": 153, + "snippet": { + "text": "}\r\n\r\nbool Player::isInviting(std::shared_ptr player) const {\r\n\tif (!player || !m_party || m_party->getLeader().get() != this) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb42d3a26dbcdf81", + "equalIndicator/v1": "571f5c4a8c5303cc5b23d0230e7d36d8b64bab1aa366c5647237369695d13778" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 10, + "charOffset": 2102, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2015, + "charLength": 175, + "snippet": { + "text": "\tfloat getMitigation() const override;\r\n\tint32_t getArmor() const override {\r\n\t\treturn mType->info.armor * getDefenseMultiplier();\r\n\t}\r\n\tint32_t getDefense() const override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d732cdb3edbd9727", + "equalIndicator/v1": "5740824de7556c13a34fc5c3e286323eeeaed76c155556469e5cb17586ecc727" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Switch has 2 consecutive identical branches", + "markdown": "Switch has 2 consecutive identical branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 216, + "startColumn": 3, + "charOffset": 6417, + "charLength": 4, + "snippet": { + "text": "case" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 214, + "startColumn": 1, + "charOffset": 6372, + "charLength": 183, + "snippet": { + "text": "\t\t\tfieldCheck = \"player_guid\";\r\n\t\t\tbreak;\r\n\t\tcase HighscoreCategories_t::DROME:\r\n\t\t\t// todo check if player is in the top 5 for the previous rota of the Tibiadrome.\r\n\t\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eea903d72771759c", + "equalIndicator/v1": "57437ff658eda71e4b1bbffc59077154dbed007b399c8bb241a31e23774f4639" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1137, + "startColumn": 58, + "charOffset": 40696, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1135, + "startColumn": 1, + "charOffset": 40634, + "charLength": 286, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) {\r\n\t// Player:onCombat(target, item, primaryDamage, primaryType, secondaryDamage, secondaryType)\r\n\tif (info.playerOnCombat == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7454487884653b87", + "equalIndicator/v1": "575394b2725e8c939b922ced031b154370e9abcaf27cc5da116e0f5e1938912f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 125, + "startColumn": 11, + "charOffset": 3575, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 123, + "startColumn": 1, + "charOffset": 3477, + "charLength": 153, + "snippet": { + "text": "\tpugi::xml_attribute delayAttribute = node.attribute(\"delay\");\r\n\tif (delayAttribute) {\r\n\t\tdelay = static_cast(delayAttribute.as_uint());\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "072d56a36ce282c4", + "equalIndicator/v1": "575886a6491325f225f60cdf768f0aeafa4a551300d981c83bb7ac52067503ae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1395, + "startColumn": 73, + "charOffset": 48105, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1393, + "startColumn": 1, + "charOffset": 48028, + "charLength": 240, + "snippet": { + "text": "}\r\n\r\n[[maybe_unused]] void Combat::doCombatDefault(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\r\n\tdoCombatDefault(caster, target, caster ? caster->getPosition() : Position(), params);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2a74db57fff783ae", + "equalIndicator/v1": "57610519b71aba1db7595a1477281040ee7e7ffc19195f39f6a9db2527a16faa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 235, + "startColumn": 24, + "charOffset": 7207, + "charLength": 7, + "snippet": { + "text": "getItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 233, + "startColumn": 1, + "charOffset": 7126, + "charLength": 148, + "snippet": { + "text": "\tbool equals(std::shared_ptr compareItem) const;\r\n\r\n\tstd::shared_ptr getItem() override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d3a18068347b6a14", + "equalIndicator/v1": "57870e8ea6bf629439aba78fc98b2a5c69e45043b85c2e9aff8d4a481318511b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The 'empty' method should be used to check for emptiness instead of 'size'", + "markdown": "The 'empty' method should be used to check for emptiness instead of 'size'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 399, + "startColumn": 71, + "charOffset": 12130, + "charLength": 12, + "snippet": { + "text": "getContainer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 397, + "startColumn": 1, + "charOffset": 12039, + "charLength": 198, + "snippet": { + "text": "\t\treturn false;\r\n\t}\r\n\tauto isContainerAndHasSomethingInside = (getContainer() != NULL) && (getContainer()->getItemList().size() > 0);\r\n\treturn (isStowable() || isContainerAndHasSomethingInside);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dee2e5f40397a5d3", + "equalIndicator/v1": "57e565168521cd3d7fa404a469f2c8ad2e44bbc005c2d3e25786a2ed6ddd84de" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 362, + "startColumn": 7, + "charOffset": 10341, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 360, + "startColumn": 1, + "charOffset": 10200, + "charLength": 338, + "snippet": { + "text": "bool CombatSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var) const {\r\n\t// onCastSpell(creature, var)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[CombatSpell::executeCastSpell - Creature {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "664f7ad596ed7c60", + "equalIndicator/v1": "58273ac349554715587350030eecb784d75f78177939d1710ebcae660ae382bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'func' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'func' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1122, + "startColumn": 188, + "charOffset": 36851, + "charLength": 4, + "snippet": { + "text": "func" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1120, + "startColumn": 1, + "charOffset": 36659, + "charLength": 269, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatFunc(std::shared_ptr caster, const Position &origin, const Position &pos, const std::unique_ptr &area, const CombatParams ¶ms, CombatFunction func, CombatDamage* data) {\r\n\tstd::vector> tileList;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4e59325ffe0a74aa", + "equalIndicator/v1": "5851dfff41eee90a4db498d585a08e3528a2642d90ab2c5ececf9ea0e3651395" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 536, + "startColumn": 35, + "charOffset": 17903, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 534, + "startColumn": 1, + "charOffset": 17814, + "charLength": 151, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, fromPosition);\r\n\r\n\tLuaScriptInterface::pushThing(L, target);\r\n\tLuaScriptInterface::pushPosition(L, toPosition);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eae5e0510b5e542d", + "equalIndicator/v1": "5874c2339379030cddc83b57873f4eec275d2bdb16d6fe570d7b60b61fb00795" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1234, + "startColumn": 27, + "charOffset": 44008, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1232, + "startColumn": 1, + "charOffset": 43976, + "charLength": 135, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnRequestQuestLine, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "faeee4f742cf88b5", + "equalIndicator/v1": "5877f0f54fda61ef4933b9a5dce8914604d9224b75058eba712bd93cd4f13a8f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6068, + "startColumn": 62, + "charOffset": 193164, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6066, + "startColumn": 1, + "charOffset": 193098, + "charLength": 201, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureSay(std::shared_ptr creature, SpeakClasses type, const std::string &text, const Position* pos /* = nullptr*/) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0xAA);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e8d81fea1dca1606", + "equalIndicator/v1": "587a83f56de5740728a35499f73d2461e115c1ff89f32a3126e9506dfefa17d9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6172, + "startColumn": 50, + "charOffset": 213291, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6170, + "startColumn": 1, + "charOffset": 213237, + "charLength": 220, + "snippet": { + "text": "}\r\n\r\nbool Game::playerSpeakTo(std::shared_ptr player, SpeakClasses type, const std::string &receiver, const std::string &text) {\r\n\tstd::shared_ptr toPlayer = getPlayerByName(receiver);\r\n\tif (!toPlayer) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9bbf6fd17f7a0bfd", + "equalIndicator/v1": "588008e7bf993a2a3eb0020a461cad24cecd9cf71baf7910f382dd8ad12b797e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 791, + "startColumn": 21, + "charOffset": 25681, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 789, + "startColumn": 1, + "charOffset": 25609, + "charLength": 210, + "snippet": { + "text": "\tfloat attackFactor = player->getAttackFactor();\r\n\r\n\tint32_t minValue = std::round(player->getLevel() / 5);\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5e7f382fbf862dcd", + "equalIndicator/v1": "58849d8ba7db424274230e7acb0b6294442f5699ff7041b6226de7449d6406c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1680, + "startColumn": 11, + "charOffset": 50057, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1678, + "startColumn": 1, + "charOffset": 50005, + "charLength": 74, + "snippet": { + "text": "\t\t\treturn \"Unassigned Loot\";\r\n\t\tdefault:\r\n\t\t\treturn std::string();\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ba05d67982d0e881", + "equalIndicator/v1": "58a1d162d5c8e450289693ec26fba4813920331aad9c4f13b521460694402d0f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 119, + "startColumn": 16, + "charOffset": 3778, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 117, + "startColumn": 1, + "charOffset": 3758, + "charLength": 217, + "snippet": { + "text": "}\r\n\r\nvoid Teleport::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tgetParent()->postAddNotification(thing, oldParent, index, LINK_PARENT);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "293fa8b33a70ea2b", + "equalIndicator/v1": "58b23a79185a1cbd832ebe9f9b74c4fa85b8145e3e6f356299a9b6c8b1dc1fc4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 508, + "startColumn": 33, + "charOffset": 14621, + "charLength": 9, + "snippet": { + "text": "spectator" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 506, + "startColumn": 1, + "charOffset": 14568, + "charLength": 170, + "snippet": { + "text": "\r\n\t// event methods\r\n\tfor (std::shared_ptr spectator : spectators) {\r\n\t\tspectator->onRemoveTileItem(static_self_cast(), cylinderMapPos, iType, item);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8f297ffabbf1ad4e", + "equalIndicator/v1": "58c39645124c40c0e31b15a8f53283898f7409a6f092d5b6a107c1b5a2f907f6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7560, + "startColumn": 108, + "charOffset": 263613, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7558, + "startColumn": 1, + "charOffset": 263463, + "charLength": 282, + "snippet": { + "text": "// Mana leech\r\nvoid Game::applyManaLeech(\r\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\r\n) const {\r\n\t// Wheel of destiny bonus - mana leech chance and amount\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f0b4ec0bacdd28b2", + "equalIndicator/v1": "58d0f88862a13e514ef7bb22be1e7ff9cb2aae02203deb311f5d022db37d2929" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 578, + "startColumn": 13, + "charOffset": 27346, + "charLength": 13, + "snippet": { + "text": "absorbPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 576, + "startColumn": 1, + "charOffset": 27184, + "charLength": 353, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentenergy\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e32b35e7149bd992", + "equalIndicator/v1": "58e43a38813433557541236850e2da3af1d322c9de176ac720bb6dd0362760a1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 139, + "startColumn": 8, + "charOffset": 4176, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 137, + "startColumn": 1, + "charOffset": 4060, + "charLength": 317, + "snippet": { + "text": "\t\t// onCreatureAppear(self, creature)\r\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\r\n\t\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\t\tg_logger().error(\"[Monster::onCreatureAppear - Monster {} creature {}] \"\r\n\t\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dea42bd8677ba618", + "equalIndicator/v1": "592a71f2a0eb4f0d461a99b7d81848bb63556c6f0aedf6573c5e9998cdb6a449" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 571, + "startColumn": 37, + "charOffset": 15396, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 569, + "startColumn": 1, + "charOffset": 15331, + "charLength": 145, + "snippet": { + "text": "\r\n\t\t\tcase STAT_MAGICPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getBaseMagicLevel() * ((statsPercent[i] - 100) / 100.f));\r\n\t\t\t\tbreak;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e1aae118837cbcae", + "equalIndicator/v1": "594416bc6c234c82536838ea012f18ffa917ff0e2e584dcd640c199c77b8f4b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 16, + "startColumn": 19, + "charOffset": 560, + "charLength": 13, + "snippet": { + "text": "getThingIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 434, + "charLength": 188, + "snippet": { + "text": "std::shared_ptr VirtualCylinder::virtualCylinder = std::make_shared();\r\n\r\nint32_t Cylinder::getThingIndex(std::shared_ptr) const {\r\n\treturn -1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "37eaf2cdb9dc01c7", + "equalIndicator/v1": "594702255ccd12ab75a15cf5915b38eadf337bfa26d185aade5f6fc537e860ea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7934, + "startColumn": 90, + "charOffset": 240490, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7932, + "startColumn": 1, + "charOffset": 240396, + "charLength": 190, + "snippet": { + "text": "}\r\n\r\nvoid Player::parseAttackDealtHazardSystem(CombatDamage &damage, std::shared_ptr monster) {\r\n\tif (!g_configManager().getBoolean(TOGGLE_HAZARDSYSTEM, __FUNCTION__)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6d3e208cb5390997", + "equalIndicator/v1": "595732069b8bff64c98a77c18918939737419fd6f0a68a5bade7de7f3d4f2d7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Tree, std::allocator>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Tree, std::allocator\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 912, + "startColumn": 58, + "charOffset": 27826, + "charLength": 1, + "snippet": { + "text": "0" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 910, + "startColumn": 1, + "charOffset": 27763, + "charLength": 176, + "snippet": { + "text": "\t}\r\n\r\n\tlua_createtable(L, monsterType->info.elementMap.size(), 0);\r\n\tfor (const auto &elementEntry : monsterType->info.elementMap) {\r\n\t\tlua_pushnumber(L, elementEntry.second);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f0f26a3dc0746b6", + "equalIndicator/v1": "595789c0b1edcc3d098e26724c80dadb876431252a4744abef65d13530da012c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 567, + "startColumn": 21, + "charOffset": 18570, + "charLength": 5, + "snippet": { + "text": "level" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 565, + "startColumn": 1, + "charOffset": 18376, + "charLength": 226, + "snippet": { + "text": "\tint32_t maxValue = static_cast(Weapons::getMaxWeaponDamage(level, attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\r\n\r\n\tint32_t minValue = level / 5;\r\n\r\n\tif (maxDamage) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "772670a2f71ce689", + "equalIndicator/v1": "5994bcd6f732215c991cd055c7ecf88c00e3c5dc73c05f2928d9a9b255c20e9a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 146, + "startColumn": 28, + "charOffset": 4478, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 144, + "startColumn": 1, + "charOffset": 4444, + "charLength": 140, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\t\tenv->setScriptId(mType->info.creatureAppearEvent, scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82471a51e97f7925", + "equalIndicator/v1": "59b7690a3da973dfd4683a67853f671618d909c4681bbb42cc99033eb5526337" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6092, + "startColumn": 82, + "charOffset": 179338, + "charLength": 12, + "snippet": { + "text": "nextReqTries" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6090, + "startColumn": 1, + "charOffset": 179142, + "charLength": 242, + "snippet": { + "text": "\t\tif (nextReqTries > currReqTries) {\r\n\t\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\r\n\t\t\tnewPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\r\n\t\t} else {\r\n\t\t\tnewPercent = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "432c951bcce0a220", + "equalIndicator/v1": "59bebfed42b33bb8219efadb8a0b82750d6f61fed909726d2cc641bf05300a77" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6840, + "startColumn": 25, + "charOffset": 236671, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6838, + "startColumn": 1, + "charOffset": 236517, + "charLength": 298, + "snippet": { + "text": "\tfloat pvpDamageMultiplier = targetDamageReceivedMultiplier * attackerDamageDealtMultiplier * levelDifferenceDamageMultiplier;\r\n\r\n\tdamage.primary.value = std::round(damage.primary.value * pvpDamageMultiplier);\r\n\tdamage.secondary.value = std::round(damage.secondary.value * pvpDamageMultiplier);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dada756f615dfc61", + "equalIndicator/v1": "59f511fa5ea3ce8267189511ae134150541fc0e70f35710fc9afeac071c9f32c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 502, + "startColumn": 25, + "charOffset": 27074, + "charLength": 31, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 500, + "startColumn": 1, + "charOffset": 27018, + "charLength": 264, + "snippet": { + "text": "\r\n\t// Animation help functions\r\n\tvoid addCreatureHealth(const std::shared_ptr target);\r\n\tstatic void addCreatureHealth(const CreatureVector &spectators, const std::shared_ptr target);\r\n\tvoid addPlayerMana(const std::shared_ptr target);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ecef3bfbc1dd613", + "equalIndicator/v1": "59f84e60b28e4c03fab378791ceb8c1bce026696d6bcc408539e8d00c07bf0c5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1215, + "startColumn": 98, + "charOffset": 46358, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1213, + "startColumn": 1, + "charOffset": 46256, + "charLength": 235, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::zoneAfterCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureLeave - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "429012f7050e8a83", + "equalIndicator/v1": "5a115056e795994f4c17db6ccce51143798fc687342d839f03ed1946b7e24bc3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 348, + "startColumn": 115, + "charOffset": 12975, + "charLength": 5, + "snippet": { + "text": "thing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 346, + "startColumn": 1, + "charOffset": 12856, + "charLength": 279, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLook - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3826eeab5e60d7e7", + "equalIndicator/v1": "5a587c48a5f422b9ce3dfbcffbb74d3e66c499a4516d0118ebba40500bd218ed" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1872, + "startColumn": 21, + "charOffset": 64774, + "charLength": 5, + "snippet": { + "text": "input" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1870, + "startColumn": 1, + "charOffset": 64680, + "charLength": 173, + "snippet": { + "text": "\t\tfor (uint32_t y = 0; y < input->getRows(); ++y) {\r\n\t\t\tuint32_t rx = 0;\r\n\t\t\tfor (int32_t x = input->getCols(); --x >= 0;) {\r\n\t\t\t\t(*output)[y][rx++] = (*input)[y][x];\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "68a5702f2abce001", + "equalIndicator/v1": "5a63943b3d42294bb4e86d509c6fcfa68a9dee3611ad2cc833f80f5b1784449f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 64, + "startColumn": 55, + "charOffset": 1726, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 62, + "startColumn": 1, + "charOffset": 1667, + "charLength": 196, + "snippet": { + "text": "}\r\n\r\nbool WaitingList::clientLogin(std::shared_ptr player) {\r\n\tif (player->hasFlag(PlayerFlags_t::CanAlwaysLogin) || player->getAccountType() >= ACCOUNT_TYPE_GAMEMASTER) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cea3c5d390bd8b98", + "equalIndicator/v1": "5a6e48e9c53db30d935d8a9e0a52e5b446334c44601ad1096fda688fb4bc1872" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 254, + "startColumn": 22, + "charOffset": 6791, + "charLength": 5, + "snippet": { + "text": "regen" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 252, + "startColumn": 1, + "charOffset": 6667, + "charLength": 198, + "snippet": { + "text": "\r\n\t\tplayer->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false);\r\n\t\tplayer->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__));\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c8b5093a106586b1", + "equalIndicator/v1": "5a7541f2f12e80adc4ce3607d1e40af523bf815c15570dd7f2641b4d05ba3820" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7729, + "startColumn": 21, + "charOffset": 242479, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7727, + "startColumn": 1, + "charOffset": 242354, + "charLength": 226, + "snippet": { + "text": "\t\tmsg.add(player->getBaseMagicLevel());\r\n\t\tmsg.add(player->getLoyaltyMagicLevel());\r\n\t\tmsg.add(player->getMagicLevelPercent() * 100);\r\n\r\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; ++i) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e890f52b1d38acf8", + "equalIndicator/v1": "5af111dd317419de203086cafbf6d0d096b63acab19ab49bd0a6b6dea000883f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Result of integer division used in a floating point context; possible loss of precision", + "markdown": "Result of integer division used in a floating point context; possible loss of precision" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 219, + "startColumn": 32, + "charOffset": 7522, + "charLength": 4, + "snippet": { + "text": "37.5" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 217, + "startColumn": 1, + "charOffset": 7402, + "charLength": 241, + "snippet": { + "text": "\t\treturn static_cast(25 + bossPoints / 10);\r\n\t} else if (bossPoints < 1250) {\r\n\t\treturn static_cast(37.5 + bossPoints / 20);\r\n\t}\r\n\treturn static_cast(100 + 0.5 * (sqrt(8 * ((bossPoints - 1250) / 5) + 81) - 9));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "be343788d799a679", + "equalIndicator/v1": "5afaa106138b05462db332f6b03e75890922365d8129f02649cbea47c6eb5365" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2698, + "startColumn": 14, + "charOffset": 79523, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2696, + "startColumn": 1, + "charOffset": 79478, + "charLength": 486, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "24ae7a52010df60a", + "equalIndicator/v1": "5b1c4743ccea194eaf4f1c8eb2298ebdb2e81cb6f47984030599c341083675ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 869, + "startColumn": 7, + "charOffset": 31536, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 867, + "startColumn": 1, + "charOffset": 31524, + "charLength": 151, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnReportRuleViolation - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1c333825a8695bc9", + "equalIndicator/v1": "5b2b1701bce81ca8a3b8c66a6df8656733816f4ac8a01db002fa8d41d10b02f4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 522, + "startColumn": 23, + "charOffset": 14084, + "charLength": 14, + "snippet": { + "text": "const uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 520, + "startColumn": 1, + "charOffset": 14014, + "charLength": 195, + "snippet": { + "text": "\tbool canOpenCorpse(uint32_t ownerId) const;\r\n\r\n\tvoid addStorageValue(const uint32_t key, const int32_t value, const bool isLogin = false);\r\n\tint32_t getStorageValue(const uint32_t key) const;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ee2f3ef789a87b58", + "equalIndicator/v1": "5b493a4b6aec0be3ed23fd54adaf2b5cd6072ac0633bee94304ac681f8334716" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1682, + "startColumn": 4, + "charOffset": 50027, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1680, + "startColumn": 1, + "charOffset": 49953, + "charLength": 198, + "snippet": { + "text": "\t\t} else if (outfitType == 2) {\r\n\t\t\tPosition pos = msg.getPosition();\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint8_t stackpos = msg.getByte();\r\n\t\t\tnewOutfit.lookMount = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7822a32cab326cf5", + "equalIndicator/v1": "5b863b853241c0a20e409909c59387f7d080d132f4d241c78c7c359d1f906ba3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 527, + "startColumn": 20, + "charOffset": 18797, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 525, + "startColumn": 1, + "charOffset": 18724, + "charLength": 134, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\r\n\r\n\tlua_pushnumber(L, exp);\r\n\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "74a3da5abd9c3b4c", + "equalIndicator/v1": "5b955e1bd8c4b8e0316ca4bd2696dad809e2e4fa5ca46c136a5065ce395f5032" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1812, + "startColumn": 2, + "charOffset": 62947, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1810, + "startColumn": 1, + "charOffset": 62940, + "charLength": 62, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface->resetScriptEnv();\r\n\treturn result;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e35bd094a0a863fe", + "equalIndicator/v1": "5bd1216cd4e208d74b70a422fbd623b7ff62712d33bd6b30c93a2b4cd335db83" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 547, + "startColumn": 38, + "charOffset": 20879, + "charLength": 12, + "snippet": { + "text": "fromCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 545, + "startColumn": 1, + "charOffset": 20789, + "charLength": 158, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, toPosition);\r\n\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "16c28aa006699056", + "equalIndicator/v1": "5bd5e5aa12334d6dc0183ac45e54626f94e7d07b456d23f33771de9dda2910f3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 30, + "startColumn": 46, + "charOffset": 945, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 28, + "startColumn": 1, + "charOffset": 894, + "charLength": 136, + "snippet": { + "text": "\t}\r\n\r\n\tvoid pushCreature(std::shared_ptr creature) {\r\n\t\tparams++;\r\n\t\tLuaScriptInterface::pushUserdata(L, creature);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0c41c6a38285247c", + "equalIndicator/v1": "5c052f251f8927b54d2cb3eba70f93bde3aef09977ae8919cb9a5be08de42c3f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 244, + "startColumn": 7, + "charOffset": 7933, + "charLength": 9, + "snippet": { + "text": "isRemoved" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 242, + "startColumn": 1, + "charOffset": 7921, + "charLength": 62, + "snippet": { + "text": "\t}\r\n\r\n\tbool isRemoved() override final {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a85896805723b772", + "equalIndicator/v1": "5c0a7ff9db4bce8bfee22eee9c1917317cbe11c10e0d13566681e8d728a657dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 370, + "startColumn": 4, + "charOffset": 12262, + "charLength": 87, + "snippet": { + "text": "case COMBAT_HOLYDAMAGE:\r\n\t\t\t\tdefaultMap[5] -= static_cast(elementEntry.second)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 368, + "startColumn": 1, + "charOffset": 12182, + "charLength": 210, + "snippet": { + "text": "\t\t\t\tdefaultMap[4] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_HOLYDAMAGE:\r\n\t\t\t\tdefaultMap[5] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_DEATHDAMAGE:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0ca4a693ca0980a7", + "equalIndicator/v1": "5c42d954d23af57e61b28c5920024c9d9d36d52ceca7d140c32ca9dcff9027ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1141, + "startColumn": 25, + "charOffset": 34251, + "charLength": 15, + "snippet": { + "text": "getTopItemCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1139, + "startColumn": 1, + "charOffset": 34156, + "charLength": 182, + "snippet": { + "text": "\tTileItemVector* items = getItemList();\r\n\tif (items && !isInserted) {\r\n\t\tint32_t topItemSize = getTopItemCount();\r\n\t\tif (pos < topItemSize) {\r\n\t\t\tauto it = items->getBeginTopItem();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1566578a79253a99", + "equalIndicator/v1": "5c51ce46063d0b7bde800c839641d99ecbf776493f4be44abc2ea88ddcee2c22" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/shop_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 131, + "startColumn": 38, + "charOffset": 3692, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 129, + "startColumn": 1, + "charOffset": 3564, + "charLength": 191, + "snippet": { + "text": "\t// shop:setStorageValue(value)\r\n\tif (const auto &shop = getUserdataShared(L, 1)) {\r\n\t\tshop->shopBlock.itemStorageValue = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "595d853127aace99", + "equalIndicator/v1": "5c60f930b6ca15338ddcbd3589b878ad58f95de7a3fcf2e195fb5eecf8fe73bc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 158, + "startColumn": 22, + "charOffset": 4788, + "charLength": 5, + "snippet": { + "text": "level" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 156, + "startColumn": 1, + "charOffset": 4547, + "charLength": 314, + "snippet": { + "text": "\t// Calculating damage\r\n\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(level, playerSkill, totalAttack, attackFactor, true) * player->getVocation()->meleeDamageMultiplier * damageModifier / 100);\r\n\tint32_t minDamage = level / 5;\r\n\tint32_t realDamage = normal_random(minDamage, maxDamage);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2e6013d4ac299e1", + "equalIndicator/v1": "5c6d326ca21362d19151482061c55c7ba5715e604d9f4f6d7441ea0b281fe48b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5775, + "startColumn": 94, + "charOffset": 170676, + "charLength": 8, + "snippet": { + "text": "std::max" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5773, + "startColumn": 1, + "charOffset": 170501, + "charLength": 287, + "snippet": { + "text": "\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\r\n\t\t}\r\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "be91f90417619370", + "equalIndicator/v1": "5c78d6702e9ebe658f318053dfae306be382a0bfa999e87cea96a8f124ab01d9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use nullptr", + "markdown": "Use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 93, + "startColumn": 21, + "charOffset": 2979, + "charLength": 1, + "snippet": { + "text": "0" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 91, + "startColumn": 1, + "charOffset": 2860, + "charLength": 258, + "snippet": { + "text": "\tstd::shared_ptr player = g_game().getPlayerByName(receiver, true);\r\n\tstd::string writer;\r\n\ttime_t date = time(0);\r\n\tstd::string text;\r\n\tif (item && item->getID() == ITEM_LETTER && !item->getAttribute(ItemAttribute_t::WRITER).empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "461c06188411a029", + "equalIndicator/v1": "5c938b2db48b413823d401cb4225b6228b8f96829a801f0870aa3f2e4ad8bed6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2139, + "startColumn": 56, + "charOffset": 72202, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2137, + "startColumn": 1, + "charOffset": 72142, + "charLength": 284, + "snippet": { + "text": "}\r\n\r\nvoid Combat::applyExtensions(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (damage.extension || !caster || damage.primary.type == COMBAT_HEALING) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "acbf12c15dd7cb88", + "equalIndicator/v1": "5ca1238a5ab32c8c000b7f6381cfed664773e5545c91174b8911f9cc0157a02e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 158, + "startColumn": 11, + "charOffset": 5124, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 156, + "startColumn": 1, + "charOffset": 5021, + "charLength": 365, + "snippet": { + "text": "\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::map &getAllItemTypeCount(std::map &countMap) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "24cc1db14c66aae3", + "equalIndicator/v1": "5cc1ff9a34acb68ffee90660fcc604eaab0a46f14c0941316621b54a5161b5c3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 159, + "startColumn": 41, + "charOffset": 5648, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 157, + "startColumn": 1, + "charOffset": 5602, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b61a4784d7600a59", + "equalIndicator/v1": "5cda7a9d7979e3b1f3143283d94c9b184c42fd1df821ccf2a11a97deb0c17f31" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 84, + "startColumn": 93, + "charOffset": 2410, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 82, + "startColumn": 1, + "charOffset": 2313, + "charLength": 239, + "snippet": { + "text": "}\r\n\r\nint32_t Weapon::playerWeaponCheck(std::shared_ptr player, std::shared_ptr target, uint8_t shootRange) const {\r\n\tconst Position &playerPos = player->getPosition();\r\n\tconst Position &targetPos = target->getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "714559f52c93104e", + "equalIndicator/v1": "5ce7560c77b00e66f9186a47240ec66d233c1f1adec9850b1ad57766f28bf061" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 430, + "startColumn": 7, + "charOffset": 15405, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 428, + "startColumn": 1, + "charOffset": 15393, + "charLength": 135, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPartyOnJoin - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5f41033028c623a8", + "equalIndicator/v1": "5cf3fce5a3c1c3a817443bcfb8ce5eaa37ec7340613566c7d0668b5cb96964c5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 275, + "startColumn": 51, + "charOffset": 9116, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 273, + "startColumn": 1, + "charOffset": 9061, + "charLength": 209, + "snippet": { + "text": "}\r\n\r\nvoid Weapon::onUsedWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr destTile) const {\r\n\tif (!player->hasFlag(PlayerFlags_t::NotGainSkill)) {\r\n\t\tskills_t skillType;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a9ec957c5b694ad0", + "equalIndicator/v1": "5cf65364ff8514c60a8d01b5e480695d1b3fae76cf4f4fa62e17f4ebe43ff950" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 528, + "startColumn": 58, + "charOffset": 15831, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 526, + "startColumn": 1, + "charOffset": 15769, + "charLength": 147, + "snippet": { + "text": "}\r\n\r\nbool Spell::playerRuneSpellCheck(std::shared_ptr player, const Position &toPos) {\r\n\tif (!playerSpellCheck(player)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a6fde91b62db1564", + "equalIndicator/v1": "5d313416b78f1d16c17d0397ec6cbc261040fffe083a7f0f3b51241d734072e8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 207, + "startColumn": 43, + "charOffset": 7549, + "charLength": 3, + "snippet": { + "text": "npc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 205, + "startColumn": 1, + "charOffset": 7456, + "charLength": 198, + "snippet": { + "text": "\tscriptInterface.pushFunction(info.npcOnSpawn);\r\n\r\n\tLuaScriptInterface::pushUserdata(L, npc);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Npc\");\r\n\tLuaScriptInterface::pushPosition(L, position);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "87131fdb43d8a598", + "equalIndicator/v1": "5d4629b67c2ac890b1f2567415e1a5dd0823d5e027dc4975f560c88607806ad9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 7, + "charOffset": 1814, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1731, + "charLength": 389, + "snippet": { + "text": "\tvoid removeThing(std::shared_ptr thing, uint32_t count) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "01e2500a2a4419da", + "equalIndicator/v1": "5d64718d3d308cae387fca582e8ff33de395c23867faeb4e6ffede8fe7e45158" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 164, + "startColumn": 3, + "charOffset": 5315, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 162, + "startColumn": 1, + "charOffset": 5228, + "charLength": 302, + "snippet": { + "text": "\t\tstd::array vData = {};\r\n\t\tmemcpy(vData.data(), buffer + readPos, 8);\r\n\t\tfor (int32_t i = 0; i < 32; ++i) {\r\n\t\t\tvData[1] -= ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][0];\r\n\t\t\tvData[0] -= ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][1];\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3cc5033a483ebe94", + "equalIndicator/v1": "5db637c497f3a565509ec8b17a84de29413e8d864f0650026bcf8deadb7db22d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2130, + "startColumn": 2, + "charOffset": 65492, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2128, + "startColumn": 1, + "charOffset": 65385, + "charLength": 218, + "snippet": { + "text": "\tHighscoreType_t type = static_cast(msg.getByte());\r\n\tuint8_t category = msg.getByte();\r\n\tuint32_t vocation = msg.get();\r\n\tuint16_t page = 1;\r\n\tconst std::string worldName = msg.getString();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0bbe46ded7c3b69e", + "equalIndicator/v1": "5dc09ce09ec2a7dd630ff4ae9636caec23ab9bcba6deaa889dc344876fe2cb04" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3262, + "startColumn": 68, + "charOffset": 98583, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3260, + "startColumn": 1, + "charOffset": 98415, + "charLength": 274, + "snippet": { + "text": "\t\t\t\tif (rightItem->getSlotPosition() & SLOTP_TWO_HAND) {\r\n\t\t\t\t\tret = RETURNVALUE_DROPTWOHANDEDITEM;\r\n\t\t\t\t} else if (item == rightItem && count == item->getItemCount()) {\r\n\t\t\t\t\tret = RETURNVALUE_NOERROR;\r\n\t\t\t\t} else if (rightType == WEAPON_SHIELD && type == WEAPON_SHIELD) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc6101b8053de2ae", + "equalIndicator/v1": "5dd76a9f2c0f68c2ed54c4fb96043a054e20bc72dc5c91ad14767bb7be812711" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 558, + "startColumn": 21, + "charOffset": 26189, + "charLength": 18, + "snippet": { + "text": "\"absorbpercentall\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 556, + "startColumn": 1, + "charOffset": 26002, + "charLength": 324, + "snippet": { + "text": "void ItemParse::parseAbsorbPercent(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\tstd::string stringValue = tmpStrValue;\r\n\tif (stringValue == \"absorbpercentall\") {\r\n\t\tint16_t value = pugi::cast(valueAttribute.value());\r\n\t\tAbilities &abilities = itemType.getAbilities();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "25b4e7f59c509397", + "equalIndicator/v1": "5dea9402bfce0478cca11e0fa06c8176492402a6fe12deea564b310f139e20c8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 348, + "startColumn": 10, + "charOffset": 11473, + "charLength": 6, + "snippet": { + "text": "health" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 346, + "startColumn": 1, + "charOffset": 11372, + "charLength": 115, + "snippet": { + "text": "int32_t Weapon::getHealthCost(std::shared_ptr player) const {\r\n\tif (health != 0) {\r\n\t\treturn health;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "66a5502140160188", + "equalIndicator/v1": "5e271821c5cbada739c1a1f3f4ec9f31b3b6fbf0367a7e25160239237b4f32e3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2333, + "startColumn": 26, + "charOffset": 80962, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2331, + "startColumn": 1, + "charOffset": 80848, + "charLength": 272, + "snippet": { + "text": "\tint32_t damageBonus = 0;\r\n\tuint8_t stage = getStage(WheelStage_t::EXECUTIONERS_THROW);\r\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\r\n\tif (healthPercent <= 30) {\r\n\t\tif (stage >= 3) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "00a35cc4c78e6eaa", + "equalIndicator/v1": "5e33e0522d72bd08fbc66407c0fb17ebb84cd13b00c7900bc016c0103094e1d7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 363, + "startColumn": 59, + "charOffset": 12462, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 361, + "startColumn": 1, + "charOffset": 12399, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nvoid SpawnMonster::removeMonster(std::shared_ptr monster) {\r\n\tuint32_t spawnMonsterId = 0;\r\n\tfor (const auto &[id, m] : spawnedMonsterMap) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "85aa61d5e2592161", + "equalIndicator/v1": "5e4868fd5fef5f377f87c78d31c2dc6b0c3ca2b6b478d845e191bb5ac6ce519c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 29, + "startColumn": 19, + "charOffset": 836, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 27, + "startColumn": 1, + "charOffset": 813, + "charLength": 204, + "snippet": { + "text": "}\r\n\r\nvoid RewardChest::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tauto parentLocked = m_parent.lock();\r\n\tif (parentLocked) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2e48c612f0b775fc", + "equalIndicator/v1": "5e716f4e38df88babeedee396b16ea1433fac8367121fde8a5d984422e1ce999" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tradePartner' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tradePartner' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4899, + "startColumn": 87, + "charOffset": 175188, + "charLength": 12, + "snippet": { + "text": "tradePartner" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4897, + "startColumn": 1, + "charOffset": 175097, + "charLength": 332, + "snippet": { + "text": "}\r\n\r\nbool Game::internalStartTrade(std::shared_ptr player, std::shared_ptr tradePartner, std::shared_ptr tradeItem) {\r\n\tif (player->tradeState != TRADE_NONE && !(player->tradeState == TRADE_ACKNOWLEDGE && player->tradePartner == tradePartner)) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREALREADYTRADING);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "01ceb3071fb2756e", + "equalIndicator/v1": "5e881fc856c76a51f8def15f9949b43d9e7ff1294460c45bdc417a871c3c23b2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 676, + "startColumn": 15, + "charOffset": 22144, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 674, + "startColumn": 1, + "charOffset": 22104, + "charLength": 134, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 104) * 0.70f) + 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6fa18c5ab6b9767b", + "equalIndicator/v1": "5e8ad01bb254b49d4eac340fb102d00ac32583d6611de4d43613d9531e14130f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly", + "markdown": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 103, + "startColumn": 60, + "charOffset": 3494, + "charLength": 12, + "snippet": { + "text": "__FUNCTION__" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 101, + "startColumn": 1, + "charOffset": 3350, + "charLength": 265, + "snippet": { + "text": "\t\t\t\tg_game().start(&serviceManager);\r\n\t\t\t\tg_game().setGameState(GAME_STATE_NORMAL);\r\n\t\t\t\tif (g_configManager().getBoolean(TOGGLE_MAINTAIN_MODE, __FUNCTION__)) {\r\n\t\t\t\t\tg_game().setGameState(GAME_STATE_CLOSED);\r\n\t\t\t\t\tg_logger().warn(\"Initialized in maintain mode!\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5974bec543f47942", + "equalIndicator/v1": "5e8b07f12ef5ccd8716ab1fc1bf49a79db091538dfddd759d9287b48d2b977d1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 14, + "charOffset": 1401, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1297, + "charLength": 271, + "snippet": { + "text": "\tskull = mType->info.skull;\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\r\n\tbaseSpeed = mType->getBaseSpeed();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1a000597b7acfff3", + "equalIndicator/v1": "5ea5ed13adfb6430f83d0fe2a6851ce53270f017dc9615305986aa0b5798e770" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Std::move of the const variable 'name' has no effect; remove std::move() or make the variable non-const", + "markdown": "Std::move of the const variable 'name' has no effect; remove std::move() or make the variable non-const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 24, + "startColumn": 16, + "charOffset": 711, + "charLength": 9, + "snippet": { + "text": "std::move" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 603, + "charLength": 180, + "snippet": { + "text": "\tVIPGroup() = default;\r\n\tVIPGroup(uint8_t id, const std::string &name, bool customizable) :\r\n\t\tid(id), name(std::move(name)), customizable(customizable) { }\r\n};\r\nclass PlayerVIP {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82e6b203885f7edc", + "equalIndicator/v1": "5eafc660cf0da056db5d9e91a5941fe6f5a78a854402fe62eacb91b06990b0f6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Prefer a lambda to std::bind", + "markdown": "Prefer a lambda to std::bind" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 119, + "startColumn": 10, + "charOffset": 5112, + "charLength": 9, + "snippet": { + "text": "std::bind" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 117, + "startColumn": 1, + "charOffset": 4996, + "charLength": 243, + "snippet": { + "text": "\ttemplate \r\n\tauto bindMapFunction(Object object, Function function) {\r\n\t\treturn std::bind(function, object, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "075589323943450d", + "equalIndicator/v1": "5ec30f00bfc14cf6c36dae207e35a2eb4101e0205392b4587e4564ab2a0ce6b9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 154, + "startColumn": 62, + "charOffset": 4663, + "charLength": 6, + "snippet": { + "text": "action" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 152, + "startColumn": 1, + "charOffset": 4597, + "charLength": 252, + "snippet": { + "text": "}\r\n\r\nbool Actions::registerLuaEvent(const std::shared_ptr action) {\r\n\t// Call all register lua events\r\n\tif (registerLuaItemEvent(action) || registerLuaUniqueEvent(action) || registerLuaActionEvent(action) || registerLuaPositionEvent(action)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5e08bd123bd5ad60", + "equalIndicator/v1": "5edd3768b06a64a21012b33890f9aff3a0194ff1f4fc88a48115cf8b4f51ef32" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1214, + "startColumn": 26, + "charOffset": 33839, + "charLength": 8, + "snippet": { + "text": "manaGain" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1212, + "startColumn": 1, + "charOffset": 33726, + "charLength": 135, + "snippet": { + "text": "\t\t\t\tcreature->changeMana(manaGain * 2); // Double regen from daily reward\r\n\t\t\t} else {\r\n\t\t\t\tcreature->changeMana(manaGain);\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c75b3b7ba023df7c", + "equalIndicator/v1": "5ee132f93395ec86c09c21085e6346ff964d4775dd1d3e2802de290529a46be2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 353, + "startColumn": 2, + "charOffset": 11636, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 351, + "startColumn": 1, + "charOffset": 11607, + "charLength": 152, + "snippet": { + "text": "\t\tdefaultMap[i] = 100;\r\n\t}\r\n\tfor (const auto &elementEntry : mtype->info.elementMap) {\r\n\t\tswitch (elementEntry.first) {\r\n\t\t\tcase COMBAT_PHYSICALDAMAGE:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "884b5fd8d98f62c2", + "equalIndicator/v1": "5ee6929428dfe6f598af707156a590976005eb4252f2b42975554d10127de848" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6551, + "startColumn": 27, + "charOffset": 226117, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6549, + "startColumn": 1, + "charOffset": 226014, + "charLength": 276, + "snippet": { + "text": "\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t}\r\n\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r\n\r\n\t\tprimaryBlockType = target->blockHit(attacker, damage.primary.type, damage.primary.value, checkDefense, checkArmor, field);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "411c88700f8dc530", + "equalIndicator/v1": "5f139cfb3400b3110ad4e8fe13befb8ed002004c74755e6929ad66bdb3bb9d32" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 768, + "startColumn": 91, + "charOffset": 27588, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 766, + "startColumn": 1, + "charOffset": 27493, + "charLength": 449, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) {\r\n\t// Player:onItemMoved(item, count, fromPosition, toPosition) or Player.onItemMoved(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)\r\n\tif (info.playerOnItemMoved == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "033bf62988316347", + "equalIndicator/v1": "5f171d62e3dbd69d821ae2d1fd78cea95fe87e7a510103d4b09ebe8a97bfc3cf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10301, + "startColumn": 57, + "charOffset": 358021, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10299, + "startColumn": 1, + "charOffset": 357960, + "charLength": 169, + "snippet": { + "text": "}\r\n\r\nvoid Game::addPlayerUniqueLogin(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().error(\"Attempted to add null player to unique player names list\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aa1e9b0c4c33d8b1", + "equalIndicator/v1": "5f48af9c42c39bce29aef073e50beb8a751fab0f3f3b745da4d895ab5e2fc801" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Annotate this function with 'override' or (rarely) 'final'", + "markdown": "Annotate this function with 'override' or (rarely) 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 95, + "startColumn": 34, + "charOffset": 2902, + "charLength": 4, + "snippet": { + "text": "keys" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 93, + "startColumn": 1, + "charOffset": 2796, + "charLength": 158, + "snippet": { + "text": "\r\n\tstd::shared_ptr scoped(const std::string &scope) override final;\r\n\tstd::unordered_set keys(const std::string &prefix = \"\");\r\n\r\nprotected:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dab161a9d384b6b8", + "equalIndicator/v1": "5f59051439d0f8672cfa2050bf5ad45083c84ba11bea42437e8daec47933c17d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1737, + "startColumn": 2, + "charOffset": 52227, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1735, + "startColumn": 1, + "charOffset": 52122, + "charLength": 229, + "snippet": { + "text": "void ProtocolGame::parseUseWithCreature(NetworkMessage &msg) {\r\n\tPosition fromPos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t fromStackPos = msg.getByte();\r\n\tuint32_t creatureId = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8df6d111baae344d", + "equalIndicator/v1": "5f602e9541fefbda96a5132e4bebc79b11056ee560f65ce191c626d65db0728a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3229, + "startColumn": 64, + "charOffset": 99044, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3227, + "startColumn": 1, + "charOffset": 98976, + "charLength": 118, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureLight(std::shared_ptr creature) {\r\n\tif (!canSee(creature)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67a887fa15511b0d", + "equalIndicator/v1": "5f7c197508078ac1bbc9152324a5441cba87ab64eeef1c5f408e0ed5fc1b3165" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 977, + "startColumn": 46, + "charOffset": 37274, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 975, + "startColumn": 1, + "charOffset": 37174, + "charLength": 164, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, player);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "23767fcf4ca26818", + "equalIndicator/v1": "5f7f621e276d0d645feea8fbc7b99c110f4d83ea77d37b699d2cc67cac752bcc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'operator bool' must be marked explicit to avoid unintentional implicit conversions", + "markdown": "'operator bool' must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 104, + "startColumn": 27, + "charOffset": 3141, + "charLength": 4, + "snippet": { + "text": "bool" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 102, + "startColumn": 1, + "charOffset": 3109, + "charLength": 81, + "snippet": { + "text": "\t}\r\n\r\n\texplicit(false) operator bool() const {\r\n\t\treturn get();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0b685ed19ba323f3", + "equalIndicator/v1": "5f8aeec9169d9500d8c48cc8508719cec0b2bb310174ba6a2e9cef88d8f9e52b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 24, + "startColumn": 14, + "charOffset": 676, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 631, + "charLength": 346, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f4a56ce7b5153fe3", + "equalIndicator/v1": "5f8d6d63a65ff2ff1e325da4a3fdd25d2e710600319c3779425c9e668baf9200" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 855, + "startColumn": 68, + "charOffset": 27889, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 853, + "startColumn": 1, + "charOffset": 27817, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Creature::getCorpse(std::shared_ptr, std::shared_ptr) {\r\n\tif (getLookCorpse() != 0) {\r\n\t\treturn Item::CreateItem(getLookCorpse());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a7b9c0fe0b77850c", + "equalIndicator/v1": "5fa868c14c210b2dff6e13eedd618ef9dbd5f2eba4edbaab4e86ca1da00af50b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1703, + "startColumn": 2, + "charOffset": 50959, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1701, + "startColumn": 1, + "charOffset": 50863, + "charLength": 274, + "snippet": { + "text": "void ProtocolGame::parseApplyImbuement(NetworkMessage &msg) {\r\n\tuint8_t slot = msg.getByte();\r\n\tuint32_t imbuementId = msg.get();\r\n\tbool protectionCharm = msg.getByte() != 0x00;\r\n\tg_game().playerApplyImbuement(player->getID(), imbuementId, slot, protectionCharm);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5001c13c992f75d2", + "equalIndicator/v1": "5fcbb1f50494c625d7f3401c3021e3711b7fb9d5685fbac777250c46da8dc6ce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 445, + "startColumn": 53, + "charOffset": 15378, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 443, + "startColumn": 1, + "charOffset": 15321, + "charLength": 129, + "snippet": { + "text": "}\r\n\r\nvoid Npc::onPlayerCheckItem(std::shared_ptr player, uint16_t itemId, uint8_t subType) {\r\n\tif (!player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e634b5104a6f9936", + "equalIndicator/v1": "5fd04a5170c6834d027f664afd76bb531c7e636a7f9eebe954a4cc8f329662ee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getRequiredMagLevel' can be made const", + "markdown": "Method 'getRequiredMagLevel' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 226, + "startColumn": 11, + "charOffset": 7282, + "charLength": 19, + "snippet": { + "text": "getRequiredMagLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 224, + "startColumn": 1, + "charOffset": 7247, + "charLength": 86, + "snippet": { + "text": "\t\treqLevel = level;\r\n\t}\r\n\tuint32_t getRequiredMagLevel() {\r\n\t\treturn reqMagLevel;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8bc739743ff40182", + "equalIndicator/v1": "5fdaf9bb6d1ed5223dd438ea7c17006d46e705549fd8c1cb284b064a507ebf05" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3059, + "startColumn": 2, + "charOffset": 93274, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3057, + "startColumn": 1, + "charOffset": 93213, + "charLength": 160, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseJoinParty(NetworkMessage &msg) {\r\n\tuint32_t targetId = msg.get();\r\n\tg_game().playerJoinParty(player->getID(), targetId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7fff02fa252615cc", + "equalIndicator/v1": "60068b6900671db7f82033ab58a3f7c0b1b6bec38ae9e4a438eea8292b26edb2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 596, + "startColumn": 3, + "charOffset": 16463, + "charLength": 22, + "snippet": { + "text": "pushBoolean(L, false);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 594, + "startColumn": 1, + "charOffset": 16376, + "charLength": 185, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (!player) {\r\n\t\tpushBoolean(L, false);\r\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\r\n\t\treturn 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ad99aff36d5850c5", + "equalIndicator/v1": "601312e4b8aa0b9eb4ab285db759ad778721d2a2ad6afac119617ffe7cb14ee0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'", + "markdown": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 25, + "startColumn": 11, + "charOffset": 884, + "charLength": 9, + "snippet": { + "text": "Condition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 23, + "startColumn": 1, + "charOffset": 706, + "charLength": 270, + "snippet": { + "text": "\t\tendTime(initTicks == -1 ? std::numeric_limits::max() : 0),\r\n\t\tsubId(initSubId), ticks(initTicks), conditionType(initType), id(initId), isBuff(initBuff) { }\r\n\tvirtual ~Condition() = default;\r\n\r\n\tvirtual bool startCondition(std::shared_ptr creature);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "feb21b329c228042", + "equalIndicator/v1": "60459eb08506edff7836e9fab512709685a454b1fab03e54922c6d4955870257" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 466, + "startColumn": 57, + "charOffset": 14277, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 464, + "startColumn": 1, + "charOffset": 14216, + "charLength": 124, + "snippet": { + "text": "}\r\n\r\nvoid Monster::onCreatureLeave(std::shared_ptr creature) {\r\n\t// update friendList\r\n\tif (isFriend(creature)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fa029a7b7eaf2a41", + "equalIndicator/v1": "604d1e4275f64810e30056ace2cec2fc60a9ef5e7fe761e012013b2c84e12965" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'destination' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'destination' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 153, + "startColumn": 48, + "charOffset": 4066, + "charLength": 11, + "snippet": { + "text": "destination" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 151, + "startColumn": 1, + "charOffset": 4014, + "charLength": 123, + "snippet": { + "text": "}\r\n\r\nbool Bank::deposit(const std::shared_ptr destination, uint64_t amount) {\r\n\tif (!destination) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b7e62e6ffbe62d44", + "equalIndicator/v1": "6088d5f3dffb7f0a151bf70d36c6e0ae076f29f4832af373ba8abc7830e6ef94" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6683, + "startColumn": 81, + "charOffset": 232142, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6681, + "startColumn": 1, + "charOffset": 232057, + "charLength": 190, + "snippet": { + "text": "}\r\n\r\nvoid Game::combatGetTypeInfo(CombatType_t combatType, std::shared_ptr target, TextColor_t &color, uint16_t &effect) {\r\n\tswitch (combatType) {\r\n\t\tcase COMBAT_PHYSICALDAMAGE: {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e458f051e837b85c", + "equalIndicator/v1": "608f62f14405fa2e55252ee82f4d888e33e4fcdde3e4521f9c8828b948974c14" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 425, + "startColumn": 14, + "charOffset": 11447, + "charLength": 8, + "snippet": { + "text": "tileItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 423, + "startColumn": 1, + "charOffset": 11399, + "charLength": 189, + "snippet": { + "text": "\r\n\t\t\t// Clear any existing carpet\r\n\t\t\tfor (auto tileItem : *tile->getItemList()) {\r\n\t\t\t\tif (tileItem && tileItem->isCarpet()) {\r\n\t\t\t\t\ttile->removeThing(tileItem, tileItem->getItemCount());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c22fc65a9ca6c549", + "equalIndicator/v1": "60a626baa27ba3b5650a1f40bdb4b664aa7b4b0be7092cd615809be8e6c36494" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2441, + "startColumn": 14, + "charOffset": 72674, + "charLength": 8, + "snippet": { + "text": "vocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2439, + "startColumn": 1, + "charOffset": 72609, + "charLength": 165, + "snippet": { + "text": "\t\t} else {\r\n\t\t\thealthMax += vocation->getHPGain();\r\n\t\t\thealth += vocation->getHPGain();\r\n\t\t\tmanaMax += vocation->getManaGain();\r\n\t\t\tmana += vocation->getManaGain();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71f53e333ac376f2", + "equalIndicator/v1": "60b8394a865085491098a3b42ddee4e37c77d559cdedf7ab286c54bab407b7b9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 30, + "startColumn": 66, + "charOffset": 930, + "charLength": 6, + "snippet": { + "text": "action" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 28, + "startColumn": 1, + "charOffset": 860, + "charLength": 160, + "snippet": { + "text": "}\r\n\r\nbool Actions::registerLuaItemEvent(const std::shared_ptr action) {\r\n\tauto itemIdVector = action->getItemIdsVector();\r\n\tif (itemIdVector.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a7ecf1a8adf3f4e5", + "equalIndicator/v1": "60bdc476dc489cbec0b73e040cfa2d033665d5c502f181e30e1d056bf9678c8c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 104, + "startColumn": 20, + "charOffset": 3876, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 102, + "startColumn": 1, + "charOffset": 3750, + "charLength": 191, + "snippet": { + "text": "\tstd::ostringstream query;\r\n\tquery << \"SELECT * FROM `players` WHERE `name` = \" << db.escapeString(name);\r\n\treturn loadPlayer(player, db.storeQuery(query.str()), disableIrrelevantInfo);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cd189b7ceae309ef", + "equalIndicator/v1": "60ddb91c95014c54593fb33ddff7d55894c4c884c587592e8ccd7f75efae5f72" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1191, + "startColumn": 98, + "charOffset": 45386, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1189, + "startColumn": 1, + "charOffset": 45284, + "charLength": 235, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::zoneAfterCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureEnter - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5d800900ddc8e40d", + "equalIndicator/v1": "60f201a0227e516171e50331df680f5d893db99e74f58b5eda4b1bb2139bd64e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 686, + "startColumn": 55, + "charOffset": 22249, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 684, + "startColumn": 1, + "charOffset": 22190, + "charLength": 234, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatManaFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\r\n\tif (!data) {\r\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c3f23a9100f0f51", + "equalIndicator/v1": "610476bbd76f8ace6b70073f8398d5d82980b7dead60a0105b931b274ea64f1b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant call to 'data'", + "markdown": "Redundant call to 'data'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1273, + "startColumn": 5, + "charOffset": 57484, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1271, + "startColumn": 1, + "charOffset": 57330, + "charLength": 320, + "snippet": { + "text": "\t\t\t\tg_logger().trace(\"Registering moveevent for item id '{}', name '{}'\", itemType.id, itemType.name);\r\n\t\t\t\tMoveEvent_t eventType = MOVE_EVENT_NONE;\r\n\t\t\t\tfor (auto subAttributeNode : attributeNode.children()) {\r\n\t\t\t\t\tpugi::xml_attribute subKeyAttribute = subAttributeNode.attribute(\"key\");\r\n\t\t\t\t\tif (!subKeyAttribute) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6031dbbfe20f504f", + "equalIndicator/v1": "610da8d1b4729f5e1512fcc63363b4051c5f4839b2f67daf52c99ebc11d4e532" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 426, + "startColumn": 8, + "charOffset": 10607, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 424, + "startColumn": 1, + "charOffset": 10515, + "charLength": 205, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetArmor(lua_State* L) {\r\n\t// itemType:getArmor()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->armor);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75ccd23fa082cc15", + "equalIndicator/v1": "611a8f8f5b05f4d719539d09b751e222671044fb0d41ee3f627ef8a3156aa1b8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7732, + "startColumn": 4, + "charOffset": 242584, + "charLength": 8, + "snippet": { + "text": "skills_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7730, + "startColumn": 1, + "charOffset": 242519, + "charLength": 270, + "snippet": { + "text": "\r\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; ++i) {\r\n\t\t\tskills_t skill = static_cast(i);\r\n\t\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\r\n\t\t\tmsg.add(player->getBaseSkill(skill));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "325919b45a3144f9", + "equalIndicator/v1": "611cb9fe224446f3edb7bbf2028b25fe25432202e97c56eedf46f666c5ad36eb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 797, + "startColumn": 122, + "charOffset": 26081, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 795, + "startColumn": 1, + "charOffset": 25955, + "charLength": 226, + "snippet": { + "text": "}\r\n\r\nvoid Combat::combatTileEffects(const CreatureVector &spectators, std::shared_ptr caster, std::shared_ptr tile, const CombatParams ¶ms) {\r\n\tif (params.itemId != 0) {\r\n\t\tuint16_t itemId = params.itemId;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fd3cb6d56e4bfc6f", + "equalIndicator/v1": "612ef6bc060a45c757486553e64fdc7323bb069b289b5ad7d11bcbf65c68b0d8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6499, + "startColumn": 15, + "charOffset": 204824, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6497, + "startColumn": 1, + "charOffset": 204739, + "charLength": 123, + "snippet": { + "text": "\tmsg.addPosition(pos);\r\n\tmsg.addByte(static_cast(stackpos));\r\n\tAddItem(msg, item);\r\n\twriteToOutputBuffer(msg);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3595a8c0925ec4cc", + "equalIndicator/v1": "614b8cfbee3c6c2fda954411cfda4e6c68bda03cfa4b8bdc8f5e253a38d397b7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 49, + "startColumn": 75, + "charOffset": 1945, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 47, + "startColumn": 1, + "charOffset": 1816, + "charLength": 176, + "snippet": { + "text": "\t} else if (it.hasSubType()) {\r\n\t\tif (it.stackable) {\r\n\t\t\titemCount = static_cast(std::ceil(static_cast(count) / it.stackSize));\r\n\t\t} else {\r\n\t\t\titemCount = 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c4a9f33062e5885a", + "equalIndicator/v1": "61b3427b41826f249481ff29d8900852d6b6f59c1764a02b4611bd0c86c483d4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'std::list\\>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 355, + "startColumn": 21, + "charOffset": 9497, + "charLength": 5, + "snippet": { + "text": "house" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 353, + "startColumn": 1, + "charOffset": 9391, + "charLength": 163, + "snippet": { + "text": "\t// house:getTileCount()\r\n\tif (const auto &house = getUserdataShared(L, 1)) {\r\n\t\tlua_pushnumber(L, house->getTiles().size());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc88169d29319524", + "equalIndicator/v1": "61b9c9e6f61dcfb58e60061047ce811acfddc96b14a0f4cb288d177402f1f428" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6841, + "startColumn": 27, + "charOffset": 236754, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6839, + "startColumn": 1, + "charOffset": 236645, + "charLength": 172, + "snippet": { + "text": "\r\n\tdamage.primary.value = std::round(damage.primary.value * pvpDamageMultiplier);\r\n\tdamage.secondary.value = std::round(damage.secondary.value * pvpDamageMultiplier);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "20fb2ba04a2faf95", + "equalIndicator/v1": "61e0598f04ab91cec4f4053e32fa3b58c1f4e7251cb1d9983af68a8d942cdcac" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 134, + "startColumn": 48, + "charOffset": 3613, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 132, + "startColumn": 1, + "charOffset": 3561, + "charLength": 244, + "snippet": { + "text": "}\r\n\r\nbool Weapon::useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const {\r\n\tint32_t damageModifier = playerWeaponCheck(player, target, item->getShootRange());\r\n\tif (damageModifier == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef427fa975c108f0", + "equalIndicator/v1": "61e3d4aed705f58716c7aa373299e44e0d92460030660afad28a6302a49b0cbf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8058, + "startColumn": 57, + "charOffset": 280512, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8056, + "startColumn": 1, + "charOffset": 280451, + "charLength": 103, + "snippet": { + "text": "}\r\n\r\nvoid Game::updateCreatureType(std::shared_ptr creature) {\r\n\tif (!creature) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "47469ec5f293645f", + "equalIndicator/v1": "61faf6b8a9da4f2535fe93a6f904e4589292bff66f10e4d5b59517dc9e5b0238" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 187, + "startColumn": 35, + "charOffset": 5884, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 185, + "startColumn": 1, + "charOffset": 5765, + "charLength": 167, + "snippet": { + "text": "\tconst std::shared_ptr action = getAction(item);\r\n\tif (action != nullptr) {\r\n\t\treturn action->canExecuteAction(player, pos);\r\n\t}\r\n\treturn RETURNVALUE_NOERROR;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "06a87daa8f3a43f3", + "equalIndicator/v1": "6208c2e630ac4fdd24fa68ce42bfdb27c752a357c42247f4f5925035d65db60d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'event' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'event' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 114, + "startColumn": 24, + "charOffset": 3493, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 112, + "startColumn": 1, + "charOffset": 3318, + "charLength": 256, + "snippet": { + "text": "\tbool registerLuaUniqueEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaEvent(const std::shared_ptr event);\r\n\tvoid clear(bool isFromXML = false);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "34c46a800c87b9d2", + "equalIndicator/v1": "621acc01d547ae20e20dfe8189c369e9a4788b2f2bc67d12d39139e2e0452336" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'onAddTileItem' is within a recursive call chain", + "markdown": "Function 'onAddTileItem' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 365, + "startColumn": 12, + "charOffset": 9527, + "charLength": 13, + "snippet": { + "text": "onAddTileItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 363, + "startColumn": 1, + "charOffset": 9511, + "charLength": 310, + "snippet": { + "text": "}\r\n\r\nvoid Tile::onAddTileItem(std::shared_ptr item) {\r\n\tif ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) {\r\n\t\tauto it = g_game().browseFields.find(static_self_cast());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ea8a20c2903808e7", + "equalIndicator/v1": "622af232721de89a3d242e85c76f631713327eeac9be8fa4c943bc4a6d60f204" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7125, + "startColumn": 28, + "charOffset": 247949, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7123, + "startColumn": 1, + "charOffset": 247825, + "charLength": 247, + "snippet": { + "text": "\t\t}\r\n\t\tif (damage.origin != ORIGIN_NONE && attacker && damage.primary.type != COMBAT_HEALING) {\r\n\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a39caca97332c725", + "equalIndicator/v1": "622b825394b72d1559cb74921c8f028358733c8d9bc24581c1a1043f8dc491a4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 210, + "startColumn": 14, + "charOffset": 5852, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 208, + "startColumn": 1, + "charOffset": 5807, + "charLength": 496, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr actor = nullptr) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d7091fa8cbab5ce1", + "equalIndicator/v1": "623d49786c914b39e5b7f66eeba76b02fe8651c12b49cc3d53870203b1078f07" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1742, + "startColumn": 7, + "charOffset": 52078, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1740, + "startColumn": 1, + "charOffset": 51917, + "charLength": 349, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\n\tvoid setNextAction(int64_t time) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "535afdc80427174f", + "equalIndicator/v1": "62429fd451a9008ab5d0ca959d18bf3790b7ef12ed356848e0fea50e5baeb121" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6091, + "startColumn": 17, + "charOffset": 179196, + "charLength": 23, + "snippet": { + "text": "Player::getPercentLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6089, + "startColumn": 1, + "charOffset": 179119, + "charLength": 245, + "snippet": { + "text": "\t\tuint8_t newPercent;\r\n\t\tif (nextReqTries > currReqTries) {\r\n\t\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\r\n\t\t\tnewPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\r\n\t\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ed87edbb6b75c7d5", + "equalIndicator/v1": "624bc5b04cd6748b63e6c08538831f7e8a4c3499adf15e40f57726b226f2c388" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 150, + "startColumn": 65, + "charOffset": 4379, + "charLength": 9, + "snippet": { + "text": "moveEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 148, + "startColumn": 1, + "charOffset": 4310, + "charLength": 214, + "snippet": { + "text": "}\r\n\r\nbool MoveEvents::registerEvent(const std::shared_ptr moveEvent, int32_t id, std::map &moveListMap) const {\r\n\tauto it = moveListMap.find(id);\r\n\tif (it == moveListMap.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "910bb614443cd8d2", + "equalIndicator/v1": "6292fbe56f9cac23e46f5e4129943514c668b0f5dba1557f8d705ae9fa0aef47" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 702, + "startColumn": 19, + "charOffset": 21598, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 700, + "startColumn": 1, + "charOffset": 21516, + "charLength": 131, + "snippet": { + "text": "\titem->setParent(getContainer());\r\n\titemlist.push_front(item);\r\n\tupdateItemWeight(item->getWeight());\r\n\r\n\t// send change to client\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e6cab6e1702e0d28", + "equalIndicator/v1": "62aa4df65b73c79f1c3ba926fffc9bfb6a169254d06fea2423a11f8d32456f1c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 965, + "startColumn": 94, + "charOffset": 36790, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 963, + "startColumn": 1, + "charOffset": 36692, + "charLength": 252, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnRotateItem(std::shared_ptr player, std::shared_ptr item, const Position &position) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0c444fd3ba049e45", + "equalIndicator/v1": "62bbbf3ec854ca29acc341e41f6423ee2d6008c05afdb2a4e2cb9bb36fba0da6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 846, + "startColumn": 30, + "charOffset": 25364, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 844, + "startColumn": 1, + "charOffset": 25319, + "charLength": 105, + "snippet": { + "text": "\t\t}\r\n\t} else {\r\n\t\tfor (std::shared_ptr item : itemlist) {\r\n\t\t\tcontainerItems.push_back(item);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ea13ec6c8ae984f9", + "equalIndicator/v1": "62dec7587f0d7e881ebde29d6bf1e89ea7124cba43d88088096ea062d472e030" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 143, + "startColumn": 14, + "charOffset": 4184, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 141, + "startColumn": 1, + "charOffset": 3850, + "charLength": 640, + "snippet": { + "text": "\tvirtual ReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override final;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d297ee665198d08d", + "equalIndicator/v1": "62ed387182897e375f5f9aa111470cdfc7fbb87fc62fe2d5924453d6cb8ec006" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8462, + "startColumn": 4, + "charOffset": 267899, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8460, + "startColumn": 1, + "charOffset": 267851, + "charLength": 167, + "snippet": { + "text": "\t\t}\r\n\t\tcase SUPPLY_STASH_ACTION_WITHDRAW: {\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint32_t count = msg.get();\r\n\t\t\tuint8_t stackpos = msg.getByte();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e2e09b7ec1283ff2", + "equalIndicator/v1": "62f7869cd566fbff5e2ca68c03d7bfe47d82ec00f4667ebba78ab3db59ed8ba7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 551, + "startColumn": 55, + "charOffset": 17834, + "charLength": 8, + "snippet": { + "text": "maxValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 549, + "startColumn": 1, + "charOffset": 17746, + "charLength": 152, + "snippet": { + "text": "\tint32_t minValue = level / 5;\r\n\r\n\treturn -normal_random(minValue, static_cast(maxValue * player->getVocation()->meleeDamageMultiplier));\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fac32dccdaabf21c", + "equalIndicator/v1": "63029716a1fb140c66f275f27824adf64bf152bd2ea4568b7c57f763e67de66e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 221, + "startColumn": 7, + "charOffset": 6726, + "charLength": 11, + "snippet": { + "text": "updateThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 219, + "startColumn": 1, + "charOffset": 6659, + "charLength": 242, + "snippet": { + "text": "\r\n\tvoid updateTileFlags(const std::shared_ptr &item);\r\n\tvoid updateThing(std::shared_ptr thing, uint16_t itemId, uint32_t count) override final;\r\n\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b659817adde89131", + "equalIndicator/v1": "630ad154285abad3222c3277f555d5246984a7854fec17c14f0424d15c611a4a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 81, + "startColumn": 10, + "charOffset": 2200, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 79, + "startColumn": 1, + "charOffset": 2147, + "charLength": 105, + "snippet": { + "text": "\t}\r\n\tint32_t getDefense() const override {\r\n\t\treturn mType->info.defense * getDefenseMultiplier();\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "52b0beb11cdd0aad", + "equalIndicator/v1": "631b9a502f7b1c403caf2dc41cade05cf66b0a22e5d9d58d851e9a9f97098694" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 830, + "startColumn": 85, + "charOffset": 26985, + "charLength": 8, + "snippet": { + "text": "minValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 828, + "startColumn": 1, + "charOffset": 26854, + "charLength": 182, + "snippet": { + "text": "\r\n\tint32_t minValue = player->getLevel() / 5;\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\r\n\tif (maxDamage) {\r\n\t\treturn -maxValue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a194a6dd2f028421", + "equalIndicator/v1": "631dec9062f3393a5dead2bac5eccd4dfacc8a330d1b8e6d77211dac8d329659" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Valty', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Valty', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/arraylist.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 116, + "startColumn": 22, + "charOffset": 2641, + "charLength": 6, + "snippet": { + "text": "_Valty" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 114, + "startColumn": 1, + "charOffset": 2613, + "charLength": 152, + "snippet": { + "text": "\t\t}\r\n\r\n\t\ttemplate \r\n\t\tdecltype(auto) emplace_back(_Valty &&... v) {\r\n\t\t\treturn backContainer.emplace_back(std::forward<_Valty>(v)...);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ba4475f82c3106d8", + "equalIndicator/v1": "632721c790022f51a6804fea9980dbc7458cf009269f264ab7520b7b15689aa1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1355, + "startColumn": 61, + "charOffset": 39655, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1353, + "startColumn": 1, + "charOffset": 39590, + "charLength": 146, + "snippet": { + "text": "}\r\n\r\nint32_t Tile::getStackposOfCreature(std::shared_ptr player, std::shared_ptr creature) const {\r\n\tint32_t n;\r\n\tif (ground) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "65d5122b6bf93382", + "equalIndicator/v1": "6340062f557471a488f3af3080a9a447dc57237d0d2ff911c94183198993770a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2835, + "startColumn": 37, + "charOffset": 84759, + "charLength": 8, + "snippet": { + "text": "capacity" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2833, + "startColumn": 1, + "charOffset": 84577, + "charLength": 226, + "snippet": { + "text": "\t\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r\n\t\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\r\n\t\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\r\n\t\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f91c7820ec66ebed", + "equalIndicator/v1": "634b7a9c1e45df1abed231ce3209075f3f84568a95fa313c5e310f43502a02a8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1376, + "startColumn": 62, + "charOffset": 42127, + "charLength": 9, + "snippet": { + "text": "condition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1374, + "startColumn": 1, + "charOffset": 42061, + "charLength": 241, + "snippet": { + "text": "}\r\n\r\nbool Creature::addCombatCondition(std::shared_ptr condition, bool attackerPlayer /* = false*/) {\r\n\t// Caution: condition variable could be deleted after the call to addCondition\r\n\tConditionType_t type = condition->getType();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "953a9ead5d6ee794", + "equalIndicator/v1": "634cee16db8f44dd8f425675bba15ed670692ed3765fa68400d897555a203ede" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8448, + "startColumn": 2, + "charOffset": 293680, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8446, + "startColumn": 1, + "charOffset": 293673, + "charLength": 150, + "snippet": { + "text": "\t}\r\n\r\n\tuint16_t page = result->getNumber(\"page\");\r\n\tuint32_t pages = result->getNumber(\"entries\");\r\n\tpages += entriesPerPage - 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d0a12723abc4eea6", + "equalIndicator/v1": "635698beed4e30de8207ce933df15d9f083cfbe47dadc0ad5fc4a64738fc9a0c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 197, + "startColumn": 86, + "charOffset": 6153, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 195, + "startColumn": 1, + "charOffset": 6063, + "charLength": 260, + "snippet": { + "text": "}\r\n\r\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target, int32_t damageModifier, int32_t cleavePercent) const {\r\n\tif (player) {\r\n\t\tif (params.soundCastEffect == SoundEffect_t::SILENCE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "96f2a1c447b2bdc5", + "equalIndicator/v1": "636e273ea57282296ab6941d6c4ee9d7d6720b29dbabec9d41eee1b543cef324" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5036, + "startColumn": 83, + "charOffset": 180143, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5034, + "startColumn": 1, + "charOffset": 180056, + "charLength": 156, + "snippet": { + "text": "}\r\n\r\nstd::string Game::getTradeErrorDescription(ReturnValue ret, std::shared_ptr item) {\r\n\tif (item) {\r\n\t\tif (ret == RETURNVALUE_NOTENOUGHCAPACITY) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4014b93a847d469c", + "equalIndicator/v1": "638a31c0770687f49b561f40e8fd9a43ba16878a90ea1f3303b7ccd1610cf878" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6051, + "startColumn": 81, + "charOffset": 177865, + "charLength": 12, + "snippet": { + "text": "nextReqTries" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6049, + "startColumn": 1, + "charOffset": 177743, + "charLength": 223, + "snippet": { + "text": "\r\n\t\toldSkillValue = skills[skill].level;\r\n\t\toldPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\r\n\r\n\t\tg_events().eventPlayerOnGainSkillTries(static_self_cast(), skill, tries);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9ac98c1a43b05dd9", + "equalIndicator/v1": "63a7601f50270f1069f28b45e10be3d28b6996d95fd1d2d60a7e85b7bfd0cedd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv_sql.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 27, + "charOffset": 706, + "charLength": 10, + "snippet": { + "text": "loadPrefix" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 668, + "charLength": 233, + "snippet": { + "text": "\r\nprivate:\r\n\tstd::vector loadPrefix(const std::string &prefix = \"\") override;\r\n\tstd::optional load(const std::string &key) override;\r\n\tbool save(const std::string &key, const ValueWrapper &value) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "63c02b254b223793", + "equalIndicator/v1": "63a77515dc61b816a831b97ea9789c0ec4d94ef70b3a3fc94b6ce98acba8037f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'defaultItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'defaultItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5376, + "startColumn": 125, + "charOffset": 189760, + "charLength": 11, + "snippet": { + "text": "defaultItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5374, + "startColumn": 1, + "charOffset": 189631, + "charLength": 257, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerQuickLoot(uint32_t playerId, const Position &pos, uint16_t itemId, uint8_t stackPos, std::shared_ptr defaultItem, bool lootAllCorpses, bool autoLoot) {\r\n\tstd::shared_ptr player = getPlayerByID(playerId);\r\n\tif (!player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e14bd3f53d43126", + "equalIndicator/v1": "63ac6dc00346bbd1260324e3bf2c42c9a2e0afef425329a8dfc3b5feaf688a04" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 348, + "startColumn": 58, + "charOffset": 12918, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 346, + "startColumn": 1, + "charOffset": 12856, + "charLength": 279, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLook - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "df90fd8a8817f9b1", + "equalIndicator/v1": "63b429dcebc96cf5ab8ba0cdb9578640a999b1524b164365131bf6687f4c61b0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 863, + "startColumn": 71, + "charOffset": 31227, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 861, + "startColumn": 1, + "charOffset": 31152, + "charLength": 360, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnReportRuleViolation(std::shared_ptr player, const std::string &targetName, uint8_t reportType, uint8_t reportReason, const std::string &comment, const std::string &translation) {\r\n\t// Player:onReportRuleViolation(targetName, reportType, reportReason, comment, translation)\r\n\tif (info.playerOnReportRuleViolation == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f49373812ed9a5a", + "equalIndicator/v1": "63bc921056c5eb70bb908ef2e74ba599893471756dd853b4fd4d0e5e75f25cc9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 607, + "startColumn": 102, + "charOffset": 21588, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 605, + "startColumn": 1, + "charOffset": 21482, + "charLength": 311, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) {\r\n\t// Player:onLookInBattleList(creature, position, distance) or Player.onLookInBattleList(self, creature, position, distance)\r\n\tif (info.playerOnLookInBattleList == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cfaac4102178c4a6", + "equalIndicator/v1": "640379f76bc7c70ad0d7babcec3142fe3af52be4696cbd911f6ebb00546b8bd1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 262, + "startColumn": 41, + "charOffset": 9669, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 260, + "startColumn": 1, + "charOffset": 9623, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bcfbecc6b7be737d", + "equalIndicator/v1": "6412ad68f225eeeb65d19ff1064952f5b4f3b932abd680a679896bb42ed43dc3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 418, + "startColumn": 26, + "charOffset": 20801, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 416, + "startColumn": 1, + "charOffset": 20605, + "charLength": 360, + "snippet": { + "text": "// SLOT_GREEN_TOP_150 = 2\r\nvoid IOWheel::slotGreenTop150(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\tif (isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_GREEN_TOP_150)) {\r\n\t\tbonusData.leech.manaLeech += MANA_LEECH_INCREASE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db4711d221b7a25c", + "equalIndicator/v1": "641a2be599e43ab6afb58055cf8b99d6273e56cd95919c4c5ca066ed05c2ac38" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1224, + "startColumn": 41, + "charOffset": 46736, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1222, + "startColumn": 1, + "charOffset": 46690, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8155f20ac47ab8ab", + "equalIndicator/v1": "641b3f74f619081fb6065185177e2b9b0feafacb29186e2b44ea70c8b5f979f1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1043, + "startColumn": 13, + "charOffset": 30154, + "charLength": 7, + "snippet": { + "text": "toupper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1041, + "startColumn": 1, + "charOffset": 30071, + "charLength": 109, + "snippet": { + "text": "\tfor (size_t i = 1; i < strLength; ++i) {\r\n\t\tif (str[i - 1] == ' ') {\r\n\t\t\tstr[i] = toupper(str[i]);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cc3d1f21b277b469", + "equalIndicator/v1": "641d59d127219122c3c9e9c0cab5648bdbdd08f7d4da1838f7057a866f47dc82" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8634, + "startColumn": 58, + "charOffset": 272023, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8632, + "startColumn": 1, + "charOffset": 271961, + "charLength": 237, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::getForgeInfoMap(std::shared_ptr item, std::map> &itemsMap) const {\r\n\tstd::map itemInfo;\r\n\titemInfo.insert({ item->getTier(), item->getItemCount() });\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "31710a20a4e7a1ab", + "equalIndicator/v1": "643aecfc6c29a9c3eeecb558a8c73f4f774a80f638658d6103277bf6f3f62548" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1095, + "startColumn": 41, + "charOffset": 41717, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1093, + "startColumn": 1, + "charOffset": 41671, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79634c1f7ff01a18", + "equalIndicator/v1": "646aafba4294be74bd726ae64a1f6e0ea6c2673fc6605f560d7f9fa8ec509186" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 69, + "startColumn": 18, + "charOffset": 2147, + "charLength": 15, + "snippet": { + "text": "getWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 67, + "startColumn": 1, + "charOffset": 2002, + "charLength": 481, + "snippet": { + "text": "\tvirtual bool useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const;\r\n\r\n\tvirtual int32_t getWeaponDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, bool maxDamage = false) const = 0;\r\n\tvirtual int32_t getElementDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const = 0;\r\n\tvirtual CombatType_t getElementType() const = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2b5b395dfae61030", + "equalIndicator/v1": "647e396c46e9d6433d4a950ebdbedbbbf62ab3e18771a379b5d8cb2d87f2de36" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 217, + "startColumn": 2, + "charOffset": 7825, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 215, + "startColumn": 1, + "charOffset": 7818, + "charLength": 46, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3db4d7113755102a", + "equalIndicator/v1": "64877a00dc3c6e69a4022c43f9336304ab6445bb0885eedd10c005161d30ba1c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 640, + "startColumn": 56, + "charOffset": 19017, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 638, + "startColumn": 1, + "charOffset": 18957, + "charLength": 164, + "snippet": { + "text": "}\r\n\r\nvoid Party::updatePlayerStatus(std::shared_ptr player, const Position &oldPos, const Position &newPos) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "89a226754cb536a6", + "equalIndicator/v1": "648bb0606e6c5b152f11026d20587a3aed710791fcda0bf7db0dd8f4114cc750" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'servicePort' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'servicePort' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 103, + "charOffset": 733, + "charLength": 11, + "snippet": { + "text": "servicePort" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 599, + "charLength": 259, + "snippet": { + "text": "#include \"server/server.hpp\"\r\n\r\nConnection_ptr ConnectionManager::createConnection(asio::io_service &io_service, ConstServicePort_ptr servicePort) {\r\n\tauto connection = std::make_shared(io_service, servicePort);\r\n\tconnections.emplace(connection);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3dcb45d225b106eb", + "equalIndicator/v1": "64c561221c50a5e5a9e758b571ec0e1aad6fb547e7c596b951018596c2aef0cc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 690, + "startColumn": 37, + "charOffset": 22554, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 688, + "startColumn": 1, + "charOffset": 22492, + "charLength": 128, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 3.20f);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "20a0253bfc049d25", + "equalIndicator/v1": "650723f1896c3bd988ef5000e233edfe9e5f2de84d31ed9d6991a45174485150" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 670, + "startColumn": 30, + "charOffset": 20817, + "charLength": 8, + "snippet": { + "text": "listItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 668, + "startColumn": 1, + "charOffset": 20724, + "charLength": 252, + "snippet": { + "text": "\t\t// try find a suitable item to stack with\r\n\t\tuint32_t n = 0;\r\n\t\tfor (std::shared_ptr listItem : itemlist) {\r\n\t\t\tif (listItem != item && listItem->equals(item) && listItem->getItemCount() < listItem->getStackSize()) {\r\n\t\t\t\t*destItem = listItem;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "87e4f469fe66407a", + "equalIndicator/v1": "651c30b4158b9cc4767f4a92def64fb9ed52b3844c9ac618e9a8b4839da1f025" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1180, + "startColumn": 58, + "charOffset": 36590, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1178, + "startColumn": 1, + "charOffset": 36528, + "charLength": 134, + "snippet": { + "text": "}\r\n\r\nvoid Creature::addDamagePoints(std::shared_ptr attacker, int32_t damagePoints) {\r\n\tif (damagePoints <= 0) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6d6dcb5025c0b443", + "equalIndicator/v1": "654f1fba3818dcf294b00b85c71496d56b9eb7d1dd727af0cdb42b5035c2df77" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1595, + "startColumn": 4, + "charOffset": 56012, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1593, + "startColumn": 1, + "charOffset": 55914, + "charLength": 150, + "snippet": { + "text": "\t\tdefault: {\r\n\t\t\tg_logger().warn(\"[ValueCallback::getMinMaxValues] - Unknown callback type\");\r\n\t\t\tscriptInterface->resetScriptEnv();\r\n\t\t\treturn;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7a90e0cbf1313375", + "equalIndicator/v1": "65583fa8d877989935ab599c46b7ef736037aadc5c1136a609e7239f70a7e09e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1436, + "startColumn": 108, + "charOffset": 49795, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1434, + "startColumn": 1, + "charOffset": 49683, + "charLength": 364, + "snippet": { + "text": "}\r\n\r\nstd::vector>> Combat::pickChainTargets(std::shared_ptr caster, const CombatParams ¶ms, uint8_t chainDistance, uint8_t maxTargets, bool backtracking, bool aggressive, std::shared_ptr initialTarget /* = nullptr */) {\r\n\tBenchmark bm_pickChain;\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "26ef6611793c5dc0", + "equalIndicator/v1": "655fd1e8cb8c57934ec4dca511169f61a82570b800eb158105068b59da568ab4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 831, + "startColumn": 64, + "charOffset": 29920, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 829, + "startColumn": 1, + "charOffset": 29852, + "charLength": 343, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) {\r\n\t// Player:onMoveCreature(creature, fromPosition, toPosition) or Player.onMoveCreature(self, creature, fromPosition, toPosition)\r\n\tif (info.playerOnMoveCreature == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f7ac8c15bd4f0ba1", + "equalIndicator/v1": "656dfb8d2e52ebab0f8be36ca86b345311fc956d613ec884526e02940a01fc18" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 898, + "startColumn": 7, + "charOffset": 34251, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 896, + "startColumn": 1, + "charOffset": 34158, + "charLength": 236, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnRequestQuestLog(std::shared_ptr player) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnRequestQuestLog - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "416d834b10a5d8cd", + "equalIndicator/v1": "6580e06fb7eadb58265b59093e894d92d1fd64f02de9551ba6190ae47a2fc892" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 900, + "startColumn": 60, + "charOffset": 28708, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 898, + "startColumn": 1, + "charOffset": 28644, + "charLength": 218, + "snippet": { + "text": "}\r\n\r\nbool InstantSpell::canThrowSpell(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tconst Position &fromPos = creature->getPosition();\r\n\tconst Position &toPos = target->getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "91323b81309b408a", + "equalIndicator/v1": "65948bd2a12eb8049c81bda13f552c9ba67d0f6802677258a050a1d8adeb7cb3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2803, + "startColumn": 52, + "charOffset": 83718, + "charLength": 13, + "snippet": { + "text": "sumSkillTries" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2801, + "startColumn": 1, + "charOffset": 83627, + "charLength": 213, + "snippet": { + "text": "\t\t\tsumSkillTries += skills[i].tries;\r\n\r\n\t\t\tuint32_t lostSkillTries = static_cast(sumSkillTries * deathLossPercent);\r\n\t\t\twhile (lostSkillTries > skills[i].tries) {\r\n\t\t\t\tlostSkillTries -= skills[i].tries;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "78bf13c541a18414", + "equalIndicator/v1": "6595d5d7c9d7aa599f8c2393eec153566d9834145556b7fdf76d19a9ee28cbcc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 574, + "startColumn": 7, + "charOffset": 20359, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 572, + "startColumn": 1, + "charOffset": 20347, + "charLength": 136, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnLook - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "002fae6ecf4d4b3a", + "equalIndicator/v1": "65c12f5458ddfc18831170cd2da5b26ebf0251848cd0354e79d52da5ed8a3524" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2768, + "startColumn": 36, + "charOffset": 82433, + "charLength": 7, + "snippet": { + "text": "sumMana" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2766, + "startColumn": 1, + "charOffset": 82391, + "charLength": 123, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tlostMana = static_cast(sumMana * deathLossPercent);\r\n\r\n\t\twhile (lostMana > manaSpent && magLevel > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d31b9752f02157c9", + "equalIndicator/v1": "65c1b13ef53fefea8fbb709b6b80d8fa1c01c11ca1632955b18264977960a3a4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7194, + "startColumn": 38, + "charOffset": 250896, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7192, + "startColumn": 1, + "charOffset": 250829, + "charLength": 116, + "snippet": { + "text": "\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmanaDamage = std::min(target->getMana(), healthChange);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0f7b1ae873ca4897", + "equalIndicator/v1": "65daedd4a68627965ee066b12a29ea54b31a0e8af90bfbd93e11cced22d1f250" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: interface, scriptId, callbackId, timerEvent", + "markdown": "Constructor does not initialize these fields: interface, scriptId, callbackId, timerEvent" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 16, + "startColumn": 20, + "charOffset": 533, + "charLength": 17, + "snippet": { + "text": "ScriptEnvironment" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 465, + "charLength": 107, + "snippet": { + "text": "#include \"lua/scripts/script_environment.hpp\"\r\n\r\nScriptEnvironment::ScriptEnvironment() {\r\n\tresetEnv();\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d70a5e2a42a7a676", + "equalIndicator/v1": "65f22c13ce19e53954976b6ce5e42cb05305711cd33fa20b00c03b8d32b3f433" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 53, + "startColumn": 53, + "charOffset": 1291, + "charLength": 21, + "snippet": { + "text": "(OTSYS_TIME() / 1000)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 51, + "startColumn": 1, + "charOffset": 1233, + "charLength": 197, + "snippet": { + "text": "\t}\r\n\r\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\r\n\tgetUnlockedKV()->set(title.m_maleName, toSaveTimeStamp);\r\n\tm_titlesUnlocked.emplace_back(title, toSaveTimeStamp);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b848fa3b9f7136e0", + "equalIndicator/v1": "65f4a18db19320b20eb998beab291c5145c35ba07a878d6126f9017a7a7a208c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 29, + "startColumn": 2, + "charOffset": 794, + "charLength": 11, + "snippet": { + "text": "ReturnValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 27, + "startColumn": 1, + "charOffset": 761, + "charLength": 486, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "87fa69effe8b7bd5", + "equalIndicator/v1": "6601a5c4c9f84b65d37e7dbdcb16cf5e33fdbf74b3835d484c95984a6d95823f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1094, + "startColumn": 60, + "charOffset": 34489, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1092, + "startColumn": 1, + "charOffset": 34425, + "charLength": 213, + "snippet": { + "text": "}\r\n\r\nbool RuneSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var, bool isHotkey) const {\r\n\t// onCastSpell(creature, var, isHotkey)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0d375d7287cba553", + "equalIndicator/v1": "66365ad498bec1bbecc314765ebd05b94b7b7565ba49f4ce3cf9941bdf893343" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 84, + "startColumn": 9, + "charOffset": 2562, + "charLength": 12, + "snippet": { + "text": "stepDuration" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 82, + "startColumn": 1, + "charOffset": 2548, + "charLength": 51, + "snippet": { + "text": "\t}\r\n\r\n\treturn stepDuration - (ct - lastStep);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ce298b98d54a4425", + "equalIndicator/v1": "666d940cd5d4c7b33e7096c1185045f25c2b0e4929c2d9818d3c9e66266c8296" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Dynamic exception specification 'throw()' is deprecated; consider using 'noexcept' instead", + "markdown": "Dynamic exception specification 'throw()' is deprecated; consider using 'noexcept' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 286, + "startColumn": 35, + "charOffset": 8351, + "charLength": 5, + "snippet": { + "text": "throw" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 284, + "startColumn": 1, + "charOffset": 8291, + "charLength": 101, + "snippet": { + "text": "\t\tmessage(message) { }\r\n\r\n\tvirtual const char* what() const throw() {\r\n\t\treturn message.c_str();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "02b30fc68c4154c4", + "equalIndicator/v1": "667d4f4ded97a0aad016d196430d7a0686766179222e1fbb36ed74402676bcea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 644, + "startColumn": 51, + "charOffset": 20289, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 642, + "startColumn": 1, + "charOffset": 20034, + "charLength": 446, + "snippet": { + "text": "\t\t\t\tif (augment->type == Augment_t::IncreasedDamage || augment->type == Augment_t::PowerfulImpact || augment->type == Augment_t::StrongImpact) {\r\n\t\t\t\t\tconst float augmentPercent = augment->value / 100.0;\r\n\t\t\t\t\tdamage.primary.value += static_cast(damage.primary.value * augmentPercent);\r\n\t\t\t\t\tdamage.secondary.value += static_cast(damage.secondary.value * augmentPercent);\r\n\t\t\t\t} else if (augment->type != Augment_t::Cooldown) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ecbae8c12ea19b6", + "equalIndicator/v1": "6693b48028ebf3d6562a8a1e689d2a04c3649037e2861cad34d07e25cd4a0b2f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 363, + "startColumn": 59, + "charOffset": 9902, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 361, + "startColumn": 1, + "charOffset": 9839, + "charLength": 176, + "snippet": { + "text": "}\r\n\r\nvoid Creature::onCreatureAppear(std::shared_ptr creature, bool isLogin) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (creature == getCreature()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1649ee3236181acc", + "equalIndicator/v1": "669b69e4cc15d9ff1291caf27accc637f467ccec75f87389cfa4eb5ef3604b2e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8890, + "startColumn": 2, + "charOffset": 282436, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8888, + "startColumn": 1, + "charOffset": 282395, + "charLength": 167, + "snippet": { + "text": "\r\n\tuint8_t slotBossId = msg.getByte();\r\n\tuint32_t selectedBossId = msg.get();\r\n\r\n\tg_game().playerBosstiarySlot(player->getID(), slotBossId, selectedBossId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "53141a25f61aef86", + "equalIndicator/v1": "66a1e004d0bd3fcd745e91bfdf88b48f2193c7cbf44bad2bb1899d15701e22fa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1829, + "startColumn": 3, + "charOffset": 55680, + "charLength": 16, + "snippet": { + "text": "ObjectCategory_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1827, + "startColumn": 1, + "charOffset": 55554, + "charLength": 290, + "snippet": { + "text": "\t\tg_game().playerSetManagedContainer(player->getID(), category, pos, itemId, stackpos, false);\r\n\t} else if (action == 5) {\r\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tg_game().playerClearManagedContainer(player->getID(), category, false);\r\n\t} else if (action == 6) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "809cc00c0f82676c", + "equalIndicator/v1": "66a3ad74559624492e98f0fce6e9896e73baab03c6ae6b7b1a941eb6828834fd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 988, + "startColumn": 58, + "charOffset": 37606, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 986, + "startColumn": 1, + "charOffset": 37544, + "charLength": 198, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnWalk(std::shared_ptr player, Direction &dir) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::eventOnWalk - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c4c7570beb1d2958", + "equalIndicator/v1": "66a85bf96dd4ee12c460afa462b43a9fa89c60c0c1b1cfc947a7703348bb49ca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 807, + "startColumn": 54, + "charOffset": 25630, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 805, + "startColumn": 1, + "charOffset": 25572, + "charLength": 181, + "snippet": { + "text": "}\r\n\r\nvoid Party::addPlayerHealing(std::shared_ptr player, uint64_t amount) {\r\n\tauto playerAnalyzer = getPlayerPartyAnalyzerStruct(player->getID());\r\n\tif (!playerAnalyzer) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "91faf3aff5a06afb", + "equalIndicator/v1": "67020d22b9a8bd8e0d373aa0d2b1ae02a684b41ee045b9d8a5333b2ce24a43e9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1925, + "startColumn": 2, + "charOffset": 58622, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1923, + "startColumn": 1, + "charOffset": 58527, + "charLength": 245, + "snippet": { + "text": "void ProtocolGame::parseHouseWindow(NetworkMessage &msg) {\r\n\tuint8_t doorId = msg.getByte();\r\n\tuint32_t id = msg.get();\r\n\tconst std::string text = msg.getString();\r\n\tg_game().playerUpdateHouseWindow(player->getID(), doorId, id, text);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b40af9ed34351ac8", + "equalIndicator/v1": "670a050dace1c2bc7376b516650e8e1a812698b755400c87e1ac44c5eea65115" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 415, + "startColumn": 8, + "charOffset": 10342, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 413, + "startColumn": 1, + "charOffset": 10234, + "charLength": 229, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetImbuementSlot(lua_State* L) {\r\n\t// itemType:getImbuementSlot()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->imbuementSlot);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c7a861edf10c82f1", + "equalIndicator/v1": "672586d7d1c2dc6a54947d655a02c9871c47dcfb7214d6ddd3f33fb0663ac932" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3596, + "startColumn": 39, + "charOffset": 111681, + "charLength": 27, + "snippet": { + "text": "Weapons::getMaxWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3594, + "startColumn": 1, + "charOffset": 111387, + "charLength": 498, + "snippet": { + "text": "\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\r\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\r\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, it.abilities->elementDamage, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\r\n\t\t\t}\r\n\t\t\tmsg.add(maxDamage >> 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a07fb0f75824f258", + "equalIndicator/v1": "6737ac69ab0d8f16277e3569e659587fd6fee1d6d7295fab819c12683e8d65e6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2078, + "startColumn": 58, + "charOffset": 61404, + "charLength": 7, + "snippet": { + "text": "oldItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2076, + "startColumn": 1, + "charOffset": 61331, + "charLength": 178, + "snippet": { + "text": "\r\n// inventory\r\nvoid Player::onUpdateInventoryItem(std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tif (oldItem != newItem) {\r\n\t\tonRemoveInventoryItem(oldItem);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67b82e07c327275d", + "equalIndicator/v1": "673ee4c39ecb8cd6adfb9163f3d76840d52d3d203bfddaf45cbb26da38492462" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5157, + "startColumn": 48, + "charOffset": 152209, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5155, + "startColumn": 1, + "charOffset": 152157, + "charLength": 288, + "snippet": { + "text": "}\r\n\r\nbool Player::hasKilled(std::shared_ptr player) const {\r\n\tfor (const auto &kill : unjustifiedKills) {\r\n\t\tif (kill.target == player->getGUID() && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60 && kill.unavenged) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "27044835c5d59e70", + "equalIndicator/v1": "674dc0633cb27665e7a5c6a5c8c924f9fab5151efbcec201aa9b5cc6d0d155df" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7550, + "startColumn": 48, + "charOffset": 263078, + "charLength": 5, + "snippet": { + "text": "charm" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7548, + "startColumn": 1, + "charOffset": 262928, + "charLength": 429, + "snippet": { + "text": "\t activeCharm != CHARM_NONE) {\r\n\t\tconst auto charm = g_iobestiary().getBestiaryCharm(activeCharm);\r\n\t\tint8_t chance = charm->id == CHARM_CRIPPLE ? charm->chance : charm->chance + attackerPlayer->getCharmChanceModifier();\r\n\t\tg_logger().debug(\"charm chance: {}, base: {}, bonus: {}\", chance, charm->chance, attackerPlayer->getCharmChanceModifier());\r\n\t\tif (charm->type == CHARM_OFFENSIVE && (chance >= normal_random(0, 100))) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5b49e82189b507ab", + "equalIndicator/v1": "6752377aa8df2f997ee0b20e4a4ba2685b8509363d92e6b04e05e5788b7ff0ff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetCreature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 82, + "charOffset": 567, + "charLength": 14, + "snippet": { + "text": "targetCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 451, + "charLength": 234, + "snippet": { + "text": "class CreatureCallback {\r\npublic:\r\n\tCreatureCallback(LuaScriptInterface* scriptInterface, std::shared_ptr targetCreature) :\r\n\t\tscriptInterface(scriptInterface), m_targetCreature(targetCreature) {};\r\n\t~CreatureCallback() { }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "19d76f601efbe9cd", + "equalIndicator/v1": "6771aa2bd92c731e5211fd09c3ba9264457e81e3ea9b94e73eb4d77abfa35a44" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1651, + "startColumn": 65, + "charOffset": 49079, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1649, + "startColumn": 1, + "charOffset": 49010, + "charLength": 125, + "snippet": { + "text": "}\r\n\r\nvoid Player::sendRemoveContainerItem(std::shared_ptr container, uint16_t slot) {\r\n\tif (!client) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "659b73e8c0f81708", + "equalIndicator/v1": "6785a33ef3f15faa3c0461077ba09d35dd757802f345f2ccf623d0a5b854f430" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5768, + "startColumn": 25, + "charOffset": 170223, + "charLength": 8, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5766, + "startColumn": 1, + "charOffset": 170095, + "charLength": 349, + "snippet": { + "text": "\t\tauto monthMax = ((isRed ? 2 : 1) * g_configManager().getNumber(MONTH_KILLS_TO_RED, __FUNCTION__));\r\n\r\n\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\r\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\r\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2111a6aca4a12ab5", + "equalIndicator/v1": "67a40339c1f714d4964f6e2b1b1eba64c1393db1fee1b39926a3dce178b0cab0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 942, + "startColumn": 7, + "charOffset": 35971, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 940, + "startColumn": 1, + "charOffset": 35824, + "charLength": 265, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e9a5c0487ae8f27d", + "equalIndicator/v1": "67a43df932e0a580c99f9ed3bd0195b314d4b22165b42a8a404cec9b58c54f7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 830, + "startColumn": 71, + "charOffset": 26971, + "charLength": 11, + "snippet": { + "text": "attackValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 828, + "startColumn": 1, + "charOffset": 26854, + "charLength": 182, + "snippet": { + "text": "\r\n\tint32_t minValue = player->getLevel() / 5;\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\r\n\tif (maxDamage) {\r\n\t\treturn -maxValue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "32a289197bb1e990", + "equalIndicator/v1": "67d60e723ebc24ba0d9b7f1ff8097d7b1ca122e746de7528899a5feaccce7959" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9789, + "startColumn": 40, + "charOffset": 342716, + "charLength": 3, + "snippet": { + "text": "npc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9787, + "startColumn": 1, + "charOffset": 342672, + "charLength": 82, + "snippet": { + "text": "}\r\n\r\nvoid Game::addNpc(std::shared_ptr npc) {\r\n\tnpcs[npc->getID()] = npc;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7b9d4712ecee4314", + "equalIndicator/v1": "6804e87afd32eb85ea4e1ff6ebc565e9d863ecd172da83d1399b1ff543cb8e55" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Std::move of the const variable 'initName' has no effect; remove std::move() or make the variable non-const", + "markdown": "Std::move of the const variable 'initName' has no effect; remove std::move() or make the variable non-const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1417, + "startColumn": 8, + "charOffset": 37380, + "charLength": 9, + "snippet": { + "text": "std::move" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1415, + "startColumn": 1, + "charOffset": 37272, + "charLength": 170, + "snippet": { + "text": "\tVIPGroupEntry(uint8_t initId, const std::string &initName, bool initCustomizable) :\r\n\t\tid(initId),\r\n\t\tname(std::move(initName)),\r\n\t\tcustomizable(initCustomizable) { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b855f114bf65c4f5", + "equalIndicator/v1": "68274ca7542aef287c0b68228931708b77d17782f0d146167ceed10ed18963a4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1906, + "startColumn": 2, + "charOffset": 57912, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1904, + "startColumn": 1, + "charOffset": 57854, + "charLength": 221, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseAttack(NetworkMessage &msg) {\r\n\tuint32_t creatureId = msg.get();\r\n\t// msg.get(); creatureId (same as above)\r\n\tg_game().playerSetAttackedCreature(player->getID(), creatureId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b3c713caa7fc9898", + "equalIndicator/v1": "6849494cc12d1619f868aeb8aeadab61b138971f75f38034e5451801b88ea7a6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 913, + "startColumn": 21, + "charOffset": 29487, + "charLength": 4, + "snippet": { + "text": "-max" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 911, + "startColumn": 1, + "charOffset": 29361, + "charLength": 164, + "snippet": { + "text": "\r\n\t// Returns the calculated maximum damage or a random value between the calculated minimum and maximum\r\n\treturn maxDamage ? -max : -normal_random(min, max);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "416d1f3db1e4e6dc", + "equalIndicator/v1": "685de3de7e532ad321f2ed884f8acf66f0c631fef270b3fc1b5d7adf75f5fdbb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 365, + "startColumn": 14, + "charOffset": 9013, + "charLength": 12, + "snippet": { + "text": "std::tolower" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 363, + "startColumn": 1, + "charOffset": 8956, + "charLength": 84, + "snippet": { + "text": "\t\t\tresult += std::toupper(ch);\r\n\t\t} else {\r\n\t\t\tresult += std::tolower(ch);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f630beebab9279ba", + "equalIndicator/v1": "685f05250e8a0ec62b5408064ef67e7287dd5c2fe07952497e3ec7f8d72f1639" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 584, + "startColumn": 13, + "charOffset": 27857, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 582, + "startColumn": 1, + "charOffset": 27667, + "charLength": 447, + "snippet": { + "text": "\t} else if (stringValue == \"absorbpercentfire\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentpoison\" || stringValue == \"absorbpercentearth\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentice\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "32579405c551ff00", + "equalIndicator/v1": "686a696b7020f4cf49ea5dc6f2a61864521ad03e02ad84670261f485a5099993" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Tree, std::less>, std::allocator>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Tree, std::less\\>, std::allocator\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 249, + "startColumn": 21, + "charOffset": 6819, + "charLength": 7, + "snippet": { + "text": "npcType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 247, + "startColumn": 1, + "charOffset": 6780, + "charLength": 173, + "snippet": { + "text": "\r\n\tint index = 0;\r\n\tlua_createtable(L, npcType->info.scripts.size(), 0);\r\n\tfor (const std::string &creatureEvent : npcType->info.scripts) {\r\n\t\tpushString(L, creatureEvent);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2ef13d320de496f5", + "equalIndicator/v1": "686ce62ed411323a46423da0c8075ce1e440cb40eae33c6a01dd16e1d14ad40a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 652, + "startColumn": 16, + "charOffset": 33331, + "charLength": 21, + "snippet": { + "text": "IOMarket::getInstance" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 650, + "startColumn": 1, + "charOffset": 33268, + "charLength": 268, + "snippet": { + "text": "\r\n\t// Update active buy offers (market_offers)\r\n\tauto offers = IOMarket::getInstance().getActiveOffers(MARKETACTION_BUY);\r\n\tfor (const auto &offer : offers) {\r\n\t\titemsPriceMap[offer.itemId][offer.tier] = std::max(itemsPriceMap[offer.itemId][offer.tier], offer.price);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "de19aebc6cb6da7e", + "equalIndicator/v1": "68737bbf9aaaf6f58be2d7c6d955835e67f58fb199cbcca8416e9b6cda574b3d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'name' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'name' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 333, + "startColumn": 18, + "charOffset": 12575, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 331, + "startColumn": 1, + "charOffset": 12415, + "charLength": 235, + "snippet": { + "text": "\tint32_t getMajorStatConditional(const std::string &instant, WheelMajor_t major) const;\r\n\tint64_t getOnThinkTimer(WheelOnThink_t type) const;\r\n\tbool getInstant(const std::string name) const;\r\n\tdouble getMitigationMultiplier() const;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "65617b9f4f96396e", + "equalIndicator/v1": "687e351269df419d095b9cc16c50c13804e3156751b58292e9cd546c415d42bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1840, + "startColumn": 175, + "charOffset": 71801, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1838, + "startColumn": 1, + "charOffset": 71622, + "charLength": 279, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\r\n\tif (!player || !toCylinder || !item) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "547286440128a85d", + "equalIndicator/v1": "688b63281d228b85a33d943c3664e017e89ec73f8cdfe45566abcd00df546f36" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 217, + "startColumn": 14, + "charOffset": 6277, + "charLength": 10, + "snippet": { + "text": "scriptName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 215, + "startColumn": 1, + "charOffset": 6237, + "charLength": 83, + "snippet": { + "text": "\r\n\tstd::string name = \"\";\r\n\tstd::string scriptName = \"\";\r\n\r\n\tuint8_t chance = 100;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3f1bbb5f580fb3ca", + "equalIndicator/v1": "688bc72c9079e47f5ced55ca29933fcf02a968063b70662a29f694bc85b719e0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 177, + "startColumn": 8, + "charOffset": 5448, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 175, + "startColumn": 1, + "charOffset": 5329, + "charLength": 323, + "snippet": { + "text": "\t\t// onCreatureDisappear(self, creature)\r\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\r\n\t\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\t\tg_logger().error(\"[Monster::onCreatureDisappear - Monster {} creature {}] \"\r\n\t\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1db6e44ae9db1f5a", + "equalIndicator/v1": "689cca6b8ac9f9be863d609c1ad26cafc33480c8fe97bdb182d81ddda8903f6c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 54, + "startColumn": 29, + "charOffset": 1503, + "charLength": 12, + "snippet": { + "text": "getContainer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 52, + "startColumn": 1, + "charOffset": 1419, + "charLength": 161, + "snippet": { + "text": "\tstd::shared_ptr clone() const override final;\r\n\r\n\tstd::shared_ptr getContainer() override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9fe8a8887d9047f4", + "equalIndicator/v1": "68c17c15c5e7a01c8c7c7c7c9b3a6bd127f905ef2071755bcb05178db02bbc4f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1340, + "startColumn": 58, + "charOffset": 45445, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1338, + "startColumn": 1, + "charOffset": 45383, + "charLength": 357, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatCondition(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster == target || canCombat) && params.impactEffect != CONST_ME_NONE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4e8edb5521f9c1e9", + "equalIndicator/v1": "68f0c8bb3894a46a55c3c16ebee92f9230b644d1e5e1c5009e04409a06ede10e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int_fast32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int_fast32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1766, + "startColumn": 34, + "charOffset": 53004, + "charLength": 2, + "snippet": { + "text": "dx" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1764, + "startColumn": 1, + "charOffset": 52941, + "charLength": 91, + "snippet": { + "text": "\tfloat tan;\r\n\tif (dx != 0) {\r\n\t\ttan = static_cast(dy) / dx;\r\n\t} else {\r\n\t\ttan = 10;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "81ec756a34002e96", + "equalIndicator/v1": "68f369fdd297d6b6666d1d53864e4caa10df2741b2c45b02d01b2c60ab9a6267" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 651, + "startColumn": 29, + "charOffset": 17601, + "charLength": 58, + "snippet": { + "text": "(100 - creature->getIncreasePercent(indexToCombatType(i)))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 649, + "startColumn": 1, + "charOffset": 17554, + "charLength": 147, + "snippet": { + "text": "\t\t\tcontinue;\r\n\t\t}\r\n\t\tsetIncrease(i, std::round((100 - creature->getIncreasePercent(indexToCombatType(i))) * increasePercentValue / 100.f));\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "50f97e4349d69bdd", + "equalIndicator/v1": "68f9d51082f3a456b40512a48fc723631dd27c07a3502e22ee5d9ac435fac101" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4569, + "startColumn": 74, + "charOffset": 144151, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4567, + "startColumn": 1, + "charOffset": 144073, + "charLength": 156, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendContainer(uint8_t cid, std::shared_ptr container, bool hasParent, uint16_t firstIndex) {\r\n\tif (!player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7198e2a605d37833", + "equalIndicator/v1": "692074324d8abdbab88d75f1d27d4b05393dcf1c47867794f2d227b9fcbeb162" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 437, + "startColumn": 8, + "charOffset": 10874, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 435, + "startColumn": 1, + "charOffset": 10772, + "charLength": 220, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetWeaponType(lua_State* L) {\r\n\t// itemType:getWeaponType()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->weaponType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e1de2bfca2abde49", + "equalIndicator/v1": "6928b961893bb95d01a28db6ed1bad89b28ae8250f90d9e3404de7d8a7569d6e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 94, + "startColumn": 30, + "charOffset": 2996, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 92, + "startColumn": 1, + "charOffset": 2927, + "charLength": 159, + "snippet": { + "text": "\r\n\t\t// Loop through items in container\r\n\t\tfor (std::shared_ptr item : container->getItemList()) {\r\n\t\t\tif (!item) {\r\n\t\t\t\tcontinue; // Check for null item\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f02b7a9138fdd5ba", + "equalIndicator/v1": "6929c2d9a2eb66e66afaaccd15e6cd6318a54b9fe07c9e99c47c860dc111d4f8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1491, + "startColumn": 26, + "charOffset": 44512, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1489, + "startColumn": 1, + "charOffset": 44341, + "charLength": 214, + "snippet": { + "text": "\tvoid sendToChannel(std::shared_ptr creature, SpeakClasses type, const std::string &text, uint16_t channelId) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendToChannel(creature, type, text, channelId);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b56bff71c58f3555", + "equalIndicator/v1": "6945e6a0b70611030a98bda77f8b1e48058830b50cacebda69cfd8e10affbbc2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1853, + "startColumn": 66, + "charOffset": 50096, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1851, + "startColumn": 1, + "charOffset": 50026, + "charLength": 134, + "snippet": { + "text": "}\r\n\r\nbool ConditionFeared::getFleeDirection(std::shared_ptr creature) {\r\n\tPosition creaturePos = creature->getPosition();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d2207832b488e3bb", + "equalIndicator/v1": "6962b0a69e86c517f91fc9278c6f0c0a5dae87c62af89f4b57e6aa1689f9d86b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1551, + "startColumn": 3, + "charOffset": 54561, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1549, + "startColumn": 1, + "charOffset": 54443, + "charLength": 168, + "snippet": { + "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r\n\t\treturn;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a21bc347e3d74978", + "equalIndicator/v1": "6976d824bbca0b842dc4424c4014352d261682fc9847ad79cb85bde78395de84" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1840, + "startColumn": 141, + "charOffset": 71767, + "charLength": 10, + "snippet": { + "text": "toCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1838, + "startColumn": 1, + "charOffset": 71622, + "charLength": 279, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\r\n\tif (!player || !toCylinder || !item) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6c2723b40251449e", + "equalIndicator/v1": "69790d4c772068de8050992ae29246618833b58cf1147038d25a04723c3187c5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 918, + "startColumn": 70, + "charOffset": 35026, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 916, + "startColumn": 1, + "charOffset": 34952, + "charLength": 225, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnRequestQuestLine(std::shared_ptr player, uint16_t questId) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnRequestQuestLine - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59eeb1d6d3d938c6", + "equalIndicator/v1": "69a01a01c7e005adbf2ff1e6d6c5e4b244b6acfd5a1058e30dccd10ead8ffc42" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1768, + "startColumn": 7, + "charOffset": 61678, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1766, + "startColumn": 1, + "charOffset": 61516, + "charLength": 360, + "snippet": { + "text": "bool ChainPickerCallback::onChainCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\t// onChainCombat(creature, target)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[ChainPickerCallback::onTargetCombat - Creature {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3307ceaf20c99f0a", + "equalIndicator/v1": "69a9b24c764118ff4bc7e30673d2195ff021b224d84490504c9eb7eaed11ea4a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 347, + "startColumn": 8, + "charOffset": 8662, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 345, + "startColumn": 1, + "charOffset": 8562, + "charLength": 194, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetStackSize(lua_State* L) {\r\n\t// itemType:getStackSize()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (!itemType) {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a43741fed6b71dfb", + "equalIndicator/v1": "69ae1cc5368add68948f84e14f38d4fc6646601ff606c4fb0a7c76fdd1a7227b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 805, + "startColumn": 7, + "charOffset": 30853, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 803, + "startColumn": 1, + "charOffset": 30728, + "charLength": 276, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnGainSkillTries(std::shared_ptr player, skills_t skill, uint64_t &tries) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnGainSkillTries - \"\r\n\t\t \"Player {} skill {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "141df54c99b543a6", + "equalIndicator/v1": "69ae84d3a56aea27d92e5b32e0bf22e91efc5c97fceb8109d76ec66d756cd690" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'getStowableItems' is within a recursive call chain", + "markdown": "Function 'getStowableItems' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 131, + "startColumn": 31, + "charOffset": 3966, + "charLength": 16, + "snippet": { + "text": "getStowableItems" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 129, + "startColumn": 1, + "charOffset": 3931, + "charLength": 128, + "snippet": { + "text": "}\r\n\r\nStashContainerList Container::getStowableItems() const {\r\n\tStashContainerList toReturnList;\r\n\tfor (auto item : itemlist) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c518b54e3eb2e0f3", + "equalIndicator/v1": "69b9f179a366d1f0bcf57c0b9d81ab10bac14780dda8f2dfccf15efb516c980a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 32, + "startColumn": 9, + "charOffset": 967, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 30, + "startColumn": 1, + "charOffset": 834, + "charLength": 165, + "snippet": { + "text": "\tchar* v = reinterpret_cast(buffer) + info.position; // does not break strict aliasing\r\n\tinfo.position += stringLen;\r\n\treturn std::string(v, stringLen);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f19d493e64e03dc5", + "equalIndicator/v1": "69c910c7b2cfd1e1aa019a84fa537913fceb5d56bfb4acc48692323cdcc4978c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 23, + "startColumn": 14, + "charOffset": 684, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 21, + "startColumn": 1, + "charOffset": 639, + "charLength": 340, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7c4c83195fae80b8", + "equalIndicator/v1": "69cab1acc60f7b7482c91a1a201d8892054ff480398ae11fc72db7d782198ba1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 88, + "startColumn": 10, + "charOffset": 2227, + "charLength": 11, + "snippet": { + "text": "attackSpeed" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 86, + "startColumn": 1, + "charOffset": 2180, + "charLength": 128, + "snippet": { + "text": "\r\n\tuint32_t getAttackSpeed() const {\r\n\t\treturn attackSpeed / g_configManager().getFloat(RATE_ATTACK_SPEED, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bc53ff9fbd662b97", + "equalIndicator/v1": "69d49e28f5a3b33414c6033d58b84ca469eba0bd9b4d471698e5cd10b61e09b3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2305, + "startColumn": 71, + "charOffset": 80180, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2303, + "startColumn": 1, + "charOffset": 80105, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nint32_t PlayerWheel::checkTwinBurstByTarget(std::shared_ptr target) const {\r\n\tif (!target || target == m_player.getPlayer()) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "41ee9cd98d460784", + "equalIndicator/v1": "69d6730852b7db4d5c9d4b0530cb3828d2ae7b6adeee51e364983a9a5945173b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 256, + "startColumn": 25, + "charOffset": 7182, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 254, + "startColumn": 1, + "charOffset": 7078, + "charLength": 197, + "snippet": { + "text": "\t\tweapon->setMinChange(getNumber(L, 2));\r\n\t\tif (lua_gettop(L) > 2) {\r\n\t\t\tweapon->setMaxChange(getNumber(L, 3));\r\n\t\t} else {\r\n\t\t\tweapon->setMaxChange(getNumber(L, 2));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e9e00e5314e7946d", + "equalIndicator/v1": "6a404488771aabd9d75ba57beace3058b828e3fb197c0dd0473ed8fc1a3c0567" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4693, + "startColumn": 7, + "charOffset": 148111, + "charLength": 31, + "snippet": { + "text": "auto [category, containersPair]" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4691, + "startColumn": 1, + "charOffset": 148059, + "charLength": 167, + "snippet": { + "text": "\tmsg.skipBytes(1);\r\n\tuint8_t containers = 0;\r\n\tfor (auto [category, containersPair] : managedContainersMap) {\r\n\t\tif (!isValidObjectCategory(category)) {\r\n\t\t\tcontinue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3071f8188a318bb1", + "equalIndicator/v1": "6ae1938f595111810ae4da3501d720ba5e78f2a541593cb21e39794d4283f6f5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 227, + "startColumn": 7, + "charOffset": 8131, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 225, + "startColumn": 1, + "charOffset": 8119, + "charLength": 209, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventCreatureOnChangeOutfit - Creature {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4ba606b46c6e1ccf", + "equalIndicator/v1": "6b4075f9b472c46b92c59140cee36da5dd2b767aa0ffd8cf4b6f0f0da4aa9fcf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1261, + "startColumn": 10, + "charOffset": 34947, + "charLength": 9, + "snippet": { + "text": "manaTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1259, + "startColumn": 1, + "charOffset": 34899, + "charLength": 129, + "snippet": { + "text": "\r\n\tif (player != nullptr && isBuff) {\r\n\t\treturn manaTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6957928e76c4b50e", + "equalIndicator/v1": "6b4686e5f80c6e6ba52af5ecf9e8a89886ccdc48156a1dde4a67698787e1eade" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 737, + "startColumn": 7, + "charOffset": 28477, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 735, + "startColumn": 1, + "charOffset": 28319, + "charLength": 310, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnGainExperience - \"\r\n\t\t \"Player {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a92553c2411f7cb4", + "equalIndicator/v1": "6b4a52b4049ec54d6d5a546a74b34bf7842192edfe648cadc244cb001f193350" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '__METHOD_NAME__', which is a reserved identifier", + "markdown": "Declaration uses identifier '__METHOD_NAME__', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/pch.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 182, + "startColumn": 2, + "charOffset": 4173, + "charLength": 55, + "snippet": { + "text": "#define __METHOD_NAME__ methodName(__PRETTY_FUNCTION__)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 180, + "startColumn": 1, + "charOffset": 4125, + "charLength": 179, + "snippet": { + "text": "\r\n#if defined(__GNUC__) || defined(__clang__)\r\n\t#define __METHOD_NAME__ methodName(__PRETTY_FUNCTION__)\r\n#elif defined(_MSC_VER)\r\n\t#define __METHOD_NAME__ methodName(__FUNCSIG__)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "64abb4eaa9ce2fc6", + "equalIndicator/v1": "6b4e4e719a0b3abb3cdcea040c927e3aa1ef538195412e18ac1e5ec0fa7e8398" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8588, + "startColumn": 2, + "charOffset": 270879, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8586, + "startColumn": 1, + "charOffset": 270872, + "charLength": 125, + "snippet": { + "text": "\t}\r\n\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t itemTier = 0;\r\n\tif (Item::items[itemId].upgradeClassification > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c058415ea678f06", + "equalIndicator/v1": "6b8a269e4dc8448f80561b9658d179a554a66961111933454f61d6dd21e3e510" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 572, + "startColumn": 39, + "charOffset": 26955, + "charLength": 14, + "snippet": { + "text": "valueAttribute" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 570, + "startColumn": 1, + "charOffset": 26791, + "charLength": 317, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentmagic\") {\r\n\t\tint16_t value = pugi::cast(valueAttribute.value());\r\n\t\tAbilities &abilities = itemType.getAbilities();\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0ce35f913ba1f5d4", + "equalIndicator/v1": "6bbe965b27756e1325bb11b422bd8c99d3b932454659cd449cac0d7f78243b67" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 124, + "startColumn": 10, + "charOffset": 3110, + "charLength": 13, + "snippet": { + "text": "getThrowRange" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 122, + "startColumn": 1, + "charOffset": 3095, + "charLength": 71, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t getThrowRange() const override final {\r\n\t\treturn 0;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "19a7c6c82231d09f", + "equalIndicator/v1": "6bd60f1808304a6ca301a0aa4bdb730e38df797bd7ff5041c3c41ed1a5c0379a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 161, + "startColumn": 2, + "charOffset": 4470, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 159, + "startColumn": 1, + "charOffset": 4406, + "charLength": 190, + "snippet": { + "text": "\r\n\tint32_t index = getNumber(L, 4, INDEX_WHEREEVER);\r\n\tuint32_t flags = getNumber(L, 5, 0);\r\n\r\n\tReturnValue ret = g_game().internalAddItem(container, item, index, flags);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "60af0811eb33776b", + "equalIndicator/v1": "6be871e358296586bbb248ed632b5f32d4aa8aa046265faa49b8abc2f94d9ad6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1909, + "startColumn": 50, + "charOffset": 56655, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1907, + "startColumn": 1, + "charOffset": 56505, + "charLength": 168, + "snippet": { + "text": "\tvoid updateInputAnalyzer(CombatType_t type, int32_t amount, std::string target) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendUpdateInputAnalyzer(type, amount, target);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4dec9ecc9ead50ae", + "equalIndicator/v1": "6bf1b42a80da0eeaf35428220b8b7f3356d60e5140f92520f580546472b3f941" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Valty', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Valty', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorset.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 51, + "startColumn": 22, + "charOffset": 1278, + "charLength": 6, + "snippet": { + "text": "_Valty" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 49, + "startColumn": 1, + "charOffset": 1250, + "charLength": 93, + "snippet": { + "text": "\t\t}\r\n\r\n\t\ttemplate \r\n\t\tauto emplace(_Valty &&... v) {\r\n\t\t\tneedUpdate = true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b9814ab7a2c6b926", + "equalIndicator/v1": "6bf2bfaf629be5685ba52beacdf05efcb7d5ff29b4e6da2bf0b4baee42cd2b5c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 583, + "startColumn": 3, + "charOffset": 27720, + "charLength": 8, + "snippet": { + "text": "itemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 581, + "startColumn": 1, + "charOffset": 27538, + "charLength": 526, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentfire\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentpoison\" || stringValue == \"absorbpercentearth\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "231b7a59d83f7f8a", + "equalIndicator/v1": "6c04a25c59642bfd565deeac35f2715a42eff77d283f945b1dfe3614cfc4b2d8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 77, + "startColumn": 65, + "charOffset": 3104, + "charLength": 34, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 75, + "startColumn": 1, + "charOffset": 2948, + "charLength": 348, + "snippet": { + "text": "\tstd::vector getBestiaryFinished(const std::shared_ptr &player) const;\r\n\r\n\tcharmRune_t getCharmFromTarget(std::shared_ptr player, const std::shared_ptr mtype);\r\n\r\n\tstd::map getBestiaryKillCountByMonsterIDs(std::shared_ptr player, std::map mtype_list) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "190dc287d0c8f1da", + "equalIndicator/v1": "6c06a08fc8b43684cf655e06a251f1d5d9122801335de79273b19c6c0e3323e7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1010, + "startColumn": 62, + "charOffset": 32265, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1008, + "startColumn": 1, + "charOffset": 32199, + "charLength": 128, + "snippet": { + "text": "}\r\n\r\nbool Creature::setAttackedCreature(std::shared_ptr creature) {\r\n\tif (creature) {\r\n\t\tauto monster = getMonster();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b76dc599eafcfd4e", + "equalIndicator/v1": "6c0bbe307f505ca87946d7d670d77bb5e8eac9842eb7651b52a58a2655ecc4ea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 121, + "startColumn": 21, + "charOffset": 3729, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 119, + "startColumn": 1, + "charOffset": 3647, + "charLength": 435, + "snippet": { + "text": "\tvoid clearPosMap(std::map &map);\r\n\r\n\tbool registerEvent(const std::shared_ptr moveEvent, int32_t id, std::map &moveListMap) const;\r\n\tbool registerEvent(const std::shared_ptr moveEvent, const Position &position, std::map &moveListMap) const;\r\n\tstd::shared_ptr getEvent(const std::shared_ptr &tile, MoveEvent_t eventType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bc5ab8901161bdf8", + "equalIndicator/v1": "6c11518f6edd2d4d2f1b9e316c3c88c2ba77bba52b5aa94a82a89109f84f855a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 459, + "startColumn": 7, + "charOffset": 16372, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 457, + "startColumn": 1, + "charOffset": 16360, + "charLength": 136, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPartyOnLeave - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7f6de6624d243893", + "equalIndicator/v1": "6c1705793dd3cb14307d7e8ddba531ad5a7d52de59b15c1c3f3482a9da63818d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4424, + "startColumn": 89, + "charOffset": 159245, + "charLength": 5, + "snippet": { + "text": "house" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4422, + "startColumn": 1, + "charOffset": 159152, + "charLength": 174, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Game::wrapItem(std::shared_ptr item, std::shared_ptr house) {\r\n\tuint16_t hiddenCharges = 0;\r\n\tuint16_t amount = item->getItemCount();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ac9a14f846d1853b", + "equalIndicator/v1": "6c23319fe33ae356166d05fd50a191dd6746afbdd158dca2c882ff9eecc6ca98" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3256, + "startColumn": 63, + "charOffset": 99793, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3254, + "startColumn": 1, + "charOffset": 99726, + "charLength": 135, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureIcon(std::shared_ptr creature) {\r\n\tif (!creature || !player || oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "896d7f40911ba863", + "equalIndicator/v1": "6c3a1a0af5b686d3ecd5ae2764d0b95c2ab203bd0f385ba12979a7357212f966" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8163, + "startColumn": 84, + "charOffset": 258189, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8161, + "startColumn": 1, + "charOffset": 258101, + "charLength": 187, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::MoveDownCreature(NetworkMessage &msg, std::shared_ptr creature, const Position &newPos, const Position &oldPos) {\r\n\tif (creature != player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eb337d3f332861da", + "equalIndicator/v1": "6c6253c2eb2de8d639a2d2940afba89b9e142a5d5bf4aa0cd58e5f99366db796" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6108, + "startColumn": 51, + "charOffset": 211133, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6106, + "startColumn": 1, + "charOffset": 211078, + "charLength": 158, + "snippet": { + "text": "}\r\n\r\nbool Game::playerSaySpell(std::shared_ptr player, SpeakClasses type, const std::string &text) {\r\n\tif (player->walkExhausted()) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9ac3ff3903f3987a", + "equalIndicator/v1": "6cac23fcf63c11072b9b08a95b2f2f40730b7dcf0cdd6d8676b36511e45c7a90" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 147, + "startColumn": 50, + "charOffset": 4529, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 145, + "startColumn": 1, + "charOffset": 4475, + "charLength": 167, + "snippet": { + "text": "}\r\n\r\nvoid Npc::onPlayerAppear(std::shared_ptr player) {\r\n\tif (player->hasFlag(PlayerFlags_t::IgnoredByNpcs) || playerSpectators.contains(player)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8425648025948950", + "equalIndicator/v1": "6caedfc6434b93d20c8c29a97aba96ef32ea37bb05f82de3852f89649b779d5f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 927, + "startColumn": 41, + "charOffset": 35413, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 925, + "startColumn": 1, + "charOffset": 35367, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1ce647d932d46d4a", + "equalIndicator/v1": "6cc6aac323b8c87cc1fbd51ffb38de8058904daf0dc0a5049f1c9359f4a660b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 919, + "startColumn": 7, + "charOffset": 35067, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 917, + "startColumn": 1, + "charOffset": 34955, + "charLength": 267, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnRequestQuestLine(std::shared_ptr player, uint16_t questId) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnRequestQuestLine - \"\r\n\t\t \"Player {} questId {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e18f24993e120630", + "equalIndicator/v1": "6ce15e2708401d22124a7eaa5e9585224aa133b8cdef43b40bf609408a85c299" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1766, + "startColumn": 32, + "charOffset": 47238, + "charLength": 26, + "snippet": { + "text": "LUA_ERROR_PLAYER_NOT_FOUND" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1764, + "startColumn": 1, + "charOffset": 47122, + "charLength": 185, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (!player) {\r\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\r\n\t\tpushBoolean(L, false);\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "78223711a98f8f73", + "equalIndicator/v1": "6ce4f7f03a90d2bdc694a47027c9e50507c565f7fedcfba31d07c698ebb08a8f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 43, + "startColumn": 7, + "charOffset": 1967, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 41, + "startColumn": 1, + "charOffset": 1806, + "charLength": 315, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n};\r\n" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "051903942b2f6ed6", + "equalIndicator/v1": "6ce5fc3467c48dbc5101a711216dc9470e6216cb26fa89b0dddfd64699fcee85" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 71, + "startColumn": 3, + "charOffset": 2401, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 69, + "startColumn": 1, + "charOffset": 2390, + "charLength": 134, + "snippet": { + "text": "\r\n\tdo {\r\n\t\tuint32_t guild1 = result->getNumber(\"guild1\");\r\n\t\tif (guildId != guild1) {\r\n\t\t\tguildWarVector.push_back(guild1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7980a7cf5f007b07", + "equalIndicator/v1": "6cf481b298a928c5b401525db55a03593576a74057f76df4aa6a2fc5588ca812" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 244, + "startColumn": 30, + "charOffset": 7421, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 242, + "startColumn": 1, + "charOffset": 7255, + "charLength": 266, + "snippet": { + "text": "bool PlayerTitle::checkBestiary(const std::string &name, uint16_t race, bool isBoss /* = false*/, uint32_t amount) {\r\n\tif (race == 0) {\r\n\t\tif (name == \"Executioner\") {\r\n\t\t\t// todo check if player has unlocked all bestiary\r\n\t\t} else if (name == \"Boss Executioner\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "97bd5d9def354cba", + "equalIndicator/v1": "6d0a284204da0662c79079f594c0753f96b18aa27e327435da0d1abd35c9c08d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 172, + "startColumn": 15, + "charOffset": 5986, + "charLength": 10, + "snippet": { + "text": "removeItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 170, + "startColumn": 1, + "charOffset": 5938, + "charLength": 171, + "snippet": { + "text": "\tvoid stopDecaying() override;\r\n\r\n\tvirtual void removeItem(std::shared_ptr thing, bool sendUpdateToClient = false);\r\n\r\n\tuint32_t getOwnerId() const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7e1f97b3415cb78e", + "equalIndicator/v1": "6d13658d5b790e00a8898393965bb3857b7f7a43e93d85635950482f23471479" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 356, + "startColumn": 82, + "charOffset": 16980, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 354, + "startColumn": 1, + "charOffset": 16775, + "charLength": 519, + "snippet": { + "text": "\tvoid playerMoveUpContainer(uint32_t playerId, uint8_t cid);\r\n\tvoid playerUpdateContainer(uint32_t playerId, uint8_t cid);\r\n\tvoid playerRotateItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerConfigureShowOffSocket(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t podiumVisible, uint8_t direction);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ff46fb4d148be6cc", + "equalIndicator/v1": "6d5d627ff21ed8b27aee82ead133fa9153cab8e27bfe65001c708de57c71fb62" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 153, + "startColumn": 28, + "charOffset": 4131, + "charLength": 29, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 151, + "startColumn": 1, + "charOffset": 3978, + "charLength": 330, + "snippet": { + "text": "\tReturnValue canUseFar(std::shared_ptr creature, const Position &toPos, bool checkLineOfSight, bool checkFloor);\r\n\r\n\tbool registerLuaItemEvent(const std::shared_ptr action);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr action);\r\n\tbool registerLuaActionEvent(const std::shared_ptr action);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6997594f772272b4", + "equalIndicator/v1": "6d75e364eb9303810016c16557e225b01a963904e4d491db3b398359bd163aaa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2051, + "startColumn": 58, + "charOffset": 60749, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2049, + "startColumn": 1, + "charOffset": 60687, + "charLength": 103, + "snippet": { + "text": "}\r\n\r\nvoid Player::onCloseContainer(std::shared_ptr container) {\r\n\tif (!client) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7922279f35faed7f", + "equalIndicator/v1": "6d8a07cfabfa28133fba2c67cd0f01eb06459e77d83a14b9dd9019a4317857ee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 186, + "startColumn": 41, + "charOffset": 6885, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 184, + "startColumn": 1, + "charOffset": 6839, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e635aee8f50dfbd7", + "equalIndicator/v1": "6d946befef12d0bf59d09c80c5c75b066e986b1e839092e9493c8bc55a49609a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::basic_string::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::basic_string::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2047, + "startColumn": 29, + "charOffset": 54771, + "charLength": 8, + "snippet": { + "text": "uint64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2045, + "startColumn": 1, + "charOffset": 54659, + "charLength": 213, + "snippet": { + "text": "int PlayerFunctions::luaPlayerAddMoney(lua_State* L) {\r\n\t// player:addMoney(money)\r\n\tuint64_t money = getNumber(L, 2);\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d4b1458d998289fe", + "equalIndicator/v1": "6daa92bd36dd6d55a742cafcd920b141cd59f179fb6d47a1c00a81e8ae7d85e4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 197, + "startColumn": 56, + "charOffset": 6123, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 195, + "startColumn": 1, + "charOffset": 6063, + "charLength": 260, + "snippet": { + "text": "}\r\n\r\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target, int32_t damageModifier, int32_t cleavePercent) const {\r\n\tif (player) {\r\n\t\tif (params.soundCastEffect == SoundEffect_t::SILENCE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5dffedf23a54884d", + "equalIndicator/v1": "6dd564378eeedf601c8e76509e1380ff9d390de5398ce2ca814a2ec0ff5fd70f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 897, + "startColumn": 61, + "charOffset": 32499, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 895, + "startColumn": 1, + "charOffset": 32434, + "charLength": 238, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnReportBug(std::shared_ptr player, const std::string &message, const Position &position, uint8_t category) {\r\n\t// Player:onReportBug(message, position, category)\r\n\tif (info.playerOnReportBug == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5e6dda52eea85ea0", + "equalIndicator/v1": "6ddab777e2468b22f09db05184613b92c8af061817422ecfb140db041e51899e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 351, + "startColumn": 9, + "charOffset": 12158, + "charLength": 29, + "snippet": { + "text": "auto [category, containerMap]" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 349, + "startColumn": 1, + "charOffset": 12092, + "charLength": 190, + "snippet": { + "text": "\t\t\tuint32_t lootFlags = 0;\r\n\t\t\tuint32_t obtainFlags = 0;\r\n\t\t\tfor (auto [category, containerMap] : player->m_managedContainers) {\r\n\t\t\t\tif (!isValidObjectCategory(category)) {\r\n\t\t\t\t\tcontinue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2d8ecbd7f17095d6", + "equalIndicator/v1": "6e22aac5a75620a4a25e2713d1eaee327e914a70c15e31d1eac6109302d77563" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/webhook_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 43, + "charOffset": 1062, + "charLength": 5, + "snippet": { + "text": "color" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 969, + "charLength": 128, + "snippet": { + "text": "\t\tg_webhook().sendMessage(title, url);\r\n\t} else {\r\n\t\tg_webhook().sendMessage(title, message, color, url);\r\n\t}\r\n\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a33f36df74f919e0", + "equalIndicator/v1": "6e2797e2689f79205342c6f92b94c09663650b942035ff22e8194fdb7131f13a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1176, + "startColumn": 41, + "charOffset": 44789, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1174, + "startColumn": 1, + "charOffset": 44743, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2cb0f2146d68d814", + "equalIndicator/v1": "6e3040c89580658c4a861199464f0fb10c74a95b82e10c61b66f0214b4918eb0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'removeThing' is within a recursive call chain", + "markdown": "Function 'removeThing' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1189, + "startColumn": 12, + "charOffset": 35368, + "charLength": 11, + "snippet": { + "text": "removeThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1187, + "startColumn": 1, + "charOffset": 35352, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nvoid Tile::removeThing(std::shared_ptr thing, uint32_t count) {\r\n\tstd::shared_ptr creature = thing->getCreature();\r\n\tif (creature) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d565d81ef00f0e69", + "equalIndicator/v1": "6e35eea883cfad0866aec121c384b188ae42a172177a5625f427ba77271da0dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 196, + "startColumn": 15, + "charOffset": 8005, + "charLength": 11, + "snippet": { + "text": "removeThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 194, + "startColumn": 1, + "charOffset": 7832, + "charLength": 371, + "snippet": { + "text": "\tvirtual void updateThing(std::shared_ptr, uint16_t, uint32_t) override { }\r\n\tvirtual void replaceThing(uint32_t, std::shared_ptr) override { }\r\n\tvirtual void removeThing(std::shared_ptr, uint32_t) override { }\r\n\r\n\tvirtual void postAddNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a27b359ece1bb1ad", + "equalIndicator/v1": "6e3e206993a464859324ce46fc4fc4a81726e670cfbbc493f89423d358981481" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 672, + "startColumn": 28, + "charOffset": 21766, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 670, + "startColumn": 1, + "charOffset": 21673, + "charLength": 205, + "snippet": { + "text": "\r\n\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\r\n\t\tdamage.secondary.value = damage.primary.value * (damagePercent);\r\n\t\tdamage.primary.value = damage.primary.value * (1 - damagePercent);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "700f72283a214988", + "equalIndicator/v1": "6e6dea4507863cd34b42e05d10fe516dab42618e7a9e4aa92c2ab2bbcc85c3aa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1735, + "startColumn": 3, + "charOffset": 60653, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1733, + "startColumn": 1, + "charOffset": 60535, + "charLength": 168, + "snippet": { + "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r\n\t\treturn;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f78b85f66a6c4198", + "equalIndicator/v1": "6eda787ab81b8a54b4f90a82a935c561c4676ff963f5ab4c0d547b0ec4b058fc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6945, + "startColumn": 93, + "charOffset": 241400, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6943, + "startColumn": 1, + "charOffset": 241303, + "charLength": 231, + "snippet": { + "text": "}\r\n\r\nbool Game::combatChangeHealth(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage, bool isEvent /*= false*/) {\r\n\tusing namespace std;\r\n\tconst Position &targetPos = target->getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "be92f382057cecf8", + "equalIndicator/v1": "6f0a0f2414499558949fdeae96e7df566ec414868f7e5484a2f0f63ea7d9c05f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The 'empty' method should be used to check for emptiness instead of 'size'", + "markdown": "The 'empty' method should be used to check for emptiness instead of 'size'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1811, + "startColumn": 16, + "charOffset": 51088, + "charLength": 5, + "snippet": { + "text": "items" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1809, + "startColumn": 1, + "charOffset": 50963, + "charLength": 169, + "snippet": { + "text": "std::shared_ptr Tile::getUseItem(int32_t index) const {\r\n\tconst TileItemVector* items = getItemList();\r\n\tif (!items || items->size() == 0) {\r\n\t\treturn ground;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0a52ee166527afd7", + "equalIndicator/v1": "6f178155111934f5223f1e6ead213e78af64a036b01ad60d608a93eeca2329fa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 408, + "startColumn": 6, + "charOffset": 14567, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 406, + "startColumn": 1, + "charOffset": 14523, + "charLength": 181, + "snippet": { + "text": "\tlua_pushnumber(L, colorSecondary);\r\n\r\n\tif (scriptInterface.protectedCall(L, 8, 6) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6d4430cb3e3e201", + "equalIndicator/v1": "6f48a7e66608a04d857f86f6b8cc75514b8eec222bbcd54aa794474f322d8677" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2020, + "startColumn": 2, + "charOffset": 61833, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2018, + "startColumn": 1, + "charOffset": 61737, + "charLength": 217, + "snippet": { + "text": "void ProtocolGame::parseRotateItem(NetworkMessage &msg) {\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tconst auto &itemType = Item::items[itemId];\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "167cfbe03712b05a", + "equalIndicator/v1": "6fa4d9657cbb33966f6d0c22cb3a3ecafb93b39b05c6c93c0ab3512c908b5950" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 23, + "charOffset": 1463, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1436, + "charLength": 168, + "snippet": { + "text": "}\r\n\r\nReturnValue Teleport::queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr /*= nullptr */) {\r\n\treturn RETURNVALUE_NOERROR;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b3ce75e13a049d37", + "equalIndicator/v1": "6fada6a8b11ac963c89e02c13639ac826627dda083909e2553c470f2fb247924" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 186, + "startColumn": 2, + "charOffset": 4756, + "charLength": 12, + "snippet": { + "text": "SpeakClasses" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 184, + "startColumn": 1, + "charOffset": 4713, + "charLength": 219, + "snippet": { + "text": "\tbool ghost = getBoolean(L, 4, false);\r\n\r\n\tSpeakClasses type = getNumber(L, 3, TALKTYPE_PRIVATE_NP);\r\n\tconst std::string &text = getString(L, 2);\r\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c1eca87de86f8b1a", + "equalIndicator/v1": "6fcef2573de4130df221e57fe8499b5788622ddeaf5284654077833587f5c02d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1150, + "startColumn": 25, + "charOffset": 37535, + "charLength": 4, + "snippet": { + "text": "maxY" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1148, + "startColumn": 1, + "charOffset": 37456, + "charLength": 129, + "snippet": { + "text": "\r\n\tconst int32_t rangeX = maxX + MAP_MAX_VIEW_PORT_X;\r\n\tconst int32_t rangeY = maxY + MAP_MAX_VIEW_PORT_Y;\r\n\r\n\tint affected = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f105274975075af8", + "equalIndicator/v1": "6ff075c9e4c51cb70eecd6776e0b029ae65e9b956cdff7d7a4f723847fbae4dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 628, + "startColumn": 37, + "charOffset": 19449, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 626, + "startColumn": 1, + "charOffset": 19407, + "charLength": 96, + "snippet": { + "text": "\t}\r\n\r\n\tif (index == 255 /*add wherever*/) {\r\n\t\tindex = INDEX_WHEREEVER;\r\n\t\t*destItem = nullptr;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "51a468e572b6d5ee", + "equalIndicator/v1": "7004a7dfa03cde67081793f19c39d74f5ec0d6c187de5dd7e508e9a701aa0f7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1137, + "startColumn": 122, + "charOffset": 40760, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1135, + "startColumn": 1, + "charOffset": 40634, + "charLength": 286, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) {\r\n\t// Player:onCombat(target, item, primaryDamage, primaryType, secondaryDamage, secondaryType)\r\n\tif (info.playerOnCombat == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cd48e25f6cb7eef2", + "equalIndicator/v1": "7016129827f426a3207534a953ad4d8e14e679ba3b1b9e7d4ea98e523c12960e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2195, + "startColumn": 11, + "charOffset": 65753, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2193, + "startColumn": 1, + "charOffset": 65664, + "charLength": 210, + "snippet": { + "text": "\tmonsterForgeClassification = ForgeClassifications_t::FORGE_NORMAL_MONSTER;\r\n\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "86b6c62b6e2b560d", + "equalIndicator/v1": "7018eb3a32b1e2ae4784e8b41d6f2d0ad2fbe997be2500fd5d687837d5b4b50e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use emplace_back instead of push_back", + "markdown": "Use emplace_back instead of push_back" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 141, + "startColumn": 17, + "charOffset": 4475, + "charLength": 9, + "snippet": { + "text": "push_back" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 139, + "startColumn": 1, + "charOffset": 4413, + "charLength": 177, + "snippet": { + "text": "\t\t\t}\r\n\t\t} else if (item->isItemStorable()) {\r\n\t\t\ttoReturnList.push_back(std::pair, uint32_t>(item, static_cast(item->getItemCount())));\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4d56c6ea3a083e29", + "equalIndicator/v1": "7026086dc9dc809c6d82e498a00364fe7638d52edbaf1d3728711c350989fd21" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 248, + "startColumn": 105, + "charOffset": 8953, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 246, + "startColumn": 1, + "charOffset": 8844, + "charLength": 269, + "snippet": { + "text": "}\r\n\r\nReturnValue Events::eventCreatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) {\r\n\t// Creature:onAreaCombat(tile, aggressive) or Creature.onAreaCombat(self, tile, aggressive)\r\n\tif (info.creatureOnAreaCombat == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b87aab409c694e52", + "equalIndicator/v1": "70376750c8cee8b2b365f36287576697485bd39d64e00ea8a7deb970eb914949" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1664, + "startColumn": 63, + "charOffset": 58338, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1662, + "startColumn": 1, + "charOffset": 58210, + "charLength": 264, + "snippet": { + "text": "//**********************************************************//\r\n\r\nvoid TargetCallback::onTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\t// onTargetCombat(creature, target)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "de1e56f631b2b3da", + "equalIndicator/v1": "703e75e2f078acb3e9febbab2c3669f5454aca76e43b740996b8ad909a8a29a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 95, + "startColumn": 2, + "charOffset": 3108, + "charLength": 7, + "snippet": { + "text": "int64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 93, + "startColumn": 1, + "charOffset": 3101, + "charLength": 151, + "snippet": { + "text": "\t}\r\n\r\n\tint64_t expiresAt = result->getNumber(\"expires_at\");\r\n\tif (expiresAt != 0 && time(nullptr) > expiresAt) {\r\n\t\tquery.str(std::string());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "401c7a8e8c5889d4", + "equalIndicator/v1": "703e912605f2ff730f3beef5081aea8d130d1e73e9f8c75d9ca6c9c9c687ec3b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 23, + "startColumn": 28, + "charOffset": 671, + "charLength": 11, + "snippet": { + "text": "getCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 21, + "startColumn": 1, + "charOffset": 638, + "charLength": 93, + "snippet": { + "text": "\t}\r\n\r\n\tstd::shared_ptr getCylinder() override final {\r\n\t\treturn getTeleport();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "76fda9ea69e14ef6", + "equalIndicator/v1": "705a76816bf1a9760442fb935d29c5d923bc803be7ef8b21f41630897855a514" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 417, + "startColumn": 41, + "charOffset": 15728, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 415, + "startColumn": 1, + "charOffset": 15682, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0540a223792e0a65", + "equalIndicator/v1": "708798bd501657d986878a4d8b5fbd68b4d71a9f78a8b3be70a945cad6774785" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1399, + "startColumn": 56, + "charOffset": 48326, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1397, + "startColumn": 1, + "charOffset": 48266, + "charLength": 364, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatDefault(std::shared_ptr caster, std::shared_ptr target, const Position &origin, const CombatParams ¶ms) {\r\n\tif (!params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR)) {\r\n\t\tauto spectators = Spectators().find(target->getPosition(), true);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8fbed7471dff97f1", + "equalIndicator/v1": "70ad54f196b2c41f6c66eccfa0e4edb864f48f190fbc10b3de75df86a076cbf1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 549, + "startColumn": 21, + "charOffset": 17766, + "charLength": 5, + "snippet": { + "text": "level" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 547, + "startColumn": 1, + "charOffset": 17641, + "charLength": 252, + "snippet": { + "text": "\r\n\tint32_t maxValue = Weapons::getMaxWeaponDamage(level, attackSkill, attackValue, attackFactor, true);\r\n\tint32_t minValue = level / 5;\r\n\r\n\treturn -normal_random(minValue, static_cast(maxValue * player->getVocation()->meleeDamageMultiplier));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5a55b080306a9c74", + "equalIndicator/v1": "70f36a7ebd05c0b567f904ab5623cc98ade15bdb79e710c9514cf2215470f361" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6576, + "startColumn": 112, + "charOffset": 193148, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6574, + "startColumn": 1, + "charOffset": 192925, + "charLength": 325, + "snippet": { + "text": "\t\t\tif (!g_configManager().getBoolean(PREY_ENABLED, __FUNCTION__)) {\r\n\t\t\t\tslot->state = PreyDataState_Inactive;\r\n\t\t\t} else if (slot->id == PreySlot_Three && !g_configManager().getBoolean(PREY_FREE_THIRD_SLOT, __FUNCTION__)) {\r\n\t\t\t\tslot->state = PreyDataState_Locked;\r\n\t\t\t} else if (slot->id == PreySlot_Two && !isPremium()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ff62ac3b5160763f", + "equalIndicator/v1": "710c7c4033c77938d5a95629af517e8c60ff6b9d6dbb51d281b5b11482b2b814" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 706, + "startColumn": 127, + "charOffset": 27192, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 704, + "startColumn": 1, + "charOffset": 27061, + "charLength": 291, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b81489c069dbfda8", + "equalIndicator/v1": "7114a54f9eb2ef9d0dadd5cb02993e73c382fab9acae182583a6198277764b50" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 53, + "charOffset": 897, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 840, + "charLength": 333, + "snippet": { + "text": "}\r\n\r\nbool TalkActions::checkWord(std::shared_ptr player, SpeakClasses type, const std::string &words, const std::string_view &word, const TalkAction_ptr &talkActionPtr) const {\r\n\tauto spacePos = std::ranges::find_if(words.begin(), words.end(), ::isspace);\r\n\tstd::string firstWord = words.substr(0, spacePos - words.begin());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "54b14981f6a0b58b", + "equalIndicator/v1": "7116bb25fd6b0089314a2cad4cd2ebcf217414870b6fbcf7e2affaa81c7e5f61" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 38, + "startColumn": 19, + "charOffset": 1297, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 36, + "startColumn": 1, + "charOffset": 1274, + "charLength": 207, + "snippet": { + "text": "}\r\n\r\nvoid DepotLocker::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tauto parentLocked = m_parent.lock();\r\n\tif (parentLocked) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79ee7193c3582fe4", + "equalIndicator/v1": "712d187c11a9f7d96764410fa3a831a8ea9ef6db5d529a217602a6692f0ce200" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Valty', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Valty', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorsort.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 109, + "startColumn": 22, + "charOffset": 2569, + "charLength": 6, + "snippet": { + "text": "_Valty" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 107, + "startColumn": 1, + "charOffset": 2541, + "charLength": 108, + "snippet": { + "text": "\t\t}\r\n\r\n\t\ttemplate \r\n\t\tdecltype(auto) emplace_back(_Valty &&... v) {\r\n\t\t\tneedUpdate = true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c3d06573d38b5019", + "equalIndicator/v1": "713fd57eb0194a0bce8643899f66bfb94616a686809b0b35aadd78bf26afe6ec" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7688, + "startColumn": 39, + "charOffset": 240729, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7686, + "startColumn": 1, + "charOffset": 240582, + "charLength": 331, + "snippet": { + "text": "\t} else {\r\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r\n\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\r\n\t\tmsg.addByte(static_cast(std::min(player->getMagicLevel(), std::numeric_limits::max())));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6e72a0637477257e", + "equalIndicator/v1": "714d041705ef86ee86abfb909fd0139efcd9354dc439fc6c1bfe6f0810a15931" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '__targetPos', which is a reserved identifier", + "markdown": "Declaration uses identifier '__targetPos', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 642, + "startColumn": 86, + "charOffset": 18802, + "charLength": 11, + "snippet": { + "text": "__targetPos" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 640, + "startColumn": 1, + "charOffset": 18712, + "charLength": 347, + "snippet": { + "text": "}\r\n\r\nbool Map::getPathMatching(const std::shared_ptr &creature, const Position &__targetPos, std::vector &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp) {\r\n\tstatic int_fast32_t allNeighbors[8][2] = {\r\n\t\t{ -1, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, -1 }, { 1, -1 }, { 1, 1 }, { -1, 1 }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "669ecd881d70d184", + "equalIndicator/v1": "714d3ee9959abf2c1abd0ea4c9d2b0c0acccc6829d57b8639ad3891bb23cf2dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1101, + "startColumn": 66, + "charOffset": 39503, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1099, + "startColumn": 1, + "charOffset": 39433, + "charLength": 199, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnGainSkillTries(std::shared_ptr player, skills_t skill, uint64_t &tries) {\r\n\t// Player:onGainSkillTries(skill, tries)\r\n\tif (info.playerOnGainSkillTries == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "462986abc2487a4c", + "equalIndicator/v1": "7179bf87fd13d21ddad16123eb156b5c7b62384374a08dc6ea4d7090e026afef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 373, + "startColumn": 7, + "charOffset": 13443, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 371, + "startColumn": 1, + "charOffset": 13431, + "charLength": 159, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventCreatureOnDrainHealth - \"\r\n\t\t \"Creature {} attacker {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "809dd163d23b7e00", + "equalIndicator/v1": "71be8907808a078d4e014cd4eb8d1c2e20cad475a8e4ee8d9a4418dfcba97b30" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 567, + "startColumn": 37, + "charOffset": 15259, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 565, + "startColumn": 1, + "charOffset": 15192, + "charLength": 140, + "snippet": { + "text": "\r\n\t\t\tcase STAT_MAXMANAPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getMaxMana() * ((statsPercent[i] - 100) / 100.f));\r\n\t\t\t\tbreak;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "05476630e87a7af9", + "equalIndicator/v1": "71bfffc6686ce4e3775d5382b507212c1d3eca6ad9909c38a8be70352b5289e9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 32, + "startColumn": 38, + "charOffset": 1114, + "charLength": 3, + "snippet": { + "text": "get" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 30, + "startColumn": 1, + "charOffset": 1000, + "charLength": 200, + "snippet": { + "text": "\tvirtual void set(const std::string &key, const ValueWrapper &value) = 0;\r\n\r\n\tvirtual std::optional get(const std::string &key, bool forceLoad = false) = 0;\r\n\r\n\tvirtual bool saveAll() {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cc364cd5a2406ac1", + "equalIndicator/v1": "71d5973dde843d3799a5c6dd86601cd97ff3f6d99fedd3d113d2f03aef602f2c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 55, + "startColumn": 8, + "charOffset": 1495, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 53, + "startColumn": 1, + "charOffset": 1397, + "charLength": 216, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsContainer(lua_State* L) {\r\n\t// itemType:isContainer()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isContainer());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8daac3d4c6a97522", + "equalIndicator/v1": "71d6523c6e57816c55bcfa1b33f215c4f167ea5dfd9d717c2e183bb778e09882" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4860, + "startColumn": 26, + "charOffset": 145370, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4858, + "startColumn": 1, + "charOffset": 145252, + "charLength": 132, + "snippet": { + "text": "\r\nvoid Player::onGainSharedExperience(uint64_t gainExp, std::shared_ptr target) {\r\n\tgainExperience(gainExp, target);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "237c1ed5d7202b52", + "equalIndicator/v1": "71f21225f8ade28965b13a61450960ffa48566325e0f01caa4bac1cb8364c6ff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 33, + "startColumn": 22, + "charOffset": 1201, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 31, + "startColumn": 1, + "charOffset": 1125, + "charLength": 225, + "snippet": { + "text": "\t * \\returns ReturnValue holds the return value\r\n\t */\r\n\tvirtual ReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) = 0;\r\n\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ac911400b207d83f", + "equalIndicator/v1": "71fdd484817aac290e2afc01cf583b03677f12110baee71445a371409b769102" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 162, + "startColumn": 27, + "charOffset": 4457, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 160, + "startColumn": 1, + "charOffset": 4425, + "charLength": 114, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tenv->setScriptId(scriptId, scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "600b46b72817fda1", + "equalIndicator/v1": "7225d5e3bb0f54f11a5c0a0da72d5b8056376c41acf0f9cb5802fafdea057b95" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5522, + "startColumn": 2, + "charOffset": 175196, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5520, + "startColumn": 1, + "charOffset": 175096, + "charLength": 219, + "snippet": { + "text": "\tauto actionType = static_cast(msg.getByte());\r\n\tbool convergence = msg.getByte();\r\n\tuint16_t firstItem = msg.get();\r\n\tuint8_t tier = msg.getByte();\r\n\tuint16_t secondItem = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2af5bebc427abeea", + "equalIndicator/v1": "7245ddf7b226e6b74b49aab592a0dc3b71e9b019627c39ecd067f373e69c124f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 710, + "startColumn": 37, + "charOffset": 23057, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 708, + "startColumn": 1, + "charOffset": 22995, + "charLength": 132, + "snippet": { + "text": "\t\t\t\tcase 1:\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 73) * 1.35f) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d28701c70050d28", + "equalIndicator/v1": "7257cddded56ba0467d7abc2f3e887e58a2237dcdfa8e73a754fbee813fbfb55" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 346, + "startColumn": 64, + "charOffset": 14151, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 344, + "startColumn": 1, + "charOffset": 14083, + "charLength": 179, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerSpells(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "239e0122e113a743", + "equalIndicator/v1": "729992148ff9031f826ed65ee669072f5bfb138002b3793ad655208a2ee9778c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 666, + "startColumn": 35, + "charOffset": 18143, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 664, + "startColumn": 1, + "charOffset": 18010, + "charLength": 197, + "snippet": { + "text": "\r\nvoid ConditionAttributes::updateCharmChanceModifier(std::shared_ptr creature) const {\r\n\tcreature->setCharmChanceModifier(creature->getCharmChanceModifier() + charmChanceModifier);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a62e6c44628b7327", + "equalIndicator/v1": "72b0ed4f03692a8dbdc601219114ed1e3da2b768e43361045ec4b3db42198609" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1032, + "startColumn": 20, + "charOffset": 39306, + "charLength": 11, + "snippet": { + "text": "currentTime" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1030, + "startColumn": 1, + "charOffset": 39228, + "charLength": 139, + "snippet": { + "text": "\tlua_pushnumber(L, value);\r\n\tlua_pushnumber(L, oldValue);\r\n\tlua_pushnumber(L, currentTime);\r\n\r\n\tgetScriptInterface()->callVoidFunction(5);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4db0937a1ad96722", + "equalIndicator/v1": "72b34e4556da8a76d58139d29cf969a2396b415206cada264a6a0b0b82e0fa4c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6338, + "startColumn": 70, + "charOffset": 200753, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6336, + "startColumn": 1, + "charOffset": 200679, + "charLength": 127, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPartyCreatureUpdate(std::shared_ptr target) {\r\n\tif (!player || oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b6f4660366d5e6c4", + "equalIndicator/v1": "72d97cb6a223fdd4183fbb79f9dda7b6d5786c6cb31a1925aa8a69809aa27985" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 325, + "startColumn": 10, + "charOffset": 10239, + "charLength": 13, + "snippet": { + "text": "getThrowRange" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 323, + "startColumn": 1, + "charOffset": 10203, + "charLength": 116, + "snippet": { + "text": "\t\treturn isMovable();\r\n\t}\r\n\tint32_t getThrowRange() const override final {\r\n\t\treturn (isPickupable() ? 15 : 2);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "903b3969bc0a3010", + "equalIndicator/v1": "72dba6502675a8c24bebcef7443ddf23684115c4adfe240ee4ff2e179e67fec7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 716, + "startColumn": 34, + "charOffset": 19659, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 714, + "startColumn": 1, + "charOffset": 19619, + "charLength": 120, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tplayer->setCharmChanceModifier(player->getCharmChanceModifier() - charmChanceModifier);\r\n\r\n\t\tif (needUpdate) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "214d2ea233296672", + "equalIndicator/v1": "732a4550ded4efeb9a9ffb4d6fc8aae9d5a12aac4c082c89592ae0f5cf154393" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 23, + "startColumn": 14, + "charOffset": 640, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 21, + "startColumn": 1, + "charOffset": 595, + "charLength": 340, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1204032b25f3ff1f", + "equalIndicator/v1": "7355183510799eca3afbaef45f6b40a1379825dbf9cd78feb4dba70f8a8c5bae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6888, + "startColumn": 93, + "charOffset": 238816, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6886, + "startColumn": 1, + "charOffset": 238719, + "charLength": 311, + "snippet": { + "text": "}\r\n\r\nvoid Game::applyWheelOfDestinyEffectsToDamage(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) const {\r\n\t// If damage is 0, it means the target is immune to the damage type, or that we missed.\r\n\tif (damage.primary.value == 0 && damage.secondary.value == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c30439361bfcfbb6", + "equalIndicator/v1": "735b95520975e78e4a34aff4cef28da7fb76ed6e60304af596187f91d5c4170c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 165, + "startColumn": 8, + "charOffset": 4201, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 163, + "startColumn": 1, + "charOffset": 4101, + "charLength": 219, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsMagicField(lua_State* L) {\r\n\t// itemType:isMagicField()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isMagicField());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f64063d2e9a580a", + "equalIndicator/v1": "73644ea38f376f9ed7de2f8c0041f76c55ba772b12360caa1109f34c6ccb4172" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'isExerciseTraining' can be made const", + "markdown": "Method 'isExerciseTraining' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 582, + "startColumn": 7, + "charOffset": 15899, + "charLength": 18, + "snippet": { + "text": "isExerciseTraining" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 580, + "startColumn": 1, + "charOffset": 15867, + "charLength": 87, + "snippet": { + "text": "\t\treturn marketMenu;\r\n\t}\r\n\tbool isExerciseTraining() {\r\n\t\treturn exerciseTraining;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e311187d72738773", + "equalIndicator/v1": "7388f98af811a42d2bf6bc90d4974c2aa89395b1a82d276785c7f09b01749d0e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 790, + "startColumn": 2, + "charOffset": 27370, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 788, + "startColumn": 1, + "charOffset": 27338, + "charLength": 204, + "snippet": { + "text": "\r\n\t// OTCv8 version detection\r\n\tuint16_t otcV8StringLength = msg.get();\r\n\tif (otcV8StringLength == 5 && msg.getString(5) == \"OTCv8\") {\r\n\t\totclientV8 = msg.get(); // 253, 260, 261, ...\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e70004ebcc900477", + "equalIndicator/v1": "73a9eebbdfaf700f110a41d503531381ebff61f7dc05138839bf4bf9c0f575d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 211, + "startColumn": 14, + "charOffset": 6012, + "charLength": 13, + "snippet": { + "text": "queryMaxCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 209, + "startColumn": 1, + "charOffset": 5809, + "charLength": 652, + "snippet": { + "text": "\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr actor = nullptr) override;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e6579f2d6bb6640f", + "equalIndicator/v1": "73b7f7ebba03289c182b951e6f4cade3185e003551b870e36b8ad3bbc17fffd2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1511, + "startColumn": 59, + "charOffset": 52512, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1509, + "startColumn": 1, + "charOffset": 52449, + "charLength": 412, + "snippet": { + "text": "}\r\n\r\nbool Combat::isValidChainTarget(std::shared_ptr caster, std::shared_ptr currentTarget, std::shared_ptr potentialTarget, const CombatParams ¶ms, bool aggressive) {\r\n\tbool canCombat = canDoCombat(caster, potentialTarget, aggressive) == RETURNVALUE_NOERROR;\r\n\tbool pick = params.chainPickerCallback ? params.chainPickerCallback->onChainCombat(caster, potentialTarget) : true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5087b22f137dbd0a", + "equalIndicator/v1": "73b82148efa285e559090731b3b729d71a58cf7656ecd56eac48f5f001ce9ea4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3461, + "startColumn": 38, + "charOffset": 105956, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3459, + "startColumn": 1, + "charOffset": 105720, + "charLength": 382, + "snippet": { + "text": "\tmsg.add(std::min(player->getMaxHealth(), std::numeric_limits::max()));\r\n\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r\n\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\tmsg.addByte(player->getSoul());\r\n\tmsg.add(player->getStaminaMinutes());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "56d59e992c3fa8e0", + "equalIndicator/v1": "73c63e35896940d6cad5a202d66acd016ec3e68ecce8d249ed320224fe429c2f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3464, + "startColumn": 16, + "charOffset": 104752, + "charLength": 9, + "snippet": { + "text": "slotIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3462, + "startColumn": 1, + "charOffset": 104543, + "charLength": 283, + "snippet": { + "text": "\t\t\t\t\tif (queryAdd(slotIndex, item, item->getItemCount(), 0) == RETURNVALUE_NOERROR) {\r\n\t\t\t\t\t\tif (inventoryItem->equals(item) && inventoryItem->getItemCount() < inventoryItem->getStackSize()) {\r\n\t\t\t\t\t\t\tindex = slotIndex;\r\n\t\t\t\t\t\t\t*destItem = inventoryItem;\r\n\t\t\t\t\t\t\treturn getPlayer();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c9f50cedd6d5158", + "equalIndicator/v1": "73c694520d3d1002e98732fe21f5141b5c0a9282e96f774495efd95bc32441ce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 94, + "startColumn": 22, + "charOffset": 2819, + "charLength": 6, + "snippet": { + "text": "scoped" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 92, + "startColumn": 1, + "charOffset": 2792, + "charLength": 150, + "snippet": { + "text": "\t}\r\n\r\n\tstd::shared_ptr scoped(const std::string &scope) override final;\r\n\tstd::unordered_set keys(const std::string &prefix = \"\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "560bba5f65be1163", + "equalIndicator/v1": "73d488ae61621626e19632daa4e809b208e3cf96ed4cf834a915922bcb61f82f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 70, + "startColumn": 15, + "charOffset": 2181, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 68, + "startColumn": 1, + "charOffset": 2162, + "charLength": 222, + "snippet": { + "text": "}\r\n\r\nvoid Mailbox::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tgetParent()->postRemoveNotification(thing, newParent, index, LINK_PARENT);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9743ef89e722fa17", + "equalIndicator/v1": "73dd23d31333bf723aacaae729b34eaa32517a4336937311180dc584c1d762a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'items' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'items' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8282, + "startColumn": 91, + "charOffset": 262610, + "charLength": 5, + "snippet": { + "text": "items" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8280, + "startColumn": 1, + "charOffset": 262515, + "charLength": 136, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendInventoryImbuements(const std::map> items) {\r\n\tif (oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82b3ef1bfbe2ff70", + "equalIndicator/v1": "7408912e1a7017404f0e48812b366e1a3e9638dc5e5e4b8ef87bcaadaa8e00f5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 197, + "startColumn": 118, + "charOffset": 6185, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 195, + "startColumn": 1, + "charOffset": 6063, + "charLength": 260, + "snippet": { + "text": "}\r\n\r\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target, int32_t damageModifier, int32_t cleavePercent) const {\r\n\tif (player) {\r\n\t\tif (params.soundCastEffect == SoundEffect_t::SILENCE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f6125818ed6a8591", + "equalIndicator/v1": "740a92b0d45c44e645c538336cb17ab052a4965626a94c5cc075653d7d165805" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 632, + "startColumn": 7, + "charOffset": 24298, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 630, + "startColumn": 1, + "charOffset": 24139, + "charLength": 296, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnReportBug(std::shared_ptr player, const std::string &message, const Position &position, uint8_t category) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnReportBug - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6464e7f299dda47c", + "equalIndicator/v1": "744459995a39df1f50f71853f281db8a3e9f28967bcc193838d0a75dcce0c3ab" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 829, + "startColumn": 21, + "charOffset": 26876, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 827, + "startColumn": 1, + "charOffset": 26804, + "charLength": 211, + "snippet": { + "text": "\tfloat attackFactor = player->getAttackFactor();\r\n\r\n\tint32_t minValue = player->getLevel() / 5;\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\r\n\tif (maxDamage) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0cd6c2dc75852bec", + "equalIndicator/v1": "74526d3526d82d1d0246f246ba5bac189c334a4ff4c359719c129779fe01dc59" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2179, + "startColumn": 29, + "charOffset": 73830, + "charLength": 10, + "snippet": { + "text": "multiplier" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2177, + "startColumn": 1, + "charOffset": 73736, + "charLength": 112, + "snippet": { + "text": "\t\tdamage.critical = true;\r\n\t\tdamage.primary.value *= multiplier;\r\n\t\tdamage.secondary.value *= multiplier;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "849c84fe189f3653", + "equalIndicator/v1": "7460148f9dbedb5b5ff5e191e74716142093cea27d11351735115f9b25b623fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6883, + "startColumn": 111, + "charOffset": 238692, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6881, + "startColumn": 1, + "charOffset": 238509, + "charLength": 209, + "snippet": { + "text": "\r\n\t\tif (attackerPlayer->wheel()->getInstant(\"Blessing of the Grove\")) {\r\n\t\t\tdamage.primary.value += (damage.primary.value * attackerPlayer->wheel()->checkBlessingGroveHealingByTarget(target)) / 100.;\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5b45fa585f5c0385", + "equalIndicator/v1": "74b1f2371b51d9b515e242150e796ca823d1bfae89a5b7502ca9fe2aed548b46" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 652, + "startColumn": 27, + "charOffset": 23275, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 650, + "startColumn": 1, + "charOffset": 23243, + "charLength": 130, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnLookInTrade, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ecf2be5bde3d2090", + "equalIndicator/v1": "74c29eab0ba8407a01efdc27f17ed945aaded7dec04ab0f5f40fe19e79dc3eb0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'owner' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'owner' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 840, + "startColumn": 15, + "charOffset": 23146, + "charLength": 5, + "snippet": { + "text": "owner" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 838, + "startColumn": 1, + "charOffset": 23062, + "charLength": 97, + "snippet": { + "text": "\t// shop functions\r\n\tvoid setShopOwner(std::shared_ptr owner) {\r\n\t\tshopOwner = owner;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dd8f34a08278f682", + "equalIndicator/v1": "74ef1ad7a7288380c4aab9c5c78e933ec26d29a1ddc5d0d36ffc598c9994db5a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1927, + "startColumn": 5, + "charOffset": 66202, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1925, + "startColumn": 1, + "charOffset": 66099, + "charLength": 235, + "snippet": { + "text": "\t\t\t\t// perform rotation\r\n\t\t\t\tint32_t rotatedX = static_cast(round(newX * a + newY * b));\r\n\t\t\t\tint32_t rotatedY = static_cast(round(newX * c + newY * d));\r\n\r\n\t\t\t\t// write in the output matrix using rotated coordinates\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ea9e5f9758fceb5e", + "equalIndicator/v1": "74fc2b88888b4f4bcb5511abbf6d27e6d1da1e9ba6ee55566c02f81e6197b67c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1170, + "startColumn": 51, + "charOffset": 35409, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1168, + "startColumn": 1, + "charOffset": 35354, + "charLength": 184, + "snippet": { + "text": "}\r\n\r\nvoid Monster::pushCreatures(std::shared_ptr tile) {\r\n\t// We can not use iterators here since we can push a creature to another tile\r\n\t// which will invalidate the iterator.\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "22374351fc58021b", + "equalIndicator/v1": "7518ec82be8f805953bfeb907f7a4792b6dfeec659774fdb40d414e8194598db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'createMonsterTypeLootLuaTable' is within a recursive call chain", + "markdown": "Function 'createMonsterTypeLootLuaTable' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 28, + "charOffset": 722, + "charLength": 29, + "snippet": { + "text": "createMonsterTypeLootLuaTable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 657, + "charLength": 195, + "snippet": { + "text": "#include \"lua/scripts/scripts.hpp\"\r\n\r\nvoid MonsterTypeFunctions::createMonsterTypeLootLuaTable(lua_State* L, const std::vector &lootList) {\r\n\tlua_createtable(L, lootList.size(), 0);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "32666d572d11c39d", + "equalIndicator/v1": "752c4fd834a28bdea151064cdaec39d05824baa462486cc5686510d53c63f4ac" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 424, + "startColumn": 15, + "charOffset": 11673, + "charLength": 12, + "snippet": { + "text": "changeHealth" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 422, + "startColumn": 1, + "charOffset": 11653, + "charLength": 135, + "snippet": { + "text": "\t}\r\n\r\n\tvirtual void changeHealth(int32_t healthChange, bool sendHealthChange = true);\r\n\tvirtual void changeMana(int32_t manaChange);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "431d4d0aeb775aa3", + "equalIndicator/v1": "753610255e85adb2e1f62229b61b890d35cb083e4f72c202f51401db82c616b3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 459, + "startColumn": 33, + "charOffset": 24426, + "charLength": 31, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 457, + "startColumn": 1, + "charOffset": 24272, + "charLength": 235, + "snippet": { + "text": "\tvoid updatePlayerShield(std::shared_ptr player);\r\n\tvoid updateCreatureType(std::shared_ptr creature);\r\n\tvoid updateCreatureWalkthrough(const std::shared_ptr creature);\r\n\r\n\tGameState_t getGameState() const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f8817d12d783282f", + "equalIndicator/v1": "7550749eeafcd57557bfce8e40279687a53ea2831b5dc2e6c6980b19c18fcfd2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'setAttackedCreature' is within a recursive call chain", + "markdown": "Function 'setAttackedCreature' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4343, + "startColumn": 14, + "charOffset": 130765, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4341, + "startColumn": 1, + "charOffset": 130747, + "charLength": 149, + "snippet": { + "text": "}\r\n\r\nbool Player::setAttackedCreature(std::shared_ptr creature) {\r\n\tif (!Creature::setAttackedCreature(creature)) {\r\n\t\tsendCancelTarget();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5359e2d43e30d5fa", + "equalIndicator/v1": "75526824f4c2866a3371fe2e145d2e6453ef1c46f7f927549e9698c0e28058b9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 792, + "startColumn": 55, + "charOffset": 25758, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 790, + "startColumn": 1, + "charOffset": 25699, + "charLength": 255, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatNullFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage*) {\r\n\tCombatConditionFunc(caster, target, params, nullptr);\r\n\tCombatDispelFunc(caster, target, params, nullptr);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f1b36dec3127f461", + "equalIndicator/v1": "75565dba64d93d8336b5b74899b401d37e70dc31dff4dd72c7016afd85473daf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')", + "markdown": "Narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4063, + "startColumn": 29, + "charOffset": 145882, + "charLength": 10, + "snippet": { + "text": "std::floor" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4061, + "startColumn": 1, + "charOffset": 145778, + "charLength": 268, + "snippet": { + "text": "\r\n\tif (parentContainer->hasPagination() && parentContainer->hasParent()) {\r\n\t\tuint16_t indexContainer = std::floor(parentContainer->getThingIndex(container) / parentContainer->capacity()) * parentContainer->capacity();\r\n\t\tplayer->addContainer(cid, parentContainer);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8fdbd129cc63b242", + "equalIndicator/v1": "756d2bf483d692bb5ec101c532fc39ad5c47329c3934fa089e62f36ce970afbb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 575, + "startColumn": 100, + "charOffset": 21928, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 573, + "startColumn": 1, + "charOffset": 21824, + "charLength": 293, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnMoveCreature - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d35408a14b16b58", + "equalIndicator/v1": "757f91d8f9f2f1e04a9b05ee6c8d4d94389488a4e0ddde67d1de516cf5ff89f5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 571, + "startColumn": 13, + "charOffset": 26877, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 569, + "startColumn": 1, + "charOffset": 26715, + "charLength": 316, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentmagic\") {\r\n\t\tint16_t value = pugi::cast(valueAttribute.value());\r\n\t\tAbilities &abilities = itemType.getAbilities();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5ad5ce5374731cd3", + "equalIndicator/v1": "75ab118da2d74b9bfbef4c3b434096ce0147a65b79f0390305d707b9ebe6c556" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1122, + "startColumn": 29, + "charOffset": 32999, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1120, + "startColumn": 1, + "charOffset": 32787, + "charLength": 284, + "snippet": { + "text": "\tvoid sendCreatureMove(std::shared_ptr creature, const Position &newPos, int32_t newStackPos, const Position &oldPos, int32_t oldStackPos, bool teleport) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendMoveCreature(creature, newPos, newStackPos, oldPos, oldStackPos, teleport);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "020800a2b707255d", + "equalIndicator/v1": "75e1c945f1dae83bbe82f63f768dee3df8bda9dd5f747f6e9a60a6831c5cbd15" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1356, + "startColumn": 56, + "charOffset": 39965, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1354, + "startColumn": 1, + "charOffset": 39905, + "charLength": 161, + "snippet": { + "text": "}\r\n\r\nvoid Player::updateSupplyTracker(std::shared_ptr item) {\r\n\tconst auto &iType = Item::items.getItemType(item->getID());\r\n\tauto value = iType.buyPrice;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "872361a2e512affe", + "equalIndicator/v1": "75e355dfa2be40740219fb44e892b10fd61755588133c14a144e2dc057ad7b28" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 224, + "startColumn": 7, + "charOffset": 6908, + "charLength": 11, + "snippet": { + "text": "removeThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 222, + "startColumn": 1, + "charOffset": 6818, + "charLength": 225, + "snippet": { + "text": "\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override final;\r\n\r\n\tvoid removeThing(std::shared_ptr thing, uint32_t count) override final;\r\n\r\n\tvoid removeCreature(std::shared_ptr creature);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c2f0152fe9cde81c", + "equalIndicator/v1": "760a8a2ab4689a40d416950b3cba50cbd6cc0284866c36d5a1bdedbf2de26e5f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2009, + "startColumn": 72, + "charOffset": 57763, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2007, + "startColumn": 1, + "charOffset": 57687, + "charLength": 161, + "snippet": { + "text": "}\r\n\r\nstd::string Item::parseClassificationDescription(std::shared_ptr item) {\r\n\tstd::ostringstream string;\r\n\tif (item && item->getClassification() >= 1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4cf78cc094481858", + "equalIndicator/v1": "761491e5dbf9401595988963422fd6a9e86a01438bc46d7c9f3eba3fba98e0bc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2483, + "startColumn": 24, + "charOffset": 73890, + "charLength": 6, + "snippet": { + "text": "rawExp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2481, + "startColumn": 1, + "charOffset": 73848, + "charLength": 61, + "snippet": { + "text": "\t}\r\n\tsendStats();\r\n\tsendExperienceTracker(rawExp, exp);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "142df757317fd326", + "equalIndicator/v1": "761518cbdf14978579626712d5637da3f09b96b3539085e068a430ed8259c14c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 283, + "startColumn": 88, + "charOffset": 7872, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 281, + "startColumn": 1, + "charOffset": 7780, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nbool House::transferToDepot(std::shared_ptr player, std::shared_ptr tile) const {\r\n\tif (townId == 0 || !player) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a109aefd5b04b8d6", + "equalIndicator/v1": "76571e287ce1bcada74dfc5461f9f18d0865ea0ab58e3682ee3a7f303e046a77" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'title' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'title' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2349, + "startColumn": 18, + "charOffset": 67478, + "charLength": 5, + "snippet": { + "text": "title" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2347, + "startColumn": 1, + "charOffset": 67413, + "charLength": 116, + "snippet": { + "text": "\t}\r\n\tvoid setLoyaltyTitle(std::string title) {\r\n\t\tloyaltyTitle = title;\r\n\t}\r\n\tstd::string getLoyaltyTitle() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e00590efce3f8795", + "equalIndicator/v1": "765b70fa248c51149e8d8f2d9fafe2f23070acbd2f0cba8df0d4b237e774364f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1889, + "startColumn": 27, + "charOffset": 65267, + "charLength": 23, + "snippet": { + "text": "(output->getCols() / 2)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1887, + "startColumn": 1, + "charOffset": 65215, + "charLength": 155, + "snippet": { + "text": "\t} else {\r\n\t\t// rotation\r\n\t\tint32_t rotateCenterX = (output->getCols() / 2) - 1;\r\n\t\tint32_t rotateCenterY = (output->getRows() / 2) - 1;\r\n\t\tint32_t angle;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "382e9642e7041a70", + "equalIndicator/v1": "7666914ea9987d48b509c5c739287ad33f40658eacdd6aff3e001a2b66879476" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 717, + "startColumn": 27, + "charOffset": 25528, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 715, + "startColumn": 1, + "charOffset": 25496, + "charLength": 130, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnRemoveCount, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd13bfdf8e15bcd6", + "equalIndicator/v1": "767a2ebde0c91fdbb324407e6795a9b340ee7fc42a3bbebadadd6a836f07ed1d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'spellName' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'spellName' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 431, + "startColumn": 86, + "charOffset": 13227, + "charLength": 9, + "snippet": { + "text": "spellName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 429, + "startColumn": 1, + "charOffset": 13108, + "charLength": 262, + "snippet": { + "text": "\t\treturn items[id].augments;\r\n\t}\r\n\tstd::vector> getAugmentsBySpellNameAndType(std::string spellName, Augment_t augmentType) const {\r\n\t\tstd::vector> augments;\r\n\t\tfor (auto &augment : items[id].augments) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "40d3b6f1d2983e2d", + "equalIndicator/v1": "7687283d427a66f7abab9e63c1a0ba9511a18e4348320105213d57c4347bbaf5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 38, + "startColumn": 2, + "charOffset": 1537, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 36, + "startColumn": 1, + "charOffset": 1443, + "charLength": 189, + "snippet": { + "text": "\tint32_t count = getNumber(L, 3, 1);\r\n\tbool canDropOnMap = getBoolean(L, 4, true);\r\n\tuint16_t subType = getNumber(L, 5, 1);\r\n\r\n\tconst ItemType &it = Item::items[itemId];\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ac1ec55f93d9b1cd", + "equalIndicator/v1": "76e3bf69de73d47d18271a2f1a8ed63c031b844e27acfbfb5872831b08ab3d3a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 112, + "startColumn": 113, + "charOffset": 3833, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 110, + "startColumn": 1, + "charOffset": 3716, + "charLength": 248, + "snippet": { + "text": "}\r\n\r\nReturnValue EventCallback::creatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnTargetCombat - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5e13a85daa1a9dee", + "equalIndicator/v1": "771cffe10c7d13cda7495373c77ac9148a6004746bff5c120c1589becac8f92c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly", + "markdown": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2390, + "startColumn": 58, + "charOffset": 90934, + "charLength": 12, + "snippet": { + "text": "__FUNCTION__" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2388, + "startColumn": 1, + "charOffset": 90805, + "charLength": 172, + "snippet": { + "text": "\t\tauto container = autoContainer->getContainer();\r\n\t\tif (!container) {\r\n\t\t\tg_logger().error(\"[{}] Failed to get auto container\", __FUNCTION__);\r\n\t\t\treturn toCylinder;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ee671f31876f6339", + "equalIndicator/v1": "773a8ade7d07426eb814fb376aa9c7ed6277f7cf03c5a9d375e7252fb49c845b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 782, + "startColumn": 2, + "charOffset": 27151, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 780, + "startColumn": 1, + "charOffset": 27144, + "charLength": 161, + "snippet": { + "text": "\t}\r\n\r\n\tuint32_t timeStamp = msg.get();\r\n\tuint8_t randNumber = msg.getByte();\r\n\tif (challengeTimestamp != timeStamp || challengeRandom != randNumber) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d21666f5c71b6f58", + "equalIndicator/v1": "77460e5c686ba2d6052013ab939be18a5e0f3f93d8f724ca8995a78944bba167" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 106, + "startColumn": 2, + "charOffset": 2731, + "charLength": 25, + "snippet": { + "text": "// party:getMemberCount()" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 104, + "startColumn": 1, + "charOffset": 2668, + "charLength": 169, + "snippet": { + "text": "\r\nint PartyFunctions::luaPartyGetMemberCount(lua_State* L) {\r\n\t// party:getMemberCount()\r\n\tstd::shared_ptr party = getUserdataShared(L, 1);\r\n\tif (party) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "64142423970bf366", + "equalIndicator/v1": "776f5fbc4b6f24d7074f6a3a87c7816362f527b034256b168d8703519922f3f1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7483, + "startColumn": 28, + "charOffset": 260599, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7481, + "startColumn": 1, + "charOffset": 260536, + "charLength": 260, + "snippet": { + "text": "\r\nvoid Game::buildMessageAsTarget(\r\n\tstd::shared_ptr attacker, const CombatDamage &damage, std::shared_ptr attackerPlayer,\r\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\r\n\tconst std::string &damageString\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e9c7fffccaf5c40f", + "equalIndicator/v1": "777136d5a8576105222098c2b1bb3b9c3dd7c3c4f7db7ff83051ad729ae762b0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 523, + "startColumn": 7, + "charOffset": 19927, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 521, + "startColumn": 1, + "charOffset": 19660, + "charLength": 412, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnItemMoved - \"\r\n\t\t \"Player {} item {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1c4ee200ef1bb122", + "equalIndicator/v1": "777f074b5fc8b85d1bbfe61d47de4dd80723b91cd6681c4ef694e5ae044ea286" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 989, + "startColumn": 7, + "charOffset": 37645, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 987, + "startColumn": 1, + "charOffset": 37547, + "charLength": 229, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnWalk(std::shared_ptr player, Direction &dir) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::eventOnWalk - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c051b7c4c0860485", + "equalIndicator/v1": "778a6a5ad07fa5fcbdf8499503f3368c4a37012993f3ed2ec3722016d6a37d0d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7875, + "startColumn": 89, + "charOffset": 238115, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7873, + "startColumn": 1, + "charOffset": 238022, + "charLength": 158, + "snippet": { + "text": "}\r\n\r\nvoid Player::parseAttackRecvHazardSystem(CombatDamage &damage, std::shared_ptr monster) {\r\n\tif (!monster || !monster->getHazard()) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "28b39efad2fc68bf", + "equalIndicator/v1": "778dc885ab2143a648ea718c09e78563b22d0a16a65554cb51385188f47f18f8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 326, + "startColumn": 41, + "charOffset": 8561, + "charLength": 34, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 324, + "startColumn": 1, + "charOffset": 8515, + "charLength": 254, + "snippet": { + "text": "\t}\r\n\r\n\tvoid addMonsterToCyclopediaTrackerList(const std::shared_ptr mtype, bool isBoss, bool reloadClient = false);\r\n\r\n\tvoid removeMonsterFromCyclopediaTrackerList(std::shared_ptr mtype, bool isBoss, bool reloadClient = false);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "961f8deb4ea3d20d", + "equalIndicator/v1": "77a446aaffbdb325082657fd5f5ca7b27c0f2a92b4f5aef6d2cc8c977391f02c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 736, + "startColumn": 102, + "charOffset": 28422, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 734, + "startColumn": 1, + "charOffset": 28316, + "charLength": 269, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnGainExperience - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c5bca4738ddbdcb6", + "equalIndicator/v1": "77b37671aa515b558820981225164b45a9268a3abaa84795a253561aa547a7ff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2196, + "startColumn": 29, + "charOffset": 74538, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2194, + "startColumn": 1, + "charOffset": 74427, + "charLength": 150, + "snippet": { + "text": "\t} else if (monster) {\r\n\t\tdamage.primary.value *= monster->getAttackMultiplier();\r\n\t\tdamage.secondary.value *= monster->getAttackMultiplier();\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "902909e7f3414fa6", + "equalIndicator/v1": "77b84680fa6f1b34f7a80872670b92d5caec02bf9dcd1fc018b0945eb01bfbba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 602, + "startColumn": 73, + "charOffset": 23056, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 600, + "startColumn": 1, + "charOffset": 22979, + "charLength": 346, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnReportRuleViolation(std::shared_ptr player, const std::string &targetName, uint8_t reportType, uint8_t reportReason, const std::string &comment, const std::string &translation) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnReportRuleViolation - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e794697d00e53f54", + "equalIndicator/v1": "77c4ed346c3d9b9ca3766ffbda4bc67218c81559ef17de02d2b02e84cbbf2d4e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 368, + "startColumn": 5, + "charOffset": 12186, + "charLength": 10, + "snippet": { + "text": "defaultMap" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 366, + "startColumn": 1, + "charOffset": 12143, + "charLength": 143, + "snippet": { + "text": "\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_ICEDAMAGE:\r\n\t\t\t\tdefaultMap[4] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_HOLYDAMAGE:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a59e3866bbbf83f0", + "equalIndicator/v1": "77c678475b26cbf25e4061a0b19e5148a6c0d7b9ad36ee4eac0e401dca1773f9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 230, + "startColumn": 9, + "charOffset": 7177, + "charLength": 12, + "snippet": { + "text": "getLastIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 228, + "startColumn": 1, + "charOffset": 7046, + "charLength": 327, + "snippet": { + "text": "\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r\n\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "91fb173dc4dae49a", + "equalIndicator/v1": "77d102ae3ef904243af6f901c28475462a8f3a85e9f6e5fc2adfffd6ae4cba02" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 617, + "startColumn": 16, + "charOffset": 17869, + "charLength": 8, + "snippet": { + "text": "duration" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 615, + "startColumn": 1, + "charOffset": 17785, + "charLength": 104, + "snippet": { + "text": "\t\tuint32_t duration = getDefaultDuration();\r\n\t\tif (duration != 0) {\r\n\t\t\tsetDuration(duration);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3f306ac9f8b2adcb", + "equalIndicator/v1": "77db55f7be6edba0e641af629e3bdd14fb301f3125457b3b3ff980f7cab5bbaf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'itemTile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'itemTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1064, + "startColumn": 45, + "charOffset": 30893, + "charLength": 8, + "snippet": { + "text": "itemTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1062, + "startColumn": 1, + "charOffset": 30821, + "charLength": 236, + "snippet": { + "text": "\t// tile\r\n\t// send methods\r\n\tvoid sendAddTileItem(std::shared_ptr itemTile, const Position &pos, std::shared_ptr item) {\r\n\t\tif (client) {\r\n\t\t\tint32_t stackpos = itemTile->getStackposOfItem(static_self_cast(), item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "554e101ac407552b", + "equalIndicator/v1": "77f82fd1eb9da7899e861a50787515605af7a1b5bda1c114c2e0c91c2d75b015" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1091, + "startColumn": 6, + "charOffset": 39178, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1089, + "startColumn": 1, + "charOffset": 39145, + "charLength": 170, + "snippet": { + "text": "\tlua_pushnumber(L, exp);\r\n\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e892e6abfb9a8aa4", + "equalIndicator/v1": "781db4edd8cbafbe6da3284953da8e66426db8e278d98dfd4e53d275504469de" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 709, + "startColumn": 94, + "charOffset": 21511, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 707, + "startColumn": 1, + "charOffset": 21413, + "charLength": 232, + "snippet": { + "text": "}\r\n\r\nbool MoveEvent::executeStep(const std::shared_ptr &creature, std::shared_ptr item, const Position &pos) const {\r\n\t// onStepIn(creature, item, pos, fromPosition)\r\n\t// onStepOut(creature, item, pos, fromPosition)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7d1b51db5025150d", + "equalIndicator/v1": "78210d47bb7298d1841a51e413ffffd8a0ea9caf74aee02688294ab6425029ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10552, + "startColumn": 57, + "charOffset": 366508, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10550, + "startColumn": 1, + "charOffset": 366447, + "charLength": 206, + "snippet": { + "text": "}\r\n\r\nvoid Game::registerAchievement(uint16_t id, std::string name, std::string description, bool secret, uint8_t grade, uint8_t points) {\r\n\tm_achievements[id] = Achievement();\r\n\tm_achievements[id].id = id;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5cba62407b40f4f6", + "equalIndicator/v1": "7856502dcc656e8a19a677120ecb30536750599cfd27a40802c1a2bc6488ec48" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 725, + "startColumn": 15, + "charOffset": 23570, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 723, + "startColumn": 1, + "charOffset": 23530, + "charLength": 133, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 1.10f) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e5283521d9e060b2", + "equalIndicator/v1": "7858cc26fd2ce0ea3e99a48ae7b1dda4ba4c9fb574618896516a03f898a927bc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 114, + "startColumn": 76, + "charOffset": 3371, + "charLength": 9, + "snippet": { + "text": "moveEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 112, + "startColumn": 1, + "charOffset": 3291, + "charLength": 182, + "snippet": { + "text": "}\r\n\r\nbool MoveEvents::registerLuaPositionEvent(const std::shared_ptr moveEvent) {\r\n\tauto positionVector = moveEvent->getPositionsVector();\r\n\tif (positionVector.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fba97e7f70d3b552", + "equalIndicator/v1": "7903e99891a63d72a07611e8774212238ea85cb3d58f85ce88ae9dd3f8cb3662" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 494, + "startColumn": 39, + "charOffset": 16807, + "charLength": 7, + "snippet": { + "text": "npcType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 492, + "startColumn": 1, + "charOffset": 16643, + "charLength": 268, + "snippet": { + "text": "\r\n\t\tif (!npcType->info.voiceVector.empty() && (npcType->info.yellChance >= static_cast(uniform_random(1, 100)))) {\r\n\t\t\tuint32_t index = uniform_random(0, npcType->info.voiceVector.size() - 1);\r\n\t\t\tconst voiceBlock_t &vb = npcType->info.voiceVector[index];\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "42d401bce3ec9147", + "equalIndicator/v1": "7908f7f70402b8a0a82b02f534f8fb78f1f6f87d96fe44cbb777dcfff64a6b6d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8998, + "startColumn": 2, + "charOffset": 286672, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8996, + "startColumn": 1, + "charOffset": 286577, + "charLength": 228, + "snippet": { + "text": "\r\n\t// For some reason the cip sends uint32_t, but we use uint16_t, so let's just ignore that\r\n\tuint16_t monsterRaceId = (uint16_t)msg.get();\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a22acab0afd0e913", + "equalIndicator/v1": "7991f0aa1844ae8ad425648b992ec44e6fde0e8eb6e1991d602d2a2f8b96b2d3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1149, + "startColumn": 25, + "charOffset": 37482, + "charLength": 4, + "snippet": { + "text": "maxX" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1147, + "startColumn": 1, + "charOffset": 37452, + "charLength": 113, + "snippet": { + "text": "\t}\r\n\r\n\tconst int32_t rangeX = maxX + MAP_MAX_VIEW_PORT_X;\r\n\tconst int32_t rangeY = maxY + MAP_MAX_VIEW_PORT_Y;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ae3b04f874a338a6", + "equalIndicator/v1": "799b0a6122a1603ec1736497b8e17d8c570adff139d17567e4bd14c0d42d6cd4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 115, + "startColumn": 81, + "charOffset": 6897, + "charLength": 13, + "snippet": { + "text": "const int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 113, + "startColumn": 1, + "charOffset": 6658, + "charLength": 576, + "snippet": { + "text": "\tvoid playerOnRequestQuestLog(std::shared_ptr player) const;\r\n\tvoid playerOnRequestQuestLine(std::shared_ptr player, uint16_t questId) const;\r\n\tvoid playerOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime) const;\r\n\tvoid playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const;\r\n\tvoid playerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "228b20c348991950", + "equalIndicator/v1": "79a7fe9dee4c45c787040bb952590691691592e2f470ed0403b114abc80c1930" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1861, + "startColumn": 2, + "charOffset": 56615, + "charLength": 12, + "snippet": { + "text": "SpeakClasses" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1859, + "startColumn": 1, + "charOffset": 56590, + "charLength": 134, + "snippet": { + "text": "\tuint16_t channelId;\r\n\r\n\tSpeakClasses type = static_cast(msg.getByte());\r\n\tswitch (type) {\r\n\t\tcase TALKTYPE_PRIVATE_TO:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f7155714b1a680fc", + "equalIndicator/v1": "79a85a095244f807479fdbebc34a1213ae413a50372719c85b6caf0dd383eecf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'items' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'items' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 470, + "startColumn": 31, + "charOffset": 20485, + "charLength": 46, + "snippet": { + "text": "const std::map>" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 468, + "startColumn": 1, + "charOffset": 20399, + "charLength": 163, + "snippet": { + "text": "\r\n\tvoid parseInventoryImbuements(NetworkMessage &msg);\r\n\tvoid sendInventoryImbuements(const std::map> items);\r\n\r\n\t// reloadCreature\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ae9b9a8d7bc41c71", + "equalIndicator/v1": "79d3f4f2426cdc027903099a9de19a79e76bb080062d5691c1493e1a9f8d6cb9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 76, + "startColumn": 74, + "charOffset": 2339, + "charLength": 9, + "snippet": { + "text": "moveEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 74, + "startColumn": 1, + "charOffset": 2261, + "charLength": 180, + "snippet": { + "text": "}\r\n\r\nbool MoveEvents::registerLuaActionEvent(const std::shared_ptr moveEvent) {\r\n\tauto actionIdVector = moveEvent->getActionIdsVector();\r\n\tif (actionIdVector.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a86530fe94d9558b", + "equalIndicator/v1": "79d76c8d0ff2f3915526aa054f000378d9b58afa993374144c94f395d99907b8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3312, + "startColumn": 65, + "charOffset": 101104, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3310, + "startColumn": 1, + "charOffset": 101035, + "charLength": 147, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureEmblem(std::shared_ptr creature) {\r\n\tif (!creature || !canSee(creature) || oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "217625cdb3d484a7", + "equalIndicator/v1": "79db706621cf34fc48a5399a550fca75042c3b4c3a46f435d34b1b3657100624" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7126, + "startColumn": 30, + "charOffset": 248023, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7124, + "startColumn": 1, + "charOffset": 247830, + "charLength": 332, + "snippet": { + "text": "\t\tif (damage.origin != ORIGIN_NONE && attacker && damage.primary.type != COMBAT_HEALING) {\r\n\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t}\r\n\t\tif (damage.origin != ORIGIN_NONE && target && damage.primary.type != COMBAT_HEALING) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9d6debab5635e8bf", + "equalIndicator/v1": "79e6ad3c06d709d95cc37926edb130fab24b7de5ef64f383d91449505fdd6efe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3476, + "startColumn": 24, + "charOffset": 105145, + "charLength": 9, + "snippet": { + "text": "slotIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3474, + "startColumn": 1, + "charOffset": 105073, + "charLength": 208, + "snippet": { + "text": "\t\t\t\t\tcontainers.push_back(subContainer);\r\n\t\t\t\t}\r\n\t\t\t} else if (queryAdd(slotIndex, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) { // empty slot\r\n\t\t\t\tindex = slotIndex;\r\n\t\t\t\t*destItem = nullptr;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67b6a422856f430a", + "equalIndicator/v1": "7a2e89b82c67ad5c7ad1141f0d055509365bbe0a1ca2d66589b577b3c78b2f73" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 599, + "startColumn": 3, + "charOffset": 16102, + "charLength": 8, + "snippet": { + "text": "skills_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 597, + "startColumn": 1, + "charOffset": 15963, + "charLength": 232, + "snippet": { + "text": "void ConditionAttributes::updatePercentSkills(std::shared_ptr player) {\r\n\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\r\n\t\tskills_t skill = static_cast(i);\r\n\t\tif (skillsPercent[skill] == 0) {\r\n\t\t\tcontinue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fbbcf0b9699211aa", + "equalIndicator/v1": "7a343c672eeacb8323b98d5368efe70659401017e3ba1c07fa928b1a0800e17a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9950, + "startColumn": 57, + "charOffset": 346979, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9948, + "startColumn": 1, + "charOffset": 346918, + "charLength": 103, + "snippet": { + "text": "}\r\n\r\nvoid Game::sendUpdateCreature(std::shared_ptr creature) {\r\n\tif (!creature) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8066c7ff5df2c2bb", + "equalIndicator/v1": "7a3506d94c898aa08dffcd9d0f136f33ec5fbe8e3bb26e355e604a40fdfb1e63" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 673, + "startColumn": 26, + "charOffset": 21832, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 671, + "startColumn": 1, + "charOffset": 21675, + "charLength": 276, + "snippet": { + "text": "\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\r\n\t\tdamage.secondary.value = damage.primary.value * (damagePercent);\r\n\t\tdamage.primary.value = damage.primary.value * (1 - damagePercent);\r\n\r\n\t\tif (imbuementInfo.imbuement->soundEffect != SoundEffect_t::SILENCE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e106233adea1337b", + "equalIndicator/v1": "7a3aefd11bf4d6a4387f910068c640848649104e71a1cd4e6159bc3331a3a722" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 446, + "startColumn": 34, + "charOffset": 16675, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 444, + "startColumn": 1, + "charOffset": 16589, + "charLength": 221, + "snippet": { + "text": "\t\t\tplayer->sendMessageDialog(ss.str());\r\n\t\t\treturn;\r\n\t\t} else if (!slot->canSelect()) {\r\n\t\t\tplayer->sendMessageDialog(\"There was an error while processing your action. Please try reopening the task window.\");\r\n\t\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4ce8143159c1d63d", + "equalIndicator/v1": "7a601279f5bb6238b5c3bf8d0c1f4f10ec67eaa5c3dcfe3abae93b085c0970e5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 716, + "startColumn": 37, + "charOffset": 23271, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 714, + "startColumn": 1, + "charOffset": 23209, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 48) * 2.05f) + 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75a9c8e8c06ecf2e", + "equalIndicator/v1": "7a7198bc24c678e77ae3052e6f9ce3dfef6827bdb8adce97b2fd5d256f77929d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 732, + "startColumn": 90, + "charOffset": 26087, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 730, + "startColumn": 1, + "charOffset": 25993, + "charLength": 445, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) {\r\n\t// Player:onMoveItem(item, count, fromPosition, toPosition) or Player.onMoveItem(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)\r\n\tif (info.playerOnMoveItem == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b490f21e77ad421", + "equalIndicator/v1": "7a863cbf027d32e9ef3e9ba6bf537b8c8db75aaf40ae91f47cb25b1de5d2a5c7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'stringToIgnore' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'stringToIgnore' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1564, + "startColumn": 75, + "charOffset": 46380, + "charLength": 14, + "snippet": { + "text": "stringToIgnore" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1562, + "startColumn": 1, + "charOffset": 46301, + "charLength": 177, + "snippet": { + "text": "}\r\n\r\nvoid capitalizeWordsIgnoringString(std::string &source, const std::string stringToIgnore) {\r\n\ttoLowerCaseString(source);\r\n\tauto size = static_cast(source.size());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b96143702df8253", + "equalIndicator/v1": "7ac92e9640263fddbb11534f0bd14c78f2a601b9f75d0d02e200f0b0fc4464c1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'context' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'context' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 100, + "startColumn": 105, + "charOffset": 3169, + "charLength": 7, + "snippet": { + "text": "context" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 98, + "startColumn": 1, + "charOffset": 3060, + "charLength": 197, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Player::createPlayerTask(uint32_t delay, std::function f, std::string context) {\r\n\treturn std::make_shared(std::move(f), std::move(context), delay);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0c82a63fbe3eefce", + "equalIndicator/v1": "7afdf0234aa81e242634f1923fed239be37f0787bdde3d4b980f0955583fe948" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 149, + "startColumn": 7, + "charOffset": 4502, + "charLength": 12, + "snippet": { + "text": "changeHealth" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 147, + "startColumn": 1, + "charOffset": 4413, + "charLength": 317, + "snippet": { + "text": "\r\n\tvoid drainHealth(std::shared_ptr attacker, int32_t damage) override;\r\n\tvoid changeHealth(int32_t healthChange, bool sendHealthChange = true) override;\r\n\tbool getNextStep(Direction &direction, uint32_t &flags) override;\r\n\tvoid onFollowCreatureComplete(const std::shared_ptr &creature) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "54709a2bfa767dba", + "equalIndicator/v1": "7b02e0288994cb3c0ec1ab933c49db5b178ab63c4e19c73215184c950c4b3ed9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 80, + "startColumn": 10, + "charOffset": 2025, + "charLength": 13, + "snippet": { + "text": "gainSoulTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 78, + "startColumn": 1, + "charOffset": 1976, + "charLength": 136, + "snippet": { + "text": "\r\n\tuint32_t getSoulGainTicks() const {\r\n\t\treturn gainSoulTicks / g_configManager().getFloat(RATE_SOUL_REGEN_SPEED, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c2973b7a30d23123", + "equalIndicator/v1": "7b05155aa4d9f56d5219612874a1bb49440c149d9c0680d629747e2bd1c6b940" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 67, + "charOffset": 895, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 797, + "charLength": 248, + "snippet": { + "text": "Spells::~Spells() = default;\r\n\r\nTalkActionResult_t Spells::playerSaySpell(std::shared_ptr player, std::string &words) {\r\n\tauto maxOnline = g_configManager().getNumber(MAX_PLAYERS_PER_ACCOUNT, __FUNCTION__);\r\n\tauto tile = player->getTile();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6adbc29876f193a4", + "equalIndicator/v1": "7b326173ef0f2ff56c65b050cee435a9caf9f40f4b876814df8f1808c64e1c03" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'mtype' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'mtype' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6655, + "startColumn": 81, + "charOffset": 195466, + "charLength": 5, + "snippet": { + "text": "mtype" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6653, + "startColumn": 1, + "charOffset": 195381, + "charLength": 133, + "snippet": { + "text": "}\r\n\r\nbool Player::isCreatureUnlockedOnTaskHunting(const std::shared_ptr mtype) const {\r\n\tif (!mtype) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "14f81e6d482a5079", + "equalIndicator/v1": "7b497a347d78e99e767c0fa8e3e27127df9504c82dfa01e7be6c3b5666a5c0d1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 38, + "startColumn": 7, + "charOffset": 1186, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 36, + "startColumn": 1, + "charOffset": 1018, + "charLength": 472, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "648811d3568fe8bc", + "equalIndicator/v1": "7b6985eebd85486a5c7ccf54857fc682e5d7b19ebf98a5e1978bbd454d8fb110" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 157, + "startColumn": 7, + "charOffset": 4268, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 155, + "startColumn": 1, + "charOffset": 4136, + "charLength": 288, + "snippet": { + "text": "void Module::executeOnRecvbyte(std::shared_ptr player, NetworkMessage &msg) {\r\n\t// onRecvbyte(player, msg, recvbyte)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"Call stack overflow. Too many lua script calls being nested {}\", player->getName());\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "748158d5f9cfbd83", + "equalIndicator/v1": "7b7515f8063c1a7b3a6d45e50f32c0ecc274b307036f6013e033a986a9c1b356" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 64, + "startColumn": 85, + "charOffset": 2057, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 62, + "startColumn": 1, + "charOffset": 1968, + "charLength": 276, + "snippet": { + "text": "}\r\n\r\nTalkActionResult_t TalkActions::checkPlayerCanSayTalkAction(std::shared_ptr player, SpeakClasses type, const std::string &words) const {\r\n\tfor (const auto &[talkactionWords, talkActionPtr] : talkActions) {\r\n\t\tif (talkactionWords.find(',') != std::string::npos) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a7cc87d4c81eb120", + "equalIndicator/v1": "7b814f4941ed6d5d8d8ad101b06dbe845ad990644045de5424297059881411d9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 883, + "startColumn": 31, + "charOffset": 28748, + "charLength": 4, + "snippet": { + "text": "mana" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 881, + "startColumn": 1, + "charOffset": 28644, + "charLength": 131, + "snippet": { + "text": "\t\tmana += std::min(manaChange, getMaxMana() - mana);\r\n\t} else {\r\n\t\tmana = std::max(0, mana + manaChange);\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "04da05ebcb5427ed", + "equalIndicator/v1": "7b928278c17257e2b89b2ddd743c9c69da826e688255e68f5b190d7af8ac4699" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1340, + "startColumn": 8, + "charOffset": 39301, + "charLength": 5, + "snippet": { + "text": "items" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1338, + "startColumn": 1, + "charOffset": 39232, + "charLength": 101, + "snippet": { + "text": "\tconst TileItemVector* items = getItemList();\r\n\tif (items) {\r\n\t\tn += items->getTopItemCount();\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "45149716e850cb2e", + "equalIndicator/v1": "7bae93ae6836cf89a698001e18f381d452cb6565c208dc17f2e67ed14d81d29c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 566, + "startColumn": 18, + "charOffset": 17053, + "charLength": 11, + "snippet": { + "text": "getPosition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 564, + "startColumn": 1, + "charOffset": 17030, + "charLength": 78, + "snippet": { + "text": "\t}\r\n\r\n\tconst Position &getPosition() override final {\r\n\t\treturn position;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4494932e5a312baa", + "equalIndicator/v1": "7bb7bfe20a8d55c54ea36817c54e5b714aa179024cc3b3d291a8bf5e11d1dc10" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 60, + "startColumn": 10, + "charOffset": 1425, + "charLength": 13, + "snippet": { + "text": "gainManaTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 58, + "startColumn": 1, + "charOffset": 1376, + "charLength": 136, + "snippet": { + "text": "\r\n\tuint32_t getManaGainTicks() const {\r\n\t\treturn gainManaTicks / g_configManager().getFloat(RATE_MANA_REGEN_SPEED, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd457d6b81d46a1e", + "equalIndicator/v1": "7bc0067e7a6b926a3aa43b9b7690cb0c3e21e973d043afcf44779824c398ad73" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The variable 'oldSplash' is copy-constructed from a const reference but is only used as const reference; consider making it a const reference", + "markdown": "The variable 'oldSplash' is copy-constructed from a const reference but is only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1035, + "startColumn": 28, + "charOffset": 31609, + "charLength": 9, + "snippet": { + "text": "oldSplash" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1033, + "startColumn": 1, + "charOffset": 31429, + "charLength": 271, + "snippet": { + "text": "\t\t\t\t// remove old splash if exists\r\n\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\r\n\t\t\t\t\tstd::shared_ptr oldSplash = *it;\r\n\t\t\t\t\tif (!Item::items[oldSplash->getID()].isSplash()) {\r\n\t\t\t\t\t\tcontinue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4d88dc4c67a9d2d9", + "equalIndicator/v1": "7be68d2d7a6352f9587a8e62555e03f38af5d029b635c5b0770b521fe63f3873" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6620, + "startColumn": 29, + "charOffset": 229508, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6618, + "startColumn": 1, + "charOffset": 229401, + "charLength": 274, + "snippet": { + "text": "\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t}\r\n\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r\n\r\n\t\tsecondaryBlockType = target->blockHit(attacker, damage.secondary.type, damage.secondary.value, false, false, field);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b310c0540268ecbf", + "equalIndicator/v1": "7bf8ae23aca31f9414141be0ed46bd078bcaf0198746a3a484b67b929aa62577" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 409, + "startColumn": 7, + "charOffset": 15407, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 407, + "startColumn": 1, + "charOffset": 15235, + "charLength": 311, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInTrade - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "be241a5f0bcf24f1", + "equalIndicator/v1": "7c0932f4eab7d364ff2acd7013c43b2364a4bf51a72ab389f673424a3f77ca5f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'", + "markdown": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 286, + "startColumn": 22, + "charOffset": 8338, + "charLength": 4, + "snippet": { + "text": "what" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 284, + "startColumn": 1, + "charOffset": 8291, + "charLength": 101, + "snippet": { + "text": "\t\tmessage(message) { }\r\n\r\n\tvirtual const char* what() const throw() {\r\n\t\treturn message.c_str();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6ec47a17c1f36474", + "equalIndicator/v1": "7c17e6306473abffc497e4ecc247b8b8d8b71154ca44a37a866aa99b5948a864" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 676, + "startColumn": 37, + "charOffset": 22166, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 674, + "startColumn": 1, + "charOffset": 22104, + "charLength": 134, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 104) * 0.70f) + 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c3b65c649392b52c", + "equalIndicator/v1": "7c17f6f9b6a420d78ba4ce4db9c659dc391da58553bd1c975a798f5fdf1cdb01" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creatureOutfit' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'creatureOutfit' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 423, + "startColumn": 89, + "charOffset": 18364, + "charLength": 14, + "snippet": { + "text": "const Outfit_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 421, + "startColumn": 1, + "charOffset": 18259, + "charLength": 264, + "snippet": { + "text": "\r\n\t// analyzers\r\n\tvoid sendKillTrackerUpdate(std::shared_ptr corpse, const std::string &name, const Outfit_t creatureOutfit);\r\n\tvoid sendUpdateSupplyTracker(std::shared_ptr item);\r\n\tvoid sendUpdateImpactTracker(CombatType_t type, int32_t amount);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "953b377f136bc415", + "equalIndicator/v1": "7c2bef3ac18f489312fe6d8b608fb84f3553c2a58018805e48b1c97a0cbb84b2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2666, + "startColumn": 16, + "charOffset": 79196, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2664, + "startColumn": 1, + "charOffset": 79074, + "charLength": 258, + "snippet": { + "text": "\t\t\t\tauto charges = item->getAttribute(ItemAttribute_t::CHARGES);\r\n\t\t\t\tif (absorbPercent != 0) {\r\n\t\t\t\t\tdamage -= std::round(damage * (absorbPercent / 100.));\r\n\t\t\t\t\tif (charges != 0) {\r\n\t\t\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ff45634785e36062", + "equalIndicator/v1": "7c41e08cbdfc817aae05482cf312a72f3595dfd0dd3d3a2690eb4cd2c9e89575" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::all_of()'", + "markdown": "Replace loop by 'std::ranges::all_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 71, + "startColumn": 2, + "charOffset": 2190, + "charLength": 37, + "snippet": { + "text": "// fire global event if is registered" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 69, + "startColumn": 1, + "charOffset": 2112, + "charLength": 219, + "snippet": { + "text": "\r\nbool CreatureEvents::playerLogout(std::shared_ptr player) const {\r\n\t// fire global event if is registered\r\n\tfor (const auto &it : creatureEvents) {\r\n\t\tif (it.second->getEventType() == CREATURE_EVENT_LOGOUT) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f4c1f0a448a8541e", + "equalIndicator/v1": "7c4f3d0d75750de27382caa2f756280132bc1c121de6ebf5808ac5b98df67df7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 720, + "startColumn": 16, + "charOffset": 21364, + "charLength": 23, + "snippet": { + "text": "Player::getPercentLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 718, + "startColumn": 1, + "charOffset": 21289, + "charLength": 165, + "snippet": { + "text": "\tuint32_t newPercent;\r\n\tif (nextReqTries > currReqTries) {\r\n\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\r\n\t} else {\r\n\t\tnewPercent = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71b1ccbc32f9111a", + "equalIndicator/v1": "7c6d617cc3c2e065f95149eade573cc402e7786339cd7eeca5ef6a6ed19f663c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: mapSectors", + "markdown": "Constructor does not initialize these fields: mapSectors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 82, + "startColumn": 7, + "charOffset": 1742, + "charLength": 8, + "snippet": { + "text": "MapCache" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 80, + "startColumn": 1, + "charOffset": 1718, + "charLength": 77, + "snippet": { + "text": "#pragma pack()\r\n\r\nclass MapCache {\r\npublic:\r\n\tvirtual ~MapCache() = default;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "da47c3683b2746a1", + "equalIndicator/v1": "7c85466ca4fb8c6db30783818d4d82680778134061e3522b0d77a6081fc0c401" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3370, + "startColumn": 65, + "charOffset": 102684, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3368, + "startColumn": 1, + "charOffset": 102615, + "charLength": 140, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureSquare(std::shared_ptr creature, SquareColor_t color) {\r\n\tif (!canSee(creature)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bcc53ae39e756fed", + "equalIndicator/v1": "7ccccb9b221f94a10522b081ceaaf1664635c32952463a98807b50ab93819e7f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'spellName' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'spellName' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 441, + "startColumn": 79, + "charOffset": 13626, + "charLength": 9, + "snippet": { + "text": "spellName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 439, + "startColumn": 1, + "charOffset": 13524, + "charLength": 222, + "snippet": { + "text": "\t\treturn augments;\r\n\t}\r\n\tstd::vector> getAugmentsBySpellName(std::string spellName) const {\r\n\t\tstd::vector> augments;\r\n\t\tfor (auto &augment : items[id].augments) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ae1103e01586fdbc", + "equalIndicator/v1": "7cd500aa66f2ee1eb859ccfc55899c32377af60d85bda76e90867fdf840a8efc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1066, + "startColumn": 66, + "charOffset": 38394, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1064, + "startColumn": 1, + "charOffset": 38324, + "charLength": 172, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnLoseExperience(std::shared_ptr player, uint64_t &exp) {\r\n\t// Player:onLoseExperience(exp)\r\n\tif (info.playerOnLoseExperience == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aa0a3962052f85d2", + "equalIndicator/v1": "7ce246bda1dd52c8f3f83416014e7d1d8b4ca8518bb4c26d75e5546b1718cd82" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'initialTarget' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'initialTarget' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1436, + "startColumn": 249, + "charOffset": 49936, + "charLength": 13, + "snippet": { + "text": "initialTarget" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1434, + "startColumn": 1, + "charOffset": 49683, + "charLength": 364, + "snippet": { + "text": "}\r\n\r\nstd::vector>> Combat::pickChainTargets(std::shared_ptr caster, const CombatParams ¶ms, uint8_t chainDistance, uint8_t maxTargets, bool backtracking, bool aggressive, std::shared_ptr initialTarget /* = nullptr */) {\r\n\tBenchmark bm_pickChain;\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c55f1fc5996fe74c", + "equalIndicator/v1": "7ce580b65a73fbc26c073c2943e7f895f1b702231790899f918d09499ca4e9a8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 487, + "startColumn": 62, + "charOffset": 18389, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 485, + "startColumn": 1, + "charOffset": 18323, + "charLength": 332, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPos, const Position &toPos, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\r\n\tif (!getScriptInterface()) {\r\n\t\tg_logger().error(\"script interface nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "de5601ad12b47871", + "equalIndicator/v1": "7cf8142cfa585fba8b681427fc1a4e720995ea9f36e3ce1ac7d8afc38c459c7a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2714, + "startColumn": 11, + "charOffset": 80659, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2712, + "startColumn": 1, + "charOffset": 80568, + "charLength": 294, + "snippet": { + "text": "\tsize_t getFirstIndex() const override;\r\n\tsize_t getLastIndex() const override;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override;\r\n\tvoid stashContainer(StashContainerList itemDict);\r\n\tItemsTierCountList getInventoryItemsId(bool ignoreStoreInbox = false) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f0d79a03525bbe8e", + "equalIndicator/v1": "7cfd84dee6354e8a02760dc7b5afaff3f48a449fc62f3148bc0e89726925de48" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'combatChangeMana' is within a recursive call chain", + "markdown": "Function 'combatChangeMana' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7627, + "startColumn": 12, + "charOffset": 266751, + "charLength": 16, + "snippet": { + "text": "combatChangeMana" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7625, + "startColumn": 1, + "charOffset": 266735, + "charLength": 247, + "snippet": { + "text": "}\r\n\r\nbool Game::combatChangeMana(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage) {\r\n\tconst Position &targetPos = target->getPosition();\r\n\tauto manaChange = damage.primary.value + damage.secondary.value;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1a323fec81421fa2", + "equalIndicator/v1": "7d15de7297896ec81cf71d99366d08996902ee317882a9a36a373fd3ff91341d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 198, + "startColumn": 15, + "charOffset": 8081, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 196, + "startColumn": 1, + "charOffset": 7991, + "charLength": 354, + "snippet": { + "text": "\tvirtual void removeThing(std::shared_ptr, uint32_t) override { }\r\n\r\n\tvirtual void postAddNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\tvirtual void postRemoveNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3f042b2848f49453", + "equalIndicator/v1": "7d1ab237bcbbcf36b0e4124f28c022d1cbb5151d7780d1198b9e40eca9955842" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6312, + "startColumn": 50, + "charOffset": 185098, + "charLength": 8, + "snippet": { + "text": "vocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6310, + "startColumn": 1, + "charOffset": 184883, + "charLength": 253, + "snippet": { + "text": "\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, vocation->getManaGainTicks());\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f1f6cbce35525ff2", + "equalIndicator/v1": "7d2d8368f5d9d838062a432aa15fd7cbfc5d0d0a3325332f189b4638fa0a8c26" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'charm' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'charm' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 607, + "startColumn": 49, + "charOffset": 30971, + "charLength": 5, + "snippet": { + "text": "charm" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 605, + "startColumn": 1, + "charOffset": 30810, + "charLength": 231, + "snippet": { + "text": "\tvoid playerInspectItem(std::shared_ptr player, uint16_t itemId, uint8_t itemCount, bool cyclopedia);\r\n\r\n\tvoid addCharmRune(const std::shared_ptr charm) {\r\n\t\tCharmList.push_back(charm);\r\n\t\tCharmList.shrink_to_fit();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "052136e094384ca7", + "equalIndicator/v1": "7d726fe7d3dd8a289e0b98e65f80992946cf31d9e57576892d344fd7a9ccf5f7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1152, + "startColumn": 41, + "charOffset": 43806, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1150, + "startColumn": 1, + "charOffset": 43760, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2a190bf0636d763f", + "equalIndicator/v1": "7d952e229e5085088e86654234ad1d77e0f6d1b826d117177a357e60aaf31ecc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3204, + "startColumn": 65, + "charOffset": 98397, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3202, + "startColumn": 1, + "charOffset": 98328, + "charLength": 143, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureOutfit(std::shared_ptr creature, const Outfit_t &outfit) {\r\n\tif (!canSee(creature)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59968cca44bb43bb", + "equalIndicator/v1": "7da7d3007c6ffe94be277b43dd800c0ec1a4636fa5037dbd20fc37235bd22969" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Val', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Val', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/arraylist.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 112, + "startColumn": 22, + "charOffset": 2558, + "charLength": 4, + "snippet": { + "text": "_Val" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 110, + "startColumn": 1, + "charOffset": 2530, + "charLength": 87, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tvoid push_back(T &&_Val) {\r\n\t\t\tbackContainer.push_back(std::move(_Val));\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "610c3cfb270dda32", + "equalIndicator/v1": "7db39134499f7b891870a457ed188c8c0859e4c508d38eb25a0aeca560b7182f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1561, + "startColumn": 56, + "charOffset": 46737, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1559, + "startColumn": 1, + "charOffset": 46677, + "charLength": 105, + "snippet": { + "text": "}\r\n\r\nvoid Player::openImbuementWindow(std::shared_ptr item) {\r\n\tif (!client || !item) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b1381b3de6b089a6", + "equalIndicator/v1": "7dc42d74ed83527165685b75cf1ee6da301c75d621deb9393da09e4c265c380d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 667, + "startColumn": 37, + "charOffset": 21845, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 665, + "startColumn": 1, + "charOffset": 21783, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 45) * 1.55f) + 6;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c8f263725b2c3111", + "equalIndicator/v1": "7dd12342d460ea4281c268e8fdefd18bd413aa933fa497686e2c3b9408931d21" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 306, + "startColumn": 59, + "charOffset": 9604, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 304, + "startColumn": 1, + "charOffset": 9541, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nReturnValue Combat::canDoCombat(std::shared_ptr attacker, std::shared_ptr target, bool aggressive) {\r\n\tif (!aggressive) {\r\n\t\treturn RETURNVALUE_NOERROR;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aa68f39a8ee83b08", + "equalIndicator/v1": "7de9b89fd7258424b178ad0359cde967ccfa0ce80169d4b2a5169732eb1857c5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 212, + "startColumn": 26, + "charOffset": 5939, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 210, + "startColumn": 1, + "charOffset": 5908, + "charLength": 142, + "snippet": { + "text": "\t}\r\n\r\n\tif (getHouseAccessLevel(player) < getHouseAccessLevel(target) || target->hasFlag(PlayerFlags_t::CanEditHouses)) {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "07f83b827d619720", + "equalIndicator/v1": "7def474c75d3a2125f4683b966c7b5626bd676f3f2d527947e812c3dd068745f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3413, + "startColumn": 21, + "charOffset": 102991, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3411, + "startColumn": 1, + "charOffset": 102966, + "charLength": 210, + "snippet": { + "text": "}\r\n\r\nReturnValue Player::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr /*= nullptr*/) {\r\n\tint32_t index = getThingIndex(thing);\r\n\tif (index == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "623a3d6d838119ec", + "equalIndicator/v1": "7df5413f5033a8a486eb424d42d919752c56721f0f8d4bd2b458b261db93daee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 955, + "startColumn": 96, + "charOffset": 34481, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 953, + "startColumn": 1, + "charOffset": 34381, + "charLength": 220, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) {\r\n\t// Player:onTradeRequest(target, item)\r\n\tif (info.playerOnTradeRequest == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "19bf49a6e25e0626", + "equalIndicator/v1": "7e0d0e68c591b13a3b89dca05bf6ee1ff7e350a0efee5ecb5cbb2e9f1a116e0d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 903, + "startColumn": 7, + "charOffset": 32701, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 901, + "startColumn": 1, + "charOffset": 32689, + "charLength": 141, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnReportBug - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b8977965bd8f272a", + "equalIndicator/v1": "7e115e50518cf9b1e1da3e90090ce4c16ff382f77f4a656de7cce42652a39fae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8189, + "startColumn": 56, + "charOffset": 284606, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8187, + "startColumn": 1, + "charOffset": 284546, + "charLength": 98, + "snippet": { + "text": "}\r\n\r\nvoid Game::updatePlayerHelpers(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "27dbcabc74774955", + "equalIndicator/v1": "7e1958aa5df88cb8c140aeb4d2f03e8064b4878e51ae9f57016d860f481ed2c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 122, + "startColumn": 30, + "charOffset": 4197, + "charLength": 13, + "snippet": { + "text": "containerItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 120, + "startColumn": 1, + "charOffset": 4086, + "charLength": 257, + "snippet": { + "text": "\tstd::shared_ptr container = item->getContainer();\r\n\tif (container) {\r\n\t\tfor (std::shared_ptr containerItem : container->getItemList()) {\r\n\t\t\tif (containerItem->getID() == ITEM_LABEL && getReceiver(containerItem, name)) {\r\n\t\t\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5fa1b55644d1604b", + "equalIndicator/v1": "7e34fc852b23eb37776562b44bfdbdf357ab1a0e8339a0ec2d276aee3c20d761" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 563, + "startColumn": 37, + "charOffset": 15118, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 561, + "startColumn": 1, + "charOffset": 15038, + "charLength": 155, + "snippet": { + "text": "\t\tswitch (i) {\r\n\t\t\tcase STAT_MAXHITPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));\r\n\t\t\t\tbreak;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7224b20bc0491b6d", + "equalIndicator/v1": "7e659ed8c4564c9259032a02de113081864ed97937001e1f2f57cd8c07fa9c8d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 575, + "startColumn": 37, + "charOffset": 15537, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 573, + "startColumn": 1, + "charOffset": 15475, + "charLength": 131, + "snippet": { + "text": "\r\n\t\t\tcase STAT_CAPACITY:\r\n\t\t\t\tstats[i] = static_cast(player->getCapacity() * (statsPercent[i] / 100.f));\r\n\t\t\t\tbreak;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7cc89bfc17834eb1", + "equalIndicator/v1": "7e777c97107f9f4ddc245b90a664e88e6b5d6e9a5559c082d75eff4d8b5455f9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 264, + "startColumn": 8, + "charOffset": 6538, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 262, + "startColumn": 1, + "charOffset": 6442, + "charLength": 207, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetArticle(lua_State* L) {\r\n\t// itemType:getArticle()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushString(L, itemType->article);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a21322c13c5b0fde", + "equalIndicator/v1": "7e7aa1fb13123273d3d35917eff78c2ff7a2299c37d8d67b259f08114a4c8748" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'float'", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 185, + "startColumn": 67, + "charOffset": 5267, + "charLength": 10, + "snippet": { + "text": "threadPool" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 183, + "startColumn": 1, + "charOffset": 5151, + "charLength": 283, + "snippet": { + "text": "\t\tlist.reserve(threadPool.get_thread_count());\r\n\r\n\t\tconst auto size_per_block = std::ceil(size / static_cast(threadPool.get_thread_count()));\r\n\t\tfor (uint_fast64_t i = 0; i < size; i += size_per_block) {\r\n\t\t\tlist.emplace_back(i, std::min(size, i + size_per_block));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "66fbb7cd84b6609a", + "equalIndicator/v1": "7ea865ae181f8a9c7b704abfdf90c63a33b4156695e817afc1ee898bd6dcdce9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 848, + "startColumn": 19, + "charOffset": 26164, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 846, + "startColumn": 1, + "charOffset": 26141, + "charLength": 213, + "snippet": { + "text": "}\r\n\r\nReturnValue Tile::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr /*= nullptr */) {\r\n\tint32_t index = getThingIndex(thing);\r\n\tif (index == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d419e29d98947a4d", + "equalIndicator/v1": "7ebae88656307fbf79fa49b1a7a3d37dcf25718a893ee6cee529ac4092d4c99c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 665, + "startColumn": 41, + "charOffset": 25543, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 663, + "startColumn": 1, + "charOffset": 25497, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e15fca064f4070e8", + "equalIndicator/v1": "7f173a70e9c86f626e52e745443ce70458fceb96c5d8c0e11c17fc5f03f17113" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1120, + "startColumn": 52, + "charOffset": 46062, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1118, + "startColumn": 1, + "charOffset": 46006, + "charLength": 263, + "snippet": { + "text": "}\r\n\r\nbool Game::placeCreature(std::shared_ptr creature, const Position &pos, bool extendedPos /*=false*/, bool forced /*= false*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!internalPlaceCreature(creature, pos, extendedPos, forced)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5b61af4ab190d055", + "equalIndicator/v1": "7f521a7c476a143d34d798b47c2e1fe0399af2b77f51931da042120bfeaf073b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'items' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'items' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2527, + "startColumn": 78, + "charOffset": 73325, + "charLength": 5, + "snippet": { + "text": "items" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2525, + "startColumn": 1, + "charOffset": 73242, + "charLength": 159, + "snippet": { + "text": "\t}\r\n\r\n\tvoid sendInventoryImbuements(const std::map> items) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendInventoryImbuements(items);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "56bfd54b40e9d487", + "equalIndicator/v1": "7f686ddef0bfb03fdb6b3dcbcf6409ef871b10dce74916ad1a8e3aff406b9fcb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2532, + "startColumn": 36, + "charOffset": 75621, + "charLength": 8, + "snippet": { + "text": "capacity" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2530, + "startColumn": 1, + "charOffset": 75434, + "charLength": 312, + "snippet": { + "text": "\t\t\thealthMax = std::max(0, healthMax - noneVocation->getHPGain());\r\n\t\t\tmanaMax = std::max(0, manaMax - noneVocation->getManaGain());\r\n\t\t\tcapacity = std::max(0, capacity - noneVocation->getCapGain());\r\n\t\t} else {\r\n\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d5dfc1f568804c8d", + "equalIndicator/v1": "7f8a5e270b2efbffb4b3c960d6ca5467af602d8e977f2200bf1ac7a30a1f1837" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 719, + "startColumn": 16, + "charOffset": 34169, + "charLength": 10, + "snippet": { + "text": "combatType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 717, + "startColumn": 1, + "charOffset": 33974, + "charLength": 286, + "snippet": { + "text": "void ItemParse::parseField(const std::string &tmpStrValue, pugi::xml_node attributeNode, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\tif (tmpStrValue == \"field\") {\r\n\t\tCombatType_t combatType = COMBAT_NONE;\r\n\t\tstd::shared_ptr conditionDamage = nullptr;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0baff317600b1beb", + "equalIndicator/v1": "7fa81a995d8e71939e8d5627c37d9d51112ef9c50f2553f02f75f698860a4811" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 29, + "charOffset": 2695, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2528, + "charLength": 224, + "snippet": { + "text": "std::shared_ptr Container::clone() const {\r\n\tstd::shared_ptr clone = std::static_pointer_cast(Item::clone());\r\n\tfor (std::shared_ptr item : itemlist) {\r\n\t\tclone->addItem(item->clone());\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aed0abbffcaebb80", + "equalIndicator/v1": "7fd05d16b0bf8edd43a7dc966648998f0406ecf1bcf939984b7dd45752992cc3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6031, + "startColumn": 72, + "charOffset": 177283, + "charLength": 11, + "snippet": { + "text": "nextReqMana" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6029, + "startColumn": 1, + "charOffset": 177110, + "charLength": 218, + "snippet": { + "text": "\t\tif (nextReqMana > currReqMana) {\r\n\t\t\tnewPercent = Player::getPercentLevel(manaSpent, nextReqMana);\r\n\t\t\tnewPercentToNextLevel = static_cast(manaSpent * 100) / nextReqMana;\r\n\t\t} else {\r\n\t\t\tnewPercent = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "feab87d4eeaf701b", + "equalIndicator/v1": "7fd791ec0dca3eef1f3677b60e5c83afdf24449e87bc416e92cd39fcb65ead24" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3143, + "startColumn": 35, + "charOffset": 110561, + "charLength": 5, + "snippet": { + "text": "skill" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3141, + "startColumn": 1, + "charOffset": 110521, + "charLength": 281, + "snippet": { + "text": "\t}\r\n\r\n\tfloat mitigation = std::ceil(((((skill * m_player.vocation->mitigationFactor) + (shieldFactor * (float)defenseValue)) / 100.0f) * fightFactor * distanceFactor) * 100.0f) / 100.0f;\r\n\tmitigation += (mitigation * (float)getMitigationMultiplier()) / 100.f;\r\n\treturn mitigation;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef315b88092006ff", + "equalIndicator/v1": "7fdb3814cb896892fc7d39b91e858d065ad879fd775fbd76bf6278d146ba1cf4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1415, + "startColumn": 49, + "charOffset": 41623, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1413, + "startColumn": 1, + "charOffset": 41570, + "charLength": 114, + "snippet": { + "text": "}\r\n\r\nvoid Player::setWriteItem(std::shared_ptr item, uint16_t maxWriteLength /*= 0*/) {\r\n\twindowTextId++;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "36d9ad3c561c3d75", + "equalIndicator/v1": "7fdb85882d981f8334353739064f5b560b0d84aa3912c8b934029809dc05b7b0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'canFollowMaster' can be made const", + "markdown": "Method 'canFollowMaster' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1112, + "startColumn": 16, + "charOffset": 34882, + "charLength": 15, + "snippet": { + "text": "canFollowMaster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1110, + "startColumn": 1, + "charOffset": 34862, + "charLength": 86, + "snippet": { + "text": "}\r\n\r\nbool Creature::canFollowMaster() {\r\n\tauto master = getMaster();\r\n\tif (!master) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "348ea50ad869364d", + "equalIndicator/v1": "7fe742821577182a37bfc055cc3345f22482042c10c7948614cafcba715a8aee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'newGuild' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'newGuild' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6277, + "startColumn": 52, + "charOffset": 184204, + "charLength": 8, + "snippet": { + "text": "newGuild" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6275, + "startColumn": 1, + "charOffset": 184148, + "charLength": 106, + "snippet": { + "text": "}\r\n\r\nvoid Player::setGuild(const std::shared_ptr newGuild) {\r\n\tif (newGuild == guild) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "31ac441d2a073ae0", + "equalIndicator/v1": "7ff236245274926d4e7ff4a62020640275bea80281d16345d0c35148f46b0346" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 520, + "startColumn": 13, + "charOffset": 15031, + "charLength": 7, + "snippet": { + "text": "toCheck" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 518, + "startColumn": 1, + "charOffset": 14996, + "charLength": 106, + "snippet": { + "text": "\r\n\t\tbool ret = false;\r\n\t\tfor (auto toCheck : *items) {\r\n\t\t\tif (toCheck->isCleanable()) {\r\n\t\t\t\tret = true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a34ea0fd1d05ac3b", + "equalIndicator/v1": "7ff443f579b9e53757aa9e1d44cc58235b0a48a76d3500456050aca520e425b6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 151, + "startColumn": 63, + "charOffset": 4735, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 149, + "startColumn": 1, + "charOffset": 4668, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerFirst(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59846e03779f5c14", + "equalIndicator/v1": "7ff61540c8025ad97e4a75d3dafda81d8d03555c80edb02a3693b1348444323a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newMaster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newMaster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1320, + "startColumn": 52, + "charOffset": 40572, + "charLength": 9, + "snippet": { + "text": "newMaster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1318, + "startColumn": 1, + "charOffset": 40516, + "charLength": 209, + "snippet": { + "text": "}\r\n\r\nbool Creature::setMaster(std::shared_ptr newMaster, bool reloadCreature /* = false*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\t// Persists if this creature has ever been a summon\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "714336dcfa2ebef5", + "equalIndicator/v1": "80111d7b39a5150c78339526422428fdf841afc1648ac684163bcaa56e15e812" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 139, + "startColumn": 63, + "charOffset": 4662, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 137, + "startColumn": 1, + "charOffset": 4594, + "charLength": 204, + "snippet": { + "text": "\t}\r\n\r\n\tbool playerCanUseItemWithOnHouseTile(std::shared_ptr player, std::shared_ptr item, const Position &toPos, int toStackPos, int toItemId) {\r\n\t\tif (!player || !item) {\r\n\t\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6c2e4f818600cad", + "equalIndicator/v1": "802cf30c68c306ca053a51bda7619f2ac5e810e4d214a74c2f669e5145e15b1b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 531, + "startColumn": 41, + "charOffset": 20271, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 529, + "startColumn": 1, + "charOffset": 20225, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "da47117c1debc51b", + "equalIndicator/v1": "809949f7d3bccb85c8ce757c88c4fdf78a3661a2ca677b2e253d6bf68effd1f0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 43, + "startColumn": 14, + "charOffset": 1445, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 41, + "startColumn": 1, + "charOffset": 1125, + "charLength": 614, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b8f9b4c15da1abc", + "equalIndicator/v1": "80b2a9427d317045565e28d112943a7305c23b9032668d99f1a5a129f6f4dda9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 358, + "startColumn": 106, + "charOffset": 17228, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 356, + "startColumn": 1, + "charOffset": 16899, + "charLength": 594, + "snippet": { + "text": "\tvoid playerRotateItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerConfigureShowOffSocket(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t podiumVisible, uint8_t direction);\r\n\tvoid playerWrapableItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerWriteItem(uint32_t playerId, uint32_t windowTextId, const std::string &text);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "11d270c84c19d271", + "equalIndicator/v1": "80d140c13e3159c1bbf5f16b3d2b0954b9a53b4cc17da19821068f260205a028" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'msg' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'msg' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 51, + "startColumn": 30, + "charOffset": 1487, + "charLength": 3, + "snippet": { + "text": "msg" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 49, + "startColumn": 1, + "charOffset": 1452, + "charLength": 122, + "snippet": { + "text": "\t}\r\n\r\n\tvoid send(OutputMessage_ptr msg) const {\r\n\t\tif (auto connection = getConnection();\r\n\t\t connection != nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "be99042248814e19", + "equalIndicator/v1": "80dcf03a5c5c52f23305417db99ce428fb7aebbbdd2c950b993b3fd5d5e170cb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 255, + "startColumn": 14, + "charOffset": 6638, + "charLength": 14, + "snippet": { + "text": "vocationString" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 253, + "startColumn": 1, + "charOffset": 6559, + "charLength": 221, + "snippet": { + "text": "\tbool wieldUnproperly = false;\r\n\tbool m_isDisabledChain = false;\r\n\tstd::string vocationString = \"\";\r\n\r\n\tvoid onUsedWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr destTile) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6acba5fb110e4f5", + "equalIndicator/v1": "80eaf4ed8618affdc23151454afa9a157bb256c8f6c000d59aead7f77eb36bc3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7402, + "startColumn": 28, + "charOffset": 257686, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7400, + "startColumn": 1, + "charOffset": 257631, + "charLength": 311, + "snippet": { + "text": "\r\nvoid Game::sendMessages(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\r\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9b12ee8a2a48c9b7", + "equalIndicator/v1": "80ff2db85e0893d5d0818ca2ba4e4d6c5b7b2b36b349508a8b0449ebc36377ae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 31, + "startColumn": 22, + "charOffset": 1108, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 29, + "startColumn": 1, + "charOffset": 1082, + "charLength": 171, + "snippet": { + "text": "}\r\n\r\nReturnValue Mailbox::queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr /*= nullptr */) {\r\n\treturn RETURNVALUE_NOTPOSSIBLE;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "866a095aa6e97cf8", + "equalIndicator/v1": "8123233efc6ed3c37374c3da4460ff03ceef0d32e6178fdff42f095fdbc506aa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 678, + "startColumn": 7, + "charOffset": 24158, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 676, + "startColumn": 1, + "charOffset": 24146, + "charLength": 154, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnLookInShop - \"\r\n\t\t \"Player {} itemType {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb3a257bdc6ecde5", + "equalIndicator/v1": "81240401f0e6c2634eed13714554a3199931768a7312cd974d7912e2e576e897" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 609, + "startColumn": 64, + "charOffset": 16432, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 607, + "startColumn": 1, + "charOffset": 16364, + "charLength": 113, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updateSkills(std::shared_ptr player) {\r\n\tbool needUpdateSkills = false;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "143759e3d7125d4e", + "equalIndicator/v1": "813355645ae9554c1a77dde72c402cc039dcb5f13b300e07004d0a92129ec853" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1248, + "startColumn": 97, + "charOffset": 44507, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1246, + "startColumn": 1, + "charOffset": 44406, + "charLength": 228, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip) {\r\n\t// Player:onInventoryUpdate(item, slot, equip)\r\n\tif (info.playerOnInventoryUpdate == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "48ed36bb640a9637", + "equalIndicator/v1": "815722908dcdeac1a44b34ad31c96a15b89c952d7dd045eba04fb7e277b27012" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 569, + "startColumn": 53, + "charOffset": 17122, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 567, + "startColumn": 1, + "charOffset": 17022, + "charLength": 140, + "snippet": { + "text": "\r\n\t\t\tif (it.abilities->getHealthGain() != 0) {\r\n\t\t\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, it.abilities->getHealthGain());\r\n\t\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29f9fdae2bbda93e", + "equalIndicator/v1": "815bab9a368ddede35aca29bcb2e538a2c4537ef7212b6b0613e98d8c1db11a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1071, + "startColumn": 41, + "charOffset": 40794, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1069, + "startColumn": 1, + "charOffset": 40748, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "248d02cd87a3f5e6", + "equalIndicator/v1": "81770f69559da9777dc7c6a6a90e572811e63a688b7203ae67c1b43d3cc87de9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 603, + "startColumn": 7, + "charOffset": 23212, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 601, + "startColumn": 1, + "charOffset": 22982, + "charLength": 377, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnReportRuleViolation(std::shared_ptr player, const std::string &targetName, uint8_t reportType, uint8_t reportReason, const std::string &comment, const std::string &translation) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnReportRuleViolation - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dbd1e4fa7ce9bf0a", + "equalIndicator/v1": "81964ef979200fbc4fa8940a9c274f3ec55b23907bd2d4a9f8d803888de6643b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 38, + "startColumn": 18, + "charOffset": 1218, + "charLength": 12, + "snippet": { + "text": "ValueWrapper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 36, + "startColumn": 1, + "charOffset": 1036, + "charLength": 369, + "snippet": { + "text": "\texplicit(false) ValueWrapper(const ValueVariant &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const std::string &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(bool value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(int value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(double value, uint64_t timestamp = 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c37009ce43adce02", + "equalIndicator/v1": "81a69b9347869a81170c51ed509122ecc3e501f6333222e64b2d676d99aaaf3e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 213, + "startColumn": 6, + "charOffset": 7681, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 211, + "startColumn": 1, + "charOffset": 7637, + "charLength": 187, + "snippet": { + "text": "\tlua_pushnumber(L, colorSecondary);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 8, 6) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7885d9bb6a560f1c", + "equalIndicator/v1": "81ed899311ac1c6508fcebe738b2b8f6d6a4170e978b82e1973e2147919d9bd0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Switch has 2 consecutive identical branches", + "markdown": "Switch has 2 consecutive identical branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 187, + "startColumn": 3, + "charOffset": 6799, + "charLength": 4, + "snippet": { + "text": "case" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 185, + "startColumn": 1, + "charOffset": 6732, + "charLength": 157, + "snippet": { + "text": "\t\tcase COMBAT_MANADRAIN:\r\n\t\t\treturn CIPBIA_ELEMENTAL_MANADRAIN;\r\n\t\tcase COMBAT_AGONYDAMAGE:\r\n\t\t\treturn CIPBIA_ELEMENTAL_AGONY;\r\n\t\tcase COMBAT_NEUTRALDAMAGE:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb5de1520b195047", + "equalIndicator/v1": "81fb2c50a23e7c92ecb2283d39b235f82ab76ab18d9dec6ae45a3b6213348034" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?", + "markdown": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2465, + "startColumn": 7, + "charOffset": 68890, + "charLength": 25, + "snippet": { + "text": "Condition::startCondition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2463, + "startColumn": 1, + "charOffset": 68799, + "charLength": 151, + "snippet": { + "text": "\r\nbool ConditionSpellCooldown::startCondition(std::shared_ptr creature) {\r\n\tif (!Condition::startCondition(creature)) {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "061448583c72b8bf", + "equalIndicator/v1": "8213505e894001718a053fbce4df889b3fa5bfdbfe147b2a90ae2fb2f2094bdc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: category", + "markdown": "Constructor does not initialize these fields: category" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1362, + "startColumn": 8, + "charOffset": 35684, + "charLength": 12, + "snippet": { + "text": "CreatureIcon" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1360, + "startColumn": 1, + "charOffset": 35671, + "charLength": 58, + "snippet": { + "text": "};\r\n\r\nstruct CreatureIcon {\r\n\tCreatureIcon() = default;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eede2ccf0ab4c9c0", + "equalIndicator/v1": "8230457ec29670c8bb5122e36c50652d21fc222187344e148f5e225519280fb9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 54, + "startColumn": 7, + "charOffset": 2122, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 52, + "startColumn": 1, + "charOffset": 2039, + "charLength": 387, + "snippet": { + "text": "\tvoid removeThing(std::shared_ptr thing, uint32_t count) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ea01fb01d8562800", + "equalIndicator/v1": "823332fcdbf3be3bbfb6da2f2ed5d64570f52a17eba4c955b1f17d34b2e0c127" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 158, + "startColumn": 12, + "charOffset": 4195, + "charLength": 7, + "snippet": { + "text": "uint8_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 156, + "startColumn": 1, + "charOffset": 4084, + "charLength": 244, + "snippet": { + "text": "// Merge only async thread events with main dispatch events\r\nvoid Dispatcher::mergeAsyncEvents() {\r\n\tconstexpr uint8_t start = static_cast(TaskGroup::GenericParallel);\r\n\tconstexpr uint8_t end = static_cast(TaskGroup::Last);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4329df7f9ea01aa0", + "equalIndicator/v1": "825c960ce11bc1801e71635bbfc968a4339df613c15941b6ba0ea6a50786752e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6914, + "startColumn": 29, + "charOffset": 240023, + "charLength": 36, + "snippet": { + "text": "(damage.primary.value * damageBonus)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6912, + "startColumn": 1, + "charOffset": 239884, + "charLength": 268, + "snippet": { + "text": "\t\t\tint32_t damageBonus = attackerPlayer->wheel()->checkExecutionersThrow(target);\r\n\t\t\tif (damageBonus != 0) {\r\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\r\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "66a1f2b2fd18f2cb", + "equalIndicator/v1": "8273ade1b8fd115145076bd80318b197d1372cc6beedc346997fcf583f6a87fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/events_callbacks.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 12, + "charOffset": 1363, + "charLength": 8, + "snippet": { + "text": "callback" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1179, + "charLength": 265, + "snippet": { + "text": "std::vector> EventsCallbacks::getCallbacksByType(EventCallback_t type) const {\r\n\tstd::vector> eventCallbacks;\r\n\tfor (auto callback : getCallbacks()) {\r\n\t\tif (callback->getType() != type) {\r\n\t\t\tcontinue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4a8a70c1681e8a9b", + "equalIndicator/v1": "828f8e4b34c22669f505280b7fc33d53d5d92d0a044c31688dee5ac5e14e027a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'float'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1047, + "startColumn": 145, + "charOffset": 30503, + "charLength": 13, + "snippet": { + "text": "(end - start)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1045, + "startColumn": 1, + "charOffset": 30326, + "charLength": 223, + "snippet": { + "text": "\r\n\tuint64_t end = OTSYS_TIME();\r\n\tg_logger().info(\"CLEAN: Removed {} item{} from {} tile{} in {} seconds\", count, (count != 1 ? \"s\" : \"\"), qntTiles, (qntTiles != 1 ? \"s\" : \"\"), (end - start) / (1000.f));\r\n\treturn count;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62aa7d09a1b66d55", + "equalIndicator/v1": "82a6a3bd7f9ef71d5a8ec63b87e90bfaf318db44183ddff04feefa3884fd0c69" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: type", + "markdown": "Constructor does not initialize these fields: type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 53, + "startColumn": 7, + "charOffset": 1481, + "charLength": 14, + "snippet": { + "text": "TargetCallback" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 51, + "startColumn": 1, + "charOffset": 1469, + "charLength": 161, + "snippet": { + "text": "};\r\n\r\nclass TargetCallback final : public CallBack {\r\npublic:\r\n\tvoid onTargetCombat(std::shared_ptr creature, std::shared_ptr target) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5523d4a454555970", + "equalIndicator/v1": "82bf27ed558062b50234254f71eb84bfc3d5e5030e5341650c63683102963123" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 82, + "startColumn": 46, + "charOffset": 2315, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 80, + "startColumn": 1, + "charOffset": 2265, + "charLength": 152, + "snippet": { + "text": "}\r\n\r\nbool BedItem::canUse(std::shared_ptr player) {\r\n\tif ((player == nullptr) || (house == nullptr) || !player->isPremium()) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "485a3681112c8b2e", + "equalIndicator/v1": "82cfde0bcbdc716e6efa04686d99d0513804f605d61bfddb3dc02e2687d42317" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7736, + "startColumn": 22, + "charOffset": 242866, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7734, + "startColumn": 1, + "charOffset": 242738, + "charLength": 176, + "snippet": { + "text": "\t\t\tmsg.add(player->getBaseSkill(skill));\r\n\t\t\tmsg.add(player->getLoyaltySkill(skill));\r\n\t\t\tmsg.add(player->getSkillPercent(skill) * 100);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab42adf619831db0", + "equalIndicator/v1": "82e00db84037d20e42b1b7f7fb6707e1f2fedc2ec8223454424f9e2b4c504adc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 638, + "startColumn": 126, + "charOffset": 22776, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 636, + "startColumn": 1, + "charOffset": 22646, + "charLength": 306, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) {\r\n\t// Player:onLookInTrade(partner, item, distance) or Player.onLookInTrade(self, partner, item, distance)\r\n\tif (info.playerOnLookInTrade == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e9729f44ae017822", + "equalIndicator/v1": "8320df8500aef70238228eded681fa9987b198cc00a3722bfaee5e9ac7102968" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 575, + "startColumn": 66, + "charOffset": 21894, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 573, + "startColumn": 1, + "charOffset": 21824, + "charLength": 293, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnMoveCreature - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0bdc976aa8a83eae", + "equalIndicator/v1": "832c608098ea0255c7abc3b7164c76a478ef37658a589bc0e1a4f9c0f918b8ee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1200, + "startColumn": 7, + "charOffset": 42814, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1198, + "startColumn": 1, + "charOffset": 42802, + "charLength": 147, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnRequestQuestLog - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "43759119ee5b0ead", + "equalIndicator/v1": "833842659f6d6c17fb3af038c7a7a2e1fd3f775786a614b01aa21a0d3108f90c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 141, + "startColumn": 22, + "charOffset": 3871, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 139, + "startColumn": 1, + "charOffset": 3818, + "charLength": 506, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tvirtual ReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e9421f4031cf4086", + "equalIndicator/v1": "834a8588687b46040c8ea4c119ee0c42ab4e1084a367e29f75591cc71280d6ca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 498, + "startColumn": 20, + "charOffset": 11721, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 496, + "startColumn": 1, + "charOffset": 11696, + "charLength": 67, + "snippet": { + "text": "\t}\r\n\r\n\tlua_pushnumber(L, tile->getCreatureCount());\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0917524b8e113c67", + "equalIndicator/v1": "835fed54a7e971aad6cde3f69d0717146aae78a3918a1e5da705fc7bb76a8c78" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3574, + "startColumn": 45, + "charOffset": 110314, + "charLength": 27, + "snippet": { + "text": "Weapons::getMaxWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3572, + "startColumn": 1, + "charOffset": 110153, + "charLength": 604, + "snippet": { + "text": "\t\t\tint32_t attackSkill = player->getSkillLevel(SKILL_DISTANCE);\r\n\t\t\tfloat attackFactor = player->getAttackFactor();\r\n\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->distDamageMultiplier);\r\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\r\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue - weapon->getAttack() + it.abilities->elementDamage, attackFactor, true) * player->getVocation()->distDamageMultiplier);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5a60e15866fc382d", + "equalIndicator/v1": "8364b096eb3eb3528bfcea3b16038f765ee1b6c217b088d083f5f65857eb415f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6866, + "startColumn": 26, + "charOffset": 237949, + "charLength": 49, + "snippet": { + "text": "(damage.primary.value * damage.healingMultiplier)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6864, + "startColumn": 1, + "charOffset": 237751, + "charLength": 282, + "snippet": { + "text": "// Wheel of destiny combat helpers\r\nvoid Game::applyWheelOfDestinyHealing(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) {\r\n\tdamage.primary.value += (damage.primary.value * damage.healingMultiplier) / 100.;\r\n\r\n\tif (attackerPlayer) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "94fbf54d5f6ec097", + "equalIndicator/v1": "8367dcfd8141373da8e051755da25a53179c777923ed8309c8e00c32ad77c843" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 719, + "startColumn": 26, + "charOffset": 33476, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 717, + "startColumn": 1, + "charOffset": 33265, + "charLength": 369, + "snippet": { + "text": "// SLOT_PURPLE_TOP_75 = 23\r\nvoid IOWheel::slotPurpleTop75(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\tauto pointsInSlot = isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_PURPLE_TOP_75);\r\n\tif (isKnight(vocationCipId)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8a6e7be58d521cd3", + "equalIndicator/v1": "8375a2e38fe685e52b8b0c0b3554762509f4efb283344b83a8b54abd3df87462" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8968, + "startColumn": 46, + "charOffset": 313495, + "charLength": 5, + "snippet": { + "text": "offer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8966, + "startColumn": 1, + "charOffset": 313328, + "charLength": 369, + "snippet": { + "text": "\tif (offer.type == MARKETACTION_BUY) {\r\n\t\tplayer->setBankBalance(player->getBankBalance() + offer.price * offer.amount);\r\n\t\tg_metrics().addCounter(\"balance_decrease\", offer.price * offer.amount, { { \"player\", player->getName() }, { \"context\", \"market_purchase\" } });\r\n\t\t// Send market window again for update stats\r\n\t\tplayer->sendMarketEnter(player->getLastDepotId());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b8f274a553b2d95e", + "equalIndicator/v1": "83a2f6f66884beeb6065f28b1ed5f3d3751dac13872218e93b5660ebcb9524b7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 132, + "startColumn": 8, + "charOffset": 3369, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 130, + "startColumn": 1, + "charOffset": 3273, + "charLength": 213, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsWritable(lua_State* L) {\r\n\t// itemType:isWritable()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->canWriteText);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fecbfee0a7344972", + "equalIndicator/v1": "83b6083a60415fcb315fecf453596e92afb772f2c60601f46b6dc06c22871433" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getForgeItemFromId' can be made const", + "markdown": "Method 'getForgeItemFromId' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4142, + "startColumn": 31, + "charOffset": 124790, + "charLength": 18, + "snippet": { + "text": "getForgeItemFromId" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4140, + "startColumn": 1, + "charOffset": 124755, + "charLength": 168, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Player::getForgeItemFromId(uint16_t itemId, uint8_t tier) {\r\n\tfor (auto item : getAllInventoryItems(true)) {\r\n\t\tif (item->hasImbuements()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f10a7c788cb2f725", + "equalIndicator/v1": "83c7898f903cf5ddb28345d322a78c74af1fe05c4b35ab4e67f77aa328cd66e3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 897, + "startColumn": 69, + "charOffset": 34228, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 895, + "startColumn": 1, + "charOffset": 34155, + "charLength": 205, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnRequestQuestLog(std::shared_ptr player) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnRequestQuestLog - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d60cae31049fa3be", + "equalIndicator/v1": "83cd4d677e1bdc61787c1b9b70c91dce7cf7eff5c4feacb0cf5885bf6770f746" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2787, + "startColumn": 3, + "charOffset": 85256, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2785, + "startColumn": 1, + "charOffset": 85210, + "charLength": 177, + "snippet": { + "text": "\t\tplayer->sendTeamFinderList();\r\n\t} else {\r\n\t\tuint32_t leaderID = msg.get();\r\n\t\tstd::shared_ptr leader = g_game().getPlayerByGUID(leaderID);\r\n\t\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "571c3eb07fc3bc95", + "equalIndicator/v1": "83da22252258ca33488a665ca7df51a295b12a0fed9dd2f9c4eac58e014bc390" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 732, + "startColumn": 13, + "charOffset": 23736, + "charLength": 12, + "snippet": { + "text": "maxHitChance" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 730, + "startColumn": 1, + "charOffset": 23706, + "charLength": 60, + "snippet": { + "text": "\t\t\t}\r\n\t\t} else {\r\n\t\t\tchance = maxHitChance;\r\n\t\t}\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b30f1afa43c9cba", + "equalIndicator/v1": "83e67846b7fc0ae6764972a3190bcb1d6bd70ebbc596cb92456b6ef82a95e145" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 945, + "startColumn": 23, + "charOffset": 30616, + "charLength": 8, + "snippet": { + "text": "blockHit" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 943, + "startColumn": 1, + "charOffset": 30589, + "charLength": 247, + "snippet": { + "text": "}\r\n\r\nBlockType_t Creature::blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense /* = false */, bool checkArmor /* = false */, bool /* field = false */) {\r\n\tBlockType_t blockType = BLOCK_NONE;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "280b03377f315c8a", + "equalIndicator/v1": "841d7b4a47b17ebb571f2d63b0d440a2d8a63a4ff994d271fd39f806b76dafe0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1369, + "startColumn": 55, + "charOffset": 46906, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1367, + "startColumn": 1, + "charOffset": 46847, + "charLength": 298, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatDispel(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster && target)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3f43a94fcc471f43", + "equalIndicator/v1": "8430d27dbeb524e928545475dd30cdd62a4403ee4787a619dd7ac6a4dd937ad7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 769, + "startColumn": 11, + "charOffset": 22395, + "charLength": 7, + "snippet": { + "text": "manaMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 767, + "startColumn": 1, + "charOffset": 22335, + "charLength": 127, + "snippet": { + "text": "\t\t\treturn healthMax;\r\n\t\tcase STAT_MAXMANAPOINTS:\r\n\t\t\treturn manaMax;\r\n\t\tcase STAT_MAGICPOINTS:\r\n\t\t\treturn getBaseMagicLevel();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e43530ae45a004ac", + "equalIndicator/v1": "84582db627bd4324bb7196e04e179996dae1dfe9bb42c048ff18e86e4fcd1c8a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 293, + "startColumn": 75, + "charOffset": 10519, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 291, + "startColumn": 1, + "charOffset": 10440, + "charLength": 246, + "snippet": { + "text": "}\r\n\r\nReturnValue Events::eventCreatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) {\r\n\t// Creature:onTargetCombat(target) or Creature.onTargetCombat(self, target)\r\n\tif (info.creatureOnTargetCombat == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8542ef0daec09de0", + "equalIndicator/v1": "846ab527628f1f0788ef9ee1d87967badb91b085856ba16a484b8340a3ac5c7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1076, + "startColumn": 83, + "charOffset": 35126, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1074, + "startColumn": 1, + "charOffset": 35039, + "charLength": 214, + "snippet": { + "text": "}\r\n\r\nbool Combat::doCombat(std::shared_ptr caster, std::shared_ptr target) const {\r\n\tif (caster != nullptr && params.chainCallback) {\r\n\t\treturn doCombatChain(caster, target, params.aggressive);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9b0478bb40a9ba8c", + "equalIndicator/v1": "848b4a84f4453dd07e3ace653986eb66b5587dd37f4f7e7af73ed1225d233ac4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 670, + "startColumn": 2, + "charOffset": 18228, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 668, + "startColumn": 1, + "charOffset": 18077, + "charLength": 306, + "snippet": { + "text": "\tConditionType_t conditionType = getNumber(L, 2);\r\n\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\r\n\tuint32_t subId = getNumber(L, 4, 0);\r\n\r\n\tconst std::shared_ptr condition = creature->getCondition(conditionType, conditionId, subId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1f83e388b04628ed", + "equalIndicator/v1": "848f1eb27fe15ffcc3858f6aff8749d7a6bb90c1b626e170a70246ad3fff1ab7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 719, + "startColumn": 15, + "charOffset": 23356, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 717, + "startColumn": 1, + "charOffset": 23316, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 65) * 1.50f) + 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d0708affa6aa96d", + "equalIndicator/v1": "84a014af1aa77cdf8971b86783b6cb58756445fa2f395e78bf008e131bca829a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3142, + "startColumn": 2, + "charOffset": 96331, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3140, + "startColumn": 1, + "charOffset": 96262, + "charLength": 172, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseModalWindowAnswer(NetworkMessage &msg) {\r\n\tuint32_t id = msg.get();\r\n\tuint8_t button = msg.getByte();\r\n\tuint8_t choice = msg.getByte();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ec2847515bd92797", + "equalIndicator/v1": "84b34c61ecf4ece2929f454b2143ed8dfbd17fc637ca041da6fc4adcb3b62142" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", + "markdown": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 35, + "charOffset": 722, + "charLength": 9, + "snippet": { + "text": "std::atoi" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 613, + "charLength": 317, + "snippet": { + "text": "\r\nuint8_t IOMarket::getTierFromDatabaseTable(const std::string &string) {\r\n\tauto tier = static_cast(std::atoi(string.c_str()));\r\n\tif (tier > g_configManager().getNumber(FORGE_MAX_ITEM_TIER, __FUNCTION__)) {\r\n\t\tg_logger().error(\"{} - Failed to get number value {} for tier table result\", __FUNCTION__, tier);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ca93225499e1390a", + "equalIndicator/v1": "84b6ebd4c7a9dca6d62216448ae51d6f02e704dcd8d98ab8bc5c91bc4b16df51" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5775, + "startColumn": 46, + "charOffset": 170628, + "charLength": 8, + "snippet": { + "text": "std::max" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5773, + "startColumn": 1, + "charOffset": 170501, + "charLength": 287, + "snippet": { + "text": "\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\r\n\t\t}\r\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "df07f981822657bf", + "equalIndicator/v1": "84b7aae92bdadc5fe89ee106f2f5c66669aeba97c5b56970dcc33ea17ee3670b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6895, + "startColumn": 27, + "charOffset": 239111, + "charLength": 50, + "snippet": { + "text": "(damage.primary.value * (damage.damageMultiplier))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6893, + "startColumn": 1, + "charOffset": 239046, + "charLength": 218, + "snippet": { + "text": "\r\n\tif (damage.damageMultiplier > 0) {\r\n\t\tdamage.primary.value += (damage.primary.value * (damage.damageMultiplier)) / 100.;\r\n\t\tdamage.secondary.value += (damage.secondary.value * (damage.damageMultiplier)) / 100.;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cafe6d66966b4d3a", + "equalIndicator/v1": "84c863489bdfa19e8472483c88b204c35a0a339ea34152a828cb9149569499d5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 187, + "startColumn": 8, + "charOffset": 4737, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 185, + "startColumn": 1, + "charOffset": 4637, + "charLength": 219, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsPickupable(lua_State* L) {\r\n\t// itemType:isPickupable()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isPickupable());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ff70e9478cf884d6", + "equalIndicator/v1": "84ca960e8ead10ea90d5993a83ae1bf31528729765d683da7846b6cf5c1d08c3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 117, + "startColumn": 24, + "charOffset": 3961, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 115, + "startColumn": 1, + "charOffset": 3933, + "charLength": 222, + "snippet": { + "text": "}\r\n\r\nReturnValue HouseTile::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor /*= nullptr*/) {\r\n\tstd::shared_ptr item = thing->getItem();\r\n\tif (!item) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fdd3cd057c041b2c", + "equalIndicator/v1": "84ce4b8b6ac1aab1c6194680981053d2c786939499522f6fb969421f212fde6b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'inbox' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'inbox' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 45, + "startColumn": 54, + "charOffset": 1623, + "charLength": 5, + "snippet": { + "text": "inbox" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 43, + "startColumn": 1, + "charOffset": 1565, + "charLength": 163, + "snippet": { + "text": "}\r\n\r\nvoid DepotLocker::removeInbox(std::shared_ptr inbox) {\r\n\tauto cit = std::find(itemlist.begin(), itemlist.end(), inbox);\r\n\tif (cit == itemlist.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e2afd0277c5af2e9", + "equalIndicator/v1": "84d68e88d976137349fbe50e84bf8533482d406a6161cfb395b0eb2e55a34f65" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 336, + "startColumn": 60, + "charOffset": 12022, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 334, + "startColumn": 1, + "charOffset": 11958, + "charLength": 234, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventCreatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) {\r\n\t// Creature:onHear(speaker, words, type)\r\n\tif (info.creatureOnHear == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1fbc564e15a9f5ae", + "equalIndicator/v1": "852e17aea5fa9fe81b482949c618434af414628f405122244e463f507a1826fc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 449, + "startColumn": 76, + "charOffset": 12522, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 447, + "startColumn": 1, + "charOffset": 12442, + "charLength": 151, + "snippet": { + "text": "}\r\n\r\nvoid Party::shareExperience(uint64_t experience, std::shared_ptr target /* = nullptr*/) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1a403ea4a6eb0db7", + "equalIndicator/v1": "85350433829775e600b3e727f467bd89bf02830fccb032127262b41da965951c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7627, + "startColumn": 55, + "charOffset": 266794, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7625, + "startColumn": 1, + "charOffset": 266735, + "charLength": 247, + "snippet": { + "text": "}\r\n\r\nbool Game::combatChangeMana(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage) {\r\n\tconst Position &targetPos = target->getPosition();\r\n\tauto manaChange = damage.primary.value + damage.secondary.value;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9a0750d5a85873ae", + "equalIndicator/v1": "854305211bb25dc7a1f64e52b547380ec2c2f9574a2c5a730d590158ca2186af" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1437, + "startColumn": 41, + "charOffset": 50982, + "charLength": 17, + "snippet": { + "text": "m_playerBonusData" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1435, + "startColumn": 1, + "charOffset": 50929, + "charLength": 180, + "snippet": { + "text": "\r\n\t// Leech\r\n\tsetPlayerCombatStats(COMBAT_LIFEDRAIN, m_playerBonusData.leech.lifeLeech * 100);\r\n\tsetPlayerCombatStats(COMBAT_MANADRAIN, m_playerBonusData.leech.manaLeech * 100);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5af103ceb33f1ff", + "equalIndicator/v1": "8543153d2d49b8de25032443c4a8ef308d1cef14c69b532940401d4ecd72831e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2322, + "startColumn": 2, + "charOffset": 72298, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2320, + "startColumn": 1, + "charOffset": 72291, + "charLength": 120, + "snippet": { + "text": "\t}\r\n\r\n\tuint16_t raceId = msg.get();\r\n\tstd::string Class = \"\";\r\n\tstd::shared_ptr mtype = nullptr;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1c748247b567b6a9", + "equalIndicator/v1": "854c61a3600dcd0f9866dae47247cbdd22ff8461bd1d721fd23d0a00d9dd4cb9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 225, + "startColumn": 78, + "charOffset": 6686, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 223, + "startColumn": 1, + "charOffset": 6604, + "charLength": 213, + "snippet": { + "text": "}\r\n\r\nbool Map::placeCreature(const Position ¢erPos, std::shared_ptr creature, bool extendedPos /* = false*/, bool forceLogin /* = false*/) {\r\n\tauto monster = creature->getMonster();\r\n\tif (monster) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "21b802bfed659689", + "equalIndicator/v1": "8554e880223b4d694a57eb6172f39c679e000077ae95aa838a362dd445fcbacb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1251, + "startColumn": 10, + "charOffset": 34640, + "charLength": 11, + "snippet": { + "text": "healthTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1249, + "startColumn": 1, + "charOffset": 34592, + "charLength": 131, + "snippet": { + "text": "\r\n\tif (player != nullptr && isBuff) {\r\n\t\treturn healthTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2b408c742833826c", + "equalIndicator/v1": "85596cde6332d81057a877e94a616f11348ca6471363b68028b19f9ac8408b20" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 59, + "startColumn": 18, + "charOffset": 1794, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 57, + "startColumn": 1, + "charOffset": 1772, + "charLength": 229, + "snippet": { + "text": "}\r\n\r\nvoid DepotChest::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr localParent = getParent();\r\n\tif (localParent != nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "064ea766fa05ed36", + "equalIndicator/v1": "8565c2a58e4b81fc3cb28f6916f364daf2071d95c6a59fc39016e4a72ec004df" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'owner' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'owner' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1038, + "startColumn": 46, + "charOffset": 29047, + "charLength": 5, + "snippet": { + "text": "owner" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1036, + "startColumn": 1, + "charOffset": 28997, + "charLength": 98, + "snippet": { + "text": "}\r\n\r\nbool Item::isOwner(std::shared_ptr owner) const {\r\n\tif (!owner) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3fef2afd3d9494eb", + "equalIndicator/v1": "858c617afef66b22e7bba2d50119fb7affb55f0fa96f9b203b59a16a223aa0fc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6454, + "startColumn": 104, + "charOffset": 222883, + "charLength": 5, + "snippet": { + "text": "actor" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6452, + "startColumn": 1, + "charOffset": 222775, + "charLength": 186, + "snippet": { + "text": "}\r\n\r\nvoid Game::sendSingleSoundEffect(const Position &pos, SoundEffect_t soundId, std::shared_ptr actor /* = nullptr*/) {\r\n\tif (soundId == SoundEffect_t::SILENCE) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2511f6a683abf69d", + "equalIndicator/v1": "8598f51d1ee090219989f5b5073b37ccf0a51e2d02e8771ceddd7e02dee13a00" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1813, + "startColumn": 3, + "charOffset": 54721, + "charLength": 16, + "snippet": { + "text": "ObjectCategory_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1811, + "startColumn": 1, + "charOffset": 54596, + "charLength": 288, + "snippet": { + "text": "\t\tg_game().playerSetManagedContainer(player->getID(), category, pos, itemId, stackpos, true);\r\n\t} else if (action == 1) {\r\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tg_game().playerClearManagedContainer(player->getID(), category, true);\r\n\t} else if (action == 2) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc8423c5c82b5b1c", + "equalIndicator/v1": "85a216b5000a95fc99067bdb986f1f1de5b2dc5d79f98c66f53df10ca8f1721e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1022, + "startColumn": 66, + "charOffset": 36931, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1020, + "startColumn": 1, + "charOffset": 36861, + "charLength": 255, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) {\r\n\t// Player:onGainExperience(target, exp, rawExp)\r\n\t// rawExp gives the original exp which is not multiplied\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "55a29f7d7d8699c4", + "equalIndicator/v1": "86061a7c75d8fd4e701736e34e46b7dcf40646789445ded1927198c30a1b9adc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1923, + "startColumn": 20, + "charOffset": 66083, + "charLength": 1, + "snippet": { + "text": "y" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1921, + "startColumn": 1, + "charOffset": 65975, + "charLength": 148, + "snippet": { + "text": "\t\t\t\t// calculate new coordinates using rotation center\r\n\t\t\t\tint32_t newX = x - centerX;\r\n\t\t\t\tint32_t newY = y - centerY;\r\n\r\n\t\t\t\t// perform rotation\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d495f0885005ea90", + "equalIndicator/v1": "8616dca46b3c33e55145620b9dcdfdd9255cd12a6b46ab43b14cf6b15517689f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3093, + "startColumn": 71, + "charOffset": 115148, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3091, + "startColumn": 1, + "charOffset": 115073, + "charLength": 265, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalCollectManagedItems(std::shared_ptr player, std::shared_ptr item, ObjectCategory_t category /* = OBJECTCATEGORY_DEFAULT*/, bool isLootContainer /* = true*/) {\r\n\tif (!player || !item) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59a1a2c31b9828cf", + "equalIndicator/v1": "861e4027dd9f59663a3a2967ccbfc2355bb4981fb4493746603cd2977fe39ee0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'row' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'row' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 175, + "startColumn": 14, + "charOffset": 5335, + "charLength": 22, + "snippet": { + "text": "const std::string_view" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 173, + "startColumn": 1, + "charOffset": 5226, + "charLength": 196, + "snippet": { + "text": "\texplicit DBInsert(std::string query);\r\n\tvoid upsert(const std::vector &columns);\r\n\tbool addRow(const std::string_view row);\r\n\tbool addRow(std::ostringstream &row);\r\n\tbool execute();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67f42a6f4e01d0cd", + "equalIndicator/v1": "862b845df39bd9ae4c20c41f050497b6da4277accca66a9d4f6cf4f3e405946e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1265, + "startColumn": 46, + "charOffset": 45063, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1263, + "startColumn": 1, + "charOffset": 44954, + "charLength": 173, + "snippet": { + "text": "\tscriptInterface.pushFunction(info.playerOnInventoryUpdate);\r\n\r\n\tLuaScriptInterface::pushUserdata(L, player);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c67e425b43731f62", + "equalIndicator/v1": "862f0911d16f4144dcc3b6f5f8d82705a7b6ea641c226bad72fcbcd432ce966f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1490, + "startColumn": 12, + "charOffset": 42449, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1488, + "startColumn": 1, + "charOffset": 42433, + "charLength": 323, + "snippet": { + "text": "}\r\n\r\nvoid Tile::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link /*= LINK_OWNER*/) {\r\n\tfor (const auto &spectator : Spectators().find(getPosition(), true)) {\r\n\t\tspectator->getPlayer()->postAddNotification(thing, oldParent, index, LINK_NEAR);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8960385ece3c2a76", + "equalIndicator/v1": "8661739e8a2b25a3e2eb8706fece418755aac4cd085009930843504fcb183598" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1399, + "startColumn": 90, + "charOffset": 48360, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1397, + "startColumn": 1, + "charOffset": 48266, + "charLength": 364, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatDefault(std::shared_ptr caster, std::shared_ptr target, const Position &origin, const CombatParams ¶ms) {\r\n\tif (!params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR)) {\r\n\t\tauto spectators = Spectators().find(target->getPosition(), true);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "adf951155788fc04", + "equalIndicator/v1": "8663201d0d8094b4d60557a8b95b1085e5c6c880f704dceca4f04b5edaa697ea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 371, + "startColumn": 8, + "charOffset": 9263, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 369, + "startColumn": 1, + "charOffset": 9161, + "charLength": 220, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetShootRange(lua_State* L) {\r\n\t// itemType:getShootRange()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->shootRange);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2b2d8bffddaa6f59", + "equalIndicator/v1": "8680d094caf7a2f2a2c28bf59abe417e2b76470d7fb874db58c5d5058e3ec463" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 143, + "startColumn": 8, + "charOffset": 3634, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 141, + "startColumn": 1, + "charOffset": 3538, + "charLength": 240, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsBlocking(lua_State* L) {\r\n\t// itemType:isBlocking()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->blockProjectile || itemType->blockSolid);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71358653253885cc", + "equalIndicator/v1": "8684f207488a45ba9922f35c4b5eacb8ccddb4e22b9507ca83bd0e8cd463e4e0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1063, + "startColumn": 7, + "charOffset": 40465, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1061, + "startColumn": 1, + "charOffset": 40339, + "charLength": 273, + "snippet": { + "text": "\r\nvoid EventCallback::monsterPostDropLoot(std::shared_ptr monster, std::shared_ptr corpse) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::monsterPostDropLoot - \"\r\n\t\t \"Monster corpse {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "187d2a470ede4312", + "equalIndicator/v1": "86932966f11e826bee42adbcd88e86c9b5f100bd1400e84e2625aa9dbbbba33b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 154, + "startColumn": 8, + "charOffset": 3930, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 152, + "startColumn": 1, + "charOffset": 3830, + "charLength": 219, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsGroundTile(lua_State* L) {\r\n\t// itemType:isGroundTile()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isGroundTile());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aebc9d7af3139121", + "equalIndicator/v1": "86b82848c5f1dce4227ab35fabae9852c7783a87f1403f953750c6d6ea8c7ae6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1439, + "startColumn": 53, + "charOffset": 42224, + "charLength": 5, + "snippet": { + "text": "house" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1437, + "startColumn": 1, + "charOffset": 42167, + "charLength": 117, + "snippet": { + "text": "}\r\n\r\nvoid Player::sendHouseWindow(std::shared_ptr house, uint32_t listId) const {\r\n\tif (!client) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c2e6ef1dd8ac3e4", + "equalIndicator/v1": "86bb2e72817cff2555c83f26e8389cb3597889be8bc47b583a9a24abc6039384" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1001, + "startColumn": 27, + "charOffset": 36168, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 999, + "startColumn": 1, + "charOffset": 36136, + "charLength": 130, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnTradeAccept, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6c22602cb9629f51", + "equalIndicator/v1": "86e4208ba121cdd7c451875e69a545983887c2e95f5a20e0a3481cf327701441" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1377, + "startColumn": 36, + "charOffset": 41377, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1375, + "startColumn": 1, + "charOffset": 41250, + "charLength": 147, + "snippet": { + "text": "\tvoid sendPartyCreatureShield(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyCreatureShield(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "799e0db7a2587352", + "equalIndicator/v1": "86e5e05b7cecdecc1dd17349d961842b3d3f01ddcbb801be1d6aa7475230f490" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 57, + "startColumn": 57, + "charOffset": 1921, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 55, + "startColumn": 1, + "charOffset": 1860, + "charLength": 154, + "snippet": { + "text": "}\r\n\r\nbool Creature::canSeeCreature(std::shared_ptr creature) const {\r\n\tif (!canSeeInvisibility() && creature->isInvisible()) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a8a859ad9494a8a9", + "equalIndicator/v1": "86ee2f5225fbf77570ff02d855ccd4e2461512bb20f3c29e6ffdb6ca58778bd4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 132, + "startColumn": 45, + "charOffset": 3472, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 130, + "startColumn": 1, + "charOffset": 3423, + "charLength": 117, + "snippet": { + "text": "}\r\n\r\nbool Bank::withdraw(std::shared_ptr player, uint64_t amount) {\r\n\tif (!debit(amount)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7402dc9fb7918b64", + "equalIndicator/v1": "8709688dc071e487a9d8a3f1b1eb2000871458cb5ccaa1cf3a7b0af03c53abbd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8399, + "startColumn": 54, + "charOffset": 266060, + "charLength": 8, + "snippet": { + "text": "stackpos" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8397, + "startColumn": 1, + "charOffset": 265955, + "charLength": 129, + "snippet": { + "text": "\t\tAddCreature(msg, creature, false, 0);\r\n\t} else {\r\n\t\tsendAddCreature(creature, creature->getPosition(), stackpos, false);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b464a438f4f53d00", + "equalIndicator/v1": "8730b1f2424a1aea971b38e68b62d0b1cea7edec7efa8ff79535bc0c8e75ca49" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 553, + "startColumn": 31, + "charOffset": 16859, + "charLength": 13, + "snippet": { + "text": "containerItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 551, + "startColumn": 1, + "charOffset": 16717, + "charLength": 392, + "snippet": { + "text": "\t\t\t// Iterate through every item and check how much free stackable slots there is.\r\n\t\t\tuint32_t slotIndex = 0;\r\n\t\t\tfor (std::shared_ptr containerItem : itemlist) {\r\n\t\t\t\tif (containerItem != item && containerItem->equals(item) && containerItem->getItemCount() < containerItem->getStackSize()) {\r\n\t\t\t\t\tuint32_t remainder = (containerItem->getStackSize() - containerItem->getItemCount());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f7d94c231d1a199b", + "equalIndicator/v1": "873e7817a68524c80dc0cb9efd596a71ea7c8dfe19b73d6ed05b472461b822ed" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 569, + "startColumn": 46, + "charOffset": 17243, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 567, + "startColumn": 1, + "charOffset": 17101, + "charLength": 267, + "snippet": { + "text": "\r\n\tconst std::shared_ptr topVisibleCreature = tile->getBottomVisibleCreature(player);\r\n\tif (blockingCreature && topVisibleCreature) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);\r\n\t\tg_game().addMagicEffect(player->getPosition(), CONST_ME_POFF);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "49bd168b9e03dbf8", + "equalIndicator/v1": "8751243ba9a903317dc585d6ecee97339419e465c3bd137ce78e32195ab32d9c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 673, + "startColumn": 37, + "charOffset": 22059, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 671, + "startColumn": 1, + "charOffset": 21997, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 0.80f) + 3;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3bf811f539ad3fea", + "equalIndicator/v1": "8767bbdf6cc342dba4e6ff23b0850ae5f6892e7b6933947873cb49f4d1ecb7e2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 307, + "startColumn": 27, + "charOffset": 11089, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 305, + "startColumn": 1, + "charOffset": 11057, + "charLength": 133, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.creatureOnTargetCombat, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f85a99f74433c79", + "equalIndicator/v1": "87911739799c3f89563f079aba3dbd5f5ba45c943360b440a11e313810ff5ef9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 587, + "startColumn": 8, + "charOffset": 14460, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 585, + "startColumn": 1, + "charOffset": 14354, + "charLength": 227, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetShowDuration(lua_State* L) {\r\n\t// itemType:getShowDuration()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushboolean(L, itemType->showDuration);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dc8b4ab40f49e3f3", + "equalIndicator/v1": "879adf284f4861432524119ec0b9c1308198258856685d2d7362dc94e1f21c36" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 63, + "startColumn": 56, + "charOffset": 1824, + "charLength": 34, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 61, + "startColumn": 1, + "charOffset": 1685, + "charLength": 325, + "snippet": { + "text": "\tstd::shared_ptr getMonsterTypeByBossRaceId(uint16_t raceId) const;\r\n\r\n\tvoid addBosstiaryKill(std::shared_ptr player, const std::shared_ptr mtype, uint32_t amount = 1) const;\r\n\tuint16_t calculateLootBonus(uint32_t bossPoints) const;\r\n\tuint32_t calculateBossPoints(uint16_t lootBonus) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d9f5a8cfc02b2091", + "equalIndicator/v1": "87b70f98badc4ed392a77249b965b8798916568489bc5854451b1d3ae185ee0e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'inPushEvent' can be made const", + "markdown": "Method 'inPushEvent' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1798, + "startColumn": 7, + "charOffset": 53685, + "charLength": 11, + "snippet": { + "text": "inPushEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1796, + "startColumn": 1, + "charOffset": 53673, + "charLength": 59, + "snippet": { + "text": "\t}\r\n\r\n\tbool inPushEvent() {\r\n\t\treturn inEventMovePush;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0451d3092a713cc8", + "equalIndicator/v1": "87c27bd74ccff016c27c70af5b6379c161835b6f264e99e5fd2f96cb6db89272" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 139, + "startColumn": 93, + "charOffset": 4692, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 137, + "startColumn": 1, + "charOffset": 4594, + "charLength": 204, + "snippet": { + "text": "\t}\r\n\r\n\tbool playerCanUseItemWithOnHouseTile(std::shared_ptr player, std::shared_ptr item, const Position &toPos, int toStackPos, int toItemId) {\r\n\t\tif (!player || !item) {\r\n\t\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c392fc259cca1f85", + "equalIndicator/v1": "8814603e6d35227ffd3d835ee5c8160e816a25eaeba9738c9e94b04de81e3e7d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 84, + "startColumn": 12, + "charOffset": 2716, + "charLength": 6, + "snippet": { + "text": "health" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 82, + "startColumn": 1, + "charOffset": 2618, + "charLength": 283, + "snippet": { + "text": "\t\tmonster->currentOutfit = mType->info.outfit;\r\n\t\tmonster->skull = mType->info.skull;\r\n\t\tmonster->health = mType->info.health * mType->getHealthMultiplier();\r\n\t\tmonster->healthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\t\tmonster->baseSpeed = mType->getBaseSpeed();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "940ced98c6b70e5e", + "equalIndicator/v1": "88361cff7089b37dc67945ac4d50e08a748e6b96fccbf741cbb6e7c5ea4c3637" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 945, + "startColumn": 58, + "charOffset": 30651, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 943, + "startColumn": 1, + "charOffset": 30589, + "charLength": 247, + "snippet": { + "text": "}\r\n\r\nBlockType_t Creature::blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense /* = false */, bool checkArmor /* = false */, bool /* field = false */) {\r\n\tBlockType_t blockType = BLOCK_NONE;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c1ced9f34fdf228a", + "equalIndicator/v1": "883d24ac3a051f968b2e0c6a65929cbcbba085421f9552a9a4ad2e0a4f10bf33" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 709, + "startColumn": 58, + "charOffset": 22282, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 707, + "startColumn": 1, + "charOffset": 22220, + "charLength": 118, + "snippet": { + "text": "}\r\n\r\nvoid Party::updatePlayerVocation(std::shared_ptr player) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "295ddff3915a8959", + "equalIndicator/v1": "886e44f7ec8284f1c4d4f26c6ab0cfbb7dda44c7ff0c40b28daec6c47d4ef071" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 656, + "startColumn": 58, + "charOffset": 25179, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 654, + "startColumn": 1, + "charOffset": 25117, + "charLength": 204, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnTurn(std::shared_ptr player, Direction direction) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTurn - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2d9008381336e89", + "equalIndicator/v1": "8872686b9fccb2950c8328ee66cf51f65deef1653ecdcfc40fc118237a47e105" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 324, + "startColumn": 6, + "charOffset": 11628, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 322, + "startColumn": 1, + "charOffset": 11594, + "charLength": 202, + "snippet": { + "text": "\r\n\tReturnValue returnValue;\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "820b95af2577b69a", + "equalIndicator/v1": "88b0add17400ecbe80a1d991ca3090e8e77c684cec95fb9bf9803462ed8378f4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 567, + "startColumn": 70, + "charOffset": 26632, + "charLength": 5, + "snippet": { + "text": "value" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 565, + "startColumn": 1, + "charOffset": 26448, + "charLength": 342, + "snippet": { + "text": "\t\tint16_t value = pugi::cast(valueAttribute.value());\r\n\t\tAbilities &abilities = itemType.getAbilities();\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "80b63859ec1f29bc", + "equalIndicator/v1": "88bb684683efe56ba3639e8032dd6d84f2f0c63e14e93dddb9115a86188db5d5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 769, + "startColumn": 83, + "charOffset": 24354, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 767, + "startColumn": 1, + "charOffset": 24267, + "charLength": 141, + "snippet": { + "text": "}\r\n\r\nvoid Party::addPlayerSupply(std::shared_ptr player, std::shared_ptr item) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "18742166120611af", + "equalIndicator/v1": "88be11cf2d0822b574b509f9263241a80af189a0755bc80b3ca770587fb53eae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 624, + "startColumn": 74, + "charOffset": 16789, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 622, + "startColumn": 1, + "charOffset": 16711, + "charLength": 181, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updatePercentAbsorbs(std::shared_ptr creature) {\r\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\r\n\t\tauto value = getAbsorbPercentByIndex(i);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cf5784d068d5538d", + "equalIndicator/v1": "88c82eb5aad123d25cfbbac379a3a7d42c82d727b058007fb8b3e22e160a7358" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 709, + "startColumn": 2, + "charOffset": 24608, + "charLength": 17, + "snippet": { + "text": "OperatingSystem_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 707, + "startColumn": 1, + "charOffset": 24601, + "charLength": 151, + "snippet": { + "text": "\t}\r\n\r\n\tOperatingSystem_t operatingSystem = static_cast(msg.get());\r\n\tversion = msg.get(); // Protocol version\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f1817a2341da0b1", + "equalIndicator/v1": "88c88b850c0be2036185d55714b11b82e66772887e4dd991cd65c1147ae8e1ee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 262, + "startColumn": 27, + "charOffset": 9537, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 260, + "startColumn": 1, + "charOffset": 9505, + "charLength": 131, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.creatureOnAreaCombat, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cdfcd1169b91af28", + "equalIndicator/v1": "8959a1d5e606c05c1ebb2b65db5cbb8c5f16626fd7b7b7351563cc4869ca7928" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'parent' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'parent' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 361, + "startColumn": 172, + "charOffset": 12500, + "charLength": 6, + "snippet": { + "text": "parent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 359, + "startColumn": 1, + "charOffset": 12324, + "charLength": 228, + "snippet": { + "text": "}\r\n\r\nvoid Npc::onPlayerSellItem(std::shared_ptr player, uint16_t itemId, uint8_t subType, uint16_t amount, bool ignore, uint64_t &totalPrice, std::shared_ptr parent /*= nullptr*/) {\r\n\tif (!player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "090b15b07586d240", + "equalIndicator/v1": "897187955548493187f47844cce9d1779c7023c909b8e0f7efb6a6cf80ebcbe4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'b' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'b' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 455, + "startColumn": 13, + "charOffset": 12379, + "charLength": 1, + "snippet": { + "text": "b" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 453, + "startColumn": 1, + "charOffset": 12315, + "charLength": 73, + "snippet": { + "text": "\t}\r\n\tvoid setBedItem(std::shared_ptr b) {\r\n\t\tbedItem = b;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a66e971be3c5330b", + "equalIndicator/v1": "89a78210a224ad95072b595ba0e778e24c1eecec9fc8150547d6a59a835b9176" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7593, + "startColumn": 26, + "charOffset": 265009, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7591, + "startColumn": 1, + "charOffset": 264941, + "charLength": 282, + "snippet": { + "text": "// Life leech\r\nvoid Game::applyLifeLeech(\r\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\r\n) const {\r\n\t// Wheel of destiny bonus - life leech chance and amount\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "08627cd07b1b80b7", + "equalIndicator/v1": "89b09e57a1c8660f90ac26d284957880e7d6e6e7f3291c7dfc6d21406bdc2587" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1301, + "startColumn": 53, + "charOffset": 43477, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1299, + "startColumn": 1, + "charOffset": 43420, + "charLength": 342, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatMana(std::shared_ptr caster, std::shared_ptr target, const Position &origin, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster && target)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f9022d2b1b3b5914", + "equalIndicator/v1": "89c8ea41c6b82c55a9532b22618ccb4b6d3d9b4c132f0ea05215dca92defe8fe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", + "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1581, + "startColumn": 28, + "charOffset": 45264, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1579, + "startColumn": 1, + "charOffset": 45208, + "charLength": 118, + "snippet": { + "text": "\t\t\t\tseparator = true;\r\n\t\t\t}\r\n\t\t\tif (int32_t hitChance = it.hitChance;\r\n\t\t\t hitChance != 0) {\r\n\t\t\t\tif (separator) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd7f64cc212ff18e", + "equalIndicator/v1": "89d174f966c891e21ac84750d6b1336362827333a231a17f592ee3c17e40a8bd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 141, + "startColumn": 50, + "charOffset": 4262, + "charLength": 13, + "snippet": { + "text": "const int64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 139, + "startColumn": 1, + "charOffset": 4126, + "charLength": 306, + "snippet": { + "text": "\tconst CustomAttribute* getCustomAttribute(const std::string &attributeName) const;\r\n\r\n\tvoid setCustomAttribute(const std::string &key, const int64_t value);\r\n\tvoid setCustomAttribute(const std::string &key, const std::string &value);\r\n\tvoid setCustomAttribute(const std::string &key, const double value);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "06a6a51fbd222548", + "equalIndicator/v1": "89d43eeab3cd0ede108b4e4f5391a787748b0c2b4cfb8567be701795e808b1a1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 951, + "startColumn": 7, + "charOffset": 30436, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 949, + "startColumn": 1, + "charOffset": 30294, + "charLength": 349, + "snippet": { + "text": "bool InstantSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var) const {\r\n\t// onCastSpell(creature, var)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[InstantSpell::executeCastSpell - Creature {} words {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7b5ecc604cf063aa", + "equalIndicator/v1": "89d60bf5e812e1ab20205104a0b848da4af0677b1878081162305c78483579ca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: id", + "markdown": "Constructor does not initialize these fields: id" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items_classification.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 7, + "charOffset": 616, + "charLength": 18, + "snippet": { + "text": "ItemClassification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 552, + "charLength": 128, + "snippet": { + "text": "\r\n// Classification class for forging system and market.\r\nclass ItemClassification {\r\npublic:\r\n\tItemClassification() = default;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "12b3c3865fbef238", + "equalIndicator/v1": "89e71f043d4ce335e7cef542e2dfd5f24988ecc6af74ebf6187f261d1a969028" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 449, + "startColumn": 67, + "charOffset": 12971, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 447, + "startColumn": 1, + "charOffset": 12780, + "charLength": 279, + "snippet": { + "text": "\tvirtual void onAttacked();\r\n\tvirtual void onAttackedCreatureDrainHealth(std::shared_ptr target, int32_t points);\r\n\tvirtual void onTargetCreatureGainHealth(std::shared_ptr, int32_t) { }\r\n\tvoid onAttackedCreatureKilled(std::shared_ptr target);\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "45cfa072eeb2c6e3", + "equalIndicator/v1": "89f00e2260216e8d9fee94a4d12001bd2d35a6e5518b0aad80795a01b4869b73" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7129, + "startColumn": 28, + "charOffset": 248190, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7127, + "startColumn": 1, + "charOffset": 248068, + "charLength": 247, + "snippet": { + "text": "\t\t}\r\n\t\tif (damage.origin != ORIGIN_NONE && target && damage.primary.type != COMBAT_HEALING) {\r\n\t\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r\n\t\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2485e5a4ca9b3df3", + "equalIndicator/v1": "89fa48c0ed96530fdeb6d274a117363c8a0e5113e69c66274c2f0a4025ba39c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 278, + "startColumn": 7, + "charOffset": 10240, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 276, + "startColumn": 1, + "charOffset": 10158, + "charLength": 283, + "snippet": { + "text": "\r\nbool EventCallback::partyOnDisband(std::shared_ptr party) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::partyOnDisband - Party leader {}] Call stack \"\r\n\t\t \"overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fb9069b4678cfd0e", + "equalIndicator/v1": "8a06e7077b5936f7ca521f1d2ac759e4d809bc0fd4a5e1515267abd901c019fd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 607, + "startColumn": 6, + "charOffset": 29687, + "charLength": 24, + "snippet": { + "text": "valueAttribute.as_bool()" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 605, + "startColumn": 1, + "charOffset": 29516, + "charLength": 291, + "snippet": { + "text": "void ItemParse::parseSupressDrunk(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\tstd::string stringValue = tmpStrValue;\r\n\tif (valueAttribute.as_bool()) {\r\n\t\tConditionType_t conditionType = CONDITION_NONE;\r\n\t\tif (stringValue == \"suppressdrunk\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1dadec3cf85ca81", + "equalIndicator/v1": "8a18ef2e09a6a54022df51e857ac41d819f439e02189957e07bca969157bf3b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 689, + "startColumn": 116, + "charOffset": 22555, + "charLength": 13, + "snippet": { + "text": "spellCooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 687, + "startColumn": 1, + "charOffset": 22366, + "charLength": 283, + "snippet": { + "text": "\t\tspellCooldown -= augmentCooldownReduction;\r\n\t\tif (spellCooldown > 0) {\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLCOOLDOWN, spellCooldown / rateCooldown, 0, false, m_spellId);\r\n\t\t\tplayer->addCondition(condition);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6a1e4cfe0408be5e", + "equalIndicator/v1": "8a3ba5c477a29b3f9cca7ef20ca232022f3c2faf38abe7a1446a6e21f49c90f2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 935, + "startColumn": 17, + "charOffset": 28005, + "charLength": 10, + "snippet": { + "text": "removeItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 933, + "startColumn": 1, + "charOffset": 27984, + "charLength": 139, + "snippet": { + "text": "}\r\n\r\nvoid Container::removeItem(std::shared_ptr thing, bool sendUpdateToClient /* = false*/) {\r\n\tif (thing == nullptr) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "386a5296317fd094", + "equalIndicator/v1": "8a414d76abcafd2431bb84aa919483cf603cdd1e17533b12c7ec21d593a11bd2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 225, + "startColumn": 2, + "charOffset": 8264, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 223, + "startColumn": 1, + "charOffset": 8257, + "charLength": 52, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e286cd0bf7b7f2fd", + "equalIndicator/v1": "8a794715c827a66fa56a6fd4d9da8f122271daa8fddf76e3489b4a00e623b377" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4449, + "startColumn": 45, + "charOffset": 160140, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4447, + "startColumn": 1, + "charOffset": 160091, + "charLength": 248, + "snippet": { + "text": "}\r\n\r\nvoid Game::unwrapItem(std::shared_ptr item, uint16_t unWrapId, std::shared_ptr house, std::shared_ptr player) {\r\n\tif (item->hasOwner() && !item->isOwner(player)) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_ITEMISNOTYOURS);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0624b6a876fc4230", + "equalIndicator/v1": "8a99076b710598091468348377352fe362db24f08ef689a6ffe965ceebda60b7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1165, + "startColumn": 26, + "charOffset": 34788, + "charLength": 16, + "snippet": { + "text": "getDownItemCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1163, + "startColumn": 1, + "charOffset": 34731, + "charLength": 153, + "snippet": { + "text": "\r\n\tif (items && !isInserted) {\r\n\t\tint32_t downItemSize = getDownItemCount();\r\n\t\tif (pos < downItemSize) {\r\n\t\t\tauto it = items->getBeginDownItem() + pos;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b739cfd9b088bfa", + "equalIndicator/v1": "8ab23a61f11ad784811bf06eb64c1f334a8c5cb47dddf5f82246214f40cffb4f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_mm_ctz', which is reserved in the global namespace", + "markdown": "Declaration uses identifier '_mm_ctz', which is reserved in the global namespace" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/simd.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 59, + "startColumn": 28, + "charOffset": 1497, + "charLength": 7, + "snippet": { + "text": "_mm_ctz" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 57, + "startColumn": 1, + "charOffset": 1431, + "charLength": 149, + "snippet": { + "text": "#ifdef _MSC_VER\r\n\t#include \r\n__forceinline unsigned int _mm_ctz(unsigned int value) {\r\n\tunsigned long i = 0;\r\n\t_BitScanForward(&i, value);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "54fe5b9685e5094b", + "equalIndicator/v1": "8ad017a320447521f779651fa53440e6728a6f3562f310926b4d212a85a854df" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 332, + "startColumn": 2, + "charOffset": 8254, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 330, + "startColumn": 1, + "charOffset": 8155, + "charLength": 212, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetWeight(lua_State* L) {\r\n\t// itemType:getWeight([count = 1])\r\n\tuint16_t count = getNumber(L, 2, 1);\r\n\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ccc6094024e32bf0", + "equalIndicator/v1": "8adb6734d6d8a4d578f063b866574612e7cba9b18a12c6524d30ae69867db77c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 634, + "startColumn": 51, + "charOffset": 18313, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 632, + "startColumn": 1, + "charOffset": 18258, + "charLength": 110, + "snippet": { + "text": "}\r\n\r\nbool AccessList::isInList(std::shared_ptr player) const {\r\n\tif (allowEveryone) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1b04ac2c76ad178", + "equalIndicator/v1": "8ae3fb49039cc1265d15a806a03808d362fb5f7b9a2f1f80c81068a1b0645897" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 835, + "startColumn": 124, + "charOffset": 32001, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 833, + "startColumn": 1, + "charOffset": 31873, + "charLength": 271, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnCombat - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "109a1e3727fa260a", + "equalIndicator/v1": "8af87cea9adbb1e9dbdce4a0cf5af8c273b1b0d56560fba491b032b3431e2d44" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 516, + "startColumn": 7, + "charOffset": 17122, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 514, + "startColumn": 1, + "charOffset": 16856, + "charLength": 462, + "snippet": { + "text": "bool Action::executeUse(std::shared_ptr player, std::shared_ptr item, const Position &fromPosition, std::shared_ptr target, const Position &toPosition, bool isHotkey) {\r\n\t// onUse(player, item, fromPosition, target, toPosition, isHotkey)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Action::executeUse - Player {}, on item {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "14fc298e46fe8cad", + "equalIndicator/v1": "8b285363d1537fa789a653de9a3291d03dc7c50329d9f8cad37af65fc7ab5016" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 987, + "startColumn": 153, + "charOffset": 35699, + "charLength": 10, + "snippet": { + "text": "targetItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 985, + "startColumn": 1, + "charOffset": 35542, + "charLength": 263, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) {\r\n\t// Player:onTradeAccept(target, item, targetItem)\r\n\tif (info.playerOnTradeAccept == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2600da812c0153c4", + "equalIndicator/v1": "8b37a6e03c94962520b1ddeab86e19715dbc279a7bf6f143c91a07559f86557d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2483, + "startColumn": 65, + "charOffset": 94645, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2481, + "startColumn": 1, + "charOffset": 94576, + "charLength": 258, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalPlayerAddItem(std::shared_ptr player, std::shared_ptr item, bool dropOnMap /*= true*/, Slots_t slot /*= CONST_SLOT_WHEREEVER*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tuint32_t remainderCount = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5461e94fb106dc0d", + "equalIndicator/v1": "8b4e57283fd4800bbce20ce9ffef5ff365bde928dd4300e76d3d0c15f89c4635" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 667, + "startColumn": 52, + "charOffset": 21035, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 665, + "startColumn": 1, + "charOffset": 20979, + "charLength": 156, + "snippet": { + "text": "}\r\n\r\nvoid Npc::handlePlayerMove(std::shared_ptr player, const Position &newPos) {\r\n\tif (!canInteract(newPos)) {\r\n\t\tremovePlayerInteraction(player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2237ace7f6e1bb42", + "equalIndicator/v1": "8b5672dc4e2e4706277928d05da86609ee896b5a11eb4e349d97161ccd9bced7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'refreshCyclopediaMonsterTracker' can be made const", + "markdown": "Method 'refreshCyclopediaMonsterTracker' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 336, + "startColumn": 7, + "charOffset": 8903, + "charLength": 31, + "snippet": { + "text": "refreshCyclopediaMonsterTracker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 334, + "startColumn": 1, + "charOffset": 8891, + "charLength": 155, + "snippet": { + "text": "\t}\r\n\r\n\tvoid refreshCyclopediaMonsterTracker(bool isBoss = false) {\r\n\t\trefreshCyclopediaMonsterTracker(getCyclopediaMonsterTrackerSet(isBoss), isBoss);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ed99e0ebf271a612", + "equalIndicator/v1": "8b697986a1cfb6c10cff6851d5f7b4ac2a2ff75dbbce0fda9b0eec15349003af" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 187, + "startColumn": 11, + "charOffset": 5178, + "charLength": 14, + "snippet": { + "text": "GlobalEventMap" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 185, + "startColumn": 1, + "charOffset": 5151, + "charLength": 52, + "snippet": { + "text": "\t\t}\r\n\t\tdefault:\r\n\t\t\treturn GlobalEventMap();\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8abe9fcc360caf54", + "equalIndicator/v1": "8bdd4f4ecfd2ec3f20f39b1785a7d916849e01f362ee25c118c32a41ef8161de" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2871, + "startColumn": 27, + "charOffset": 87679, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2869, + "startColumn": 1, + "charOffset": 87647, + "charLength": 144, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t removeRuneCost = player->getLevel() * 100;\r\n\tif (player->hasCharmExpansion()) {\r\n\t\tremoveRuneCost = (removeRuneCost * 75) / 100;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "586b8fcc2cae76e3", + "equalIndicator/v1": "8c1ca67b0dc390523b945841e44b55fb17f6902e9039f898ccbb63e79716e81e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6030, + "startColumn": 17, + "charOffset": 177162, + "charLength": 23, + "snippet": { + "text": "Player::getPercentLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6028, + "startColumn": 1, + "charOffset": 177087, + "charLength": 221, + "snippet": { + "text": "\t\tuint8_t newPercent;\r\n\t\tif (nextReqMana > currReqMana) {\r\n\t\t\tnewPercent = Player::getPercentLevel(manaSpent, nextReqMana);\r\n\t\t\tnewPercentToNextLevel = static_cast(manaSpent * 100) / nextReqMana;\r\n\t\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "182596c3b6d116b3", + "equalIndicator/v1": "8c623245ad7b16a96ea03b291bd47ca26e5cce36a1e8411fa89ba57358fe44e3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3350, + "startColumn": 63, + "charOffset": 102079, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3348, + "startColumn": 1, + "charOffset": 102012, + "charLength": 144, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureType(std::shared_ptr creature, uint8_t creatureType) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0x95);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "632393fb22613035", + "equalIndicator/v1": "8cb2e7b197000abc1f65c6c143724ec7b1fec6cb1b45c5213a96b8f78dd1c53f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 231, + "startColumn": 51, + "charOffset": 5927, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 229, + "startColumn": 1, + "charOffset": 5865, + "charLength": 140, + "snippet": { + "text": "\r\nprivate:\r\n\tvirtual bool getSkillType(std::shared_ptr, std::shared_ptr, skills_t &, uint32_t &) const {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "17b5c911d220d30d", + "equalIndicator/v1": "8cd6f4909ace2bacd691a9544427ae8282970a027bda118d5b481a606c6fb384" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 92, + "startColumn": 2, + "charOffset": 2715, + "charLength": 6, + "snippet": { + "text": "Combat" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 90, + "startColumn": 1, + "charOffset": 2601, + "charLength": 232, + "snippet": { + "text": "\t// combat:addCondition(condition)\r\n\tstd::shared_ptr condition = getUserdataShared(L, 2);\r\n\tCombat* combat = getUserdata(L, 1);\r\n\tif (combat && condition) {\r\n\t\tcombat->addCondition(condition->clone());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "39344829f001fc17", + "equalIndicator/v1": "8ce96e993ca0de5ff5a0aa7cfb999995779a07f091fdbf1f6063c16e86e7b627" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2093, + "startColumn": 8, + "charOffset": 57573, + "charLength": 4, + "snippet": { + "text": "maxa" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2091, + "startColumn": 1, + "charOffset": 57499, + "charLength": 105, + "snippet": { + "text": "\tint32_t difference = var - 40;\r\n\tmin = mina * difference + minb;\r\n\tmax = maxa * difference + maxb;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e49d30a9fdb9d1df", + "equalIndicator/v1": "8d06a74681527401dc7cbcbd9651dd61c9f088ea337dcb63ffd918f25929e230" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1101, + "startColumn": 47, + "charOffset": 41984, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1099, + "startColumn": 1, + "charOffset": 41883, + "charLength": 214, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, monster);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\r\n\tLuaScriptInterface::pushPosition(L, position);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "94ce2cd72c5531bf", + "equalIndicator/v1": "8d219f423510bc9b9318db81186bf0711e69fcdb62e47beaebbfc268445f9f52" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 209, + "startColumn": 3, + "charOffset": 5348, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 207, + "startColumn": 1, + "charOffset": 5291, + "charLength": 193, + "snippet": { + "text": "\r\n\tif (const TileItemVector* items = getItemList()) {\r\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\r\n\t\t\tif ((*it)->getMailbox()) {\r\n\t\t\t\treturn (*it)->getMailbox();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7e43edf79a32b8da", + "equalIndicator/v1": "8d43baaa573d5b38ffc3ecf64c7fc0fd2c7097b2e800b1f3f9d493ffef0c393f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1556, + "startColumn": 15, + "charOffset": 46142, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1554, + "startColumn": 1, + "charOffset": 46048, + "charLength": 201, + "snippet": { + "text": "\tuint8_t size = (uint8_t)source.size();\r\n\tfor (uint8_t i = 0; i < size; i++) {\r\n\t\tif (i == 0) {\r\n\t\t\tsource[i] = (char)toupper(source[i]);\r\n\t\t} else if (source[i - 1] == ' ' || source[i - 1] == '\\'') {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "926c21839dd37917", + "equalIndicator/v1": "8d5d2dbe8c3ab80792bc77ec5665fe4fc246b54216d15e222cd19aa1c98b21dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 156, + "startColumn": 2, + "charOffset": 5015, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 154, + "startColumn": 1, + "charOffset": 4946, + "charLength": 185, + "snippet": { + "text": "\tuint32_t precachedControlSum[32][2];\r\n\tuint32_t sum = 0xC6EF3720;\r\n\tfor (int32_t i = 0; i < 32; ++i) {\r\n\t\tprecachedControlSum[i][0] = (sum + newKey[(sum >> 11) & 3]);\r\n\t\tsum += delta;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e7fd1721712b68e3", + "equalIndicator/v1": "8d86d5017a6c1594a7f183e19f64096b22d4a835cf5562d7bff593a9917a7254" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'guild' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'guild' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 284, + "startColumn": 16, + "charOffset": 7399, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 282, + "startColumn": 1, + "charOffset": 7363, + "charLength": 128, + "snippet": { + "text": "\t\treturn guild;\r\n\t}\r\n\tvoid setGuild(const std::shared_ptr guild);\r\n\r\n\t[[nodiscard]] GuildRank_ptr getGuildRank() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "21122ba2caa01c4e", + "equalIndicator/v1": "8d8cac0d9e8084b74bb191570f295df441ce48db0640cf6d3b127f241efa6aa3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 605, + "startColumn": 40, + "charOffset": 16300, + "charLength": 15, + "snippet": { + "text": "unmodifiedSkill" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 603, + "startColumn": 1, + "charOffset": 16201, + "charLength": 165, + "snippet": { + "text": "\r\n\t\tint32_t unmodifiedSkill = player->getBaseSkill(skill);\r\n\t\tskills[skill] = static_cast(unmodifiedSkill * ((skillsPercent[skill] - 100) / 100.f));\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1d7de08585d47594", + "equalIndicator/v1": "8da3f22651bb96ee3c31b335baab1c929970d7162a638154ce93e4454f5aa540" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 55, + "startColumn": 13, + "charOffset": 1472, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 53, + "startColumn": 1, + "charOffset": 1455, + "charLength": 224, + "snippet": { + "text": "}\r\n\r\nvoid Inbox::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr localParent = getParent();\r\n\tif (localParent != nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d603a9b2d7972016", + "equalIndicator/v1": "8db62f93983b018c4994235c25b4d2d361f7a10cb66026ca64649539f13e1be1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 150, + "startColumn": 62, + "charOffset": 5192, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 148, + "startColumn": 1, + "charOffset": 5126, + "charLength": 271, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::creatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnHear - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "545c122a0b4001e5", + "equalIndicator/v1": "8dc4a86c778d92355a93d1f187694ac1ad95fd814b763929bad93df84b63db10" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'guild' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'guild' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 24, + "charOffset": 568, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 475, + "charLength": 267, + "snippet": { + "text": "public:\r\n\tstatic std::shared_ptr loadGuild(uint32_t guildId);\r\n\tstatic void saveGuild(const std::shared_ptr guild);\r\n\tstatic uint32_t getGuildIdByName(const std::string &name);\r\n\tstatic void getWarList(uint32_t guildId, GuildWarVector &guildWarVector);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6d0e60f0fd6dd2f2", + "equalIndicator/v1": "8dcbbf3d2cff4fca324e827fb147983a59bc2104e476f93e94feb4ec837fd649" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 83, + "startColumn": 27, + "charOffset": 2319, + "charLength": 11, + "snippet": { + "text": "endPosition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 81, + "startColumn": 1, + "charOffset": 2151, + "charLength": 197, + "snippet": { + "text": "\tPositionIterator end() const {\r\n\t\tPosition endPosition(from.x, from.y, to.z + 1); // z is incremented so it's past the last valid position.\r\n\t\treturn PositionIterator(endPosition, *this);\r\n\t}\r\n};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d1bda70d41f85d75", + "equalIndicator/v1": "8e13ea32fb669634255b758fea8fe76bc9e87c289d976d0c2d2eafec3ddba746" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 159, + "startColumn": 32, + "charOffset": 5234, + "charLength": 19, + "snippet": { + "text": "getAllItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 157, + "startColumn": 1, + "charOffset": 5068, + "charLength": 320, + "snippet": { + "text": "\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::map &getAllItemTypeCount(std::map &countMap) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "86d131f589ae152a", + "equalIndicator/v1": "8e1ee2ff8b80b8face41b4a65b377ca1e3bcab905bda690333ac66ef802c2ec8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1063, + "startColumn": 2, + "charOffset": 38289, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1061, + "startColumn": 1, + "charOffset": 38282, + "charLength": 46, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5ab14065346bcf47", + "equalIndicator/v1": "8e360c60962adf027f57009980297d80a162c7689ee10355f9a9650b84564500" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 706, + "startColumn": 41, + "charOffset": 23184, + "charLength": 22, + "snippet": { + "text": "secondaryGroupCooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 704, + "startColumn": 1, + "charOffset": 23106, + "charLength": 239, + "snippet": { + "text": "\r\n\tif (secondaryGroupCooldown > 0) {\r\n\t\tint32_t spellSecondaryGroupCooldown = secondaryGroupCooldown;\r\n\t\tif (isUpgraded) {\r\n\t\t\tspellSecondaryGroupCooldown -= getWheelOfDestinyBoost(WheelSpellBoost_t::SECONDARY_GROUP_COOLDOWN, spellGrade);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f839058a80c3029", + "equalIndicator/v1": "8e3b8e0f6fcad15ecf4c44e4354a3dfc86fe63ebd96cc41a67795e3a89681bef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/thing.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 39, + "startColumn": 15, + "charOffset": 951, + "charLength": 9, + "snippet": { + "text": "setParent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 37, + "startColumn": 1, + "charOffset": 931, + "charLength": 67, + "snippet": { + "text": "\t}\r\n\r\n\tvirtual void setParent(std::weak_ptr) {\r\n\t\t//\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a15ba06bd308de9e", + "equalIndicator/v1": "8e55dba0fb7d547c79f62b43f0705f464e2bc27f6f01adecad0cf2c152710616" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::any_of()'", + "markdown": "Replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5801, + "startColumn": 2, + "charOffset": 171361, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5799, + "startColumn": 1, + "charOffset": 171273, + "charLength": 166, + "snippet": { + "text": "bool Player::hasAnyMount() const {\r\n\tconst auto mounts = g_game().mounts.getMounts();\r\n\tfor (const auto &mount : mounts) {\r\n\t\tif (hasMount(mount)) {\r\n\t\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b920ae25591d11e7", + "equalIndicator/v1": "8e5730a362f1c8e80b3bca8a0a70cb2b08d3d27756926ed7dc9307953ecda171" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3133, + "startColumn": 2, + "charOffset": 96073, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3131, + "startColumn": 1, + "charOffset": 95986, + "charLength": 243, + "snippet": { + "text": "\tuint32_t timestamp = msg.get();\r\n\tuint16_t counter = msg.get();\r\n\tuint16_t amount = msg.get();\r\n\tif (amount > 0 && counter > 0) {\r\n\t\tg_game().playerAcceptMarketOffer(player->getID(), timestamp, counter, amount);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ed8972f1bc955a6e", + "equalIndicator/v1": "8e62d86f5908afb7e100f7ab9830d2a1c274f8898bd139fa77e31419db564622" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2093, + "startColumn": 15, + "charOffset": 57580, + "charLength": 10, + "snippet": { + "text": "difference" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2091, + "startColumn": 1, + "charOffset": 57499, + "charLength": 105, + "snippet": { + "text": "\tint32_t difference = var - 40;\r\n\tmin = mina * difference + minb;\r\n\tmax = maxa * difference + maxb;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ee0431c15dd8c41b", + "equalIndicator/v1": "8e6c30ab9d2fdd6d2a892723c57194af6fdae24c21a482fd4534dcef1ab383a5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1844, + "startColumn": 2, + "charOffset": 56170, + "charLength": 17, + "snippet": { + "text": "QuickLootFilter_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1842, + "startColumn": 1, + "charOffset": 56163, + "charLength": 107, + "snippet": { + "text": "\t}\r\n\r\n\tQuickLootFilter_t filter = (QuickLootFilter_t)msg.getByte();\r\n\tstd::vector listedItems;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1246fea2ea0b2233", + "equalIndicator/v1": "8e780ea0e8134ac7250a6b0c62ab16ec9864dc918d2c17a6e2cde20b5a97760d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::list::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 174, + "startColumn": 16, + "charOffset": 4398, + "charLength": 14, + "snippet": { + "text": "timerEventDesc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 172, + "startColumn": 1, + "charOffset": 4306, + "charLength": 211, + "snippet": { + "text": "\t\tenv->setTimerEvent();\r\n\t\tenv->setScriptId(timerEventDesc.scriptId, this);\r\n\t\tcallFunction(timerEventDesc.parameters.size());\r\n\t} else {\r\n\t\tg_logger().error(\"[LuaEnvironment::executeTimerEvent - Lua file {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d817546e002f0a73", + "equalIndicator/v1": "8e915ef620b6d3faa40ecdf1bded0d11b79b279b15a2561a04e0574fc77b7dbc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 62, + "startColumn": 28, + "charOffset": 1730, + "charLength": 11, + "snippet": { + "text": "getCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 60, + "startColumn": 1, + "charOffset": 1697, + "charLength": 94, + "snippet": { + "text": "\t}\r\n\r\n\tstd::shared_ptr getCylinder() override final {\r\n\t\treturn getContainer();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d0ab6634b470f9e7", + "equalIndicator/v1": "8e9714cc31f24c4be554d1a29143f00ad77852e15bc356ece4f22650e3baa11a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 131, + "startColumn": 24, + "charOffset": 3250, + "charLength": 7, + "snippet": { + "text": "getTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 129, + "startColumn": 1, + "charOffset": 3221, + "charLength": 96, + "snippet": { + "text": "\t}\r\n\r\n\tstd::shared_ptr getTile() override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "73fb796652142a78", + "equalIndicator/v1": "8eb1b13a6d93ae20d4d0b066a3145ad0b3fd374d09cd221a38b7600a8a4df252" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'leader' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'leader' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 62, + "charOffset": 689, + "charLength": 6, + "snippet": { + "text": "leader" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 579, + "charLength": 190, + "snippet": { + "text": "#include \"lua/callbacks/events_callbacks.hpp\"\r\n\r\nstd::shared_ptr Party::create(std::shared_ptr leader) {\r\n\tauto party = std::make_shared();\r\n\tparty->m_leader = leader;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7b1d3108fe8b8e46", + "equalIndicator/v1": "8eb620bf818a938e1b531a12cf2c6a30383f8bdbd3c943f06464d7aa310d6f91" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1121, + "startColumn": 60, + "charOffset": 35178, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1119, + "startColumn": 1, + "charOffset": 35114, + "charLength": 146, + "snippet": { + "text": "}\r\n\r\nbool Creature::setFollowCreature(std::shared_ptr creature) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (creature) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ce4cd84c8c6f776e", + "equalIndicator/v1": "8eb8c735e734fdf4b925b5067f56a1f21008cb039f7ba3e57e8bacc6e6c47ab7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 170, + "startColumn": 53, + "charOffset": 5277, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 168, + "startColumn": 1, + "charOffset": 5220, + "charLength": 167, + "snippet": { + "text": "}\r\n\r\nReturnValue Actions::canUse(std::shared_ptr player, const Position &pos) {\r\n\tif (pos.x != 0xFFFF) {\r\n\t\tconst Position &playerPos = player->getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59ef8b3287eb12f3", + "equalIndicator/v1": "8ebbc9d7480a0768c18fc2b19c2f9391552c85d819b4f396fcc321090e770168" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1673, + "startColumn": 3, + "charOffset": 58731, + "charLength": 18, + "snippet": { + "text": "WheelGemAffinity_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1671, + "startColumn": 1, + "charOffset": 58722, + "charLength": 239, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tWheelGemAffinity_t affinity = static_cast(i);\r\n\t\tstd::string affinityName(magic_enum::enum_name(affinity));\r\n\t\tg_logger().debug(\" Affinity: {} count: {}\", affinityName, bonusData.unlockedVesselResonances[i]);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9c88bff365e95652", + "equalIndicator/v1": "8ebf6c4234cfefd5df5f9b846c94ea3045aa06bf56532d1e1e911d3c265780a6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 99, + "startColumn": 14, + "charOffset": 2592, + "charLength": 6, + "snippet": { + "text": "prefix" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 97, + "startColumn": 1, + "charOffset": 2480, + "charLength": 152, + "snippet": { + "text": "\t// KV.keys([prefix = \"\"]) | scopedKV:keys([prefix = \"\"])\r\n\tstd::unordered_set keys;\r\n\tstd::string prefix = \"\";\r\n\r\n\tif (isString(L, -1)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f29d962c5f938dad", + "equalIndicator/v1": "8ecb1604a2d3dd788d1ea397f75929648a236c29af24b1b278539f16e660200f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 446, + "startColumn": 41, + "charOffset": 16855, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 444, + "startColumn": 1, + "charOffset": 16809, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ddd45bc9b2202d4", + "equalIndicator/v1": "8eee1c066d17835e6bc53e0bad380edc18dd383ba22dd629dcdfd91a861992c7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Macro replacement list should be enclosed in parentheses", + "markdown": "Macro replacement list should be enclosed in parentheses" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/pch.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 118, + "startColumn": 9, + "charOffset": 2744, + "charLength": 20, + "snippet": { + "text": "MAGIC_ENUM_RANGE_MIN" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 116, + "startColumn": 1, + "charOffset": 2668, + "charLength": 163, + "snippet": { + "text": " * @note Sets the upper limit of the enum value range to 500.\r\n */\r\n#define MAGIC_ENUM_RANGE_MIN -500\r\n#define MAGIC_ENUM_RANGE_MAX 500\r\n#include \r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6bcf9a8eb308eca1", + "equalIndicator/v1": "8f02a675860af19e24502f63773a271a6788d8acf488658affa2a60df165d0cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2702, + "startColumn": 3, + "charOffset": 83342, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2700, + "startColumn": 1, + "charOffset": 83246, + "charLength": 218, + "snippet": { + "text": "\t\tparty->switchAnalyzerPriceType();\r\n\t} else if (action == PARTYANALYZERACTION_PRICEVALUE) {\r\n\t\tuint16_t size = msg.get();\r\n\t\tfor (uint16_t i = 1; i <= size; i++) {\r\n\t\t\tuint16_t itemId = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dca87a24fe0b3e8b", + "equalIndicator/v1": "8f0fe3620179358483372c99e9bf41a4991c0e60b2149ddb7eac129633d88749" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Pass by value and use std::move", + "markdown": "Pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 28, + "charOffset": 605, + "charLength": 18, + "snippet": { + "text": "const ValueVariant" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 514, + "charLength": 218, + "snippet": { + "text": "\ttimestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { }\r\n\r\nValueWrapper::ValueWrapper(const ValueVariant &value, uint64_t timestamp) :\r\n\tdata_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8045ddeb4eaf8a8f", + "equalIndicator/v1": "8f24ed47809a6923fbb666a8a7f8a55e712a31f9741a72419b2e3851ce8f937c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 108, + "startColumn": 2, + "charOffset": 3653, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 106, + "startColumn": 1, + "charOffset": 3646, + "charLength": 72, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n\treturn returnValue;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "030baf17c006a25a", + "equalIndicator/v1": "8f524e9e7dc24b580d6627938ca553204a6d2130244d9e561188f50b5ddd0039" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 640, + "startColumn": 41, + "charOffset": 24617, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 638, + "startColumn": 1, + "charOffset": 24571, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e0e44e9a775454e8", + "equalIndicator/v1": "8f566a5b8c4d3d64b7364605959996f7f0f1c186d4366da0797f4dfe1ad0f3de" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Pass by value and use std::move", + "markdown": "Pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 34, + "charOffset": 655, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 592, + "charLength": 174, + "snippet": { + "text": "\r\n// Constructor for int64_t\r\nCustomAttribute::CustomAttribute(const std::string &initStringKey, const int64_t initInt64) :\r\n\tstringKey(initStringKey), value(initInt64) {\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a8ee49a322813449", + "equalIndicator/v1": "8f67d48af21d8624b365fb5cac88d4c279201b03a33b8e9db9a902c5a8ef13f8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 878, + "startColumn": 67, + "charOffset": 30425, + "charLength": 25, + "snippet": { + "text": "wheelGemBasicSlot1Allowed" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 876, + "startColumn": 1, + "charOffset": 30262, + "charLength": 258, + "snippet": { + "text": "\tgem.affinity = static_cast(uniform_random(0, 3));\r\n\tgem.quality = quality;\r\n\tgem.basicModifier1 = wheelGemBasicSlot1Allowed[uniform_random(0, wheelGemBasicSlot1Allowed.size() - 1)];\r\n\tgem.basicModifier2 = {};\r\n\tgem.supremeModifier = {};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c5af1f7030ab964d", + "equalIndicator/v1": "8f81c9aec3b222701dc797956f00d6f9e8528c388422867b85be8f5f1bbe0d8c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 571, + "startColumn": 55, + "charOffset": 15924, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 569, + "startColumn": 1, + "charOffset": 15865, + "charLength": 143, + "snippet": { + "text": "}\r\n\r\nvoid Party::clearPlayerPoints(std::shared_ptr player) {\r\n\tauto it = ticksMap.find(player->getID());\r\n\tif (it != ticksMap.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6624ac3a34d65797", + "equalIndicator/v1": "8f8fb410e7bf1d42784c550de7ece19f9bec9c3951040d8ab9a6cc74537a4a6b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 823, + "startColumn": 20, + "charOffset": 31588, + "charLength": 5, + "snippet": { + "text": "tries" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 821, + "startColumn": 1, + "charOffset": 31539, + "charLength": 118, + "snippet": { + "text": "\r\n\tlua_pushnumber(L, skill);\r\n\tlua_pushnumber(L, tries);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 3, 1) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c74fc1d08c411ab9", + "equalIndicator/v1": "8f919b72f47ae209c01be7cb90dfe193a655f075d1ca2e0b7f949eaf591e27ca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'container' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'container' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3073, + "startColumn": 35, + "charOffset": 93347, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3071, + "startColumn": 1, + "charOffset": 93282, + "charLength": 156, + "snippet": { + "text": "\r\n\tvoid removeEmptyRewards();\r\n\tbool hasOtherRewardContainerOpen(const std::shared_ptr container) const;\r\n\r\n\tvoid checkAndShowBlessingMessage();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6490c7c3cef78dbc", + "equalIndicator/v1": "8fc3c398ebe209793002cffcf3344309c2199615ce3bd62705796bdb97dc044c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: buffer", + "markdown": "Constructor does not initialize these fields: buffer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 7, + "charOffset": 537, + "charLength": 14, + "snippet": { + "text": "NetworkMessage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 517, + "charLength": 76, + "snippet": { + "text": "class RSA;\r\n\r\nclass NetworkMessage {\r\npublic:\r\n\tusing MsgSize_t = uint16_t;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c1529d280ac9f798", + "equalIndicator/v1": "8fdd79691d8e2f5286ca8bdefcdaad7fc3ef515ed395b1ae3013ecf1032b9d80" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 38, + "startColumn": 3, + "charOffset": 1138, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 36, + "startColumn": 1, + "charOffset": 1129, + "charLength": 205, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tuint16_t id = pugi::cast(attr.value());\r\n\r\n\t\tauto res = vocationsMap.emplace(std::piecewise_construct, std::forward_as_tuple(id), std::forward_as_tuple(std::make_shared(id)));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59a56592b1549c48", + "equalIndicator/v1": "900141ff0d86969ea0cd2b73e07f494918c86a46120b7ec6c4aee0a8f24dcbad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 812, + "startColumn": 27, + "charOffset": 26024, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 810, + "startColumn": 1, + "charOffset": 25992, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b32344e5b1f322a2", + "equalIndicator/v1": "900764377eff7c0ab272b8d534bd0dd47ce8ffaae030ddf1c28a3051aa759bc1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'vocName' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'vocName' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 181, + "startColumn": 34, + "charOffset": 6228, + "charLength": 7, + "snippet": { + "text": "vocName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 179, + "startColumn": 1, + "charOffset": 6168, + "charLength": 164, + "snippet": { + "text": "\t\treturn vocEquipMap;\r\n\t}\r\n\tvoid addVocEquipMap(std::string vocName) {\r\n\t\tuint16_t vocationId = g_vocations().getVocationId(vocName);\r\n\t\tif (vocationId != 65535) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f889e787dee30fc0", + "equalIndicator/v1": "900a8ba5ca6e721c8cf7c0b934f6def1c1a0256182165b2b69f123f10233af67" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 443, + "startColumn": 24, + "charOffset": 13112, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 441, + "startColumn": 1, + "charOffset": 13084, + "charLength": 261, + "snippet": { + "text": "}\r\n\r\nReturnValue Container::queryAdd(int32_t addIndex, const std::shared_ptr &addThing, uint32_t addCount, uint32_t flags, std::shared_ptr actor /* = nullptr*/) {\r\n\tbool childIsOwner = hasBitSet(FLAG_CHILDISOWNER, flags);\r\n\tif (childIsOwner) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "05d23f7603ede807", + "equalIndicator/v1": "909134cb414150fd128201d2c261eb1ee26534269dc04da63efe4fec34be225e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 597, + "startColumn": 71, + "charOffset": 16033, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 595, + "startColumn": 1, + "charOffset": 15958, + "charLength": 187, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updatePercentSkills(std::shared_ptr player) {\r\n\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\r\n\t\tskills_t skill = static_cast(i);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "22914ccc28c41e2c", + "equalIndicator/v1": "90f143b6335374e7cbc9950c511091b59d761096b99262c1d421ec50bd0619af" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 771, + "startColumn": 2, + "charOffset": 29619, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 769, + "startColumn": 1, + "charOffset": 29612, + "charLength": 52, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "feb110afcf068ab3", + "equalIndicator/v1": "91033633d2a16f72263e93a00e48fdf560b74d8100ba8f34cffff53b652f2682" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 382, + "startColumn": 104, + "charOffset": 14324, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 380, + "startColumn": 1, + "charOffset": 14216, + "charLength": 265, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInBattleList - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1d3241f400d86c34", + "equalIndicator/v1": "9127f462b1d25ff145c9aaffb59bc5d20fc722281ad84c9762784b58ea53ddbc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 729, + "startColumn": 2, + "charOffset": 20156, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 727, + "startColumn": 1, + "charOffset": 20085, + "charLength": 194, + "snippet": { + "text": "\r\n\tConditionType_t conditionType = getNumber(L, 2);\r\n\tuint32_t subId = getNumber(L, 3, 0);\r\n\tpushBoolean(L, creature->hasCondition(conditionType, subId));\r\n\treturn 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e8877753d063bccf", + "equalIndicator/v1": "9138b7da2182691ce30dfc31d8b7c25a6a265bf0913e87bec097ec3411bc619f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 464, + "startColumn": 53, + "charOffset": 13710, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 462, + "startColumn": 1, + "charOffset": 13567, + "charLength": 266, + "snippet": { + "text": "\tvirtual void onAttackedCreatureBlockHit(BlockType_t) { }\r\n\tvirtual void onBlockHit() { }\r\n\tvirtual void onTakeDamage(std::shared_ptr, int32_t) { }\r\n\tvirtual void onChangeZone(ZoneType_t zone);\r\n\tvirtual void onAttackedCreatureChangeZone(ZoneType_t zone);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ecbf65fda3ade29e", + "equalIndicator/v1": "913d2619f918f670617c9ef13e2bea9e16c8b0901c3a30bbecf515d17ca5b004" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1759, + "startColumn": 57, + "charOffset": 52743, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1757, + "startColumn": 1, + "charOffset": 52682, + "charLength": 193, + "snippet": { + "text": "}\r\n\r\nvoid Creature::turnToCreature(std::shared_ptr creature) {\r\n\tconst Position &creaturePos = creature->getPosition();\r\n\tconst auto dx = Position::getOffsetX(position, creaturePos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ec75666469939256", + "equalIndicator/v1": "916e5d71c03a8f6d6991c201d746e3263d53feba4f34c9afd6ec513823f51268" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6647, + "startColumn": 38, + "charOffset": 231017, + "charLength": 9, + "snippet": { + "text": "std::ceil" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6645, + "startColumn": 1, + "charOffset": 230904, + "charLength": 353, + "snippet": { + "text": "\t\t\t\t} else {\r\n\t\t\t\t\tdamageReflected.secondary.type = damage.secondary.type;\r\n\t\t\t\t\tdamageReflected.primary.value = std::ceil(damage.secondary.value * secondaryReflectPercent / 100.) + std::max(-static_cast(std::ceil(attacker->getMaxHealth() * 0.01)), std::max(damage.secondary.value, -(static_cast(secondaryReflectFlat))));\r\n\t\t\t\t}\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ffaad8e52eed9477", + "equalIndicator/v1": "917b39f76df221082b4d40f6fdceb9c8ad2ec3ba5f8d4853363f9520eba92963" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7402, + "startColumn": 64, + "charOffset": 257722, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7400, + "startColumn": 1, + "charOffset": 257631, + "charLength": 311, + "snippet": { + "text": "\r\nvoid Game::sendMessages(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\r\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "03c5a25df884f396", + "equalIndicator/v1": "91830235f9e19a726e4730c2bbaa6e4c06bbd40df60c6c76842c3efaba9039ef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 594, + "startColumn": 13, + "charOffset": 28793, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 592, + "startColumn": 1, + "charOffset": 28599, + "charLength": 415, + "snippet": { + "text": "\t} else if (stringValue == \"absorbpercentlifedrain\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_LIFEDRAIN)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentmanadrain\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_MANADRAIN)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentdrown\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eaba432d3e045cf7", + "equalIndicator/v1": "919b981a7945d444058c3b9c4e7ab4859d41b9c9e39051f17012895cdf803b08" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 703, + "startColumn": 63, + "charOffset": 25077, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 701, + "startColumn": 1, + "charOffset": 25010, + "charLength": 166, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) {\r\n\t// Player:onMove()\r\n\tif (info.playerOnRemoveCount == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dd6742a3fbca66b4", + "equalIndicator/v1": "91f58d1cffbadaf97ed877dc15e652cf63c273100bc2c2db839a3a3beb8f117e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 59, + "startColumn": 24, + "charOffset": 1847, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 57, + "startColumn": 1, + "charOffset": 1611, + "charLength": 615, + "snippet": { + "text": "\tstd::shared_ptr getBestiaryCharm(charmRune_t activeCharm, bool force = false) const;\r\n\tvoid addBestiaryKill(std::shared_ptr player, const std::shared_ptr mtype, uint32_t amount = 1);\r\n\tbool parseCharmCombat(const std::shared_ptr charm, std::shared_ptr player, std::shared_ptr target, int32_t realDamage, bool dueToPotion = false, bool checkArmor = false);\r\n\tvoid addCharmPoints(std::shared_ptr player, uint16_t amount, bool negative = false);\r\n\tvoid sendBuyCharmRune(std::shared_ptr player, charmRune_t runeID, uint8_t action, uint16_t raceid);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "24dfdbf745085383", + "equalIndicator/v1": "91fc4a7777ce836bbbe09ae654dae5435272c459499d0ca553cd269c9dce91a0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1646, + "startColumn": 58, + "charOffset": 44545, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1644, + "startColumn": 1, + "charOffset": 44483, + "charLength": 283, + "snippet": { + "text": "}\r\n\r\nbool ConditionDamage::doDamage(std::shared_ptr creature, int32_t healthChange) {\r\n\tauto attacker = g_game().getPlayerByGUID(owner) ? g_game().getPlayerByGUID(owner)->getCreature() : g_game().getCreatureByID(owner);\r\n\tbool isPlayer = attacker && attacker->getPlayer();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "de46a04fb8d36e4c", + "equalIndicator/v1": "921ec8b33c278c9f26234d07623db081cb18b5d211441f6aba58b4278a00cf82" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'mtype' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'mtype' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 506, + "startColumn": 83, + "charOffset": 13913, + "charLength": 5, + "snippet": { + "text": "mtype" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 504, + "startColumn": 1, + "charOffset": 13826, + "charLength": 170, + "snippet": { + "text": "}\r\n\r\nvoid Player::addMonsterToCyclopediaTrackerList(const std::shared_ptr mtype, bool isBoss, bool reloadClient /* = false */) {\r\n\tif (!client) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eb500a60bb5e4eab", + "equalIndicator/v1": "92237836154d4ab003ed14d10074c45e641c51fd73f33c2dcc12f07a524d3848" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'needPremium' can be made const", + "markdown": "Method 'needPremium' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 232, + "startColumn": 7, + "charOffset": 7413, + "charLength": 11, + "snippet": { + "text": "needPremium" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 230, + "startColumn": 1, + "charOffset": 7379, + "charLength": 73, + "snippet": { + "text": "\t\treqMagLevel = level;\r\n\t}\r\n\tbool needPremium() {\r\n\t\treturn premium;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5596a4fcd3606d2", + "equalIndicator/v1": "92367e4c269959085b9a638022d02547d65fa0873f6ba8148b48204c6d986ffe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 689, + "startColumn": 116, + "charOffset": 22555, + "charLength": 13, + "snippet": { + "text": "spellCooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 687, + "startColumn": 1, + "charOffset": 22366, + "charLength": 283, + "snippet": { + "text": "\t\tspellCooldown -= augmentCooldownReduction;\r\n\t\tif (spellCooldown > 0) {\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLCOOLDOWN, spellCooldown / rateCooldown, 0, false, m_spellId);\r\n\t\t\tplayer->addCondition(condition);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6a1e4cfe0408be5e", + "equalIndicator/v1": "924dd968530ebf791e4f5e4be280539c121aad2a5d1eb08a85b769019794c6e0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 553, + "startColumn": 64, + "charOffset": 21061, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 551, + "startColumn": 1, + "charOffset": 20993, + "charLength": 212, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnChangeZone(std::shared_ptr player, ZoneType_t zone) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnChangeZone - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "92828f9ab346cb02", + "equalIndicator/v1": "9258b25d2eee35f9ea25312e82728728a5cf27d8770050d52c72516bdd51b44a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 234, + "startColumn": 7, + "charOffset": 7382, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 232, + "startColumn": 1, + "charOffset": 7304, + "charLength": 394, + "snippet": { + "text": "\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b32275e5108f38fd", + "equalIndicator/v1": "926082c013176027968ef2144f404d4ac6757b8396f0a06960daab0eafab3dc4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3490, + "startColumn": 33, + "charOffset": 105677, + "charLength": 12, + "snippet": { + "text": "tmpContainer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3488, + "startColumn": 1, + "charOffset": 105561, + "charLength": 280, + "snippet": { + "text": "\t\t\t\tuint32_t n = tmpContainer->capacity() - tmpContainer->size();\r\n\t\t\t\twhile (n) {\r\n\t\t\t\t\tif (tmpContainer->queryAdd(tmpContainer->capacity() - n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\r\n\t\t\t\t\t\tindex = tmpContainer->capacity() - n;\r\n\t\t\t\t\t\t*destItem = nullptr;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ba2fab826d731e4", + "equalIndicator/v1": "9263e1289e0b08ead9f5b95e367e2407727e66ad7b9599efd1bcf6f84100b216" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 818, + "startColumn": 50, + "charOffset": 24869, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 816, + "startColumn": 1, + "charOffset": 24803, + "charLength": 155, + "snippet": { + "text": "\t\treturn 0;\r\n\t}\r\n\tvirtual void dropLoot(std::shared_ptr, std::shared_ptr) { }\r\n\tvirtual uint16_t getLookCorpse() const {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc57e532ce804d53", + "equalIndicator/v1": "926d9f034cbe53d56c652076c7c959bf8c6a203c1b89dfd88ae33e0039a70b83" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 20, + "charOffset": 761, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 737, + "charLength": 83, + "snippet": { + "text": "}\r\n\r\nuint32_t Cylinder::getItemTypeCount(uint16_t, int32_t) const {\r\n\treturn 0;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2e6c01acfddd966a", + "equalIndicator/v1": "9293cb9521a2738cbc2f2a5d837b67e668da71cea0a1ce3feb384d8b739fe968" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 132, + "startColumn": 3, + "charOffset": 4148, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 130, + "startColumn": 1, + "charOffset": 4061, + "charLength": 302, + "snippet": { + "text": "\t\tstd::array vData = {};\r\n\t\tmemcpy(vData.data(), buffer + readPos, 8);\r\n\t\tfor (int32_t i = 0; i < 32; ++i) {\r\n\t\t\tvData[0] += ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][0];\r\n\t\t\tvData[1] += ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][1];\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cc21e677a29cdcfa", + "equalIndicator/v1": "92949d6fa5f9c2eb8d4501fb0940c497fcd575c59b3835973efb1873e330eabf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7383, + "startColumn": 64, + "charOffset": 256879, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7381, + "startColumn": 1, + "charOffset": 256773, + "charLength": 326, + "snippet": { + "text": "\r\nvoid Game::sendDamageMessageAndEffects(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\r\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c4bf15d5a9bceb46", + "equalIndicator/v1": "92abb408c8ccdace748a9e4357ffe273ada9a9c9c1d77ba803f2e04fa3b778a4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 442, + "startColumn": 8, + "charOffset": 26914, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 440, + "startColumn": 1, + "charOffset": 26901, + "charLength": 119, + "snippet": { + "text": "\t}\r\n\r\n\tconst uint16_t oldRace = result->getNumber(\"raceid\");\r\n\tconst auto monsterlist = getBestiaryList();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f95c376393f05702", + "equalIndicator/v1": "92d567b563d08e101519f0f84278c0d13a368451a76e175e59774644622a004f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 775, + "startColumn": 7, + "charOffset": 29770, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 773, + "startColumn": 1, + "charOffset": 29663, + "charLength": 249, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnLoseExperience(std::shared_ptr player, uint64_t &exp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLoseExperience - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "92c3769ed29e4050", + "equalIndicator/v1": "92e458bc78aac3031d8d320b311ab9cb8ccb40f2e6d1f35cf07823763f904b71" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1588, + "startColumn": 2, + "charOffset": 47036, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1586, + "startColumn": 1, + "charOffset": 46972, + "charLength": 168, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseCloseChannel(NetworkMessage &msg) {\r\n\tuint16_t channelId = msg.get();\r\n\tg_game().playerCloseChannel(player->getID(), channelId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd64884ce73be21f", + "equalIndicator/v1": "934222cd040177142c8a492e0111c9a46f10377b45c027d181b61c6d28d219a2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 792, + "startColumn": 71, + "charOffset": 25788, + "charLength": 11, + "snippet": { + "text": "attackValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 790, + "startColumn": 1, + "charOffset": 25659, + "charLength": 176, + "snippet": { + "text": "\r\n\tint32_t minValue = std::round(player->getLevel() / 5);\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\r\n\r\n\tif (target) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9b25504c683c80f0", + "equalIndicator/v1": "93493f32ee9c0ffc6d90f7919349baee734d457f041f38ea16e88e408f88651d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 251, + "startColumn": 28, + "charOffset": 8119, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 249, + "startColumn": 1, + "charOffset": 7974, + "charLength": 443, + "snippet": { + "text": "\tstatic uint32_t RemoveItemField(std::shared_ptr item, std::shared_ptr tileItem, const Position &pos);\r\n\r\n\tstatic uint32_t EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool boolean);\r\n\tstatic uint32_t DeEquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool boolean);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "16f8a57ac3de8ae7", + "equalIndicator/v1": "939b9a8ccb5e4cf3da13135fb4b45c68ce5618b17b119578ebc18a547ff00651" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 176, + "startColumn": 8, + "charOffset": 4468, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 174, + "startColumn": 1, + "charOffset": 4372, + "charLength": 213, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsMultiUse(lua_State* L) {\r\n\t// itemType:isMultiUse()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isMultiUse());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db280b0f92fae188", + "equalIndicator/v1": "93c6570b8dad04de594ef6581779478874bca50d62c4e31de23017423d7800ed" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1396, + "startColumn": 26, + "charOffset": 48203, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1394, + "startColumn": 1, + "charOffset": 48031, + "charLength": 239, + "snippet": { + "text": "\r\n[[maybe_unused]] void Combat::doCombatDefault(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\r\n\tdoCombatDefault(caster, target, caster ? caster->getPosition() : Position(), params);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "07d2c994699f9860", + "equalIndicator/v1": "94081fc938e01c76fe70a9c3ec055ee78533f222bae31f4d43ec591d903282a5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'getManagedContainer' is within a recursive call chain", + "markdown": "Function 'getManagedContainer' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1107, + "startColumn": 36, + "charOffset": 32292, + "charLength": 19, + "snippet": { + "text": "getManagedContainer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1105, + "startColumn": 1, + "charOffset": 32252, + "charLength": 215, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Player::getManagedContainer(ObjectCategory_t category, bool isLootContainer) const {\r\n\tif (category != OBJECTCATEGORY_DEFAULT && !isPremium()) {\r\n\t\tcategory = OBJECTCATEGORY_DEFAULT;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8fe59e9c7c4e6294", + "equalIndicator/v1": "940ae7e35f92f34fa542bb21299aa4014b6331f1699d70375347a23e4bc4a884" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 74, + "startColumn": 10, + "charOffset": 1842, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 72, + "startColumn": 1, + "charOffset": 1752, + "charLength": 111, + "snippet": { + "text": "std::string ServicePort::get_protocol_names() const {\r\n\tif (services.empty()) {\r\n\t\treturn std::string();\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d6653c4f91f26cc7", + "equalIndicator/v1": "9413de63a9d534530594905ca6273a56370b7f35e25279864a14e1748f368f6a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 969, + "startColumn": 27, + "charOffset": 34965, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 967, + "startColumn": 1, + "charOffset": 34933, + "charLength": 131, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnTradeRequest, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b3203f9f05e1ebe", + "equalIndicator/v1": "941a0443fb55508ba806a2637d6eab8da090af430e8120f26018f1f48b126756" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 558, + "startColumn": 22, + "charOffset": 18003, + "charLength": 15, + "snippet": { + "text": "getWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 556, + "startColumn": 1, + "charOffset": 17977, + "charLength": 242, + "snippet": { + "text": "}\r\n\r\nint32_t WeaponMelee::getWeaponDamage(std::shared_ptr player, std::shared_ptr, std::shared_ptr item, bool maxDamage /*= false*/) const {\r\n\tusing namespace std;\r\n\tint32_t attackSkill = player->getWeaponSkill(item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ab04ba569f5b5e1", + "equalIndicator/v1": "942778b553435d3b88f5002097809b41de64b5c331d85bec7142cb53af635f62" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 799, + "startColumn": 38, + "charOffset": 28931, + "charLength": 10, + "snippet": { + "text": "toCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 797, + "startColumn": 1, + "charOffset": 28839, + "charLength": 146, + "snippet": { + "text": "\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r\n\tscriptInterface.callVoidFunction(7);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "180ea1929fdcaf24", + "equalIndicator/v1": "943bf9cc7f7a9fc916d893349d9706d222ce7c2bdf2b00ab81ae70c709709a85" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 54, + "startColumn": 22, + "charOffset": 2301, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 52, + "startColumn": 1, + "charOffset": 2225, + "charLength": 207, + "snippet": { + "text": "\t * \\returns ReturnValue holds the return value\r\n\t */\r\n\tvirtual ReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr = nullptr) = 0;\r\n\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd24c38664047aed", + "equalIndicator/v1": "945061710e3e765357a80260f884df86cf9c15bcd15533620a593c08f4e595af" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 185, + "startColumn": 51, + "charOffset": 5815, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 183, + "startColumn": 1, + "charOffset": 5651, + "charLength": 247, + "snippet": { + "text": "\r\nReturnValue Actions::canUse(std::shared_ptr player, const Position &pos, std::shared_ptr item) {\r\n\tconst std::shared_ptr action = getAction(item);\r\n\tif (action != nullptr) {\r\n\t\treturn action->canExecuteAction(player, pos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7977580e99a73d01", + "equalIndicator/v1": "9461fe1758245e8d2c92660da3ee6d5d998ec8d463a0366cde49a4cb5f633543" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Local copy 'oldLeader' of the variable 'leader' is never modified; consider avoiding the copy", + "markdown": "Local copy 'oldLeader' of the variable 'leader' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 182, + "startColumn": 7, + "charOffset": 5040, + "charLength": 9, + "snippet": { + "text": "oldLeader" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 180, + "startColumn": 1, + "charOffset": 4965, + "charLength": 118, + "snippet": { + "text": "\tbroadcastPartyMessage(MESSAGE_PARTY_MANAGEMENT, ss.str(), true);\r\n\r\n\tauto oldLeader = leader;\r\n\tm_leader = player;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1f403c7e882a53ea", + "equalIndicator/v1": "949e9a084e25120de4d5732647ae5e15cb1eb91b313220c2a8cd6a7f23d56b3b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 168, + "startColumn": 7, + "charOffset": 5825, + "charLength": 16, + "snippet": { + "text": "internalAddThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 166, + "startColumn": 1, + "charOffset": 5747, + "charLength": 222, + "snippet": { + "text": "\r\n\tvoid internalAddThing(std::shared_ptr thing) override final;\r\n\tvoid internalAddThing(uint32_t index, std::shared_ptr thing) override final;\r\n\tvoid startDecaying() override;\r\n\tvoid stopDecaying() override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7d510c9fa4f78756", + "equalIndicator/v1": "94b0b8e1d624fb670debd595cc9245398161e479d846629add93156b0f166cd2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1733, + "startColumn": 27, + "charOffset": 60561, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1731, + "startColumn": 1, + "charOffset": 60529, + "charLength": 159, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d2cd6f32a1f2731b", + "equalIndicator/v1": "94dc6a760add1337934c64f4a2922870d87c4374b762bd9c199d00fc5b86ac74" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'itemIds' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'itemIds' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5651, + "startColumn": 115, + "charOffset": 198860, + "charLength": 7, + "snippet": { + "text": "itemIds" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5649, + "startColumn": 1, + "charOffset": 198741, + "charLength": 207, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerQuickLootBlackWhitelist(uint32_t playerId, QuickLootFilter_t filter, const std::vector itemIds) {\r\n\tstd::shared_ptr player = getPlayerByID(playerId);\r\n\tif (!player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5ad26ed98b17e34", + "equalIndicator/v1": "94ddf55c6243bea5f40aa0fef292309d2f0941c31f6886769ee6afd322af7b86" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 751, + "startColumn": 26, + "charOffset": 22074, + "charLength": 10, + "snippet": { + "text": "getMaxMana" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 749, + "startColumn": 1, + "charOffset": 21983, + "charLength": 188, + "snippet": { + "text": "\t\tcase STAT_MAXMANAPOINTS: {\r\n\t\t\tif (getMana() > getMaxMana()) {\r\n\t\t\t\tCreature::changeMana(getMaxMana() - getMana());\r\n\t\t\t} else {\r\n\t\t\t\tg_game().addPlayerMana(static_self_cast());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef4c6806f496d71a", + "equalIndicator/v1": "9542d7042bb02d59717d875bd324c01f7d725424a4bff737b8ce30dfbea7ea00" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 869, + "startColumn": 26, + "charOffset": 39954, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 867, + "startColumn": 1, + "charOffset": 39739, + "charLength": 379, + "snippet": { + "text": "// SLOT_BLUE_BOTTOM_100 = 33\r\nvoid IOWheel::slotBlueBottom100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\tbool onSlot = isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_BLUE_BOTTOM_100);\r\n\tif (isKnight(vocationCipId) && onSlot) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aa29d8935493a3c3", + "equalIndicator/v1": "954f5167fdfeaf2fd23347d943913389b24c14c3774bb8f1f08bc170133210bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 62, + "startColumn": 2, + "charOffset": 1650, + "charLength": 15, + "snippet": { + "text": "lua_createtable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 60, + "startColumn": 1, + "charOffset": 1603, + "charLength": 147, + "snippet": { + "text": "\tconst auto items = imbuement->getItems();\r\n\r\n\tlua_createtable(L, items.size(), 0);\r\n\tfor (const auto &itm : items) {\r\n\t\tlua_createtable(L, 0, 2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3f5d144db73569a7", + "equalIndicator/v1": "9553f9c9a60c7d91ac2c9910b1dc73263da2167ec874eb884b522a469f87b2a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'unserializeItemNode' is within a recursive call chain", + "markdown": "Function 'unserializeItemNode' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 253, + "startColumn": 69, + "charOffset": 7222, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 251, + "startColumn": 1, + "charOffset": 7149, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nbool BasicItem::unserializeItemNode(FileStream &stream, uint16_t x, uint16_t y, uint8_t z) {\r\n\tif (stream.isProp(OTB::Node::END)) {\r\n\t\tstream.back();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ce0c335d089eef18", + "equalIndicator/v1": "9570c9eb8523b354c0b0936d191535972e1610f1f6872eef835a2307aa08f1ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 353, + "startColumn": 2, + "charOffset": 8777, + "charLength": 8, + "snippet": { + "text": "uint64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 351, + "startColumn": 1, + "charOffset": 8770, + "charLength": 116, + "snippet": { + "text": "\t}\r\n\r\n\tuint64_t stackSize = static_cast(itemType->stackSize);\r\n\tlua_pushnumber(L, stackSize);\r\n\treturn 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f0cf870d47bcd30c", + "equalIndicator/v1": "959a0ca0af95d4d886ed38ad2769b1d9645690edfa99492a217b78c334fa5896" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 174, + "startColumn": 12, + "charOffset": 4772, + "charLength": 7, + "snippet": { + "text": "uint8_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 172, + "startColumn": 1, + "charOffset": 4677, + "charLength": 194, + "snippet": { + "text": "// Merge thread events with main dispatch events\r\nvoid Dispatcher::mergeEvents() {\r\n\tconstexpr uint8_t serial = static_cast(TaskGroup::Serial);\r\n\r\n\tfor (const auto &thread : threads) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "087f5338b4477f5a", + "equalIndicator/v1": "959c6cbe6537f6eb6196a82aa7625f6b4b4f160a570534dc3f3b8c25f998d314" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 251, + "startColumn": 128, + "charOffset": 7998, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 249, + "startColumn": 1, + "charOffset": 7866, + "charLength": 241, + "snippet": { + "text": "}\r\n\r\nReturnValue Actions::internalUseItem(std::shared_ptr player, const Position &pos, uint8_t index, std::shared_ptr item, bool isHotkey) {\r\n\tif (std::shared_ptr door = item->getDoor()) {\r\n\t\tif (!door->canUse(player)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4555aba0e22aa188", + "equalIndicator/v1": "95c478333cbe42aac7bf65896e73ff144e9b4ced6d1588f86c4cf5a55c88207e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 978, + "startColumn": 2, + "charOffset": 26638, + "charLength": 2, + "snippet": { + "text": "if" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 976, + "startColumn": 1, + "charOffset": 26510, + "charLength": 175, + "snippet": { + "text": "\t// player:addMana(manaChange[, animationOnLoss = false])\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (!player) {\r\n\t\tlua_pushnil(L);\r\n\t\treturn 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0f492ff82a909f9a", + "equalIndicator/v1": "95caee0d3802cc0169a3831532a78f847a50a1f34822e54539b02c234d013bec" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 91, + "startColumn": 21, + "charOffset": 2401, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 89, + "startColumn": 1, + "charOffset": 2305, + "charLength": 150, + "snippet": { + "text": "\tstd::shared_ptr tile = getUserdataShared(L, 1);\r\n\tif (tile) {\r\n\t\tlua_pushnumber(L, tile->getThingCount());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "84d7d5502966ecea", + "equalIndicator/v1": "95ed201206b421c50581b6aeef385ea6a8b30e85ca48b858dfaa4d49fb73c111" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 971, + "startColumn": 41, + "charOffset": 37008, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 969, + "startColumn": 1, + "charOffset": 36962, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "566684bc302e0510", + "equalIndicator/v1": "95ee614eaf1b5183d60c6c7b095e21c59cb72b1ea8673df98b304983f7c1ed27" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 172, + "startColumn": 71, + "charOffset": 5046, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 170, + "startColumn": 1, + "charOffset": 4971, + "charLength": 131, + "snippet": { + "text": "}\r\n\r\nAccessHouseLevel_t House::getHouseAccessLevel(std::shared_ptr player) const {\r\n\tif (!player) {\r\n\t\treturn HOUSE_OWNER;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2f747badab691748", + "equalIndicator/v1": "9602c3e15dd8146e8f454669b91c6b176d418135e34a98aabab2edc7e638a2dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1796, + "startColumn": 59, + "charOffset": 48472, + "charLength": 3, + "snippet": { + "text": "med" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1794, + "startColumn": 1, + "charOffset": 48389, + "charLength": 170, + "snippet": { + "text": "\t\t\tlist.push_back(i);\r\n\r\n\t\t\tx1 = std::fabs(1.0 - ((static_cast(sum)) + i) / med);\r\n\t\t\tx2 = std::fabs(1.0 - (static_cast(sum) / med));\r\n\t\t} while (x1 < x2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5a7dfa03b3acdeef", + "equalIndicator/v1": "960b8e495d424487f6c438bea78eede74baf7c3da1de0e9b1920e2631e988937" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 514, + "startColumn": 64, + "charOffset": 15289, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 512, + "startColumn": 1, + "charOffset": 15221, + "charLength": 157, + "snippet": { + "text": "}\r\n\r\nbool House::executeTransfer(std::shared_ptr item, std::shared_ptr newOwner) {\r\n\tif (transferItem != item) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8c8b63e9f84524bb", + "equalIndicator/v1": "96257d7e4da6dd8b8f438e511282b533ee4946426c237532de65a98305c26871" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 269, + "startColumn": 65, + "charOffset": 7982, + "charLength": 9, + "snippet": { + "text": "moveEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 267, + "startColumn": 1, + "charOffset": 7913, + "charLength": 235, + "snippet": { + "text": "}\r\n\r\nbool MoveEvents::registerEvent(const std::shared_ptr moveEvent, const Position &position, std::map &moveListMap) const {\r\n\tauto it = moveListMap.find(position);\r\n\tif (it == moveListMap.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "11d52a6117aa7296", + "equalIndicator/v1": "9633b8aeb34a7c948129fd59f1c14e4923b6b970323c2f6fdb0832907438df74" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from '::std::_Common_float_type_t' (aka 'double') to 'unsigned long long'", + "markdown": "Narrowing conversion from '::std::_Common_float_type_t' (aka 'double') to 'unsigned long long'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 286, + "startColumn": 42, + "charOffset": 9335, + "charLength": 4, + "snippet": { + "text": "1600" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 284, + "startColumn": 1, + "charOffset": 9288, + "charLength": 176, + "snippet": { + "text": "\t}\r\n\r\n\tuint64_t reqMana = std::floor(1600 * std::pow(manaMultiplier, static_cast(magLevel) - 1));\r\n\tcacheMana[magLevel] = reqMana;\r\n\treturn reqMana;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4a18234718c67264", + "equalIndicator/v1": "963d7cc2763e53b751c33be06f5ad27ed018d843a993fc4178dfa38623e7f945" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 198, + "startColumn": 34, + "charOffset": 5101, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 196, + "startColumn": 1, + "charOffset": 5003, + "charLength": 161, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.extraDefense = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4af0ec27ad603057", + "equalIndicator/v1": "964a5c18480e428334b9f6b8ebfae6e7ba715f08e5fda467dae05854cb7cfdfe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 368, + "startColumn": 27, + "charOffset": 12095, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 366, + "startColumn": 1, + "charOffset": 12063, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5b09f07f125c15af", + "equalIndicator/v1": "96527fc22547959f4c928b293e23f43a20ff89192392e34cb8d2309e65014697" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1033, + "startColumn": 54, + "charOffset": 33663, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1031, + "startColumn": 1, + "charOffset": 33605, + "charLength": 208, + "snippet": { + "text": "}\r\n\r\nbool Combat::doCombatChain(std::shared_ptr caster, std::shared_ptr target, bool aggressive) const {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!params.chainCallback) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dbeffa71fdca1bff", + "equalIndicator/v1": "966cc5d455cbd7d1901334580db78a5b105474125dfa68cff51c2911b459edeb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1486, + "startColumn": 41, + "charOffset": 44306, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1484, + "startColumn": 1, + "charOffset": 44159, + "charLength": 181, + "snippet": { + "text": "\tvoid sendTextWindow(std::shared_ptr item, uint16_t maxlen, bool canWrite) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendTextWindow(windowTextId, item, maxlen, canWrite);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bb8677eca9529f10", + "equalIndicator/v1": "96864fe7f27cbea4dbf9d4f3845bc77cc63d71629feaf336076fcd6889aad79b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 222, + "startColumn": 7, + "charOffset": 6824, + "charLength": 12, + "snippet": { + "text": "replaceThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 220, + "startColumn": 1, + "charOffset": 6661, + "charLength": 321, + "snippet": { + "text": "\tvoid updateTileFlags(const std::shared_ptr &item);\r\n\tvoid updateThing(std::shared_ptr thing, uint16_t itemId, uint32_t count) override final;\r\n\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override final;\r\n\r\n\tvoid removeThing(std::shared_ptr thing, uint32_t count) override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "90facd474638b5aa", + "equalIndicator/v1": "9688ab73216d679aa6c93c98b50f4d59ca20c313821f12af98bab57a2c35d7b9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 110, + "startColumn": 8, + "charOffset": 2819, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 108, + "startColumn": 1, + "charOffset": 2723, + "charLength": 234, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsStowable(lua_State* L) {\r\n\t// itemType:isStowable()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->stackable && itemType->wareId > 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bb3e4cf31884f7b4", + "equalIndicator/v1": "9694d3a4105b9ed651a62999d34ce558d24ffa1f476069da20d2cced3f864b36" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2323, + "startColumn": 14, + "charOffset": 72351, + "charLength": 5, + "snippet": { + "text": "Class" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2321, + "startColumn": 1, + "charOffset": 72295, + "charLength": 191, + "snippet": { + "text": "\r\n\tuint16_t raceId = msg.get();\r\n\tstd::string Class = \"\";\r\n\tstd::shared_ptr mtype = nullptr;\r\n\tstd::map mtype_list = g_game().getBestiaryList();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "423c5ba391435eae", + "equalIndicator/v1": "96a7dda31075f7170d0df1ffd1f623d721372386dc39c65a6f7695bc749f965c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2024, + "startColumn": 18, + "charOffset": 59980, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2022, + "startColumn": 1, + "charOffset": 59886, + "charLength": 106, + "snippet": { + "text": "// container\r\nvoid Player::onAddContainerItem(std::shared_ptr item) {\r\n\tcheckTradeState(item);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1636cee3136e72c3", + "equalIndicator/v1": "96b1187c775fa8613ecf412aa7c26afa993d99e152e087694869030882c6aa4a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 109, + "startColumn": 54, + "charOffset": 3215, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 107, + "startColumn": 1, + "charOffset": 3157, + "charLength": 123, + "snippet": { + "text": "}\r\n\r\nbool SaveManager::savePlayer(std::shared_ptr player) {\r\n\tif (player->isOnline()) {\r\n\t\tschedulePlayer(player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f0eb3618b3f837c", + "equalIndicator/v1": "96b8c126ce2a617ce934cefe0618beba51e844fb4f438923df49dc29fafb4891" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'isLogin' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'isLogin' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 526, + "startColumn": 82, + "charOffset": 14362, + "charLength": 10, + "snippet": { + "text": "const bool" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 524, + "startColumn": 1, + "charOffset": 14208, + "charLength": 220, + "snippet": { + "text": "\r\n\tint32_t getStorageValueByName(const std::string &storageName) const;\r\n\tvoid addStorageValueByName(const std::string &storageName, const int32_t value, const bool isLogin = false);\r\n\r\n\tstd::shared_ptr kv() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6e33a01ff8e24b80", + "equalIndicator/v1": "96bc84641b83061fe8c4d64b15420363bfec025cfff27a59eb7f5bb51d68c9b8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7744, + "startColumn": 3, + "charOffset": 243097, + "charLength": 8, + "snippet": { + "text": "skills_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7742, + "startColumn": 1, + "charOffset": 243076, + "charLength": 224, + "snippet": { + "text": "\t\t\tcontinue;\r\n\t\t}\r\n\t\tskills_t skill = static_cast(i);\r\n\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\r\n\t\tmsg.add(player->getBaseSkill(skill));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c7882b728e897d1f", + "equalIndicator/v1": "96d39129a6a22de84a64d483efd186f61c921e17f1974ead315310bcb06ebc5e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 213, + "startColumn": 59, + "charOffset": 6944, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 211, + "startColumn": 1, + "charOffset": 6881, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nbool IOLoginData::savePlayerGuard(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tthrow DatabaseException(\"Player nullptr in function: \" + std::string(__FUNCTION__));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "585694ee4e4aa4c7", + "equalIndicator/v1": "96d44a0b17dee055f00bc78f29d4cb04482aa4dfa1179308a21fabaf31d9d8bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1624, + "startColumn": 50, + "charOffset": 48427, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1622, + "startColumn": 1, + "charOffset": 48252, + "charLength": 203, + "snippet": { + "text": "\tvoid sendItemInspection(uint16_t itemId, uint8_t itemCount, std::shared_ptr item, bool cyclopedia) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendItemInspection(itemId, itemCount, item, cyclopedia);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "faf0ba727db860b7", + "equalIndicator/v1": "96de3f98d8f7f5df4c0033d4368e96d819bacc61490f702037853b2ac51bf009" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 75, + "startColumn": 9, + "charOffset": 2203, + "charLength": 8, + "snippet": { + "text": "Position" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 73, + "startColumn": 1, + "charOffset": 2126, + "charLength": 94, + "snippet": { + "text": "\t\treturn creature->getPlayer()->getTown()->getTemplePosition();\r\n\t}\r\n\treturn Position();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d66cb4b63e54ec70", + "equalIndicator/v1": "96f0b521e92d1a4e60395203565ee9eef6648c783c95356b4c21ea0c9d5e9358" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1783, + "startColumn": 2, + "charOffset": 53759, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1781, + "startColumn": 1, + "charOffset": 53691, + "charLength": 178, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseLookInBattleList(NetworkMessage &msg) {\r\n\tuint32_t creatureId = msg.get();\r\n\tg_game().playerLookInBattleList(player->getID(), creatureId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d9107bb39de43316", + "equalIndicator/v1": "971ca52f26824b1cbf8a7fa76fa88c6f3b351ef1d59cbf7b12a66d89e817dca1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2729, + "startColumn": 4, + "charOffset": 83954, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2727, + "startColumn": 1, + "charOffset": 83933, + "charLength": 154, + "snippet": { + "text": "\t\t}\r\n\t\tcase 2: {\r\n\t\t\tuint32_t memberID = msg.get();\r\n\t\t\tstd::shared_ptr member = g_game().getPlayerByGUID(memberID);\r\n\t\t\tif (!member) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e7cccaba716c09ee", + "equalIndicator/v1": "9743201492370d2de1e33e26a23019b30908b66533ead493557423d90b912296" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7451, + "startColumn": 26, + "charOffset": 259608, + "charLength": 12, + "snippet": { + "text": "targetPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7449, + "startColumn": 1, + "charOffset": 259446, + "charLength": 297, + "snippet": { + "text": "void Game::buildMessageAsSpectator(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\r\n\tconst std::string &damageString, std::string &spectatorMessage\r\n) const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "74b5798a21666c97", + "equalIndicator/v1": "975dc2f9d95e2ddf51db380f751cd59e8210d4967f12c7c862131748c9508e47" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3288, + "startColumn": 70, + "charOffset": 100508, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3286, + "startColumn": 1, + "charOffset": 100434, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureWalkthrough(std::shared_ptr creature, bool walkthrough) {\r\n\tif (!canSee(creature)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ad7370d48f640a39", + "equalIndicator/v1": "975e912b340a3fdf9cf8c7e3f80a6f5eff374c6e6e87690c0f94341f8f7baef8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'getReceiver' is within a recursive call chain", + "markdown": "Function 'getReceiver' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 119, + "startColumn": 15, + "charOffset": 4018, + "charLength": 11, + "snippet": { + "text": "getReceiver" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 117, + "startColumn": 1, + "charOffset": 3999, + "charLength": 168, + "snippet": { + "text": "}\r\n\r\nbool Mailbox::getReceiver(std::shared_ptr item, std::string &name) const {\r\n\tstd::shared_ptr container = item->getContainer();\r\n\tif (container) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "387e1ddb03e96bba", + "equalIndicator/v1": "976887b2c07cad1ac549c02bac34e5abfe5d90be3a8932218f421d4c988eae32" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 58, + "startColumn": 4, + "charOffset": 1870, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 56, + "startColumn": 1, + "charOffset": 1817, + "charLength": 247, + "snippet": { + "text": "\t\t// Another ServerInfo protocol\r\n\t\tcase 0x01: {\r\n\t\t\tuint16_t requestedInfo = msg.get(); // only a Byte is necessary, though we could add new info here\r\n\t\t\tstd::string characterName;\r\n\t\t\tif (requestedInfo & REQUEST_PLAYER_STATUS_INFO) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aeee02219cbdfecc", + "equalIndicator/v1": "976dd4dad03f9b3b867606f6725e776e5182e7e0df665f04621ae8a1fe842c27" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 554, + "startColumn": 7, + "charOffset": 21101, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 552, + "startColumn": 1, + "charOffset": 20996, + "charLength": 243, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnChangeZone(std::shared_ptr player, ZoneType_t zone) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnChangeZone - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "19d6bbafef7ec7b9", + "equalIndicator/v1": "978e78e7df0b487dc403b5fdc7b68ea1f30164753ff4d17491f95e25cc3c252d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'instant' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'instant' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 117, + "startColumn": 74, + "charOffset": 3714, + "charLength": 7, + "snippet": { + "text": "instant" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 115, + "startColumn": 1, + "charOffset": 3636, + "charLength": 177, + "snippet": { + "text": "}\r\n\r\nbool Spells::registerInstantLuaEvent(const std::shared_ptr instant) {\r\n\tif (instant) {\r\n\t\t// If the spell not have the \"spell:words()\" return a error message\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "588049dc50d28306", + "equalIndicator/v1": "97a4b7494737ce3c73825da4b2878197d644e9f3482ee24195f11dc457c764e6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'sscanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", + "markdown": "'sscanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 43, + "startColumn": 3, + "charOffset": 1638, + "charLength": 6, + "snippet": { + "text": "sscanf" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 41, + "startColumn": 1, + "charOffset": 1509, + "charLength": 360, + "snippet": { + "text": "\t\tint16_t endDay;\r\n\t\tsscanf(eventNode.attribute(\"startdate\").as_string(), \"%hd/%hd/%hd\", &startMonth, &startDay, &startYear);\r\n\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);\r\n\t\tint startDays = ((startYear * 365) + (startMonth * 30) + startDay);\r\n\t\tint endDays = ((endYear * 365) + (endMonth * 30) + endDay);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7e0ada696dcfd259", + "equalIndicator/v1": "97cb5b6ccbb1f55ada79b26a67b62c50573ee09dac6e322dcad1951b78587044" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'message' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'message' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 249, + "startColumn": 27, + "charOffset": 9309, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 247, + "startColumn": 1, + "charOffset": 9225, + "charLength": 145, + "snippet": { + "text": "\r\n\tvoid openImbuementWindow(std::shared_ptr item);\r\n\tvoid sendImbuementResult(const std::string message);\r\n\tvoid closeImbuementWindow();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "24beabd82db05fd1", + "equalIndicator/v1": "981024ddf97b0da2eca468b0d9c58a47d98196a5643dd90398e7c01cfe6233d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7171, + "startColumn": 43, + "charOffset": 250045, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7169, + "startColumn": 1, + "charOffset": 249899, + "charLength": 257, + "snippet": { + "text": "\r\n\t\tif (target->hasCondition(CONDITION_MANASHIELD) && damage.primary.type != COMBAT_UNDEFINEDDAMAGE) {\r\n\t\t\tint32_t manaDamage = std::min(target->getMana(), healthChange);\r\n\t\t\tuint32_t manaShield = target->getManaShield();\r\n\t\t\tif (manaShield > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "419d2d631d4e3cf1", + "equalIndicator/v1": "9825929ad3e2e687e667cce89ad2443f4f16a7abf0affc77c5eec858161022ef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 328, + "startColumn": 102, + "charOffset": 9835, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 326, + "startColumn": 1, + "charOffset": 9729, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nvoid LuaFunctionsLoader::setCreatureMetatable(lua_State* L, int32_t index, std::shared_ptr creature) {\r\n\tif (validateDispatcherContext(__FUNCTION__)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "16136a196037cab6", + "equalIndicator/v1": "982a9a9593443ac7b5917fe25464571b4d8261d7433d2b90781d8d8f4e913f4e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 102, + "startColumn": 89, + "charOffset": 3497, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 100, + "startColumn": 1, + "charOffset": 3403, + "charLength": 147, + "snippet": { + "text": "\t}\r\n\r\n\tbool playerCanUseItemOnHouseTile(std::shared_ptr player, std::shared_ptr item) {\r\n\t\tif (!player || !item) {\r\n\t\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6e9329886e69be45", + "equalIndicator/v1": "982dd4a086a61750f3be11ae7c7f9078d6b316a581555ccbdbb22ebf02fc49ec" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 562, + "startColumn": 41, + "charOffset": 21421, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 560, + "startColumn": 1, + "charOffset": 21375, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "95a1aee27e8d7e32", + "equalIndicator/v1": "98542ffdd9492390c237c90c75fcca0922edebc8cc26842a2ba9ffe0ffd5c4c4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Switch has 3 consecutive identical branches", + "markdown": "Switch has 3 consecutive identical branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4405, + "startColumn": 4, + "charOffset": 139387, + "charLength": 4, + "snippet": { + "text": "case" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4403, + "startColumn": 1, + "charOffset": 139366, + "charLength": 100, + "snippet": { + "text": "\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase MESSAGE_BOOSTED_CREATURE: {\r\n\t\t\t\tinternalType = MESSAGE_LOOT;\r\n\t\t\t\tbreak;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cdee605150133b93", + "equalIndicator/v1": "98590e3d2db5b196aa7fcc8d557945e9381bf6ff77be530355e57ef27569b184" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1567, + "startColumn": 25, + "charOffset": 46164, + "charLength": 5, + "snippet": { + "text": "myPos" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1565, + "startColumn": 1, + "charOffset": 46050, + "charLength": 402, + "snippet": { + "text": "\r\n\t// negative offset means that the action taken place is on a lower floor than ourself\r\n\tconst int8_t offsetz = myPos.getZ() - z;\r\n\treturn (x >= myPos.getX() - MAP_MAX_CLIENT_VIEW_PORT_X + offsetz) && (x <= myPos.getX() + (MAP_MAX_CLIENT_VIEW_PORT_X + 1) + offsetz) && (y >= myPos.getY() - MAP_MAX_CLIENT_VIEW_PORT_Y + offsetz) && (y <= myPos.getY() + (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) + offsetz);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3fddda0e5cd00b7d", + "equalIndicator/v1": "987bd80e975642c11c0528a414502408cd9ea86e8df92d22acf2d5f6e9dbca21" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Return type 'const std::shared_ptr' (aka 'const shared_ptr, allocator>>') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness", + "markdown": "Return type 'const std::shared_ptr' (aka 'const shared_ptr, allocator\\>\\>') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 119, + "startColumn": 2, + "charOffset": 3508, + "charLength": 34, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 117, + "startColumn": 1, + "charOffset": 3501, + "charLength": 190, + "snippet": { + "text": "\t}\r\n\r\n\tconst std::shared_ptr getString() const {\r\n\t\tif (std::holds_alternative>(value)) {\r\n\t\t\treturn std::get>(value);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "162657424ddc51ad", + "equalIndicator/v1": "989766816e9ac0a9d25752fc19d1a24b60eace5e3a44d46658fbbc41a74ec43d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2833, + "startColumn": 38, + "charOffset": 84614, + "charLength": 9, + "snippet": { + "text": "healthMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2831, + "startColumn": 1, + "charOffset": 84493, + "charLength": 302, + "snippet": { + "text": "\t\t\twhile (level > 1 && experience < Player::getExpForLevel(level)) {\r\n\t\t\t\t--level;\r\n\t\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r\n\t\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\r\n\t\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c4a8ded26d1f3ebf", + "equalIndicator/v1": "98c63205eace5c1b502d5be7fc16d4fb6fa863d21601768f396c574b28ab855c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 314, + "startColumn": 6, + "charOffset": 11703, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 312, + "startColumn": 1, + "charOffset": 11670, + "charLength": 176, + "snippet": { + "text": "\tlua_pushnumber(L, exp);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b2ef5744429ff2ab", + "equalIndicator/v1": "98d11d22fce499dc088200978871e9575d961d662f7ac3e58797c695320dd253" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 511, + "startColumn": 35, + "charOffset": 16794, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 509, + "startColumn": 1, + "charOffset": 16730, + "charLength": 125, + "snippet": { + "text": "\t\treturn targetCreature;\r\n\t}\r\n\treturn g_game().internalGetThing(player, toPosition, toStackPos, 0, STACKPOS_USETARGET);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cf08c40c4bf0fc8a", + "equalIndicator/v1": "98de186dd967c37b0a5b3d48e2d28c55ad953385db1e0787f098f19e97d07587" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'newHouseName' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'newHouseName' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 129, + "startColumn": 21, + "charOffset": 3653, + "charLength": 12, + "snippet": { + "text": "newHouseName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 127, + "startColumn": 1, + "charOffset": 3588, + "charLength": 122, + "snippet": { + "text": "\r\n\tvoid setName(std::string newHouseName) {\r\n\t\tthis->houseName = newHouseName;\r\n\t}\r\n\tconst std::string &getName() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ebe02faa2698c791", + "equalIndicator/v1": "99020cc772d31bd384c6f78c69fafbd5e843834ffa41784c9068ec0ddb195abe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6401, + "startColumn": 67, + "charOffset": 221140, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6399, + "startColumn": 1, + "charOffset": 221069, + "charLength": 185, + "snippet": { + "text": "}\r\n\r\nvoid Game::internalCreatureChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) {\r\n\tif (!g_events().eventCreatureOnChangeOutfit(creature, outfit)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d3be5317e546823", + "equalIndicator/v1": "994caf7d06bdf90e94126af3c0d99cc1980bbc6846bb40fe7f0265601ce4852b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 68, + "startColumn": 10, + "charOffset": 1693, + "charLength": 15, + "snippet": { + "text": "gainHealthTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 66, + "startColumn": 1, + "charOffset": 1642, + "charLength": 142, + "snippet": { + "text": "\r\n\tuint32_t getHealthGainTicks() const {\r\n\t\treturn gainHealthTicks / g_configManager().getFloat(RATE_HEALTH_REGEN_SPEED, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c601fed17e1b9925", + "equalIndicator/v1": "995bd35051f280fc4d4a20a091909165b6a4a7ed1f566b871f89e6748f9a7136" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1664, + "startColumn": 99, + "charOffset": 58374, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1662, + "startColumn": 1, + "charOffset": 58210, + "charLength": 264, + "snippet": { + "text": "//**********************************************************//\r\n\r\nvoid TargetCallback::onTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\t// onTargetCombat(creature, target)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2dd94d8c3859f24b", + "equalIndicator/v1": "996993538a3e6907be09a610f0c50945e54871994f7736d3f4967125d1071ee2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Pass by value and use std::move", + "markdown": "Pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 34, + "charOffset": 1016, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 953, + "charLength": 185, + "snippet": { + "text": "}\r\n// Constructor for double\r\nCustomAttribute::CustomAttribute(const std::string &initStringKey, const double initDoubleValue) :\r\n\tstringKey(initStringKey), value(initDoubleValue) {\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "52995c5068bc32b7", + "equalIndicator/v1": "9973092ddd2646093147d3cb83c5cd048ba9bd6e0889b4da82b9f160de2bb356" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 136, + "startColumn": 14, + "charOffset": 4178, + "charLength": 11, + "snippet": { + "text": "subContItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 134, + "startColumn": 1, + "charOffset": 4060, + "charLength": 352, + "snippet": { + "text": "\t\tif (item->getContainer() != NULL) {\r\n\t\t\tauto subContainer = item->getContainer()->getStowableItems();\r\n\t\t\tfor (auto subContItem : subContainer) {\r\n\t\t\t\tstd::shared_ptr containerItem = subContItem.first;\r\n\t\t\t\ttoReturnList.push_back(std::pair, uint32_t>(containerItem, static_cast(containerItem->getItemCount())));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b6c14ac3d46f2305", + "equalIndicator/v1": "99ad4dc7d51e3bc0663052daf532d83a0ebefc7363b417f82624f90db34f1293" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1421, + "startColumn": 14, + "charOffset": 37474, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1419, + "startColumn": 1, + "charOffset": 37441, + "charLength": 77, + "snippet": { + "text": "\r\n\tuint8_t id = 0;\r\n\tstd::string name = \"\";\r\n\tbool customizable = false;\r\n};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ccb856fae27826ee", + "equalIndicator/v1": "99b04662c5ec6f1c6280d8cf6941b7d0b9b80023dff2cd921aa7e0164d019251" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1062, + "startColumn": 102, + "charOffset": 40442, + "charLength": 6, + "snippet": { + "text": "corpse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1060, + "startColumn": 1, + "charOffset": 40336, + "charLength": 234, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::monsterPostDropLoot(std::shared_ptr monster, std::shared_ptr corpse) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::monsterPostDropLoot - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ce78250f07315edc", + "equalIndicator/v1": "99d0ac7a7b4dfbf664bc2c12d92847da482477b1283f957dc54652459b8f735f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 493, + "startColumn": 7, + "charOffset": 18685, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 491, + "startColumn": 1, + "charOffset": 18673, + "charLength": 208, + "snippet": { + "text": "\t}\r\n\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Action::executeUse - Player {}, on item {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2f9bebe28fefb0ef", + "equalIndicator/v1": "99d4642b10a3547896c3513f31768512312f4ec468119fde2fbc273d3543cc8c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 64, + "startColumn": 10, + "charOffset": 1561, + "charLength": 14, + "snippet": { + "text": "gainManaAmount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 62, + "startColumn": 1, + "charOffset": 1511, + "charLength": 132, + "snippet": { + "text": "\r\n\tuint32_t getManaGainAmount() const {\r\n\t\treturn gainManaAmount * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2211595e285600f2", + "equalIndicator/v1": "9a043555cfce9b51d7d0a583036dd394debd2eb445159cbf472e6eba1914aae2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 156, + "startColumn": 9, + "charOffset": 5029, + "charLength": 13, + "snippet": { + "text": "getFirstIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 154, + "startColumn": 1, + "charOffset": 4943, + "charLength": 259, + "snippet": { + "text": "\r\n\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r\n\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eeae3cb15d76afd0", + "equalIndicator/v1": "9a0f3fd89117c2edeb28cf656153d7e97dba67df44e49afb8f35cd1cf6f70a1b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6512, + "startColumn": 15, + "charOffset": 205141, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6510, + "startColumn": 1, + "charOffset": 205056, + "charLength": 123, + "snippet": { + "text": "\tmsg.addPosition(pos);\r\n\tmsg.addByte(static_cast(stackpos));\r\n\tAddItem(msg, item);\r\n\twriteToOutputBuffer(msg);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8057e3925303a658", + "equalIndicator/v1": "9a146fc22ae55700fd12205e0edef0ce18b0fe2caef05320b472661c9c84b634" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'internalAddItem' is within a recursive call chain", + "markdown": "Function 'internalAddItem' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2202, + "startColumn": 19, + "charOffset": 84180, + "charLength": 15, + "snippet": { + "text": "internalAddItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2200, + "startColumn": 1, + "charOffset": 84157, + "charLength": 258, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalAddItem(std::shared_ptr toCylinder, std::shared_ptr item, int32_t index, uint32_t flags, bool test, uint32_t &remainderCount) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (toCylinder == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "66430a7f71d75ba0", + "equalIndicator/v1": "9a4906666fb48610c39f4e6ca0abff3ef6cf2fdd496c07372b290924a5956ce7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 46, + "charOffset": 648, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 598, + "charLength": 84, + "snippet": { + "text": "}\r\n\r\nvoid Decay::startDecay(std::shared_ptr item) {\r\n\tif (!item) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "871af2692b29bdbc", + "equalIndicator/v1": "9a511f61a9e53afa1770bee52172abd0992de84f41934e7921cd86f4f2b01a13" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'find' called with a string literal consisting of a single character; consider using the more effective overload accepting a character", + "markdown": "'find' called with a string literal consisting of a single character; consider using the more effective overload accepting a character" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 613, + "startColumn": 34, + "charOffset": 16777, + "charLength": 3, + "snippet": { + "text": "\";\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 611, + "startColumn": 1, + "charOffset": 16592, + "charLength": 364, + "snippet": { + "text": "\t\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\r\n\t\t\tfor (int i = 0; i < parameters; ++i) {\r\n\t\t\t\tif (getString(L, 2 + i).find(\";\") != std::string::npos) {\r\n\t\t\t\t\tstd::vector vocList = explodeString(getString(L, 2 + i), \";\");\r\n\t\t\t\t\tint32_t vocationId = g_vocations().getVocationId(vocList[0]);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef5ecd0ca84eb437", + "equalIndicator/v1": "9a57ddfc10c31a73b108656fe1b3c092f6783e6e96cd61d9419ad6e34a4353b8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2675, + "startColumn": 3, + "charOffset": 71872, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2673, + "startColumn": 1, + "charOffset": 71794, + "charLength": 153, + "snippet": { + "text": "\r\n\tif (player->getAccount()->save() != enumToValue(AccountErrors_t::Ok)) {\r\n\t\treportErrorFunc(\"failed to save account\");\r\n\t\tlua_pushnil(L);\r\n\t\treturn 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c84f224eda3468bc", + "equalIndicator/v1": "9a828778e2cc422f118070bd2bee2f3c06b1eeaa8e4f379b03e13dc7de26fe9f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7995, + "startColumn": 66, + "charOffset": 251437, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7993, + "startColumn": 1, + "charOffset": 251367, + "charLength": 130, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendUpdateSupplyTracker(std::shared_ptr item) {\r\n\tif (oldProtocol || !player || !item) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c34b64b1c47cec4", + "equalIndicator/v1": "9a96cb0b04e7bd71490817f82acb201987d4ff9b6b1bc59db21185596b16cc1a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 155, + "startColumn": 30, + "charOffset": 4269, + "charLength": 29, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 153, + "startColumn": 1, + "charOffset": 4104, + "charLength": 338, + "snippet": { + "text": "\tbool registerLuaItemEvent(const std::shared_ptr action);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr action);\r\n\tbool registerLuaActionEvent(const std::shared_ptr action);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr action);\r\n\tbool registerLuaEvent(const std::shared_ptr action);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5d5bf23f656e97dd", + "equalIndicator/v1": "9ab761770db41e6db95f47f9abc934969198e25c03cc681ef68ef84d18da403d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The 'empty' method should be used to check for emptiness instead of 'size'", + "markdown": "The 'empty' method should be used to check for emptiness instead of 'size'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 616, + "startColumn": 10, + "charOffset": 16966, + "charLength": 7, + "snippet": { + "text": "vocList" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 614, + "startColumn": 1, + "charOffset": 16807, + "charLength": 260, + "snippet": { + "text": "\t\t\t\t\tstd::vector vocList = explodeString(getString(L, 2 + i), \";\");\r\n\t\t\t\t\tint32_t vocationId = g_vocations().getVocationId(vocList[0]);\r\n\t\t\t\t\tif (vocList.size() > 0) {\r\n\t\t\t\t\t\tif (vocList[1] == \"true\") {\r\n\t\t\t\t\t\t\tspell->addVocMap(vocationId, true);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "95af475d9ee0a916", + "equalIndicator/v1": "9aca61106ab21a87cbefc7dff4adf0f1ffee7a1c11d354a333e2249e96532d63" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Uninitialized record type: 'combatReductionArray'", + "markdown": "Uninitialized record type: 'combatReductionArray'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3930, + "startColumn": 2, + "charOffset": 117764, + "charLength": 34, + "snippet": { + "text": "std::array" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3928, + "startColumn": 1, + "charOffset": 117683, + "charLength": 236, + "snippet": { + "text": "\r\nstd::array Player::getFinalDamageReduction() const {\r\n\tstd::array combatReductionArray;\r\n\tcombatReductionArray.fill(0);\r\n\tcalculateDamageReductionFromEquipedItems(combatReductionArray);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a43ed23614926d94", + "equalIndicator/v1": "9ad9aaf33641d6e18700a650fe45358b4607d00755e4eb36973753b0b831e05b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6438, + "startColumn": 68, + "charOffset": 203252, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6436, + "startColumn": 1, + "charOffset": 203180, + "charLength": 110, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPartyPlayerVocation(std::shared_ptr target) {\r\n\tif (!target) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e4bee5f95889999b", + "equalIndicator/v1": "9af2186c49889445c599cc44050c7cf421561c9ff600afdec64aaa8fc3bbebac" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Pass by value and use std::move", + "markdown": "Pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 32, + "startColumn": 34, + "charOffset": 1200, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 30, + "startColumn": 1, + "charOffset": 1136, + "charLength": 180, + "snippet": { + "text": "}\r\n// Constructor for boolean\r\nCustomAttribute::CustomAttribute(const std::string &initStringKey, const bool initBoolValue) :\r\n\tstringKey(initStringKey), value(initBoolValue) {\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "94299a3cac4cc8f6", + "equalIndicator/v1": "9b003ddbe527619c3375f630c3af697967f1ac400fb70fce1886f302f7db11ee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'currentTarget' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'currentTarget' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1511, + "startColumn": 93, + "charOffset": 52546, + "charLength": 13, + "snippet": { + "text": "currentTarget" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1509, + "startColumn": 1, + "charOffset": 52449, + "charLength": 412, + "snippet": { + "text": "}\r\n\r\nbool Combat::isValidChainTarget(std::shared_ptr caster, std::shared_ptr currentTarget, std::shared_ptr potentialTarget, const CombatParams ¶ms, bool aggressive) {\r\n\tbool canCombat = canDoCombat(caster, potentialTarget, aggressive) == RETURNVALUE_NOERROR;\r\n\tbool pick = params.chainPickerCallback ? params.chainPickerCallback->onChainCombat(caster, potentialTarget) : true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "450ea90db1ec7d99", + "equalIndicator/v1": "9b07af81d665a667271ba7654df3c0405fe208ca0bc8ac63dc513a71db5bf8b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 238, + "startColumn": 76, + "charOffset": 6729, + "charLength": 12, + "snippet": { + "text": "newRaidEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 236, + "startColumn": 1, + "charOffset": 6629, + "charLength": 286, + "snippet": { + "text": "\r\n\t\tif (newRaidEvent) {\r\n\t\t\tuint32_t ticks = static_cast(std::max(RAID_MINTICKS, newRaidEvent->getDelay() - raidEvent->getDelay()));\r\n\t\t\tnextEventEvent = g_dispatcher().scheduleEvent(\r\n\t\t\t\tticks, [this, newRaidEvent] { executeRaidEvent(newRaidEvent); }, __FUNCTION__\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a8a685cada368fdf", + "equalIndicator/v1": "9b08ea49d0cc8fc12fad195a67fab4748b2d961182563958f7582f8dc5967d3f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 167, + "startColumn": 7, + "charOffset": 5755, + "charLength": 16, + "snippet": { + "text": "internalAddThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 165, + "startColumn": 1, + "charOffset": 5591, + "charLength": 346, + "snippet": { + "text": "\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\n\tvoid internalAddThing(std::shared_ptr thing) override final;\r\n\tvoid internalAddThing(uint32_t index, std::shared_ptr thing) override final;\r\n\tvoid startDecaying() override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "acfa47385c65b183", + "equalIndicator/v1": "9b0c88060e584f9aa20dc3597dbb81c4a9e9df761551522178a2fcafbc44d7ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1140, + "startColumn": 2, + "charOffset": 43277, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1138, + "startColumn": 1, + "charOffset": 43270, + "charLength": 52, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4ad66bf29fe1646a", + "equalIndicator/v1": "9b112796c5648a10ac6ba63545bc27bea730c202f24b02842c756617c9ec3917" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 231, + "startColumn": 74, + "charOffset": 5950, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 229, + "startColumn": 1, + "charOffset": 5865, + "charLength": 140, + "snippet": { + "text": "\r\nprivate:\r\n\tvirtual bool getSkillType(std::shared_ptr, std::shared_ptr, skills_t &, uint32_t &) const {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9e070a195533e776", + "equalIndicator/v1": "9b3620972fc60605c2b8bc93e73af2a9702150c3cf761f752753c5f8f086e587" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 190, + "startColumn": 3, + "charOffset": 4917, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 188, + "startColumn": 1, + "charOffset": 4860, + "charLength": 201, + "snippet": { + "text": "\r\n\tif (const TileItemVector* items = getItemList()) {\r\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\r\n\t\t\tif ((*it)->getTrashHolder()) {\r\n\t\t\t\treturn (*it)->getTrashHolder();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "55bc51d440458823", + "equalIndicator/v1": "9b3fd57a5e6a4c60180c2863313e3bbe1ef8563abe49551ffd4efa73a6f23573" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Potential uncovered code path; add a default label", + "markdown": "Potential uncovered code path; add a default label" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2366, + "startColumn": 3, + "charOffset": 73739, + "charLength": 6, + "snippet": { + "text": "switch" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2364, + "startColumn": 1, + "charOffset": 73704, + "charLength": 99, + "snippet": { + "text": "\t\tbool shouldAddItem = false;\r\n\r\n\t\tswitch (currentLevel) {\r\n\t\t\tcase 1:\r\n\t\t\t\tshouldAddItem = false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "74d42efe426e6d51", + "equalIndicator/v1": "9b41bb97a80e9a193099c83980606928ce92647d9e9b8b0d8d81133b73370284" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'potentialTarget' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'potentialTarget' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1511, + "startColumn": 134, + "charOffset": 52587, + "charLength": 15, + "snippet": { + "text": "potentialTarget" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1509, + "startColumn": 1, + "charOffset": 52449, + "charLength": 412, + "snippet": { + "text": "}\r\n\r\nbool Combat::isValidChainTarget(std::shared_ptr caster, std::shared_ptr currentTarget, std::shared_ptr potentialTarget, const CombatParams ¶ms, bool aggressive) {\r\n\tbool canCombat = canDoCombat(caster, potentialTarget, aggressive) == RETURNVALUE_NOERROR;\r\n\tbool pick = params.chainPickerCallback ? params.chainPickerCallback->onChainCombat(caster, potentialTarget) : true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b97c9ad52871d30f", + "equalIndicator/v1": "9b4d0fd3c5276bdd91fa15e96f04370084e2eb22b7e4d96c08332f07de97e29e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1540, + "startColumn": 61, + "charOffset": 54064, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1538, + "startColumn": 1, + "charOffset": 53999, + "charLength": 200, + "snippet": { + "text": "}\r\n\r\nvoid ValueCallback::getMinMaxValues(std::shared_ptr player, CombatDamage &damage, bool useCharges) const {\r\n\t// onGetPlayerMinMaxValues(...)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e7134f456c8dc499", + "equalIndicator/v1": "9b56d31cad337b7d6d8e623c1230bef1da3838a25b568d5988233cbb3f80fee3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 77, + "startColumn": 8, + "charOffset": 2042, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 75, + "startColumn": 1, + "charOffset": 1948, + "charLength": 206, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsMovable(lua_State* L) {\r\n\t// itemType:isMovable()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->movable);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "488f8ef1dee325ed", + "equalIndicator/v1": "9b778624b5d33a38088a90cb5fbf58e0fcc536fb1f7304f2b97da3f9f2e68819" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1257, + "startColumn": 72, + "charOffset": 34822, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1255, + "startColumn": 1, + "charOffset": 34746, + "charLength": 154, + "snippet": { + "text": "}\r\n\r\nuint32_t ConditionRegeneration::getManaTicks(std::shared_ptr creature) const {\r\n\tstd::shared_ptr player = creature->getPlayer();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "269d2678f1639218", + "equalIndicator/v1": "9bb43fb9ac4f3044beff8505de976aa6907daf9ab4cd37faa6d26a9265630b41" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Return type 'const Outfit_t' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness", + "markdown": "Return type 'const Outfit_t' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 281, + "startColumn": 2, + "charOffset": 6941, + "charLength": 14, + "snippet": { + "text": "const Outfit_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 279, + "startColumn": 1, + "charOffset": 6909, + "charLength": 103, + "snippet": { + "text": "\t\tcurrentOutfit = outfit;\r\n\t}\r\n\tconst Outfit_t getDefaultOutfit() const {\r\n\t\treturn defaultOutfit;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aca6d32514942180", + "equalIndicator/v1": "9be936d2f4e0ef94829b2ea5059cd7107dda75445fa6e058482ab88da00fb5d4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::list\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 58, + "startColumn": 21, + "charOffset": 1527, + "charLength": 7, + "snippet": { + "text": "members" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 56, + "startColumn": 1, + "charOffset": 1455, + "charLength": 111, + "snippet": { + "text": "\r\n\tconst auto members = guild->getMembersOnline();\r\n\tlua_createtable(L, members.size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c81142678a65f0e6", + "equalIndicator/v1": "9bf2267415e07a13467a131d08a7fb565d71bc27c24beb6b4fc863833ec83e98" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 681, + "startColumn": 4, + "charOffset": 18732, + "charLength": 4, + "snippet": { + "text": "else" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 679, + "startColumn": 1, + "charOffset": 18659, + "charLength": 110, + "snippet": { + "text": "\t\tpushUserdata(L, reward);\r\n\t\tsetItemMetatable(L, -1, reward);\r\n\t} else {\r\n\t\tpushBoolean(L, false);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f092d1e48cc1c884", + "equalIndicator/v1": "9c3677bc949ebb22f97bf1d671a3d51224208aeadf679005e52bc98b80ff5094" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 616, + "startColumn": 131, + "charOffset": 18789, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 614, + "startColumn": 1, + "charOffset": 18654, + "charLength": 257, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::DeEquipItem(const std::shared_ptr MoveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8ecd626ad1fcf6a5", + "equalIndicator/v1": "9c471621c1435e29d44345bb84294302d92d4b792fc5671164a98a94976fe738" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 311, + "startColumn": 14, + "charOffset": 9694, + "charLength": 14, + "snippet": { + "text": "getDescription" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 309, + "startColumn": 1, + "charOffset": 9579, + "charLength": 248, + "snippet": { + "text": "\tstatic std::string getWeightDescription(const ItemType &it, uint32_t weight, uint32_t count = 1);\r\n\r\n\tstd::string getDescription(int32_t lookDistance) override final;\r\n\tstd::string getNameDescription();\r\n\tstd::string getWeightDescription() const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f9f30454e7c94b04", + "equalIndicator/v1": "9c5b3d72ddf6f74a0c2d84ce6d3bec6ca5377bcf23cb07c8dd6e6fafd86eba15" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::all_of()'", + "markdown": "Replace loop by 'std::ranges::all_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 59, + "startColumn": 2, + "charOffset": 1873, + "charLength": 37, + "snippet": { + "text": "// fire global event if is registered" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 57, + "startColumn": 1, + "charOffset": 1796, + "charLength": 217, + "snippet": { + "text": "\r\nbool CreatureEvents::playerLogin(std::shared_ptr player) const {\r\n\t// fire global event if is registered\r\n\tfor (const auto &it : creatureEvents) {\r\n\t\tif (it.second->getEventType() == CREATURE_EVENT_LOGIN) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "55ff26bb68dabc45", + "equalIndicator/v1": "9c726a101bb7708dd12c81175cc00d7030dacb0accfbebc104c0f820444141a0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 551, + "startColumn": 13, + "charOffset": 25814, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 549, + "startColumn": 1, + "charOffset": 25614, + "charLength": 382, + "snippet": { + "text": "\t} else if (stringValue == \"fieldabsorbpercentfire\") {\r\n\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"fieldabsorbpercentpoison\") {\r\n\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "15812fe7e855b9d9", + "equalIndicator/v1": "9c8c397a0c1f4fad56afd6fd5b19716ae9b3b4c2c9c46cb7e8d31c330105bdd4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 148, + "startColumn": 62, + "charOffset": 3820, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 146, + "startColumn": 1, + "charOffset": 3754, + "charLength": 181, + "snippet": { + "text": "}\r\n\r\nvoid ScriptEnvironment::removeTempItem(std::shared_ptr item) {\r\n\tfor (auto it = tempItems.begin(), end = tempItems.end(); it != end; ++it) {\r\n\t\tif (it->second == item) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d344fd9ec0b3711a", + "equalIndicator/v1": "9ca9acee81f110752ca6f7ef5756926a5711443aa4bc3d18aefa3870bd12a774" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 705, + "startColumn": 65, + "charOffset": 22916, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 703, + "startColumn": 1, + "charOffset": 22847, + "charLength": 128, + "snippet": { + "text": "}\r\n\r\nbool Combat::checkFearConditionAffected(std::shared_ptr player) {\r\n\tif (player->isImmuneFear()) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c1f73b12f9c33593", + "equalIndicator/v1": "9cc3f131136d91f45755cc62672ffcdf3967c5eb62ace381968a55e390e40083" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1369, + "startColumn": 89, + "charOffset": 46940, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1367, + "startColumn": 1, + "charOffset": 46847, + "charLength": 298, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatDispel(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster && target)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "50a0e0ea30f3b3a9", + "equalIndicator/v1": "9cc6d7ca2e701f662ea84dc51ec477f0e44e684988bbcaed358ff5d126750b61" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 862, + "startColumn": 16, + "charOffset": 28038, + "charLength": 12, + "snippet": { + "text": "changeHealth" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 860, + "startColumn": 1, + "charOffset": 28018, + "charLength": 124, + "snippet": { + "text": "}\r\n\r\nvoid Creature::changeHealth(int32_t healthChange, bool sendHealthChange /* = true*/) {\r\n\tint32_t oldHealth = health;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a0f5545e05301d7b", + "equalIndicator/v1": "9ccffd4077e0935f8f98207452f33612b56929b5ce0cee1cb0701deabb779fcb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 67, + "startColumn": 46, + "charOffset": 2035, + "charLength": 5, + "snippet": { + "text": "range" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 65, + "startColumn": 1, + "charOffset": 1969, + "charLength": 86, + "snippet": { + "text": "\t\treturn false;\r\n\t}\r\n\treturn Creature::canSee(getPosition(), pos, range, range);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e2620b523bb424b", + "equalIndicator/v1": "9d3bfe1d69fcb101e7fbfe3a0683c846608fa5e7e328c3be54f7577d61471690" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 722, + "startColumn": 37, + "charOffset": 23485, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 720, + "startColumn": 1, + "charOffset": 23423, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 87) * 1.20f) - 4;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bb5fd591fbc95f89", + "equalIndicator/v1": "9d5d69567b89187afa669d0a1e89fa800af90a9e1acfa2f8f588f6f735bd623f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1860, + "startColumn": 26, + "charOffset": 54684, + "charLength": 12, + "snippet": { + "text": "std::tolower" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1858, + "startColumn": 1, + "charOffset": 54653, + "charLength": 276, + "snippet": { + "text": "\t}\r\n\r\n\tconst char &character = std::tolower(modifiedValue.front());\r\n\tauto article = character == 'a' || character == 'e' || character == 'i' || character == 'o' || character == 'u' ? \"an\" : \"a\";\r\n\treturn fmt::format(\"{}{} {}.\", withSpace ? \" \" : \"\", article, modifiedValue);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3edbc5f6996818c1", + "equalIndicator/v1": "9d5e5b460f29244fbf1e00363d9556faa4ec7bc7dd5a0b9b8871c8a1f2faf937" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1392, + "startColumn": 32, + "charOffset": 41866, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1390, + "startColumn": 1, + "charOffset": 41730, + "charLength": 167, + "snippet": { + "text": "\tvoid sendPartyPlayerMana(std::shared_ptr player, uint8_t manaPercent) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyPlayerMana(player, manaPercent);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "19c583a076c8a95d", + "equalIndicator/v1": "9d6b64206d413dfa93d25fcdaa25edc29f0a64d66e50d8c2bbd5fec648a47563" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 645, + "startColumn": 76, + "charOffset": 17400, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 643, + "startColumn": 1, + "charOffset": 17320, + "charLength": 197, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updatePercentIncreases(std::shared_ptr creature) {\r\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\r\n\t\tauto increasePercentValue = getIncreasePercentById(i);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2e49f37f96b73e1e", + "equalIndicator/v1": "9db0d1d71260c34f2510a695c25ef2db95a7244e2377947b008d67dbe3028130" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3117, + "startColumn": 47, + "charOffset": 116134, + "charLength": 5, + "snippet": { + "text": "money" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3115, + "startColumn": 1, + "charOffset": 116020, + "charLength": 219, + "snippet": { + "text": "\t\t\t}\r\n\t\t\tplayer->setBankBalance(player->getBankBalance() + money);\r\n\t\t\tg_metrics().addCounter(\"balance_increase\", money, { { \"player\", player->getName() }, { \"context\", \"loot\" } });\r\n\t\t\treturn RETURNVALUE_NOERROR;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b26246bb272a67e0", + "equalIndicator/v1": "9dc0e047b4f9e77e1032f08350f5d795249564b9792702bf8e07eb71c6813f7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 581, + "startColumn": 63, + "charOffset": 15678, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 579, + "startColumn": 1, + "charOffset": 15611, + "charLength": 106, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updateStats(std::shared_ptr player) {\r\n\tbool needUpdate = false;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "859a2fd4747960a3", + "equalIndicator/v1": "9dc84619f0d87f0898795ee579a3abc27ce0b35f1ecef40da5309f04850b9b62" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1405, + "startColumn": 3, + "charOffset": 41849, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1403, + "startColumn": 1, + "charOffset": 41799, + "charLength": 210, + "snippet": { + "text": "\tif (creatures) {\r\n\t\tbool playerAdded = false;\r\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\r\n\t\t\tstd::shared_ptr creature = *it;\r\n\t\t\tif (!player->canSeeCreature(creature)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "23ec1024c534fea4", + "equalIndicator/v1": "9de8d2d6d98ebd41d31a9eb480ca3f6e2ce90a3e05aaabcd0c83b51678b6b516" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1305, + "startColumn": 8, + "charOffset": 44960, + "charLength": 19, + "snippet": { + "text": "auto [townid, town]" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1303, + "startColumn": 1, + "charOffset": 44811, + "charLength": 309, + "snippet": { + "text": "\t// Check if is in the temple range (we assume the temple is within the range of 10 sqms)\r\n\tif (m_player.getZoneType() == ZONE_PROTECTION) {\r\n\t\tfor (auto [townid, town] : g_game().map.towns.getTowns()) {\r\n\t\t\tif (Position::areInRange<1, 10>(town->getTemplePosition(), m_player.getPosition())) {\r\n\t\t\t\treturn 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "40dbc7e9328c7a12", + "equalIndicator/v1": "9def61a375008c43524dabc91c8f55c3f0c99a7bcd794f5c9d2e4b68c2a293f2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1037, + "startColumn": 30, + "charOffset": 30025, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1035, + "startColumn": 1, + "charOffset": 29910, + "charLength": 135, + "snippet": { + "text": "\tvoid sendCreatureSkull(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureSkull(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cef42669a91863bc", + "equalIndicator/v1": "9e1ab49d5fb61d3fb4c11366d997ae5f4f113cf6ff09916f2595c8c0db264a29" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7593, + "startColumn": 67, + "charOffset": 265050, + "charLength": 13, + "snippet": { + "text": "targetMonster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7591, + "startColumn": 1, + "charOffset": 264941, + "charLength": 282, + "snippet": { + "text": "// Life leech\r\nvoid Game::applyLifeLeech(\r\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\r\n) const {\r\n\t// Wheel of destiny bonus - life leech chance and amount\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9dc0e6a8f612aa5d", + "equalIndicator/v1": "9e4506b3fad52add9a96ccbbbe5a67c2b98d5c2f73456f7b19c8430d55198418" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1215, + "startColumn": 66, + "charOffset": 46326, + "charLength": 4, + "snippet": { + "text": "zone" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1213, + "startColumn": 1, + "charOffset": 46256, + "charLength": 235, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::zoneAfterCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureLeave - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb7096e65b4f88d7", + "equalIndicator/v1": "9e497669d29412226a054d992bdf292e5eb2d1314319bcaa2651281f7cce0213" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2042, + "startColumn": 59, + "charOffset": 59023, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2040, + "startColumn": 1, + "charOffset": 58960, + "charLength": 100, + "snippet": { + "text": "}\r\n\r\nstd::string Item::parseShowDuration(std::shared_ptr item) {\r\n\tif (!item) {\r\n\t\treturn {};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29adf78fd3176426", + "equalIndicator/v1": "9e4a4a2f2299168e19dea11285b5debe67bb63e9cd07100c4c6d96e3e7358c3d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 774, + "startColumn": 68, + "charOffset": 29732, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 772, + "startColumn": 1, + "charOffset": 29660, + "charLength": 218, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnLoseExperience(std::shared_ptr player, uint64_t &exp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLoseExperience - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8948d856fc39a42e", + "equalIndicator/v1": "9e5153ea144899392645b311a6dfbcf0b1573bf5b25aeb946c0024eeb7a912ae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2027, + "startColumn": 127, + "charOffset": 60119, + "charLength": 7, + "snippet": { + "text": "newItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2025, + "startColumn": 1, + "charOffset": 59988, + "charLength": 216, + "snippet": { + "text": "}\r\n\r\nvoid Player::onUpdateContainerItem(std::shared_ptr container, std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tif (oldItem != newItem) {\r\n\t\tonRemoveContainerItem(container, oldItem);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "30e40ab411cb8896", + "equalIndicator/v1": "9e5284d7d8adcdf2653cdef501d2b2f900d19001482a2848728a28b6f8763e05" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'depotLocker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'depotLocker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6967, + "startColumn": 57, + "charOffset": 205819, + "charLength": 11, + "snippet": { + "text": "depotLocker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6965, + "startColumn": 1, + "charOffset": 205665, + "charLength": 317, + "snippet": { + "text": "\r\nstd::pair>, std::map>>\r\nPlayer::requestLockerItems(std::shared_ptr depotLocker, bool sendToClient /*= false*/, uint8_t tier /*= 0*/) const {\r\n\tif (!depotLocker) {\r\n\t\tg_logger().error(\"{} - Depot locker is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "73d8289a0ebb4b54", + "equalIndicator/v1": "9e89c6d94dfe0685e604d14e3e63812d1adadd4591e0f1f9c1c5594f79b120d2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3740, + "startColumn": 56, + "charOffset": 112147, + "charLength": 13, + "snippet": { + "text": "stashIterator" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3738, + "startColumn": 1, + "charOffset": 111987, + "charLength": 304, + "snippet": { + "text": "\tfor (const auto &stashIterator : itemDict) {\r\n\t\tuint16_t iteratorCID = (stashIterator.first)->getID();\r\n\t\tif (g_game().internalRemoveItem(stashIterator.first, stashIterator.second) == RETURNVALUE_NOERROR) {\r\n\t\t\taddItemOnStash(iteratorCID, stashIterator.second);\r\n\t\t\ttotalStowed += stashIterator.second;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75f998a1c51b6f93", + "equalIndicator/v1": "9e93c792aac3e4e6b456ed1c4f24b83968c5fafe7370a54f5a875246b36ca9c0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 74, + "startColumn": 46, + "charOffset": 2432, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 72, + "startColumn": 1, + "charOffset": 2382, + "charLength": 126, + "snippet": { + "text": "}\r\n\r\nbool Mailbox::sendItem(std::shared_ptr item) const {\r\n\tstd::string receiver;\r\n\tif (!getReceiver(item, receiver)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1ebcc4aba1adce7", + "equalIndicator/v1": "9ea05d30f959c7c207c24534c253db4fcec5b7cfa3a10ba7a938b4bd5518fa41" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 853, + "startColumn": 58, + "charOffset": 24612, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 851, + "startColumn": 1, + "charOffset": 24550, + "charLength": 166, + "snippet": { + "text": "}\r\n\r\nint8_t Player::getContainerID(std::shared_ptr container) const {\r\n\tfor (const auto &it : openContainers) {\r\n\t\tif (it.second.container == container) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1762e7559b857a5d", + "equalIndicator/v1": "9ec11a3e78ee86ad29cc95fe376489cfd5407539bf4e355137caf04626bc4fb0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 536, + "startColumn": 2, + "charOffset": 19031, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 534, + "startColumn": 1, + "charOffset": 19024, + "charLength": 46, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f228a0a531d9308", + "equalIndicator/v1": "9ec9694dbfe8ae262e070435198b5376bb1be542f94b2bc5d1f256e8492a5b00" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 162, + "startColumn": 25, + "charOffset": 4916, + "charLength": 10, + "snippet": { + "text": "realDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 160, + "startColumn": 1, + "charOffset": 4860, + "charLength": 180, + "snippet": { + "text": "\r\n\t// Setting damage to combat\r\n\tcombat.primary.value = realDamage * weaponAttackProportion;\r\n\tcombat.secondary.value = realDamage * (1 - weaponAttackProportion);\r\n\treturn combat;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "609a43040a83bbf1", + "equalIndicator/v1": "9ecc37efaa1a82ebd28b51611c178e881e3931f1ace9993851ba4086f8abf02f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 32, + "startColumn": 7, + "charOffset": 1197, + "charLength": 10, + "snippet": { + "text": "removeItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 30, + "startColumn": 1, + "charOffset": 1185, + "charLength": 95, + "snippet": { + "text": "\t}\r\n\r\n\tvoid removeItem(std::shared_ptr thing, bool sendToClient = false) override;\r\n};\r\n" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e467a0440896f230", + "equalIndicator/v1": "9ecd8a11164e0002d3466158aeb71d7493b2e9d83b92a166d34d5e63e0e650cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'container' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'container' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1257, + "startColumn": 31, + "charOffset": 37189, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1255, + "startColumn": 1, + "charOffset": 37031, + "charLength": 202, + "snippet": { + "text": "\tvoid sendContainer(uint8_t cid, std::shared_ptr container, bool hasParent, uint16_t firstIndex) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendContainer(cid, container, hasParent, firstIndex);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "02aceec4cca6e04a", + "equalIndicator/v1": "9eea83d94287f6a04d54d062107639183bfebb3c7fb03834534f2394011bb9bc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 421, + "startColumn": 57, + "charOffset": 11712, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 419, + "startColumn": 1, + "charOffset": 11651, + "charLength": 187, + "snippet": { + "text": "}\r\n\r\nbool Party::setSharedExperience(std::shared_ptr player, bool newSharedExpActive, bool silent /*= false*/) {\r\n\tauto leader = getLeader();\r\n\tif (!player || leader != player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82a2e32eb772f9a0", + "equalIndicator/v1": "9f615cc2380f558bd166f2f14116050d6cb05a549f80263436f2b41742307133" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 242, + "startColumn": 21, + "charOffset": 6892, + "charLength": 9, + "snippet": { + "text": "creatures" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 240, + "startColumn": 1, + "charOffset": 6751, + "charLength": 282, + "snippet": { + "text": "\tfor (const std::shared_ptr &tile : houseTiles) {\r\n\t\tif (CreatureVector* creatures = tile->getCreatures()) {\r\n\t\t\tfor (int32_t i = creatures->size(); --i >= 0;) {\r\n\t\t\t\tstd::shared_ptr player = (*creatures)[i]->getPlayer();\r\n\t\t\t\tif (player && !isInvited(player)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c8ea7d01a6acc4dc", + "equalIndicator/v1": "9f7ca9ad6ceff14e09fe3aec71889bf4d29e9394e6a6c044f7fadb4beb33ff20" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1386, + "startColumn": 24, + "charOffset": 38579, + "charLength": 8, + "snippet": { + "text": "soulGain" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1384, + "startColumn": 1, + "charOffset": 38486, + "charLength": 115, + "snippet": { + "text": "\t\t\tif (internalSoulTicks >= soulTicks) {\r\n\t\t\t\tinternalSoulTicks = 0;\r\n\t\t\t\tplayer->changeSoul(soulGain);\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bc7c5cc5e81d1430", + "equalIndicator/v1": "9f9298ee6be1bab3dc61683f4380f2de60e101c11ac68f69d4bd38f574cdd5a5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 261, + "startColumn": 56, + "charOffset": 7036, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 259, + "startColumn": 1, + "charOffset": 6976, + "charLength": 144, + "snippet": { + "text": "}\r\n\r\nvoid BedItem::updateAppearance(std::shared_ptr player) {\r\n\tconst ItemType &it = Item::items[id];\r\n\tif (it.type == ITEM_TYPE_BED) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e2d47a4fa53d9f9", + "equalIndicator/v1": "9faf1a56e0062519a8d40470f096e8594c6531414188fb4637bc52d07eca8b07" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 76, + "startColumn": 20, + "charOffset": 1953, + "charLength": 5, + "snippet": { + "text": "guild" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 74, + "startColumn": 1, + "charOffset": 1917, + "charLength": 77, + "snippet": { + "text": "\t\treturn 1;\r\n\t}\r\n\tlua_pushnumber(L, guild->getBankBalance());\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5138dd3a6f600284", + "equalIndicator/v1": "9fb5b3028b521bca5fde579d81f55f058e21c1fc078a0d4561b1c34289583dfd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'message' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'message' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7876, + "startColumn": 58, + "charOffset": 247671, + "charLength": 7, + "snippet": { + "text": "message" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7874, + "startColumn": 1, + "charOffset": 247609, + "charLength": 116, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendImbuementResult(const std::string message) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0xED);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "52bf1083e09c7bf1", + "equalIndicator/v1": "9fb8e03d96da0afbff94a4ffaf18d646b56a7a8b9c7d453e18122d5dbefa0043" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 302, + "startColumn": 2, + "charOffset": 7234, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 300, + "startColumn": 1, + "charOffset": 7227, + "charLength": 76, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t subType = getNumber(L, 3, -1);\r\n\r\n\tuint16_t itemId;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e87acde0f79a7020", + "equalIndicator/v1": "9fc5ddc3860d87728f591561815a151f3fd876b93c851752eb443b8a91bd270a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 275, + "startColumn": 81, + "charOffset": 9146, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 273, + "startColumn": 1, + "charOffset": 9061, + "charLength": 209, + "snippet": { + "text": "}\r\n\r\nvoid Weapon::onUsedWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr destTile) const {\r\n\tif (!player->hasFlag(PlayerFlags_t::NotGainSkill)) {\r\n\t\tskills_t skillType;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dcd97edf99d1065b", + "equalIndicator/v1": "9ffcc64490ee1ddcabd303cb6df7c1c7581db6604df96e1f617daca75ede9237" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'checkImbuements' can be made const", + "markdown": "Method 'checkImbuements' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7907, + "startColumn": 12, + "charOffset": 276573, + "charLength": 15, + "snippet": { + "text": "checkImbuements" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7905, + "startColumn": 1, + "charOffset": 276557, + "charLength": 119, + "snippet": { + "text": "}\r\n\r\nvoid Game::checkImbuements() {\r\n\tfor (const auto &[mapPlayerId, mapPlayer] : getPlayers()) {\r\n\t\tif (!mapPlayer) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "667d084c5c4261fb", + "equalIndicator/v1": "a0143a86fe39f223409d999d6e165e52d57d6a7b56e592280377e4ace65c1570" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 157, + "startColumn": 43, + "charOffset": 4613, + "charLength": 27, + "snippet": { + "text": "Weapons::getMaxWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 155, + "startColumn": 1, + "charOffset": 4545, + "charLength": 314, + "snippet": { + "text": "\r\n\t// Calculating damage\r\n\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(level, playerSkill, totalAttack, attackFactor, true) * player->getVocation()->meleeDamageMultiplier * damageModifier / 100);\r\n\tint32_t minDamage = level / 5;\r\n\tint32_t realDamage = normal_random(minDamage, maxDamage);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71261164c37bac35", + "equalIndicator/v1": "a02d3015366bb9a80f29bab3bbdedb6a55861724006b9bf3226d38fb670535cf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 14, + "charOffset": 616, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 571, + "charLength": 351, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e48a714e9089befc", + "equalIndicator/v1": "a03badd690152495f4405547978d4a0c3c83fc4101ba22c3d6f9e7378cc7403b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5276, + "startColumn": 89, + "charOffset": 156093, + "charLength": 10, + "snippet": { + "text": "experience" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5274, + "startColumn": 1, + "charOffset": 155932, + "charLength": 204, + "snippet": { + "text": "\tif (level >= 24) {\r\n\t\tdouble tmpLevel = level + (levelPercent / 100.);\r\n\t\tlossPercent = ((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;\r\n\t} else {\r\n\t\tlossPercent = 5;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "50ea7e3202378cb2", + "equalIndicator/v1": "a0588a17196f0dc9affcbb59e3293155f38e34e5b94e02b4c09527c1c8cdae0b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6436, + "startColumn": 57, + "charOffset": 222280, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6434, + "startColumn": 1, + "charOffset": 222219, + "charLength": 185, + "snippet": { + "text": "}\r\n\r\nvoid Game::updateCreatureIcon(std::shared_ptr creature) {\r\n\t// Send to clients\r\n\tfor (const auto &spectator : Spectators().find(creature->getPosition(), true)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7450b3734c2da82b", + "equalIndicator/v1": "a066b885068dcbdbc1ff45cee192bb976a30cb365f3bedd506c45b22843c0576" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1177, + "startColumn": 58, + "charOffset": 36505, + "charLength": 17, + "snippet": { + "text": "getLostExperience" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1175, + "startColumn": 1, + "charOffset": 36362, + "charLength": 170, + "snippet": { + "text": "\r\nuint64_t Creature::getGainedExperience(std::shared_ptr attacker) const {\r\n\treturn std::floor(getDamageRatio(std::move(attacker)) * getLostExperience());\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "88be1e29e35b061a", + "equalIndicator/v1": "a0a452993f44801a28736a2a96f3be68dc6a6e29bb2c33e735f98e237e1dd5c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 140, + "startColumn": 45, + "charOffset": 4620, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 138, + "startColumn": 1, + "charOffset": 4571, + "charLength": 154, + "snippet": { + "text": "}\r\n\r\nbool Mailbox::canSend(std::shared_ptr item) {\r\n\treturn !item->hasOwner() && (item->getID() == ITEM_PARCEL || item->getID() == ITEM_LETTER);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "726d2b8244e1f885", + "equalIndicator/v1": "a0cc8103a7fd2032a800a2a5cb70f8be84413b5de9e13f8fce87ebc6e3e8354e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 290, + "startColumn": 4, + "charOffset": 7427, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 288, + "startColumn": 1, + "charOffset": 7416, + "charLength": 151, + "snippet": { + "text": "\t\t\t}\r\n\r\n\t\t\tfor (auto it = creatures->rbegin(), end = creatures->rend(); it != end; ++it) {\r\n\t\t\t\tif (creature->canSeeCreature(*it)) {\r\n\t\t\t\t\treturn *it;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8c6b8bbb08aba993", + "equalIndicator/v1": "a0d13d2832d160b95739cef75e8bb51dac8dc7649507f40b76f986830ce08acf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: imbuement", + "markdown": "Constructor does not initialize these fields: imbuement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 623, + "startColumn": 8, + "charOffset": 15628, + "charLength": 13, + "snippet": { + "text": "ImbuementInfo" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 621, + "startColumn": 1, + "charOffset": 15615, + "charLength": 78, + "snippet": { + "text": "};\r\n\r\nstruct ImbuementInfo {\r\n\tImbuement* imbuement;\r\n\tuint32_t duration = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b3d904eb36bf850d", + "equalIndicator/v1": "a0f694aa096915172697ed90ea87f2ac5e1d433db041e1ef7441df53363a2b29" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 679, + "startColumn": 128, + "charOffset": 26088, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 677, + "startColumn": 1, + "charOffset": 25956, + "charLength": 259, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeRequest - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6c29d322826aafdc", + "equalIndicator/v1": "a1017bc01f42191c1259305a8032ca678b84bbd6ae20f9ec4a72f98b9429274e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1836, + "startColumn": 76, + "charOffset": 71472, + "charLength": 10, + "snippet": { + "text": "toCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1834, + "startColumn": 1, + "charOffset": 71392, + "charLength": 232, + "snippet": { + "text": "}\r\n\r\nbool Game::isTryingToStow(const Position &toPos, std::shared_ptr toCylinder) const {\r\n\treturn toCylinder->getContainer() && toCylinder->getItem()->getID() == ITEM_LOCKER && toPos.getZ() == ITEM_SUPPLY_STASH_INDEX;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "102bd249dee20cc4", + "equalIndicator/v1": "a104a4f73e2fbc52a918d92bdc8af4a87fc47d8067da22d33531f64ed8c0dde6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 555, + "startColumn": 70, + "charOffset": 14921, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 553, + "startColumn": 1, + "charOffset": 14847, + "charLength": 169, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updatePercentStats(std::shared_ptr player) {\r\n\tfor (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {\r\n\t\tif (statsPercent[i] == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f15bbef5c338e342", + "equalIndicator/v1": "a108101febd64f3b7decd49facc5783b439f339b771e20bb70cfd443c07f5df9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6388, + "startColumn": 70, + "charOffset": 201993, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6386, + "startColumn": 1, + "charOffset": 201919, + "charLength": 182, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPartyCreatureHealth(std::shared_ptr target, uint8_t healthPercent) {\r\n\tuint32_t cid = target->getID();\r\n\tif (!knownCreatureSet.contains(cid)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ea80a75d33f4565e", + "equalIndicator/v1": "a145768b1150bf9cc353a8f77836fb4a9869e9e096ee04def257148a683fb3b6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 668, + "startColumn": 90, + "charOffset": 20420, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 666, + "startColumn": 1, + "charOffset": 20326, + "charLength": 173, + "snippet": { + "text": "}\r\n\r\nvoid Party::updatePlayerHealth(std::shared_ptr player, std::shared_ptr target, uint8_t healthPercent) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2b826ec9cff8c95a", + "equalIndicator/v1": "a14f1385c93b28951dae307e56a7a494e0a46f6951a341ac5f50d5ad4425de0f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 660, + "startColumn": 124, + "charOffset": 20186, + "charLength": 37, + "snippet": { + "text": "(it.abilities->statsPercent[s] - 100)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 658, + "startColumn": 1, + "charOffset": 19967, + "charLength": 280, + "snippet": { + "text": "\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\r\n\t\t\tif (it.abilities->statsPercent[s]) {\r\n\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f0c1966cf657b581", + "equalIndicator/v1": "a15444486b2cd5773b3a378b7cc6eb74257489fff5e1e15492b88c23df1c30a1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1765, + "startColumn": 2, + "charOffset": 53176, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1763, + "startColumn": 1, + "charOffset": 53081, + "charLength": 212, + "snippet": { + "text": "void ProtocolGame::parseThrow(NetworkMessage &msg) {\r\n\tPosition fromPos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t fromStackpos = msg.getByte();\r\n\tPosition toPos = msg.getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9bfc3af36e05af67", + "equalIndicator/v1": "a15fb8dd9b9f87fc5287e58e2bae489abd40a1ec20159db24878dabecd76d01c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: sleepStart, sleeperGUID", + "markdown": "Constructor does not initialize these fields: sleepStart, sleeperGUID" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 10, + "charOffset": 583, + "charLength": 7, + "snippet": { + "text": "BedItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 527, + "charLength": 119, + "snippet": { + "text": "#include \"game/scheduling/save_manager.hpp\"\r\n\r\nBedItem::BedItem(uint16_t id) :\r\n\tItem(id) {\r\n\tinternalRemoveSleeper();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fe9cdfacdcec47d8", + "equalIndicator/v1": "a162ea2e1c0a20c3d963618dd7cb069181470865b2d0cdafc83acbe2aad25b1e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint_fast64_t' (aka 'unsigned long long') to 'float'", + "markdown": "Narrowing conversion from 'uint_fast64_t' (aka 'unsigned long long') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 190, + "startColumn": 3, + "charOffset": 5444, + "charLength": 6, + "snippet": { + "text": "return" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 188, + "startColumn": 1, + "charOffset": 5435, + "charLength": 28, + "snippet": { + "text": "\t\t}\r\n\r\n\t\treturn list;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "12db9b05e8de7764", + "equalIndicator/v1": "a16ba724fb79c1df9b36df1b7bca53468e7c3dc3570df375bc105e9f546c4562" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1072, + "startColumn": 103, + "charOffset": 31252, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1070, + "startColumn": 1, + "charOffset": 31141, + "charLength": 224, + "snippet": { + "text": "\t\t}\r\n\t}\r\n\tvoid sendUpdateTileItem(std::shared_ptr updateTile, const Position &pos, std::shared_ptr item) {\r\n\t\tif (client) {\r\n\t\t\tint32_t stackpos = updateTile->getStackposOfItem(static_self_cast(), item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0b5c12c6c0830279", + "equalIndicator/v1": "a1865a4e75142f97b9d16b280ff9892f2a418fc1be2259b9616bb1a78ce72f2f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'id' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'id' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 126, + "startColumn": 27, + "charOffset": 3518, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 124, + "startColumn": 1, + "charOffset": 3382, + "charLength": 192, + "snippet": { + "text": "\tstd::shared_ptr getItemByIndex(size_t index) const;\r\n\tbool isHoldingItem(std::shared_ptr item);\r\n\tbool isHoldingItemWithId(const uint16_t id);\r\n\r\n\tuint32_t getItemHoldingCount();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4d6abb2aefd1adb4", + "equalIndicator/v1": "a18853908af1947befb58cbd7bcf4a8967864140ac9af2a673664e769ed7b1bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 540, + "startColumn": 36, + "charOffset": 15507, + "charLength": 5, + "snippet": { + "text": "spawn" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 538, + "startColumn": 1, + "charOffset": 15378, + "charLength": 282, + "snippet": { + "text": "bool AreaSpawnEvent::executeEvent() {\r\n\tfor (const MonsterSpawn &spawn : spawnMonsterList) {\r\n\t\tuint32_t amount = uniform_random(spawn.minAmount, spawn.maxAmount);\r\n\t\tfor (uint32_t i = 0; i < amount; ++i) {\r\n\t\t\tstd::shared_ptr monster = Monster::createMonster(spawn.name);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "26b096fc8994e794", + "equalIndicator/v1": "a18a16f3dc1ffdf026bbe25d83f90504df7f0712319c2c099b8b6745affeed54" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2220, + "startColumn": 14, + "charOffset": 64964, + "charLength": 8, + "snippet": { + "text": "interval" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2218, + "startColumn": 1, + "charOffset": 64818, + "charLength": 384, + "snippet": { + "text": "\tauto playerTile = getTile();\r\n\tconst bool vipStaysOnline = isVip() && g_configManager().getBoolean(VIP_STAY_ONLINE, __FUNCTION__);\r\n\tidleTime += interval;\r\n\tif (playerTile && !playerTile->hasFlag(TILESTATE_NOLOGOUT) && !isAccessPlayer() && !isExerciseTraining() && !vipStaysOnline) {\r\n\t\tconst int32_t kickAfterMinutes = g_configManager().getNumber(KICK_AFTER_MINUTES, __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e4fb0c909a91af1c", + "equalIndicator/v1": "a19901e65fe01693aa7e257382155e71ddc191f01c05b69bcfb18783303f9030" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 831, + "startColumn": 20, + "charOffset": 25010, + "charLength": 10, + "snippet": { + "text": "OTSYS_TIME" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 829, + "startColumn": 1, + "charOffset": 24921, + "charLength": 119, + "snippet": { + "text": "int GlobalFunctions::luaSystemTime(lua_State* L) {\r\n\t// systemTime()\r\n\tlua_pushnumber(L, OTSYS_TIME());\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5f72128591e9594b", + "equalIndicator/v1": "a1f430d45fc982182260d252c362e3acf83c7e7f139bbe44aacfcd12e7f9895f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 194, + "startColumn": 15, + "charOffset": 7846, + "charLength": 11, + "snippet": { + "text": "updateThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 192, + "startColumn": 1, + "charOffset": 7701, + "charLength": 363, + "snippet": { + "text": "\tvirtual void addThing(std::shared_ptr) override { }\r\n\tvirtual void addThing(int32_t, std::shared_ptr) override { }\r\n\tvirtual void updateThing(std::shared_ptr, uint16_t, uint32_t) override { }\r\n\tvirtual void replaceThing(uint32_t, std::shared_ptr) override { }\r\n\tvirtual void removeThing(std::shared_ptr, uint32_t) override { }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bc70c89286f75c78", + "equalIndicator/v1": "a21ab1b1c50e28b4956498c0ef5530c5eea20ae700ea7fffb2fa7ce6211085db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1096, + "startColumn": 7, + "charOffset": 34594, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1094, + "startColumn": 1, + "charOffset": 34430, + "charLength": 369, + "snippet": { + "text": "bool RuneSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var, bool isHotkey) const {\r\n\t// onCastSpell(creature, var, isHotkey)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[RuneSpell::executeCastSpell - Creature {} runeId {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a5af786247be3f2f", + "equalIndicator/v1": "a21c334df7bb6ebe4b4b19809d603cb958ab9b4e167ab461be0fcae8e3bd3eb5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 145, + "startColumn": 36, + "charOffset": 4497, + "charLength": 5, + "snippet": { + "text": "count" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 143, + "startColumn": 1, + "charOffset": 4431, + "charLength": 80, + "snippet": { + "text": "\t\tsubType = count;\r\n\t} else {\r\n\t\titemCount = std::max(1, count);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0df475e5c28e500e", + "equalIndicator/v1": "a21e60d986b181623d2273df640fecaaead1a3ab65cfd6ec9dbb27b55e4d4804" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Pass by value and use std::move", + "markdown": "Pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 24, + "startColumn": 34, + "charOffset": 827, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 764, + "charLength": 191, + "snippet": { + "text": "}\r\n// Constructor for string\r\nCustomAttribute::CustomAttribute(const std::string &initStringKey, const std::string &initStringValue) :\r\n\tstringKey(initStringKey), value(initStringValue) {\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "38d6a43246526051", + "equalIndicator/v1": "a242cf3b3550a54ce778725c9d2f051c6686745b449c193b4ddc433ff68744a9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 302, + "startColumn": 38, + "charOffset": 8533, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 300, + "startColumn": 1, + "charOffset": 8419, + "charLength": 199, + "snippet": { + "text": "\t\tif (tmpStrValue == \"warning\") {\r\n\t\t\tmessageType = MESSAGE_GAME_HIGHLIGHT;\r\n\t\t} else if (tmpStrValue == \"event\") {\r\n\t\t\tmessageType = MESSAGE_EVENT_ADVANCE;\r\n\t\t} else if (tmpStrValue == \"default\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab2427f88401fb90", + "equalIndicator/v1": "a2525fe5ca77767f08e987f06ced15973a9b6326c8476dd6867f6ecdd7a1f9dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2507, + "startColumn": 27, + "charOffset": 74643, + "charLength": 7, + "snippet": { + "text": "lostExp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2505, + "startColumn": 1, + "charOffset": 74530, + "charLength": 193, + "snippet": { + "text": "\t\tTextMessage message(MESSAGE_EXPERIENCE, expString);\r\n\t\tmessage.position = position;\r\n\t\tmessage.primary.value = lostExp;\r\n\t\tmessage.primary.color = TEXTCOLOR_RED;\r\n\t\tsendTextMessage(message);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7f2566d85a3bb8fa", + "equalIndicator/v1": "a26562dad18de6f13d7f311ddf02b4ea63d660194832989247406c2306afb394" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'uint_fast64_t' (aka 'unsigned long long')", + "markdown": "Narrowing conversion from 'float' to 'uint_fast64_t' (aka 'unsigned long long')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 187, + "startColumn": 9, + "charOffset": 5371, + "charLength": 12, + "snippet": { + "text": "emplace_back" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 185, + "startColumn": 1, + "charOffset": 5201, + "charLength": 240, + "snippet": { + "text": "\t\tconst auto size_per_block = std::ceil(size / static_cast(threadPool.get_thread_count()));\r\n\t\tfor (uint_fast64_t i = 0; i < size; i += size_per_block) {\r\n\t\t\tlist.emplace_back(i, std::min(size, i + size_per_block));\r\n\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71b1ca9113f6e840", + "equalIndicator/v1": "a275b494b45500a379aaa570d88ccc272ef2af4ed83a865003a8f7f8fa2e2bab" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 433, + "startColumn": 11, + "charOffset": 13004, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 431, + "startColumn": 1, + "charOffset": 12937, + "charLength": 89, + "snippet": { + "text": "\t\t\t\tgetScriptInterface()->getLoadingScriptName()\r\n\t\t\t);\r\n\t\t\treturn std::string();\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8a00af57ab4b1e17", + "equalIndicator/v1": "a2ca6d653bba5ecb220524a5344f584827397ff0e79615edb1468988fcb248d9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 491, + "startColumn": 58, + "charOffset": 14618, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 489, + "startColumn": 1, + "charOffset": 14556, + "charLength": 122, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::RemoveItemField(std::shared_ptr, std::shared_ptr, const Position &) {\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f9d8ab916315a78a", + "equalIndicator/v1": "a2f6dd8fd583af1f443a00a0b80b7af4f7166c979b2ca5e68fe9a3e587b74fe1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 232, + "startColumn": 25, + "charOffset": 7328, + "charLength": 8, + "snippet": { + "text": "getThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 230, + "startColumn": 1, + "charOffset": 7169, + "charLength": 365, + "snippet": { + "text": "\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3bf363a4dc830a8a", + "equalIndicator/v1": "a321e45242f40ed0410728e4f82b259701d40374638ca5096a3b65461b795971" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 219, + "startColumn": 58, + "charOffset": 6720, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 217, + "startColumn": 1, + "charOffset": 6482, + "charLength": 381, + "snippet": { + "text": "\t// Factory member to create item of right type based on type\r\n\tstatic std::shared_ptr CreateItem(const uint16_t type, uint16_t count = 0, Position* itemPosition = nullptr);\r\n\tstatic std::shared_ptr CreateItemAsContainer(const uint16_t type, uint16_t size);\r\n\tstatic std::shared_ptr CreateItem(uint16_t itemId, Position &itemPosition);\r\n\tstatic Items items;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0b0be11666168435", + "equalIndicator/v1": "a32ca9f9f22bb50731ed18f8007aab77bf0ebe40a18255828275427eb6fe4702" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 133, + "startColumn": 12, + "charOffset": 4040, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 131, + "startColumn": 1, + "charOffset": 3936, + "charLength": 228, + "snippet": { + "text": "StashContainerList Container::getStowableItems() const {\r\n\tStashContainerList toReturnList;\r\n\tfor (auto item : itemlist) {\r\n\t\tif (item->getContainer() != NULL) {\r\n\t\t\tauto subContainer = item->getContainer()->getStowableItems();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59e6b07fe75e7047", + "equalIndicator/v1": "a339f875a3bc8cbfbcab4fcf473859ebdea2b15ec1506c1d4ff6749361410ce4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 222, + "startColumn": 32, + "charOffset": 5662, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 220, + "startColumn": 1, + "charOffset": 5566, + "charLength": 159, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.shootRange = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71ba8dd87dac353c", + "equalIndicator/v1": "a3472a0ff829ba336039ed846046f9557b2eb91e423bc69ca165561d82d444ab" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7853, + "startColumn": 95, + "charOffset": 274716, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7851, + "startColumn": 1, + "charOffset": 274514, + "charLength": 289, + "snippet": { + "text": "void Game::addPlayerMana(std::shared_ptr target) {\r\n\tif (const auto &party = target->getParty()) {\r\n\t\tuint8_t manaPercent = std::ceil((static_cast(target->getMana()) / std::max(target->getMaxMana(), 1)) * 100);\r\n\t\tparty->updatePlayerMana(target, manaPercent);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cc8d25f253c890b2", + "equalIndicator/v1": "a35208a94da33e20a8583eec236494435c8ba1b7ae652bbdfb678f6cc5fe2290" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4674, + "startColumn": 20, + "charOffset": 167186, + "charLength": 67, + "snippet": { + "text": "((freeSlots) - (count < it.stackSize ? 1 : (count / it.stackSize)))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4672, + "startColumn": 1, + "charOffset": 167161, + "charLength": 152, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t NDSlots = ((freeSlots) - (count < it.stackSize ? 1 : (count / it.stackSize)));\r\n\tuint32_t SlotsWith = count;\r\n\tuint32_t noSlotsWith = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d3e27532c267f3d3", + "equalIndicator/v1": "a39bb8edee1aa7df9c856d76ba20a5385c1d42ee259f6bb10b80e3d978fb8fc1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::basic_string::size_type'", + "markdown": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::basic_string::size_type'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 221, + "startColumn": 22, + "charOffset": 5423, + "charLength": 1, + "snippet": { + "text": "i" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 219, + "startColumn": 1, + "charOffset": 5325, + "charLength": 221, + "snippet": { + "text": "\r\n\t// hmac concat outer pad with message, conversion from hex to int needed\r\n\tfor (uint8_t i = 0; i < message.length(); i += 2) {\r\n\t\toKeyPad.push_back(static_cast(std::stol(message.substr(i, 2), nullptr, 16)));\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4d9d089bdd37e526", + "equalIndicator/v1": "a3a5e62cd8b05bf6798c1faa9789eaac65a2ce28eaa094831236b9f0b4153fe9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 605, + "startColumn": 109, + "charOffset": 17572, + "charLength": 6, + "snippet": { + "text": "member" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 603, + "startColumn": 1, + "charOffset": 17160, + "charLength": 602, + "snippet": { + "text": "\t\tplayer->sendPartyCreatureHealth(member, std::ceil((static_cast(member->getHealth()) / std::max(member->getMaxHealth(), 1)) * 100));\r\n\t\tmember->sendPartyCreatureHealth(player, std::ceil((static_cast(player->getHealth()) / std::max(player->getMaxHealth(), 1)) * 100));\r\n\t\tplayer->sendPartyPlayerMana(member, std::ceil((static_cast(member->getMana()) / std::max(member->getMaxMana(), 1)) * 100));\r\n\t\tmember->sendPartyPlayerMana(player, std::ceil((static_cast(player->getMana()) / std::max(player->getMaxMana(), 1)) * 100));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "838065d565d12abc", + "equalIndicator/v1": "a3b1aace525c419c7529f9449fb3fd019854acdf56ce38aa50be023ce5321ec7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 143, + "startColumn": 14, + "charOffset": 4184, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 141, + "startColumn": 1, + "charOffset": 3850, + "charLength": 640, + "snippet": { + "text": "\tvirtual ReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override final;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d297ee665198d08d", + "equalIndicator/v1": "a3b57895ecf4a5d05992be2881648a76b8218264a23ecef12fa801dcd6154cd8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8034, + "startColumn": 64, + "charOffset": 279680, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8032, + "startColumn": 1, + "charOffset": 279612, + "charLength": 192, + "snippet": { + "text": "}\r\n\r\nvoid Game::updateCreatureWalkthrough(std::shared_ptr creature) {\r\n\t// Send to clients\r\n\tfor (const auto &spectator : Spectators().find(creature->getPosition(), true)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "616a64811503e0e8", + "equalIndicator/v1": "a3cae27c33a61ed10caad0a069fc565b005bb4f0f5f9305b89cba827dc5fb452" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 792, + "startColumn": 20, + "charOffset": 30444, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 790, + "startColumn": 1, + "charOffset": 30370, + "charLength": 141, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r\n\tlua_pushnumber(L, exp);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9320533925081067", + "equalIndicator/v1": "a3d7bc7281854de23fda56e87f09a6d68b8fc06dcee87deb943b47c5053a72be" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2628, + "startColumn": 43, + "charOffset": 99282, + "charLength": 5, + "snippet": { + "text": "money" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2626, + "startColumn": 1, + "charOffset": 99130, + "charLength": 294, + "snippet": { + "text": "\t\t} else if (moneyEntry.first > money) {\r\n\t\t\tconst uint32_t worth = moneyEntry.first / item->getItemCount();\r\n\t\t\tconst uint32_t removeCount = std::ceil(money / static_cast(worth));\r\n\t\t\taddMoney(cylinder, (worth * removeCount) - money, flags);\r\n\t\t\tinternalRemoveItem(item, removeCount);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "503dd8d9e23b4a41", + "equalIndicator/v1": "a3dcc00990b959f7acae707565c5fe8f3d328b70a5e26f7c963b45fc9e84ed8b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::any_of()'", + "markdown": "Replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1514, + "startColumn": 2, + "charOffset": 46048, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1512, + "startColumn": 1, + "charOffset": 46011, + "charLength": 167, + "snippet": { + "text": "\r\n\tint64_t timeNow = OTSYS_TIME();\r\n\tfor (const auto &condition : conditions) {\r\n\t\tif (condition->getType() != type || condition->getSubId() != subId) {\r\n\t\t\tcontinue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "337e9da516558343", + "equalIndicator/v1": "a3e0ac336fb3b4abb6bb4c197e250b36d1df932fb65ffd342b2be1c201a88450" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 844, + "startColumn": 41, + "charOffset": 32389, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 842, + "startColumn": 1, + "charOffset": 32343, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "afeb7e7eb1f9d052", + "equalIndicator/v1": "a3f8b25b77133f7955bb1eadba1cb219b146e1867025ff1cf27ba44340666013" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Escaped string literal can be written as a raw string literal", + "markdown": "Escaped string literal can be written as a raw string literal" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 140, + "startColumn": 14, + "charOffset": 4434, + "charLength": 19, + "snippet": { + "text": "\"{ \\\"content\\\": \\\"\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 138, + "startColumn": 1, + "charOffset": 4387, + "charLength": 124, + "snippet": { + "text": "\t\tpayload << \" }] }\";\r\n\t} else {\r\n\t\tpayload << \"{ \\\"content\\\": \\\"\" << (!message.empty() ? message : title) << \"\\\" }\";\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5d1b7ccc978f0cd2", + "equalIndicator/v1": "a4034e62dbf3ab525a4f38c8bef97d83bb3cb176045d9983289e56beb0ead709" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 64, + "startColumn": 10, + "charOffset": 1561, + "charLength": 14, + "snippet": { + "text": "gainManaAmount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 62, + "startColumn": 1, + "charOffset": 1511, + "charLength": 132, + "snippet": { + "text": "\r\n\tuint32_t getManaGainAmount() const {\r\n\t\treturn gainManaAmount * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2211595e285600f2", + "equalIndicator/v1": "a4059c65f4aafe23b96300ce0188f6ce8668396789fc5e7ac5d83d23c8460ca6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9230, + "startColumn": 15, + "charOffset": 322596, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9228, + "startColumn": 1, + "charOffset": 322534, + "charLength": 106, + "snippet": { + "text": "\t\t\tint32_t subType;\r\n\t\t\tif (it.charges != 0) {\r\n\t\t\t\tsubType = it.charges;\r\n\t\t\t} else {\r\n\t\t\t\tsubType = -1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3036b629f7e281a5", + "equalIndicator/v1": "a41abc111e35e86fff2001ae579e29eae51f8fb952675a7193be81435e32763e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 117, + "startColumn": 80, + "charOffset": 6043, + "charLength": 13, + "snippet": { + "text": "const int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 115, + "startColumn": 1, + "charOffset": 5807, + "charLength": 565, + "snippet": { + "text": "\tvoid eventPlayerOnRequestQuestLog(std::shared_ptr player);\r\n\tvoid eventPlayerOnRequestQuestLine(std::shared_ptr player, uint16_t questId);\r\n\tvoid eventOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime);\r\n\tvoid eventPlayerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage);\r\n\tvoid eventPlayerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ddff0aefef1b7130", + "equalIndicator/v1": "a424e7f4005553a8bb84d400d3129bf013ae56744cbed7764c3e2b8c59694420" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 187, + "startColumn": 9, + "charOffset": 4520, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 185, + "startColumn": 1, + "charOffset": 4460, + "charLength": 93, + "snippet": { + "text": "\t\thexstring[index + 1] = hexDigits[byte & 15];\r\n\t}\r\n\treturn std::string(hexstring, 40);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "480d71a45c846517", + "equalIndicator/v1": "a425e132efdb8bcea9a6d59b243dffc9917cf234ed8b14f5d70b8d5ac0d50851" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2253, + "startColumn": 2, + "charOffset": 70185, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2251, + "startColumn": 1, + "charOffset": 70146, + "charLength": 195, + "snippet": { + "text": "\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tg_game().playerConfigureShowOffSocket(player->getID(), pos, stackpos, itemId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1938b379c11fea8c", + "equalIndicator/v1": "a43e8cfce356f78ab0547c5c771af635b2dc5f0adc2ca3d6a51c16f2a8621224" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 240, + "startColumn": 18, + "charOffset": 7870, + "charLength": 11, + "snippet": { + "text": "getPosition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 238, + "startColumn": 1, + "charOffset": 7763, + "charLength": 161, + "snippet": { + "text": "\tvoid virtual internalAddThing(uint32_t index, std::shared_ptr thing) override;\r\n\r\n\tconst Position &getPosition() override final {\r\n\t\treturn tilePos;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1fbf0012b7b0f92f", + "equalIndicator/v1": "a444ba39481bf0d90f73dbc9c2e9f8c50bbd344aa6100295ecc54ea49c3a6ca6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 965, + "startColumn": 31, + "charOffset": 28927, + "charLength": 8, + "snippet": { + "text": "interval" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 963, + "startColumn": 1, + "charOffset": 28857, + "charLength": 112, + "snippet": { + "text": "\r\n\t\t\tif (challengeFocusDuration > 0) {\r\n\t\t\t\tchallengeFocusDuration -= interval;\r\n\t\t\t\tcanChangeTarget = false;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8ebc979032ad1290", + "equalIndicator/v1": "a45d312c7969d7fb1cbab831d5e89109462c3e7d8069ce2cc84caa7811a84070" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 796, + "startColumn": 53, + "charOffset": 25248, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 794, + "startColumn": 1, + "charOffset": 25191, + "charLength": 180, + "snippet": { + "text": "}\r\n\r\nvoid Party::addPlayerDamage(std::shared_ptr player, uint64_t amount) {\r\n\tauto playerAnalyzer = getPlayerPartyAnalyzerStruct(player->getID());\r\n\tif (!playerAnalyzer) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "43f6c08bbe221ffd", + "equalIndicator/v1": "a48b67b31cbf511b24100e8bd8320aa61c09d538fb437631a304917fd11b5c03" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 134, + "startColumn": 110, + "charOffset": 3675, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 132, + "startColumn": 1, + "charOffset": 3561, + "charLength": 244, + "snippet": { + "text": "}\r\n\r\nbool Weapon::useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const {\r\n\tint32_t damageModifier = playerWeaponCheck(player, target, item->getShootRange());\r\n\tif (damageModifier == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c3abd7a6952e1e5", + "equalIndicator/v1": "a4cfd4797ca078b75e4689822a6aa040015037fc67468a7aa044687931741f19" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 567, + "startColumn": 33, + "charOffset": 16206, + "charLength": 9, + "snippet": { + "text": "spectator" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 565, + "startColumn": 1, + "charOffset": 16151, + "charLength": 155, + "snippet": { + "text": "\r\n\t// send to clients\r\n\tfor (std::shared_ptr spectator : spectators) {\r\n\t\tspectator->getPlayer()->sendUpdateTile(getTile(), cylinderMapPos);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1c9b3134b86150c8", + "equalIndicator/v1": "a4dbb49fab6725ff3473f6cff232aa14fcbfb1c501338ca510a82d398db7b833" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 194, + "startColumn": 2, + "charOffset": 5433, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 192, + "startColumn": 1, + "charOffset": 5369, + "charLength": 224, + "snippet": { + "text": "\r\n\tint32_t index = getNumber(L, 3, INDEX_WHEREEVER);\r\n\tuint32_t flags = getNumber(L, 4, 0);\r\n\tReturnValue ret = g_game().internalAddItem(container, item, index, flags);\r\n\tif (ret == RETURNVALUE_NOERROR) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb303a54eb61a762", + "equalIndicator/v1": "a559cf467953e95b18e8eab3ec36e8077f21301a1375ad895893dd2aedba29c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The value returned by this function should not be disregarded; neglecting it may lead to errors", + "markdown": "The value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 33, + "startColumn": 5, + "charOffset": 1184, + "charLength": 10, + "snippet": { + "text": "connection" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 31, + "startColumn": 1, + "charOffset": 1142, + "charLength": 259, + "snippet": { + "text": "\t\t\ttry {\r\n\t\t\t\tstd::error_code error;\r\n\t\t\t\tconnection->socket.shutdown(asio::ip::tcp::socket::shutdown_both, error);\r\n\t\t\t\tif (error) {\r\n\t\t\t\t\tg_logger().error(\"[ConnectionManager::closeAll] - Failed to close connection, system error code {}\", error.message());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0e5d6d17ca236115", + "equalIndicator/v1": "a57d97574da661a75f663e59c40e7008f945a3d2194f7d3f37eb0ca22c207bff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 719, + "startColumn": 37, + "charOffset": 23378, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 717, + "startColumn": 1, + "charOffset": 23316, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 65) * 1.50f) + 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "96e845c31ba9bddf", + "equalIndicator/v1": "a5b7f184fa6ad03c6fa8b9536e8b61ece27c720dfb2fb0fa4e7cde8e99af9189" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::any_of()'", + "markdown": "Replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5309, + "startColumn": 2, + "charOffset": 156847, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5307, + "startColumn": 1, + "charOffset": 156840, + "charLength": 158, + "snippet": { + "text": "\t}\r\n\r\n\tfor (const auto &learnedSpellName : learnedInstantSpellList) {\r\n\t\tif (strcasecmp(learnedSpellName.c_str(), spellName.c_str()) == 0) {\r\n\t\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0bc0ad7376d0ac90", + "equalIndicator/v1": "a5be0bce111adf85798406c4ac934357cbe58ab277e2e2f297ea634decbf96e1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 165, + "startColumn": 46, + "charOffset": 4385, + "charLength": 6, + "snippet": { + "text": "amount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 163, + "startColumn": 1, + "charOffset": 4294, + "charLength": 225, + "snippet": { + "text": "\t}\r\n\tif (bankable->getPlayer() != nullptr) {\r\n\t\tg_metrics().addCounter(\"balance_decrease\", amount, { { \"player\", bankable->getPlayer()->getName() }, { \"context\", \"bank_deposit\" } });\r\n\t}\r\n\treturn destination->credit(amount);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "93af2f887fd4521f", + "equalIndicator/v1": "a5c9e81fc47e21e1572ac6ff210bf832539c8651c3802f54e083a7fc665c6f41" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 438, + "startColumn": 27, + "charOffset": 15702, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 436, + "startColumn": 1, + "charOffset": 15670, + "charLength": 122, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.partyOnJoin, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f11b511a07d50fa8", + "equalIndicator/v1": "a5cc03294e3b74386640ccff4284c510dd21b0cb8e6c47ffb18985fe812e5a81" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 23, + "startColumn": 14, + "charOffset": 647, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 21, + "startColumn": 1, + "charOffset": 602, + "charLength": 346, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9912eb9df885d344", + "equalIndicator/v1": "a60d41855369274f552bf32a1b0c66e26059a5a012aba34f82a1c1cef272bc47" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 189, + "startColumn": 125, + "charOffset": 6099, + "charLength": 37, + "snippet": { + "text": "(it.abilities->statsPercent[s] - 100)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 187, + "startColumn": 1, + "charOffset": 5882, + "charLength": 280, + "snippet": { + "text": "\t\t\t\tif (it.abilities && it.abilities->statsPercent[s] != 0) {\r\n\t\t\t\t\tneedUpdateStats = true;\r\n\t\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\r\n\t\t\t\t}\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "827afec8c8323752", + "equalIndicator/v1": "a61f93e6a1f87e594ddf4254472e8d1a8c4e1bb73123ad5b540f428a61e65084" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1409, + "startColumn": 14, + "charOffset": 37179, + "charLength": 11, + "snippet": { + "text": "description" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1407, + "startColumn": 1, + "charOffset": 37120, + "charLength": 121, + "snippet": { + "text": "\tuint32_t guid = 0;\r\n\tstd::string name = \"\";\r\n\tstd::string description = \"\";\r\n\tuint32_t icon = 0;\r\n\tbool notify = false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "15777295a647aacf", + "equalIndicator/v1": "a625c2eddc18383b62820c534138a55dc744695478b2204f68c4043998448a63" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 738, + "startColumn": 51, + "charOffset": 24305, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 736, + "startColumn": 1, + "charOffset": 24250, + "charLength": 160, + "snippet": { + "text": "}\r\n\r\nvoid Spell::postCastSpell(std::shared_ptr player, uint32_t manaCost, uint32_t soulCost) {\r\n\tif (manaCost > 0) {\r\n\t\tplayer->addManaSpent(manaCost);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b4ee5e0912087370", + "equalIndicator/v1": "a6337e0562142959afc618b896218f40ef685954401f556c7cb18a3ec4eaec7e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'toTile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'toTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1393, + "startColumn": 166, + "charOffset": 55227, + "charLength": 6, + "snippet": { + "text": "toTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1391, + "startColumn": 1, + "charOffset": 55057, + "charLength": 264, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerMoveCreature(std::shared_ptr player, std::shared_ptr movingCreature, const Position &movingCreatureOrigPos, std::shared_ptr toTile) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!player->canDoAction()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0079c6d12bfd5f70", + "equalIndicator/v1": "a638daf5a2ab9d0f5399ed63994ffbf99b62adf71a837231690e5fff68d3bf33" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 364, + "startColumn": 4, + "charOffset": 12051, + "charLength": 89, + "snippet": { + "text": "case COMBAT_ENERGYDAMAGE:\r\n\t\t\t\tdefaultMap[3] -= static_cast(elementEntry.second)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 362, + "startColumn": 1, + "charOffset": 11971, + "charLength": 210, + "snippet": { + "text": "\t\t\t\tdefaultMap[2] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_ENERGYDAMAGE:\r\n\t\t\t\tdefaultMap[3] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_ICEDAMAGE:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "437022d7eb876dea", + "equalIndicator/v1": "a674399fc9e4965242e53ce49d5feeefaaed413ecd48388b31184fe33bce31db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2085, + "startColumn": 72, + "charOffset": 60390, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2083, + "startColumn": 1, + "charOffset": 60314, + "charLength": 195, + "snippet": { + "text": "}\r\n\r\nstd::string Item::parseShowAttributesDescription(std::shared_ptr item, const uint16_t itemId) {\r\n\tstd::ostringstream itemDescription;\r\n\tconst ItemType &itemType = Item::items[itemId];\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "25538780df1f5a2b", + "equalIndicator/v1": "a6d51169c844392b226cb3c534c933fa7b1607bea01247df215823fb7fd73c27" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'achievementsUnlocked' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'achievementsUnlocked' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3707, + "startColumn": 128, + "charOffset": 115434, + "charLength": 20, + "snippet": { + "text": "achievementsUnlocked" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3705, + "startColumn": 1, + "charOffset": 115302, + "charLength": 199, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCyclopediaCharacterAchievements(uint16_t secretsUnlocked, std::vector> achievementsUnlocked) {\r\n\tif (!player || oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a0ed85899f7f7fc3", + "equalIndicator/v1": "a6e953a61e25d24f707cc46935556a36dc85c5b8d8ddc6f2f2d276c595287af1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1029, + "startColumn": 7, + "charOffset": 37183, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1027, + "startColumn": 1, + "charOffset": 37171, + "charLength": 156, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnGainExperience - \"\r\n\t\t \"Player {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aa8c809f0d03856f", + "equalIndicator/v1": "a6fb2939ea543c2cb1a2bc762ba13d2ea5cc9957cb4535c520e92554e4dffe42" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'callback' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'callback' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasetasks.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 25, + "startColumn": 95, + "charOffset": 847, + "charLength": 8, + "snippet": { + "text": "callback" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 23, + "startColumn": 1, + "charOffset": 748, + "charLength": 220, + "snippet": { + "text": "}\r\n\r\nvoid DatabaseTasks::execute(const std::string &query, std::function callback /* nullptr */) {\r\n\tthreadPool.detach_task([this, query, callback]() {\r\n\t\tbool success = db.executeQuery(query);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e5ba48941dc49e63", + "equalIndicator/v1": "a70881b71fd4ff5a57a09eef935337af23bee1b34d6da4e4d58d3a15bb8c498d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 808, + "startColumn": 20, + "charOffset": 20102, + "charLength": 18, + "snippet": { + "text": "luaItemSetDuration" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 806, + "startColumn": 1, + "charOffset": 20078, + "charLength": 244, + "snippet": { + "text": "}\r\n\r\nint ItemFunctions::luaItemSetDuration(lua_State* L) {\r\n\t// item:setDuration(minDuration, maxDuration = 0, decayTo = 0, showDuration = true)\r\n\t// Example: item:setDuration(10000, 20000, 2129, false) = random duration from range 10000/20000\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "358f1e0127ad7783", + "equalIndicator/v1": "a7263c046ac51a1912b73efcd74ee4c888d01a169595107b0bc3016fe8e433e0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 143, + "startColumn": 13, + "charOffset": 4443, + "charLength": 5, + "snippet": { + "text": "count" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 141, + "startColumn": 1, + "charOffset": 4424, + "charLength": 81, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tsubType = count;\r\n\t} else {\r\n\t\titemCount = std::max(1, count);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "199d8d38274ed6b4", + "equalIndicator/v1": "a76656794173fd958939c2c7217413d66498ca6c4c2b93a8a89d11cb3dcb193b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'hash' is within a recursive call chain", + "markdown": "Function 'hash' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 234, + "startColumn": 32, + "charOffset": 6788, + "charLength": 3, + "snippet": { + "text": "arr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 232, + "startColumn": 1, + "charOffset": 6714, + "charLength": 198, + "snippet": { + "text": "\r\nvoid BasicItem::hash(size_t &h) const {\r\n\tconst std::array arr = { id, charges, actionId, uniqueId, destX, destY, destZ, doorOrDepotId };\r\n\tfor (const auto v : arr) {\r\n\t\tif (v > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "10709ed55c043ae9", + "equalIndicator/v1": "a7931042341be761edd3f03fd3e5adde4011be548fcc5d4361378a57f194548d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1726, + "startColumn": 7, + "charOffset": 60283, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1724, + "startColumn": 1, + "charOffset": 60110, + "charLength": 365, + "snippet": { + "text": "void ChainCallback::onChainCombat(std::shared_ptr creature, uint8_t &maxTargets, uint8_t &chainDistance, bool &backtracking) {\r\n\t// onChainCombat(creature)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[ChainCallback::onTargetCombat - Creature {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f33c5708c5200682", + "equalIndicator/v1": "a796d244ce296e0639d75d6edc916180791ea6b52fb65e7130a9a498764d2560" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: quickLootFilter", + "markdown": "Constructor does not initialize these fields: quickLootFilter" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 47, + "startColumn": 9, + "charOffset": 1786, + "charLength": 6, + "snippet": { + "text": "Player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 45, + "startColumn": 1, + "charOffset": 1740, + "charLength": 115, + "snippet": { + "text": "MuteCountMap Player::muteCountMap;\r\n\r\nPlayer::Player(ProtocolGame_ptr p) :\r\n\tCreature(),\r\n\tlastPing(OTSYS_TIME()),\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "515a9dbb26d92357", + "equalIndicator/v1": "a79b11b1e97c42938dfa03c6a7347258a774229abfaf84136da9164fee2109ce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2173, + "startColumn": 60, + "charOffset": 63783, + "charLength": 4, + "snippet": { + "text": "task" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2171, + "startColumn": 1, + "charOffset": 63719, + "charLength": 160, + "snippet": { + "text": "}\r\n\r\nvoid Player::setNextPotionActionTask(std::shared_ptr task) {\r\n\tif (actionPotionTaskEvent != 0) {\r\n\t\tg_dispatcher().stopEvent(actionPotionTaskEvent);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4ed9692277d81fbe", + "equalIndicator/v1": "a7a3c596a0ab6d51d20fac750f22b88d712e26c853b132293333189e4ef2f8c5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1105, + "startColumn": 6, + "charOffset": 42105, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1103, + "startColumn": 1, + "charOffset": 42049, + "charLength": 199, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, position);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fff805f32807f16a", + "equalIndicator/v1": "a7d95a0deec1d47237a3cdd3fa49f68ec94a8b78e29a4ef7818cfc911eed2fe5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 397, + "startColumn": 62, + "charOffset": 10990, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 395, + "startColumn": 1, + "charOffset": 10924, + "charLength": 188, + "snippet": { + "text": "}\r\n\r\nvoid Creature::onCreatureDisappear(std::shared_ptr creature, bool isLogout) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (getAttackedCreature() == creature) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c2a4b99074d2be79", + "equalIndicator/v1": "a87e257a1b986cd1a396c26b0c97b1a611a88b190680c2a4a78c7be98629f358" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1103, + "startColumn": 27, + "charOffset": 34908, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1101, + "startColumn": 1, + "charOffset": 34876, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "549a61344d2d0bc7", + "equalIndicator/v1": "a8830e8a2f9b781085d567e822a0e0d98991db946fd908eb791ed301501f3ccb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1125, + "startColumn": 20, + "charOffset": 40361, + "charLength": 5, + "snippet": { + "text": "tries" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1123, + "startColumn": 1, + "charOffset": 40312, + "charLength": 112, + "snippet": { + "text": "\r\n\tlua_pushnumber(L, skill);\r\n\tlua_pushnumber(L, tries);\r\n\r\n\tif (scriptInterface.protectedCall(L, 3, 1) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "244371c7372706b8", + "equalIndicator/v1": "a893537de4d70b1e1a58a0d94150371ff4464dfa59857e54c891c575e717b452" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 177, + "startColumn": 69, + "charOffset": 6302, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 175, + "startColumn": 1, + "charOffset": 6229, + "charLength": 403, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::creatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnDrainHealth - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "90dc15e258a9bdab", + "equalIndicator/v1": "a8aa71c403585fb0020ad0c5f0b007e4875614a892b81a0e640041d1ee350f3b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 801, + "startColumn": 2, + "charOffset": 30684, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 799, + "startColumn": 1, + "charOffset": 30677, + "charLength": 52, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5b4718ce325c85ed", + "equalIndicator/v1": "a8bc8a7ea31a18bedbd033a84edbf1bd579549a47c60b88b391cf36c5ca1882c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1633, + "startColumn": 91, + "charOffset": 57218, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1631, + "startColumn": 1, + "charOffset": 57062, + "charLength": 249, + "snippet": { + "text": "//**********************************************************//\r\n\r\nvoid TileCallback::onTileCombat(std::shared_ptr creature, std::shared_ptr tile) const {\r\n\t// onTileCombat(creature, pos)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ae4a4ca8fd03e6d0", + "equalIndicator/v1": "a8d7ddd180c458e0ddd98b0f7ce257b73d792aa4536bdd77549e6f9d74a1db76" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 667, + "startColumn": 15, + "charOffset": 21823, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 665, + "startColumn": 1, + "charOffset": 21783, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 45) * 1.55f) + 6;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b8d184daa674c817", + "equalIndicator/v1": "a8f2432972dc2423ebb96329ea2422c7abb6041aca094ae4361d77a27f3fe417" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 762, + "startColumn": 38, + "charOffset": 27382, + "charLength": 12, + "snippet": { + "text": "fromCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 760, + "startColumn": 1, + "charOffset": 27292, + "charLength": 158, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, toPosition);\r\n\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8bcab81f4aef3634", + "equalIndicator/v1": "a9144add867f9066a884bd7bbec1624b0d4ca1c510c79eb5ee6733b2d6229fb3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 433, + "startColumn": 8, + "charOffset": 26694, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 431, + "startColumn": 1, + "charOffset": 26681, + "charLength": 125, + "snippet": { + "text": "\t}\r\n\r\n\tconst uint16_t date = result->getNumber(\"date\");\r\n\tconst time_t now = time(0);\r\n\ttm* ltm = localtime(&now);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4cd90784aa8e9691", + "equalIndicator/v1": "a9328183c9e3ef8820dcb6bfcb6ac7d29cb1cc00ec742c3f303813e15481334a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3007, + "startColumn": 44, + "charOffset": 90910, + "charLength": 10, + "snippet": { + "text": "experience" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3005, + "startColumn": 1, + "charOffset": 90786, + "charLength": 166, + "snippet": { + "text": "\tdouble getLostPercent() const;\r\n\tuint64_t getLostExperience() const override {\r\n\t\treturn skillLoss ? static_cast(experience * getLostPercent()) : 0;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "03c3eef343e0ef42", + "equalIndicator/v1": "a9366af11b3325a7b469261b2de33f4ea0adb0d2d2e70461502ad9bf90e8451c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 804, + "startColumn": 62, + "charOffset": 29052, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 802, + "startColumn": 1, + "charOffset": 28986, + "charLength": 163, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnChangeZone(std::shared_ptr player, ZoneType_t zone) {\r\n\t// Player:onChangeZone(zone)\r\n\tif (info.playerOnChangeZone == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6405b6fef7c5f798", + "equalIndicator/v1": "a96f347413210ec2ef864f53f8e70f57711ffd17841ab7c4f0f6a68ee903e01d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 381, + "startColumn": 59, + "charOffset": 10374, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 379, + "startColumn": 1, + "charOffset": 10311, + "charLength": 172, + "snippet": { + "text": "}\r\n\r\nvoid Creature::onRemoveCreature(std::shared_ptr creature, bool) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tonCreatureDisappear(creature, true);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ca3cfb6409b3fe14", + "equalIndicator/v1": "a972ddfa07d0440e378d3d9f058b4146d37e4d7102512f5d9f60130ea56166ca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 53, + "startColumn": 41, + "charOffset": 1279, + "charLength": 9, + "snippet": { + "text": "timestamp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 51, + "startColumn": 1, + "charOffset": 1233, + "charLength": 197, + "snippet": { + "text": "\t}\r\n\r\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\r\n\tgetUnlockedKV()->set(title.m_maleName, toSaveTimeStamp);\r\n\tm_titlesUnlocked.emplace_back(title, toSaveTimeStamp);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7c9ae79046d9c288", + "equalIndicator/v1": "a98908235a7c8a6ce9b9b8ad8761475dcf1e0c806097e19264a6d9254939806e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 209, + "startColumn": 8, + "charOffset": 5250, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 207, + "startColumn": 1, + "charOffset": 5158, + "charLength": 207, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsQuiver(lua_State* L) {\r\n\t// itemType:isQuiver()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isQuiver());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3f17400ca71a1d5d", + "equalIndicator/v1": "a98b99b66ca08699f5d15863efc5a29ec572358df79be2081d9fb11e0c4fca2e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 898, + "startColumn": 58, + "charOffset": 29294, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 896, + "startColumn": 1, + "charOffset": 29232, + "charLength": 195, + "snippet": { + "text": "}\r\n\r\nvoid Combat::addDistanceEffect(std::shared_ptr caster, const Position &fromPos, const Position &toPos, uint16_t effect) {\r\n\tif (effect == CONST_ANI_WEAPONTYPE) {\r\n\t\tif (!caster) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "98c383fb2a877c18", + "equalIndicator/v1": "a9bb7924c6bfb894baaeb973b5d77196698853b86e1e4279f2fe326f49fbfa7a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1385, + "startColumn": 57, + "charOffset": 40267, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1383, + "startColumn": 1, + "charOffset": 40206, + "charLength": 138, + "snippet": { + "text": "}\r\n\r\nint32_t Tile::getStackposOfItem(std::shared_ptr player, std::shared_ptr item) const {\r\n\tint32_t n = 0;\r\n\tif (ground) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "922f48baee6a0cf1", + "equalIndicator/v1": "aa17ebbcac8b0ba4bba5f1763e13cfaa945c02fec7b3055e486d706ecd6b2b0f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8449, + "startColumn": 4, + "charOffset": 267428, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8447, + "startColumn": 1, + "charOffset": 267341, + "charLength": 243, + "snippet": { + "text": "\t\tcase SUPPLY_STASH_ACTION_STOW_CONTAINER: {\r\n\t\t\tPosition pos = msg.getPosition();\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint8_t stackpos = msg.getByte();\r\n\t\t\tg_game().playerStowItem(player->getID(), pos, itemId, stackpos, 0, false);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0546c8d1ccafcdd0", + "equalIndicator/v1": "aa1c7aa11b9bd574d6da47bf44b3ce9bf2021507d3d1d2558c1f71ce552c250a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2441, + "startColumn": 2, + "charOffset": 75947, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2439, + "startColumn": 1, + "charOffset": 75871, + "charLength": 207, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseCyclopediaMonsterTracker(NetworkMessage &msg) {\r\n\tuint16_t monsterRaceId = msg.get();\r\n\t// Bosstiary tracker: 0 = disabled, 1 = enabled\r\n\t// Bestiary tracker: 1 = enabled\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "afcaaf1309b7b968", + "equalIndicator/v1": "aa3f6392e0faeabf375d4eca6459ca414762e36885fef89c514cc71548541c9e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3071, + "startColumn": 132, + "charOffset": 114302, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3069, + "startColumn": 1, + "charOffset": 114166, + "charLength": 275, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::processLootItems(std::shared_ptr player, std::shared_ptr lootContainer, std::shared_ptr item, bool &fallbackConsumed) {\r\n\tstd::shared_ptr lastSubContainer = nullptr;\r\n\tuint32_t remainderCount = item->getItemCount();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d8a541a53bce4fc", + "equalIndicator/v1": "aa414e097cf92c8ac12961f253ecd4fcbbd4a45fbad68a62a9a64c70558a8cb4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 184, + "startColumn": 28, + "charOffset": 5753, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 182, + "startColumn": 1, + "charOffset": 5719, + "charLength": 143, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\t\tenv->setScriptId(mType->info.creatureDisappearEvent, scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f31db5d2cfae964b", + "equalIndicator/v1": "aa51f9992a5b00de24ac58ef5d35c6d0c0d2cac6e71e234f9161105276461832" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 235, + "startColumn": 56, + "charOffset": 6012, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 233, + "startColumn": 1, + "charOffset": 5952, + "charLength": 135, + "snippet": { + "text": "}\r\n\r\nvoid BedItem::regeneratePlayer(std::shared_ptr player) const {\r\n\tconst uint32_t sleptTime = time(nullptr) - sleepStart;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "76eee41497b4daa4", + "equalIndicator/v1": "aa72f6cd96dc019e3c472d9b827a0a48793511bd93d1659c0ed8a64232005f2e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 577, + "startColumn": 17, + "charOffset": 15612, + "charLength": 9, + "snippet": { + "text": "shopBlock" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 575, + "startColumn": 1, + "charOffset": 15497, + "charLength": 252, + "snippet": { + "text": "\tuint64_t pricePerUnit = 0;\r\n\tconst auto &shopVector = npc->getShopItemVector(player->getGUID());\r\n\tfor (ShopBlock shopBlock : shopVector) {\r\n\t\tif (itemId == shopBlock.itemId && shopBlock.itemBuyPrice != 0) {\r\n\t\t\tpricePerUnit = shopBlock.itemBuyPrice;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "13cdc2567a9b2933", + "equalIndicator/v1": "aa7a751c2dea6b105f3797bcd32760d36d3f56c0d90dc852674f180cb362e5be" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 154, + "startColumn": 30, + "charOffset": 4200, + "charLength": 29, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 152, + "startColumn": 1, + "charOffset": 4102, + "charLength": 277, + "snippet": { + "text": "\r\n\tbool registerLuaItemEvent(const std::shared_ptr action);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr action);\r\n\tbool registerLuaActionEvent(const std::shared_ptr action);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr action);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc60aa923c843561", + "equalIndicator/v1": "aab95ef15b799f39dfc3e040091d67fa5a2d55dc14267ab17fa566775ba021e0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 188, + "startColumn": 36, + "charOffset": 7568, + "charLength": 16, + "snippet": { + "text": "queryDestination" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 186, + "startColumn": 1, + "charOffset": 7494, + "charLength": 204, + "snippet": { + "text": "\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r\n\tvirtual std::shared_ptr queryDestination(int32_t &, const std::shared_ptr &, std::shared_ptr*, uint32_t &) override {\r\n\t\treturn nullptr;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1f3f114bc87c5ed", + "equalIndicator/v1": "aad15c8debf55f29af635a3281ddd456d648583ac9d011d76e2c4d2f4f48703e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 357, + "startColumn": 41, + "charOffset": 13351, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 355, + "startColumn": 1, + "charOffset": 13305, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "49360c3bc0eacd3f", + "equalIndicator/v1": "aad3282eba08e3a58e8a3383aa33d727feca46653f1b27baad2539f19adaced9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'std::map::mapped_type' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'std::map::mapped_type' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10117, + "startColumn": 44, + "charOffset": 352258, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10115, + "startColumn": 1, + "charOffset": 352169, + "charLength": 166, + "snippet": { + "text": "\t\t\t\"Game::updateFiendishMonsterStatus\"\r\n\t\t);\r\n\t\tforgeMonsterEventIds[monster->getID()] = g_dispatcher().scheduleEvent(schedulerTask);\r\n\t\treturn monster->getID();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "18f119f361eb093e", + "equalIndicator/v1": "ab02622823466b155f645e36f07c3d5dbe3ca4d8789d30c663790700b88c8a5b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 947, + "startColumn": 41, + "charOffset": 36136, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 945, + "startColumn": 1, + "charOffset": 36090, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "911249341845a145", + "equalIndicator/v1": "ab0cbbf01fbe8f4891f6ab0065a9ffc1d66805d33e3216162d8c274e83c44f47" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3069, + "startColumn": 2, + "charOffset": 93626, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3067, + "startColumn": 1, + "charOffset": 93555, + "charLength": 180, + "snippet": { + "text": "\r\nvoid ProtocolGame::parsePassPartyLeadership(NetworkMessage &msg) {\r\n\tuint32_t targetId = msg.get();\r\n\tg_game().playerPassPartyLeadership(player->getID(), targetId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0e7a02189d9bd48f", + "equalIndicator/v1": "ab10f7b3ae6b3b7e1ecf73ecfc374cd13911a9977be8bb49363c247a0d51a9b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10253, + "startColumn": 58, + "charOffset": 356465, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10251, + "startColumn": 1, + "charOffset": 356403, + "charLength": 258, + "snippet": { + "text": "}\r\n\r\nbool Game::addInfluencedMonster(std::shared_ptr monster) {\r\n\tif (monster && monster->canBeForgeMonster()) {\r\n\t\tif (auto maxInfluencedMonsters = static_cast(g_configManager().getNumber(FORGE_INFLUENCED_CREATURES_LIMIT, __FUNCTION__));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2d3a4f6ab170dcbd", + "equalIndicator/v1": "ab35388e9c479514d4a41483fe304fe35ad902d802c589366a5340ed444ddf02" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 382, + "startColumn": 70, + "charOffset": 14290, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 380, + "startColumn": 1, + "charOffset": 14216, + "charLength": 265, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInBattleList - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "946b1eb4cf706239", + "equalIndicator/v1": "ab43534a07499daba6e0f39caee34b73af21b36b0d95a8260bbc11bb5a812f07" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 218, + "startColumn": 20, + "charOffset": 6849, + "charLength": 18, + "snippet": { + "text": "luaGameGetNpcCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 216, + "startColumn": 1, + "charOffset": 6825, + "charLength": 130, + "snippet": { + "text": "}\r\n\r\nint GameFunctions::luaGameGetNpcCount(lua_State* L) {\r\n\t// Game.getNpcCount()\r\n\tlua_pushnumber(L, g_game().getNpcsOnline());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dfdbf945c13f8e0d", + "equalIndicator/v1": "ab78c3103b57a45048132aaa77dc54229e7c0e8e344cd9e5006dc30861099d8f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 95, + "startColumn": 21, + "charOffset": 2721, + "charLength": 8, + "snippet": { + "text": "vocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 93, + "startColumn": 1, + "charOffset": 2598, + "charLength": 205, + "snippet": { + "text": "\t\tskills_t skillType = getNumber(L, 2);\r\n\t\tuint16_t skillLevel = getNumber(L, 3);\r\n\t\tlua_pushnumber(L, vocation->getReqSkillTries(skillType, skillLevel));\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "63151c3bc961d530", + "equalIndicator/v1": "ab7b56837c90afd075bfd2befce20e9f920dd9076075ffc0a7c0cc720ca123c8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float_t' (aka 'float')", + "markdown": "Narrowing conversion from 'int' to 'float_t' (aka 'float')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1771, + "startColumn": 18, + "charOffset": 47331, + "charLength": 120, + "snippet": { + "text": "\"The function 'player:getStorageValueByName' is deprecated and will be removed in future versions, please use KV system\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1769, + "startColumn": 1, + "charOffset": 47308, + "charLength": 235, + "snippet": { + "text": "\t}\r\n\r\n\tg_logger().warn(\"The function 'player:getStorageValueByName' is deprecated and will be removed in future versions, please use KV system\");\r\n\tauto name = getString(L, 2);\r\n\tlua_pushnumber(L, player->getStorageValueByName(name));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "34bceeff11c7a733", + "equalIndicator/v1": "ab812d87c367dba992ffae0c3f55dbb941a0a4b5455bf53d44797db6b7c314d5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7560, + "startColumn": 67, + "charOffset": 263572, + "charLength": 13, + "snippet": { + "text": "targetMonster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7558, + "startColumn": 1, + "charOffset": 263463, + "charLength": 282, + "snippet": { + "text": "// Mana leech\r\nvoid Game::applyManaLeech(\r\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\r\n) const {\r\n\t// Wheel of destiny bonus - mana leech chance and amount\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a7aa35458db14db9", + "equalIndicator/v1": "ab940d4ce44ac96f9a3c2165e5a84cadccfedb1fc4c020ee468d6ce1b3017f40" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5775, + "startColumn": 145, + "charOffset": 170727, + "charLength": 8, + "snippet": { + "text": "std::max" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5773, + "startColumn": 1, + "charOffset": 170501, + "charLength": 287, + "snippet": { + "text": "\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\r\n\t\t}\r\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "926953c1438a5841", + "equalIndicator/v1": "abb036aeaeb753abfe591e1a373724c5f83b5bd36693596b80370d10e8f30d07" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 242, + "startColumn": 62, + "charOffset": 6344, + "charLength": 9, + "snippet": { + "text": "sleptTime" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 240, + "startColumn": 1, + "charOffset": 6226, + "charLength": 294, + "snippet": { + "text": "\t\tuint32_t regen;\r\n\t\tif (condition->getTicks() != -1) {\r\n\t\t\tregen = std::min((condition->getTicks() / 1000), sleptTime) / 30; // RATE_HEALTH_REGEN_SPEED and RATE_MANA_REGEN_SPEED?\r\n\t\t\tconst int32_t newRegenTicks = condition->getTicks() - (regen * 30000);\r\n\t\t\tif (newRegenTicks <= 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8c71f91a77c2e450", + "equalIndicator/v1": "abc302140104303d44b042f3181996c98c0b5fba637c4e89d389e490e8b81344" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", + "markdown": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 252, + "startColumn": 37, + "charOffset": 7185, + "charLength": 9, + "snippet": { + "text": "std::atoi" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 250, + "startColumn": 1, + "charOffset": 7048, + "charLength": 354, + "snippet": { + "text": "\r\nuint8_t DBResult::getU8FromString(const std::string &string, const std::string &function) const {\r\n\tauto result = static_cast(std::atoi(string.c_str()));\r\n\tif (result > std::numeric_limits::max()) {\r\n\t\tg_logger().error(\"[{}] Failed to get number value {} for tier table result, on function call: {}\", __FUNCTION__, result, function);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2dc54152bed3529a", + "equalIndicator/v1": "abc7a4e83be0a8c18118ffe498be334639acec174126fb99f311f664cc66ced6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2413, + "startColumn": 27, + "charOffset": 71670, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2411, + "startColumn": 1, + "charOffset": 71495, + "charLength": 257, + "snippet": { + "text": "\t\tTextMessage message(MESSAGE_EXPERIENCE, \"You gained \" + expString + (handleHazardExperience ? \" (Hazard)\" : \"\"));\r\n\t\tmessage.position = position;\r\n\t\tmessage.primary.value = exp;\r\n\t\tmessage.primary.color = TEXTCOLOR_WHITE_EXP;\r\n\t\tsendTextMessage(message);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aee1dd0b7be18a77", + "equalIndicator/v1": "abcae7d49cb56e96516db186077f088d6399ef97d8ba0211fa9b499a24dfbcdc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7178, + "startColumn": 19, + "charOffset": 250323, + "charLength": 10, + "snippet": { + "text": "manaShield" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7176, + "startColumn": 1, + "charOffset": 250247, + "charLength": 163, + "snippet": { + "text": "\t\t\t\t\tmanaShield = manaShield - manaDamage;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmanaDamage = manaShield;\r\n\t\t\t\t\ttarget->removeCondition(CONDITION_MANASHIELD);\r\n\t\t\t\t\tmanaShield = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "02de79757004ac33", + "equalIndicator/v1": "abe6a15f756a65a7ea41978848560f45397ea4ea927279e267f327dad6dd72ee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 283, + "startColumn": 2, + "charOffset": 8325, + "charLength": 15, + "snippet": { + "text": "lua_createtable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 281, + "startColumn": 1, + "charOffset": 8270, + "charLength": 116, + "snippet": { + "text": "\r\n\tconst auto targetList = monster->getTargetList();\r\n\tlua_createtable(L, targetList.size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f12074e33f389e78", + "equalIndicator/v1": "abf80abf3137534983acabf833411db81e94bb0cf75c90870d1da51c9de2f2df" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 288, + "startColumn": 8, + "charOffset": 7179, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 286, + "startColumn": 1, + "charOffset": 7073, + "charLength": 226, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetSlotPosition(lua_State* L) {\r\n\t// itemType:getSlotPosition()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->slotPosition);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "764f4c4a59a9acf0", + "equalIndicator/v1": "ac0483f74d62ef4f3f0a762cac7d5bed2fd5151c9cc979193731c851f02529f4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 253, + "startColumn": 8, + "charOffset": 6271, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 251, + "startColumn": 1, + "charOffset": 6169, + "charLength": 221, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetPluralName(lua_State* L) {\r\n\t// itemType:getPluralName()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushString(L, itemType->getPluralName());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d4eb82102fd29c5a", + "equalIndicator/v1": "acda0da238a00557135bca615ca7d9653bcd51a776b36af6e47775380c421267" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1127, + "startColumn": 6, + "charOffset": 40377, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1125, + "startColumn": 1, + "charOffset": 40342, + "charLength": 172, + "snippet": { + "text": "\tlua_pushnumber(L, tries);\r\n\r\n\tif (scriptInterface.protectedCall(L, 3, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d3ca2479e3c733fe", + "equalIndicator/v1": "ace64ca0c54b349e005d10c54cf297f3b2bf62a8c93e290daafb75070705100f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5195, + "startColumn": 57, + "charOffset": 153196, + "charLength": 8, + "snippet": { + "text": "attacked" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5193, + "startColumn": 1, + "charOffset": 153135, + "charLength": 213, + "snippet": { + "text": "}\r\n\r\nvoid Player::addUnjustifiedDead(std::shared_ptr attacked) {\r\n\tif (hasFlag(PlayerFlags_t::NotGainInFight) || attacked == getPlayer() || g_game().getWorldType() == WORLD_TYPE_PVP_ENFORCED) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3c65e82d56b161f3", + "equalIndicator/v1": "acfa33fa58efb4bdff44e9efa96c1078453bd327cea6a18b2bd6842849e44b7a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1149, + "startColumn": 27, + "charOffset": 33796, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1147, + "startColumn": 1, + "charOffset": 33689, + "charLength": 127, + "snippet": { + "text": "\tvoid sendCreatureReload(std::shared_ptr creature) {\r\n\t\tif (client) {\r\n\t\t\tclient->reloadCreature(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d66588bfb8e36e99", + "equalIndicator/v1": "acfc958dd3db482761acb0847865497be93456bda94fa78e6c928c8de942ced7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 134, + "startColumn": 21, + "charOffset": 3419, + "charLength": 23, + "snippet": { + "text": "luaPartyGetInviteeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 132, + "startColumn": 1, + "charOffset": 3394, + "charLength": 159, + "snippet": { + "text": "}\r\n\r\nint PartyFunctions::luaPartyGetInviteeCount(lua_State* L) {\r\n\t// party:getInviteeCount()\r\n\tstd::shared_ptr party = getUserdataShared(L, 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dd28c6607a686cd3", + "equalIndicator/v1": "ad12e1e9e72f67c9684aa4ec36c1946d26e0bc3b3e6e569577ad273b7086f293" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'guild' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'guild' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9828, + "startColumn": 50, + "charOffset": 343683, + "charLength": 5, + "snippet": { + "text": "guild" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9826, + "startColumn": 1, + "charOffset": 343629, + "charLength": 90, + "snippet": { + "text": "}\r\n\r\nvoid Game::addGuild(const std::shared_ptr guild) {\r\n\tif (!guild) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b90e623d5abb5df4", + "equalIndicator/v1": "ad35356c0ccacc312a619e6b5139512681e3cb5820b360034ced3de9099430bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1673, + "startColumn": 27, + "charOffset": 58714, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1671, + "startColumn": 1, + "charOffset": 58682, + "charLength": 159, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "747a946a292800ad", + "equalIndicator/v1": "ad4423d6d22176e63f0ac86ee3672f1ff63fe70b3438a5dca0a8914ad9302ffd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 211, + "startColumn": 54, + "charOffset": 7514, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 209, + "startColumn": 1, + "charOffset": 7357, + "charLength": 212, + "snippet": { + "text": "\t\tif (spell->conditionType == CONDITION_NONE) {\r\n\t\t\tg_logger().error(\"[Monsters::deserializeSpell] - \"\r\n\t\t\t \"{} condition is not set for: {}\",\r\n\t\t\t description, spell->name);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "94d640697421825d", + "equalIndicator/v1": "ad47cc66070521fecafc2a78297a0e1ac1ff02cbeac849a24b8ed644d4c54262" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1022, + "startColumn": 100, + "charOffset": 36965, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1020, + "startColumn": 1, + "charOffset": 36861, + "charLength": 255, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) {\r\n\t// Player:onGainExperience(target, exp, rawExp)\r\n\t// rawExp gives the original exp which is not multiplied\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "34ca943a1588cb4e", + "equalIndicator/v1": "ad4ae00acf3f6d4d1747a0ff12948fad43912f12cf4447a1d00bd1ec1d59a720" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 224, + "startColumn": 2, + "charOffset": 6788, + "charLength": 15, + "snippet": { + "text": "lua_createtable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 222, + "startColumn": 1, + "charOffset": 6732, + "charLength": 117, + "snippet": { + "text": "\r\n\tconst auto &friendList = monster->getFriendList();\r\n\tlua_createtable(L, friendList.size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "33d3cc4c8a95809d", + "equalIndicator/v1": "adb60b1c13c6584baaa8bb8a41dd1c92ac884d06c6d1441b11cc25a0ea203e03" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 160, + "startColumn": 14, + "charOffset": 4667, + "charLength": 14, + "snippet": { + "text": "setFormulaVars" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 158, + "startColumn": 1, + "charOffset": 4516, + "charLength": 227, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1)->dynamic_self_cast();\r\n\tif (condition) {\r\n\t\tcondition->setFormulaVars(mina, minb, maxa, maxb);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d9721d3c018689a", + "equalIndicator/v1": "adb90a58f25a5ea406637a6ad6452606d3d63121640c07d8dfcce54429c5db23" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '__FUNCTION__', which is a reserved identifier", + "markdown": "Declaration uses identifier '__FUNCTION__', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 12, + "startColumn": 1, + "charOffset": 395, + "charLength": 7, + "snippet": { + "text": "#ifndef" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10, + "startColumn": 1, + "charOffset": 379, + "charLength": 77, + "snippet": { + "text": "#pragma once\r\n\r\n#ifndef __FUNCTION__\r\n\t#define __FUNCTION__ __func__\r\n#endif\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e86d7e09b3820f86", + "equalIndicator/v1": "addbfb555556c9afa2c729a621e28e4ed8a9306f31d8bbdeb95f7883cf8d7d4d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2027, + "startColumn": 96, + "charOffset": 60088, + "charLength": 7, + "snippet": { + "text": "oldItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2025, + "startColumn": 1, + "charOffset": 59988, + "charLength": 216, + "snippet": { + "text": "}\r\n\r\nvoid Player::onUpdateContainerItem(std::shared_ptr container, std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tif (oldItem != newItem) {\r\n\t\tonRemoveContainerItem(container, oldItem);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "49143d009bd30042", + "equalIndicator/v1": "ade267027c0f84167203e444cc4b53680da806422a1f9d6807219df047f05e18" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6001, + "startColumn": 94, + "charOffset": 191303, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5999, + "startColumn": 1, + "charOffset": 191205, + "charLength": 140, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendTradeItemRequest(const std::string &traderName, std::shared_ptr item, bool ack) {\r\n\tNetworkMessage msg;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e33ead68a6592f87", + "equalIndicator/v1": "ae186bca3b86fb0e07e3971d2760ddac6ec43640b44380ee4bff19504c2fc0fe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 487, + "startColumn": 92, + "charOffset": 18419, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 485, + "startColumn": 1, + "charOffset": 18323, + "charLength": 332, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPos, const Position &toPos, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\r\n\tif (!getScriptInterface()) {\r\n\t\tg_logger().error(\"script interface nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b6710043c5619627", + "equalIndicator/v1": "ae44223faf04ea3b24c576889572c0dd0bb1aef2a5b60e86b5ac656e194220d5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9775, + "startColumn": 46, + "charOffset": 342205, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9773, + "startColumn": 1, + "charOffset": 342155, + "charLength": 182, + "snippet": { + "text": "}\r\n\r\nvoid Game::addPlayer(std::shared_ptr player) {\r\n\tconst std::string &lowercase_name = asLowerCaseString(player->getName());\r\n\tmappedPlayerNames[lowercase_name] = player;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9dfe4c880beecf38", + "equalIndicator/v1": "ae4a5d156503c737faee0ca94512220e1d611da395d1d9ab85894ee9614a1777" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'operator flat_hash_map' must be marked explicit to avoid unintentional implicit conversions", + "markdown": "'operator flat_hash_map' must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 120, + "startColumn": 27, + "charOffset": 3452, + "charLength": 7, + "snippet": { + "text": "MapType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 118, + "startColumn": 1, + "charOffset": 3420, + "charLength": 80, + "snippet": { + "text": "\t}\r\n\r\n\texplicit(false) operator MapType() const {\r\n\t\treturn get();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f05dcf31b04503a3", + "equalIndicator/v1": "ae5417f71f8c594826694982dafc80ed6d8ac3b5dc97303d95f2b9297dc84c2e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 53, + "startColumn": 74, + "charOffset": 1697, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 51, + "startColumn": 1, + "charOffset": 1619, + "charLength": 123, + "snippet": { + "text": "}\r\n\r\nstd::string CreatureCallback::getCreatureClass(std::shared_ptr creature) {\r\n\tif (!creature) {\r\n\t\treturn \"\";\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "00c75da12f303c81", + "equalIndicator/v1": "ae6923ad229eb3b6d7e49a2b43723bb075beb87545af41b82ba40209c30ed19b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 575, + "startColumn": 62, + "charOffset": 15562, + "charLength": 12, + "snippet": { + "text": "statsPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 573, + "startColumn": 1, + "charOffset": 15475, + "charLength": 131, + "snippet": { + "text": "\r\n\t\t\tcase STAT_CAPACITY:\r\n\t\t\t\tstats[i] = static_cast(player->getCapacity() * (statsPercent[i] / 100.f));\r\n\t\t\t\tbreak;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bfebbd47248881ba", + "equalIndicator/v1": "ae7028ae42f56dad00bb5dfc2d2f057f9343069cec58f527dde031946f65f668" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 14, + "charOffset": 1401, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1297, + "charLength": 271, + "snippet": { + "text": "\tskull = mType->info.skull;\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\r\n\tbaseSpeed = mType->getBaseSpeed();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1a000597b7acfff3", + "equalIndicator/v1": "ae7efc2e6bbef7bc541483a280918f41df15f6a259be44716baa0f4268eeb460" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 26, + "charOffset": 853, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 823, + "charLength": 168, + "snippet": { + "text": "}\r\n\r\nReturnValue DepotLocker::queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr) {\r\n\treturn RETURNVALUE_NOTENOUGHROOM;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1c781bbb681c105", + "equalIndicator/v1": "ae841e0098df173388d7c306af07d6d499ddd7c661d744155d00879480657db7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 690, + "startColumn": 15, + "charOffset": 22532, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 688, + "startColumn": 1, + "charOffset": 22492, + "charLength": 128, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 3.20f);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "127ed4119858a877", + "equalIndicator/v1": "ae96f96c331d8d8ffcf0adb77b677e285c56945e7de595be257ae943851a4011" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 634, + "startColumn": 67, + "charOffset": 17111, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 632, + "startColumn": 1, + "charOffset": 17040, + "charLength": 173, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updateAbsorbs(std::shared_ptr creature) const {\r\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\r\n\t\tauto value = getAbsorbByIndex(i);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c618cc67aa92d566", + "equalIndicator/v1": "ae9ca6131ab6750c1117492305cb5e7c75a8435f92ecc0422c9d696bee2397c1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 600, + "startColumn": 71, + "charOffset": 18191, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 598, + "startColumn": 1, + "charOffset": 18078, + "charLength": 226, + "snippet": { + "text": "\r\n\t\t\tif (it.abilities->statsPercent[s]) {\r\n\t\t\t\tplayer->setVarStats(static_cast(s), static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "56fafca9a30312c5", + "equalIndicator/v1": "aeca1b3f50a6d8867612f4cc8b3100a0abbd7a8bbff8a912a9b5c69c1407a2e5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2435, + "startColumn": 14, + "charOffset": 72452, + "charLength": 12, + "snippet": { + "text": "noneVocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2433, + "startColumn": 1, + "charOffset": 72322, + "charLength": 242, + "snippet": { + "text": "\t\t\tconst auto &noneVocation = g_vocations().getVocation(VOCATION_NONE);\r\n\t\t\thealthMax += noneVocation->getHPGain();\r\n\t\t\thealth += noneVocation->getHPGain();\r\n\t\t\tmanaMax += noneVocation->getManaGain();\r\n\t\t\tmana += noneVocation->getManaGain();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "10a4b670c485d7fa", + "equalIndicator/v1": "aecdfc181d309c46d00a7ae8f396ed722552558c5856ddb1d2cfd6ee73042ede" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1107, + "startColumn": 7, + "charOffset": 39656, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1105, + "startColumn": 1, + "charOffset": 39644, + "charLength": 155, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnGainSkillTries - \"\r\n\t\t \"Player {} skill {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3a782457e6b25212", + "equalIndicator/v1": "aed0c0120cef6cc723700fe00225db224dd6f6696437b3ce0d81e239fc47d5c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3000, + "startColumn": 2, + "charOffset": 91569, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2998, + "startColumn": 1, + "charOffset": 91512, + "charLength": 149, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseGreet(NetworkMessage &msg) {\r\n\tuint32_t npcId = msg.get();\r\n\tg_game().playerNpcGreet(player->getID(), npcId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a3fa32ea22a56bb0", + "equalIndicator/v1": "aed92ffafd46668b80c21d513ee3ec47c0b708772cf2c31022db6194cbb4dac4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 369, + "startColumn": 27, + "charOffset": 10630, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 367, + "startColumn": 1, + "charOffset": 10598, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "77b5755aa994f4b8", + "equalIndicator/v1": "aeea0e7a6f2124d85f4505f78bfa06572a53b42d6ed7cd5a488fca757c3b7e97" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/metrics/metrics.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 191, + "startColumn": 2, + "charOffset": 7080, + "charLength": 20, + "snippet": { + "text": "DEFINE_LATENCY_CLASS" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 189, + "startColumn": 1, + "charOffset": 6974, + "charLength": 201, + "snippet": { + "text": "\tDEFINE_LATENCY_CLASS(query, \"query\", \"truncated_query\");\r\n\tDEFINE_LATENCY_CLASS(task, \"task\", \"task\");\r\n\tDEFINE_LATENCY_CLASS(lock, \"lock\", \"scope\");\r\n\r\n\tconst std::vector latencyNames {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e38cf7d936efdab", + "equalIndicator/v1": "af0b2266b278dd6a688fd3fd47bd1c056b23191518afd959a8e3d57d04a4a25d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/thread/thread_pool.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 29, + "startColumn": 32, + "charOffset": 956, + "charLength": 16, + "snippet": { + "text": "getNumberOfCores" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 27, + "startColumn": 1, + "charOffset": 881, + "charLength": 155, + "snippet": { + "text": "\r\nThreadPool::ThreadPool(Logger &logger) :\r\n\tBS::thread_pool(std::max(getNumberOfCores(), DEFAULT_NUMBER_OF_THREADS)), logger(logger) {\r\n\tstart();\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "94206e61ce82d4c9", + "equalIndicator/v1": "af0c780a3197eaf23d011f8d98342a5804c8c60e32dbac3454b14d609472007a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 46, + "startColumn": 100, + "charOffset": 1901, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 44, + "startColumn": 1, + "charOffset": 1797, + "charLength": 176, + "snippet": { + "text": "}\r\n\r\nCombatDamage Combat::getCombatDamage(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tCombatDamage damage;\r\n\tdamage.origin = params.origin;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c7a08d9db327c815", + "equalIndicator/v1": "af14612ea3b148bee2ab5a710df5fdc30317fd44875fff9b01b5a9bfc119ce5b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Pass by value and use std::move", + "markdown": "Pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 124, + "startColumn": 44, + "charOffset": 3932, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 122, + "startColumn": 1, + "charOffset": 3844, + "charLength": 175, + "snippet": { + "text": "class ScopedKV final : public KV {\r\npublic:\r\n\tScopedKV(Logger &logger, KVStore &rootKV, const std::string &prefix) :\r\n\t\tlogger(logger), rootKV_(rootKV), prefix_(prefix) { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "da817ae96b4d7d51", + "equalIndicator/v1": "af558eb809eb41389247d1bf6221f7fcd141ba1dd42fd29db6a3206ce52ce5bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2478, + "startColumn": 18, + "charOffset": 73734, + "charLength": 23, + "snippet": { + "text": "Player::getPercentLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2476, + "startColumn": 1, + "charOffset": 73678, + "charLength": 169, + "snippet": { + "text": "\r\n\tif (nextLevelExp > currLevelExp) {\r\n\t\tlevelPercent = Player::getPercentLevel(experience - currLevelExp, nextLevelExp - currLevelExp);\r\n\t} else {\r\n\t\tlevelPercent = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3b98ab978600f729", + "equalIndicator/v1": "af71416114686ae14371af8830dd75d2e72998e21b5fe4d4302397d3fce6ce5e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 147, + "startColumn": 2, + "charOffset": 4080, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 145, + "startColumn": 1, + "charOffset": 4073, + "charLength": 120, + "snippet": { + "text": "\t}\r\n\r\n\tuint32_t count = getNumber(L, 3, 1);\r\n\tconst ItemType &it = Item::items[itemId];\r\n\tif (it.stackable) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b1a71f9e053b8060", + "equalIndicator/v1": "af719cf489615ea2989250557ead04c129692cf1f8672c7fbc8dabfe64673132" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5383, + "startColumn": 30, + "charOffset": 159190, + "charLength": 7, + "snippet": { + "text": "manaMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5381, + "startColumn": 1, + "charOffset": 159120, + "charLength": 160, + "snippet": { + "text": "\r\nuint32_t Player::getMaxMana() const {\r\n\treturn std::max(0, manaMax + varStats[STAT_MAXMANAPOINTS] + m_wheelPlayer->getStat(WheelStat_t::MANA));\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fe96767726a5db0a", + "equalIndicator/v1": "af7572f5bfb65b16577c116b9e2208272bd98b2da38a708bdd8a30f2f26fbc90" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1918, + "startColumn": 2, + "charOffset": 58361, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1916, + "startColumn": 1, + "charOffset": 58299, + "charLength": 222, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseTextWindow(NetworkMessage &msg) {\r\n\tuint32_t windowTextId = msg.get();\r\n\tconst std::string newText = msg.getString();\r\n\tg_game().playerWriteItem(player->getID(), windowTextId, newText);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ac7d68a070d784c", + "equalIndicator/v1": "af8c182fa11295e5eef267c145c27c2ad7e8b2e02b1e6cb286314977d8d8e886" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 143, + "charOffset": 1926, + "charLength": 8, + "snippet": { + "text": "override" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1707, + "charLength": 387, + "snippet": { + "text": "\tvoid removeThing(std::shared_ptr thing, uint32_t count) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "954923152d17ed1e", + "equalIndicator/v1": "af8cb0a7735b0445a523da1e2502244345f79f0e638363d3b67cb05324f44892" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?", + "markdown": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1101, + "startColumn": 7, + "charOffset": 29646, + "charLength": 25, + "snippet": { + "text": "Condition::startCondition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1099, + "startColumn": 1, + "charOffset": 29556, + "charLength": 150, + "snippet": { + "text": "\r\nbool ConditionRegeneration::startCondition(std::shared_ptr creature) {\r\n\tif (!Condition::startCondition(creature)) {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a8aa6e9d445c6c4c", + "equalIndicator/v1": "afa40049cb255c20bec923e7f20f8aabc6730903501bce97be5f9d3e4776f548" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 459, + "startColumn": 8, + "charOffset": 11414, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 457, + "startColumn": 1, + "charOffset": 11310, + "charLength": 198, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetElementType(lua_State* L) {\r\n\t// itemType:getElementType()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (!itemType) {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fee76af27f7ec76b", + "equalIndicator/v1": "afacc9071ef82f20ccd39634b33296084168a7f4e6e7016cf19a9c7a5ee0545b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3000, + "startColumn": 79, + "charOffset": 111474, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2998, + "startColumn": 1, + "charOffset": 111391, + "charLength": 334, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Game::findManagedContainer(std::shared_ptr player, bool &fallbackConsumed, ObjectCategory_t category, bool isLootContainer) {\r\n\tauto lootContainer = player->getManagedContainer(category, isLootContainer);\r\n\tif (!lootContainer && player->quickLootFallbackToMainContainer && !fallbackConsumed) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ef7a6037553e6b4", + "equalIndicator/v1": "afb493aeaec1844e1b1b718da00b3f960f8a8993ede3f31593052363ec5e43c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'c' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'c' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1530, + "startColumn": 53, + "charOffset": 45220, + "charLength": 1, + "snippet": { + "text": "c" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1528, + "startColumn": 1, + "charOffset": 45163, + "charLength": 126, + "snippet": { + "text": "}\r\n\r\nbool ProtocolGame::canSee(std::shared_ptr c) const {\r\n\tif (!c || !player || c->isRemoved()) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6c1df0c4fa2b1571", + "equalIndicator/v1": "afc7e90126be418558b1219884caf1e2519227b91cdef3a076772e9b242cf76d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 358, + "startColumn": 55, + "charOffset": 11651, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 356, + "startColumn": 1, + "charOffset": 11592, + "charLength": 179, + "snippet": { + "text": "}\r\n\r\nbool Weapon::executeUseWeapon(std::shared_ptr player, const LuaVariant &var) const {\r\n\t// onUseWeapon(player, var)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aa18fee78b149f21", + "equalIndicator/v1": "afcd1c5484c14c204205db4ca5fef0ae8170a0f177b798d3967d8016ccd95c47" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 294, + "startColumn": 18, + "charOffset": 7987, + "charLength": 21, + "snippet": { + "text": "getElementDamageValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 292, + "startColumn": 1, + "charOffset": 7943, + "charLength": 96, + "snippet": { + "text": "\t\treturn elementType;\r\n\t}\r\n\tvirtual int16_t getElementDamageValue() const override;\r\n\r\nprivate:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "18354faf39f8cbb4", + "equalIndicator/v1": "afe051aa93dd63bb7d38dcf35b3572e58052daed0462e2d46d2bc5218f480028" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 159, + "startColumn": 12, + "charOffset": 4273, + "charLength": 7, + "snippet": { + "text": "uint8_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 157, + "startColumn": 1, + "charOffset": 4145, + "charLength": 222, + "snippet": { + "text": "void Dispatcher::mergeAsyncEvents() {\r\n\tconstexpr uint8_t start = static_cast(TaskGroup::GenericParallel);\r\n\tconstexpr uint8_t end = static_cast(TaskGroup::Last);\r\n\r\n\tfor (const auto &thread : threads) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e38bb690bc0a6448", + "equalIndicator/v1": "afe526d061a73be86760d781dd3b3642a86507e8f22cddadbb4409ef2b532b6d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 289, + "startColumn": 10, + "charOffset": 7606, + "charLength": 15, + "snippet": { + "text": "getWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 287, + "startColumn": 1, + "charOffset": 7468, + "charLength": 474, + "snippet": { + "text": "\tbool useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const override;\r\n\r\n\tint32_t getWeaponDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, bool maxDamage = false) const override;\r\n\tint32_t getElementDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const override;\r\n\tCombatType_t getElementType() const override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "951e5b5c7faa7498", + "equalIndicator/v1": "b00468f6816e973a6e8759f0a2e2df4e27f3a57c4b06f5c0efcef8cd0e904a64" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'lastHitCreature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'lastHitCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4882, + "startColumn": 56, + "charOffset": 145883, + "charLength": 15, + "snippet": { + "text": "lastHitCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4880, + "startColumn": 1, + "charOffset": 145823, + "charLength": 122, + "snippet": { + "text": "}\r\n\r\nbool Player::lastHitIsPlayer(std::shared_ptr lastHitCreature) {\r\n\tif (!lastHitCreature) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b860ed1eb896cb1d", + "equalIndicator/v1": "b02cba2a0322550a497a73cad09a705ee6de531343326ec261f9f959d43d1160" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1077, + "startColumn": 47, + "charOffset": 41061, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1075, + "startColumn": 1, + "charOffset": 40960, + "charLength": 167, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, monster);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9c3d3f74e6815148", + "equalIndicator/v1": "b0495d6f018824dfce61d42734404cb7e894ff5b012b788e282b34f083e9357d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 576, + "startColumn": 7, + "charOffset": 22011, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 574, + "startColumn": 1, + "charOffset": 21827, + "charLength": 336, + "snippet": { + "text": "\r\nbool EventCallback::playerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnMoveCreature - \"\r\n\t\t \"Player {} creature {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a69c546e8dbd9e92", + "equalIndicator/v1": "b04d5db42b428fbbfb068af35621b81b69bd6b5d83bacd7be94826c51646a4fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 418, + "startColumn": 47, + "charOffset": 14450, + "charLength": 9, + "snippet": { + "text": "totalCost" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 416, + "startColumn": 1, + "charOffset": 14355, + "charLength": 263, + "snippet": { + "text": "\t\t\t\tg_game().addMoney(player, totalCost);\r\n\t\t\t}\r\n\t\t\tg_metrics().addCounter(\"balance_increase\", totalCost, { { \"player\", player->getName() }, { \"context\", \"npc_sale\" } });\r\n\t\t} else {\r\n\t\t\tstd::shared_ptr newItem = Item::CreateItem(getCurrency(), totalCost);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d4bb227491c47f7", + "equalIndicator/v1": "b04e8999924fc4c1ef11c6ae62d89dfdf64c5fc7577c0c835dee8dd6aa62880d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3477, + "startColumn": 13, + "charOffset": 105244, + "charLength": 9, + "snippet": { + "text": "slotIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3475, + "startColumn": 1, + "charOffset": 105115, + "charLength": 191, + "snippet": { + "text": "\t\t\t\t}\r\n\t\t\t} else if (queryAdd(slotIndex, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) { // empty slot\r\n\t\t\t\tindex = slotIndex;\r\n\t\t\t\t*destItem = nullptr;\r\n\t\t\t\treturn getPlayer();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e4adf84e5ae229f4", + "equalIndicator/v1": "b0503d137c2b186eb1b8275b204f8234535cf37d173cdf2a5c8fe3b9bd22e5ce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1944, + "startColumn": 257, + "charOffset": 75955, + "charLength": 5, + "snippet": { + "text": "actor" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1942, + "startColumn": 1, + "charOffset": 75694, + "charLength": 444, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalMoveItem(std::shared_ptr fromCylinder, std::shared_ptr toCylinder, int32_t index, std::shared_ptr item, uint32_t count, std::shared_ptr* movedItem, uint32_t flags /*= 0*/, std::shared_ptr actor /*=nullptr*/, std::shared_ptr tradeItem /* = nullptr*/, bool checkTile /* = true*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (fromCylinder == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3a71eb2003383527", + "equalIndicator/v1": "b06985432618a591286f3c66c8ac829d732a9004b27f318556e6febfc6336c70" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1134, + "startColumn": 2, + "charOffset": 40599, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1132, + "startColumn": 1, + "charOffset": 40592, + "charLength": 46, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a278d7224541af57", + "equalIndicator/v1": "b09789129abb6852a79308d7b8628cd00ae4bc8345a49b30a0ede46b91ab1e51" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 295, + "startColumn": 15, + "charOffset": 7651, + "charLength": 12, + "snippet": { + "text": "std::tolower" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 293, + "startColumn": 1, + "charOffset": 7595, + "charLength": 85, + "snippet": { + "text": "\t\t\t\tcapitalizeNext = false;\r\n\t\t\t} else {\r\n\t\t\t\tresult += std::tolower(ch);\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cbbb4b52890c1509", + "equalIndicator/v1": "b09a7d26ff935fbdf6b161533c39a4dfafdf96522bdc49400518e883eda0112d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_classification_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 32, + "startColumn": 2, + "charOffset": 1142, + "charLength": 18, + "snippet": { + "text": "ItemClassification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 30, + "startColumn": 1, + "charOffset": 956, + "charLength": 326, + "snippet": { + "text": "int ItemClassificationFunctions::luaItemClassificationAddTier(lua_State* L) {\r\n\t// itemClassification:addTier(id, core, regularPrice, convergenceFusionPrice, convergenceTransferPrice)\r\n\tItemClassification* itemClassification = getUserdata(L, 1);\r\n\tif (itemClassification) {\r\n\t\titemClassification->addTier(\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c85794ae5e1ad7c0", + "equalIndicator/v1": "b0c33fb1280b1952d26a32e19284e80b154d16816ffdcd8b3d070a0518207f30" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 299, + "startColumn": 7, + "charOffset": 10730, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 297, + "startColumn": 1, + "charOffset": 10718, + "charLength": 158, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventCreatureOnTargetCombat - \"\r\n\t\t \"Creature {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4a3f6f0b9eb32b5c", + "equalIndicator/v1": "b10ec3bf40c6bcfd0cad6b133632ba8998ced1db02380d75f263e95ed1cd65dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 488, + "startColumn": 7, + "charOffset": 17304, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 486, + "startColumn": 1, + "charOffset": 17292, + "charLength": 205, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPartyOnDisband - Party leader {}] Call stack \"\r\n\t\t \"overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1bd2eeb6e752673f", + "equalIndicator/v1": "b13d081deab60a133e72bf25fbb59c511b51beb378ae9576a1682d016dfc51ec" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1027, + "startColumn": 8, + "charOffset": 29866, + "charLength": 7, + "snippet": { + "text": "toupper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1025, + "startColumn": 1, + "charOffset": 29816, + "charLength": 78, + "snippet": { + "text": "\tfor (char &i : str) {\r\n\t\tif (i != ' ') {\r\n\t\t\ti = toupper(i);\r\n\t\t\tbreak;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e87f06c34ea2ff73", + "equalIndicator/v1": "b148204d73b8be38263daed7ecec1488b0a49e70e05d055e09241730f991f3cc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 47, + "startColumn": 2, + "charOffset": 1193, + "charLength": 13, + "snippet": { + "text": "getUnlockedKV" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 45, + "startColumn": 1, + "charOffset": 1114, + "charLength": 225, + "snippet": { + "text": "\r\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\r\n\tgetUnlockedKV()->set(badge.m_name, toSaveTimeStamp);\r\n\tm_badgesUnlocked.emplace_back(badge, toSaveTimeStamp);\r\n\tm_badgesUnlocked.shrink_to_fit();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2078c43a2b1c4faa", + "equalIndicator/v1": "b183c2841005edbe1ef7a58092949ced768a4fb1afba2b6df1ee50f722e36b35" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3576, + "startColumn": 39, + "charOffset": 110563, + "charLength": 27, + "snippet": { + "text": "Weapons::getMaxWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3574, + "startColumn": 1, + "charOffset": 110270, + "charLength": 532, + "snippet": { + "text": "\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->distDamageMultiplier);\r\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\r\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue - weapon->getAttack() + it.abilities->elementDamage, attackFactor, true) * player->getVocation()->distDamageMultiplier);\r\n\t\t\t}\r\n\t\t\tmsg.add(maxDamage >> 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "622e75b601e9bc56", + "equalIndicator/v1": "b1886cd82ee8f119bf1ca23ff1509df6a994ad1e81c1454d26b85d62e654a51e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1011, + "startColumn": 67, + "charOffset": 38433, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1009, + "startColumn": 1, + "charOffset": 38362, + "charLength": 281, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::eventOnStorageUpdate - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7a8e0347998360f9", + "equalIndicator/v1": "b190e22d4d4a87502706bfbf0aa284a01ede8bc67157ed6085de835fffeea304" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 247, + "startColumn": 59, + "charOffset": 7492, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 245, + "startColumn": 1, + "charOffset": 7429, + "charLength": 210, + "snippet": { + "text": "}\r\n\r\nReturnValue Combat::canDoCombat(std::shared_ptr caster, std::shared_ptr tile, bool aggressive) {\r\n\tif (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {\r\n\t\treturn RETURNVALUE_NOTENOUGHROOM;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eaa02a07e638a511", + "equalIndicator/v1": "b1d8b9271e14ca350a0cff77f4e2734cb0ec08d08bb240a2cb88a3f18af49245" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'podium' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'podium' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7155, + "startColumn": 59, + "charOffset": 224037, + "charLength": 6, + "snippet": { + "text": "podium" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7153, + "startColumn": 1, + "charOffset": 223974, + "charLength": 225, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPodiumWindow(std::shared_ptr podium, const Position &position, uint16_t itemId, uint8_t stackpos) {\r\n\tif (!podium || oldProtocol) {\r\n\t\tg_logger().error(\"[{}] item is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f293ab0ffd3c5cd4", + "equalIndicator/v1": "b1fdfe37b250ee28527a9fec3ff11428f24ee7cb3e59b1e8ebec3d2e17367828" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when declaring iterators", + "markdown": "Use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 214, + "startColumn": 3, + "charOffset": 6081, + "charLength": 42, + "snippet": { + "text": "std::map::iterator" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 212, + "startColumn": 1, + "charOffset": 6022, + "charLength": 307, + "snippet": { + "text": "\r\n\tif (item->hasAttribute(ItemAttribute_t::ACTIONID)) {\r\n\t\tstd::map::iterator it = actionIdMap.find(item->getAttribute(ItemAttribute_t::ACTIONID));\r\n\t\tif (it != actionIdMap.end()) {\r\n\t\t\tstd::list> moveEventList = it->second.moveEvent[eventType];\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a10513ccd1719d93", + "equalIndicator/v1": "b21f2d62f433aa3929cb4d1d0a954d57b0c762e83adf3bdd1c4ce0781f5da83a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1089, + "startColumn": 20, + "charOffset": 39164, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1087, + "startColumn": 1, + "charOffset": 39090, + "charLength": 135, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r\n\tlua_pushnumber(L, exp);\r\n\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5da4af7447beee92", + "equalIndicator/v1": "b2405a0fe157e1841f71932fe9b6bd7988e6a78af0187e4e398b570381ee4b7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2196, + "startColumn": 14, + "charOffset": 65818, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2194, + "startColumn": 1, + "charOffset": 65741, + "charLength": 156, + "snippet": { + "text": "\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\r\n\tremoveIcon(\"forge\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67ade26b2aa4b6a4", + "equalIndicator/v1": "b25e244e6c8cc21c04ad10c9f2f34ed73947f2d683e8cad4f98d280f13d0cefa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'initDoubleValue' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'initDoubleValue' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 52, + "charOffset": 729, + "charLength": 12, + "snippet": { + "text": "const double" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 506, + "charLength": 335, + "snippet": { + "text": "\tCustomAttribute(const std::string &initStringKey, const int64_t initInt64Value);\r\n\tCustomAttribute(const std::string &initStringKey, const std::string &initStringValue);\r\n\tCustomAttribute(const std::string &initStringKey, const double initDoubleValue);\r\n\tCustomAttribute(const std::string &initStringKey, const bool initBoolValue);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b71746026567b5f1", + "equalIndicator/v1": "b294b22d6c88b21ece400e26394e055cee580a76e9f58891cd1a9b50f038c81a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 285, + "startColumn": 88, + "charOffset": 8813, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 283, + "startColumn": 1, + "charOffset": 8721, + "charLength": 188, + "snippet": { + "text": "}\r\n\r\nbool Combat::isInPvpZone(std::shared_ptr attacker, std::shared_ptr target) {\r\n\treturn attacker->getZoneType() == ZONE_PVP && target->getZoneType() == ZONE_PVP;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c931ce83ed72e3a0", + "equalIndicator/v1": "b29568ac747c938549aa0b9f13e4cbca2b08e361b2d7acc4a84d73df6afb4d20" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: n, d", + "markdown": "Constructor does not initialize these fields: n, d" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 15, + "startColumn": 6, + "charOffset": 470, + "charLength": 3, + "snippet": { + "text": "RSA" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 13, + "startColumn": 1, + "charOffset": 434, + "charLength": 92, + "snippet": { + "text": "#include \"security/rsa.hpp\"\r\n\r\nRSA::RSA(Logger &logger) :\r\n\tlogger(logger) {\r\n\tmpz_init(n);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8722b532ea120822", + "equalIndicator/v1": "b2c26d3b2468eb678865433fbab82fbe33b7058982dffe6f10d048bbc002a3cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 36, + "startColumn": 19, + "charOffset": 1121, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 34, + "startColumn": 1, + "charOffset": 1098, + "charLength": 207, + "snippet": { + "text": "}\r\n\r\nvoid RewardChest::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tauto parentLocked = m_parent.lock();\r\n\tif (parentLocked) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0d0a17b1fba6910e", + "equalIndicator/v1": "b2c52c7ad096e2523b3e70d5e0c81e87b4991692bb330a02f1d4e04995ccdb53" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 193, + "startColumn": 7, + "charOffset": 7032, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 191, + "startColumn": 1, + "charOffset": 7020, + "charLength": 112, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"{} - \"\r\n\t\t \"Position {}\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "645ec026d2a7b36d", + "equalIndicator/v1": "b2c55e372e11133f91b85b0c744e94d9c84158f91386cc76683a3e4677909eff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 198, + "startColumn": 8, + "charOffset": 4994, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 196, + "startColumn": 1, + "charOffset": 4908, + "charLength": 198, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsKey(lua_State* L) {\r\n\t// itemType:isKey()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isKey());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "754369d188779ed3", + "equalIndicator/v1": "b2e00dbbd5474a3fdca363e39e584c3840f750a175b4ae7539f10f76fae601bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 14, + "charOffset": 512, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 462, + "charLength": 138, + "snippet": { + "text": "struct VIPGroup {\r\n\tuint8_t id = 0;\r\n\tstd::string name = \"\";\r\n\tbool customizable = false;\r\n\tphmap::flat_hash_set vipGroupGuids;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "78f269a0ac75bb7e", + "equalIndicator/v1": "b31987475bb72c85bd720122ea7fa9267d2d1f882934c573b6257735a2c416ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7244, + "startColumn": 48, + "charOffset": 216504, + "charLength": 4, + "snippet": { + "text": "cost" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7242, + "startColumn": 1, + "charOffset": 216436, + "charLength": 165, + "snippet": { + "text": "\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_fuse\" } });\r\n\t\t\t\thistory.cost = cost;\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db77c7b9bce4b718", + "equalIndicator/v1": "b330ed0530a69ec58482b2d3ff70b9463eb74fa5f11673039e809a794b96c40a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 764, + "startColumn": 6, + "charOffset": 29393, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 762, + "startColumn": 1, + "charOffset": 29357, + "charLength": 179, + "snippet": { + "text": "\tlua_pushnumber(L, rawExp);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 4, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "44da2ba15a4f4bb8", + "equalIndicator/v1": "b33736d86b67eb897ce07a8e3881f633612138797e35d39513ab31906715e04d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2444, + "startColumn": 53, + "charOffset": 65495, + "charLength": 6, + "snippet": { + "text": "Player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2442, + "startColumn": 1, + "charOffset": 65350, + "charLength": 226, + "snippet": { + "text": "int PlayerFunctions::luaPlayerHasFamiliar(lua_State* L) {\r\n\t// player:hasFamiliar(lookType)\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player) {\r\n\t\tuint16_t lookType = getNumber(L, 2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b527efc5c6fabecb", + "equalIndicator/v1": "b346ccd03c74a58840190d472188907e705ddc85ac668866a1ddb2571a01f3a5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 809, + "startColumn": 4, + "charOffset": 22029, + "charLength": 4, + "snippet": { + "text": "else" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 807, + "startColumn": 1, + "charOffset": 21963, + "charLength": 96, + "snippet": { + "text": "\tif (player) {\r\n\t\tlua_pushnumber(L, player->getSkullTicks());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "544c6f1b75eb68e7", + "equalIndicator/v1": "b34eee0356b1bdee2e63461f0eb24d424c7a5ef56a0bfd90b1cceb1da21709ef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 298, + "startColumn": 7, + "charOffset": 11074, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 296, + "startColumn": 1, + "charOffset": 10969, + "charLength": 326, + "snippet": { + "text": "\r\nvoid EventCallback::partyOnShareExperience(std::shared_ptr party, uint64_t &exp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"Party leader {}. Call stack overflow. Too many lua script calls being nested.\", party->getLeader() ? party->getLeader()->getName() : \"unknown\");\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4aeb66b366a092a5", + "equalIndicator/v1": "b35a5da8f474e3312e46c71be1e0900bbfd0df39d60166b71efc423c14635a1a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'callback' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'callback' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/events_callbacks.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 52, + "startColumn": 19, + "charOffset": 1539, + "charLength": 36, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 50, + "startColumn": 1, + "charOffset": 1450, + "charLength": 145, + "snippet": { + "text": "\t * @param callback Pointer to the EventCallback object to add.\r\n\t */\r\n\tvoid addCallback(const std::shared_ptr callback);\r\n\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e8688d59c812630", + "equalIndicator/v1": "b364a213dede21b7d791051da4d8b979e0ec0ce0fa707586138355ebff2b4de0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 271, + "startColumn": 53, + "charOffset": 7565, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 269, + "startColumn": 1, + "charOffset": 7508, + "charLength": 122, + "snippet": { + "text": "}\r\n\r\nbool House::transferToDepot(std::shared_ptr player) const {\r\n\tif (townId == 0 || !player) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a6878e0b54ddb495", + "equalIndicator/v1": "b371442d6ebc74774b823254408173134afc9952b0819ea195a9a9e89a98914e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 679, + "startColumn": 98, + "charOffset": 26058, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 677, + "startColumn": 1, + "charOffset": 25956, + "charLength": 259, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeRequest - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cda02686c0457c10", + "equalIndicator/v1": "b3d4ded7be497a384199e4b6a47f621a29f21d38823086945ed6e1cf49ba4ec1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6402, + "startColumn": 64, + "charOffset": 202374, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6400, + "startColumn": 1, + "charOffset": 202306, + "charLength": 174, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPartyPlayerMana(std::shared_ptr target, uint8_t manaPercent) {\r\n\tuint32_t cid = target->getID();\r\n\tif (!knownCreatureSet.contains(cid)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1a567c763be66043", + "equalIndicator/v1": "b3dc1a004d686251ab23d99bad7beb629d75bd81e2978d2429dd849fd860d279" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'newParty' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'newParty' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 376, + "startColumn": 13, + "charOffset": 9922, + "charLength": 8, + "snippet": { + "text": "newParty" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 374, + "startColumn": 1, + "charOffset": 9857, + "charLength": 123, + "snippet": { + "text": "\r\n\tvoid setParty(std::shared_ptr newParty) {\r\n\t\tm_party = newParty;\r\n\t}\r\n\tstd::shared_ptr getParty() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ce6b198a6d1bfb35", + "equalIndicator/v1": "b3df7ecf4f7fdd057548030d46a35941a2e6142bc319a3f76577571e96aca697" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2630, + "startColumn": 29, + "charOffset": 99410, + "charLength": 11, + "snippet": { + "text": "removeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2628, + "startColumn": 1, + "charOffset": 99240, + "charLength": 213, + "snippet": { + "text": "\t\t\tconst uint32_t removeCount = std::ceil(money / static_cast(worth));\r\n\t\t\taddMoney(cylinder, (worth * removeCount) - money, flags);\r\n\t\t\tinternalRemoveItem(item, removeCount);\r\n\t\t\treturn true;\r\n\t\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6bf63b913db1ea79", + "equalIndicator/v1": "b3e3498267d7e8905ddc46f8c4874dc01ca62192e9aea1c5eef5d86434d55a24" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 949, + "startColumn": 63, + "charOffset": 30356, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 947, + "startColumn": 1, + "charOffset": 30289, + "charLength": 191, + "snippet": { + "text": "}\r\n\r\nbool InstantSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var) const {\r\n\t// onCastSpell(creature, var)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2f36700443a4e20d", + "equalIndicator/v1": "b44a08071ca197738f9cd1c9a00f5025f0532f69377ffc6fce16e07a3894de84" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 544, + "startColumn": 7, + "charOffset": 16461, + "charLength": 9, + "snippet": { + "text": "setParent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 542, + "startColumn": 1, + "charOffset": 16449, + "charLength": 149, + "snippet": { + "text": "\t}\r\n\r\n\tvoid setParent(std::weak_ptr cylinder) override final {\r\n\t\tconst auto oldGroundSpeed = walk.groundSpeed;\r\n\t\twalk.groundSpeed = 150;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dbd86e22990e7390", + "equalIndicator/v1": "b4693e63e115377efc33ff4a343b69163411ab3aa4492c1c70e97b1dd239df23" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'", + "markdown": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 107, + "startColumn": 11, + "charOffset": 2622, + "charLength": 4, + "snippet": { + "text": "Tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 105, + "startColumn": 1, + "charOffset": 2544, + "charLength": 109, + "snippet": { + "text": "\tTile(uint16_t x, uint16_t y, uint8_t z) :\r\n\t\ttilePos(x, y, z) { }\r\n\tvirtual ~Tile() {};\r\n\r\n\t// non-copyable\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1703faaf0983e531", + "equalIndicator/v1": "b4700d4013d2093460e52c918cdfd19c57c3dd2e124e192d1f24510fac5d9ba9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 745, + "startColumn": 14, + "charOffset": 25828, + "charLength": 8, + "snippet": { + "text": "password" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 743, + "startColumn": 1, + "charOffset": 25725, + "charLength": 151, + "snippet": { + "text": "\tstd::string sessionKey = msg.getString();\r\n\tstd::string accountDescriptor = sessionKey;\r\n\tstd::string password = \"\";\r\n\r\n\tif (authType != \"session\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bc44bc011fe50475", + "equalIndicator/v1": "b4b0b680968915e50ab2ed17a668259758321a787a5a48d52d04657f5402a4b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 153, + "startColumn": 45, + "charOffset": 4061, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 151, + "startColumn": 1, + "charOffset": 4012, + "charLength": 102, + "snippet": { + "text": "}\r\n\r\nbool BedItem::sleep(std::shared_ptr player) {\r\n\tif (house == nullptr) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4e018670f1cff9f7", + "equalIndicator/v1": "b4ce5efc294e799aa6247d6eb0b3f9d97a93036abba197a1037d1f65f70f7b6f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 739, + "startColumn": 3, + "charOffset": 20506, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 737, + "startColumn": 1, + "charOffset": 20497, + "charLength": 129, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tint32_t houseId = pugi::cast(houseIdAttribute.value());\r\n\r\n\t\tstd::shared_ptr house = getHouse(houseId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bb5e89db5e42ded5", + "equalIndicator/v1": "b4ed3c79778f2593accc9e56598493d58fb4e1ba816f5fe2f3071f80ba34652b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 154, + "startColumn": 22, + "charOffset": 4902, + "charLength": 6, + "snippet": { + "text": "scoped" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 152, + "startColumn": 1, + "charOffset": 4875, + "charLength": 207, + "snippet": { + "text": "\t}\r\n\r\n\tstd::shared_ptr scoped(const std::string &scope) override final {\r\n\t\tlogger.trace(\"ScopedKV::scoped({})\", buildKey(scope));\r\n\t\treturn std::make_shared(logger, rootKV_, buildKey(scope));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "281280c7441739bc", + "equalIndicator/v1": "b5016e1b5112050b7c77119417db8cb18dac95777bae6bcc9ff1ebe4f9e428b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1125, + "startColumn": 50, + "charOffset": 33121, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1123, + "startColumn": 1, + "charOffset": 33063, + "charLength": 102, + "snippet": { + "text": "\t\t}\r\n\t}\r\n\tvoid sendCreatureTurn(std::shared_ptr creature) {\r\n\t\tif (!creature) {\r\n\t\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "06d34e024d30f2c4", + "equalIndicator/v1": "b50ea0961e4bb7bbe72f259fbf938c5f9dd130f69689ee52693e06cf5747952e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2387, + "startColumn": 54, + "charOffset": 70547, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2385, + "startColumn": 1, + "charOffset": 70409, + "charLength": 235, + "snippet": { + "text": "\tif (sendText) {\r\n\t\tg_metrics().addCounter(\"player_experience_raw\", rawExp, attrs);\r\n\t\tg_metrics().addCounter(\"player_experience_actual\", exp, attrs);\r\n\t} else {\r\n\t\tg_metrics().addCounter(\"player_experience_bonus_raw\", rawExp, attrs);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f113ca6765d8e625", + "equalIndicator/v1": "b5357044e9478cb1b04a21bd465f434f451a4c79e27715046cdefeb603804da6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 47, + "startColumn": 2, + "charOffset": 1193, + "charLength": 15, + "snippet": { + "text": "getUnlockedKV()" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 45, + "startColumn": 1, + "charOffset": 1114, + "charLength": 225, + "snippet": { + "text": "\r\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\r\n\tgetUnlockedKV()->set(badge.m_name, toSaveTimeStamp);\r\n\tm_badgesUnlocked.emplace_back(badge, toSaveTimeStamp);\r\n\tm_badgesUnlocked.shrink_to_fit();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bed7edc8216e86a0", + "equalIndicator/v1": "b559afe32148dd9c48f64e15e5da1ee184b5c0644a27bf1b4b808030a3847612" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 63, + "startColumn": 68, + "charOffset": 1861, + "charLength": 6, + "snippet": { + "text": "action" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 61, + "startColumn": 1, + "charOffset": 1789, + "charLength": 168, + "snippet": { + "text": "}\r\n\r\nbool Actions::registerLuaUniqueEvent(const std::shared_ptr action) {\r\n\tauto uniqueIdVector = action->getUniqueIdsVector();\r\n\tif (uniqueIdVector.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "86d52fc9569c886d", + "equalIndicator/v1": "b57b7a91b176b3350292e37dd7f71e3bfea0fe7851a184314252bcdc259561e6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 865, + "startColumn": 2, + "charOffset": 39340, + "charLength": 7, + "snippet": { + "text": "Slots_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 863, + "startColumn": 1, + "charOffset": 39322, + "charLength": 106, + "snippet": { + "text": "\r\n\t// inventory\r\n\tSlots_t slot = static_cast(pos.y);\r\n\treturn player->getInventoryItem(slot);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8f0597c1c71b3687", + "equalIndicator/v1": "b5859a26a781f473044c777ebec9115d4d023690331534d1845a38b9eec33e98" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1389, + "startColumn": 45, + "charOffset": 42089, + "charLength": 7, + "snippet": { + "text": "dirList" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1387, + "startColumn": 1, + "charOffset": 41948, + "charLength": 183, + "snippet": { + "text": "\tif (!dirList.empty()) {\r\n\t\tstd::shuffle(dirList.begin(), dirList.end(), getRandomGenerator());\r\n\t\tmoveDirection = dirList[uniform_random(0, dirList.size() - 1)];\r\n\t\treturn true;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f99b78e11de31cd6", + "equalIndicator/v1": "b5a26a7a8b9985554cf4423b0d6482f557b2c154b80385e2ee00554dccff4d28" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1640, + "startColumn": 2, + "charOffset": 43994, + "charLength": 22, + "snippet": { + "text": "// player:getStamina()" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1638, + "startColumn": 1, + "charOffset": 43933, + "charLength": 168, + "snippet": { + "text": "\r\nint PlayerFunctions::luaPlayerGetStamina(lua_State* L) {\r\n\t// player:getStamina()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "039bb507859a2f06", + "equalIndicator/v1": "b5a6d6970bbfeb5588339c8ba7f6007928fa622bc1df82baf2da758d30240ca8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 575, + "startColumn": 7, + "charOffset": 16045, + "charLength": 16, + "snippet": { + "text": "auto [key, item]" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 573, + "startColumn": 1, + "charOffset": 15980, + "charLength": 161, + "snippet": { + "text": "\r\n\t// Iterate through all items in the player's inventory\r\n\tfor (auto [key, item] : getAllSlotItems()) {\r\n\t\t// Iterate through all imbuement slots on the item\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b1166bc1624bd983", + "equalIndicator/v1": "b5f26713fa2d5174035bba9af016e17be943d5ca3f0491e4cd75110db3328caf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'", + "markdown": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 82, + "startColumn": 34, + "charOffset": 2580, + "charLength": 9, + "snippet": { + "text": "getPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 80, + "startColumn": 1, + "charOffset": 2503, + "charLength": 114, + "snippet": { + "text": "\t\treturn static_self_cast();\r\n\t}\r\n\tvirtual std::shared_ptr getPlayer() {\r\n\t\treturn nullptr;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8588d363733ec888", + "equalIndicator/v1": "b6017b53c4cfeba16f754d7dcc840198c9e2a8e404694a938b16bb32f79a3041" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 257, + "startColumn": 2, + "charOffset": 8563, + "charLength": 8, + "snippet": { + "text": "uint64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 255, + "startColumn": 1, + "charOffset": 8556, + "charLength": 203, + "snippet": { + "text": "\t}\r\n\r\n\tuint64_t tries = static_cast(skillBase[skill] * std::pow(static_cast(skillMultipliers[skill]), level - (minSkillLevel + 1)));\r\n\tcacheSkill[skill][level] = tries;\r\n\treturn tries;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "28f9cb3437b6af8d", + "equalIndicator/v1": "b606824b4adc4a89f4faab875c4e29891e9e2a8e2dba7ceab8d129796272f9d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 973, + "startColumn": 52, + "charOffset": 31227, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 971, + "startColumn": 1, + "charOffset": 31171, + "charLength": 146, + "snippet": { + "text": "}\r\n\r\nbool InstantSpell::canCast(std::shared_ptr player) const {\r\n\tif (player->hasFlag(PlayerFlags_t::CannotUseSpells)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "288c42e65d5d7454", + "equalIndicator/v1": "b62932d872a6c259ab44a03e02c33623c3b9b8bf9862305516cf2756597d9bce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7484, + "startColumn": 26, + "charOffset": 260703, + "charLength": 12, + "snippet": { + "text": "targetPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7482, + "startColumn": 1, + "charOffset": 260538, + "charLength": 269, + "snippet": { + "text": "void Game::buildMessageAsTarget(\r\n\tstd::shared_ptr attacker, const CombatDamage &damage, std::shared_ptr attackerPlayer,\r\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\r\n\tconst std::string &damageString\r\n) const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b8c7596627fbb9f1", + "equalIndicator/v1": "b65a9b6fa5fd92a5e867297fe7dea7c8e93204a6499bb3fdd21eb9117149b69f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/position.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 90, + "startColumn": 10, + "charOffset": 3016, + "charLength": 8, + "snippet": { + "text": "Position" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 88, + "startColumn": 1, + "charOffset": 2956, + "charLength": 106, + "snippet": { + "text": "\r\n\tPosition operator+(const Position &p1) const {\r\n\t\treturn Position(x + p1.x, y + p1.y, z + p1.z);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2cc7421a0279e259", + "equalIndicator/v1": "b67b2cd4d40ee721dbbd0f72933af673e760aea088826b618fcfeff011fe47d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'houseTile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'houseTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 365, + "startColumn": 143, + "charOffset": 10572, + "charLength": 9, + "snippet": { + "text": "houseTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 363, + "startColumn": 1, + "charOffset": 10425, + "charLength": 284, + "snippet": { + "text": "}\r\n\r\nvoid House::handleWrapableItem(ItemList &moveItemList, std::shared_ptr item, std::shared_ptr player, std::shared_ptr houseTile) const {\r\n\tif (item->isWrapContainer()) {\r\n\t\tg_logger().debug(\"[{}] found wrapable item '{}'\", __FUNCTION__, item->getName());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5a2e601e36159e53", + "equalIndicator/v1": "b67fc1ea9b4cc3c24440b82814f64e494a3360f026aa4ba262451dde39fe67f7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2115, + "startColumn": 27, + "charOffset": 63096, + "charLength": 8, + "snippet": { + "text": "duration" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2113, + "startColumn": 1, + "charOffset": 62992, + "charLength": 145, + "snippet": { + "text": "\r\n\tbool shouldUpdate = mType->info.targetDistance > distance ? true : false;\r\n\tchallengeMeleeDuration = duration;\r\n\ttargetDistance = distance;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "907c2ce45f2829a1", + "equalIndicator/v1": "b68291aefde02fa6b163ffd646f5dff09dbb181a2de3b9aeb4c094c1671b455e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 159, + "startColumn": 34, + "charOffset": 5122, + "charLength": 4, + "snippet": { + "text": "keys" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 157, + "startColumn": 1, + "charOffset": 5083, + "charLength": 133, + "snippet": { + "text": "\t}\r\n\r\n\tstd::unordered_set keys(const std::string &prefix = \"\") override {\r\n\t\treturn rootKV_.keys(buildKey(prefix));\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f9deadab3c9202f5", + "equalIndicator/v1": "b6a1cf1050c693a5ea2e963321f4d25ab1e8edc018ff645c922f7f78f1417fd2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1847, + "startColumn": 2, + "charOffset": 56272, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1845, + "startColumn": 1, + "charOffset": 56232, + "charLength": 108, + "snippet": { + "text": "\tstd::vector listedItems;\r\n\r\n\tuint16_t size = msg.get();\r\n\tlistedItems.reserve(size);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "667fe3c859ee1c23", + "equalIndicator/v1": "b6b367ad90f850b4ed29fba6b00630f7d40ffee884ec27c5a74a07a00a6a5be6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 256, + "startColumn": 2, + "charOffset": 9099, + "charLength": 13, + "snippet": { + "text": "MarketOfferEx" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 254, + "startColumn": 1, + "charOffset": 9013, + "charLength": 213, + "snippet": { + "text": "\r\nMarketOfferEx IOMarket::getOfferByCounter(uint32_t timestamp, uint16_t counter) {\r\n\tMarketOfferEx offer;\r\n\r\n\tconst int32_t created = timestamp - g_configManager().getNumber(MARKET_OFFER_DURATION, __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6bdb2daab0a56f5b", + "equalIndicator/v1": "b6e99d45ed26f00e63e501b55955fb27f1e07b6f670f1885447ebd4d5038ca19" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1151, + "startColumn": 27, + "charOffset": 41267, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1149, + "startColumn": 1, + "charOffset": 41235, + "charLength": 125, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnCombat, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "829451f9cd122ed4", + "equalIndicator/v1": "b6f2aced6bd292c4708f59c5a7ef4c23889b1b76ff36204f3e804e8158c76f3b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use std::make_unique instead", + "markdown": "Use std::make_unique instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 157, + "startColumn": 13, + "charOffset": 4151, + "charLength": 5, + "snippet": { + "text": "reset" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 155, + "startColumn": 1, + "charOffset": 4052, + "charLength": 448, + "snippet": { + "text": "\ttry {\r\n\t\tif (g_configManager().getBoolean(BIND_ONLY_GLOBAL_ADDRESS, __FUNCTION__)) {\r\n\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4::from_string(g_configManager().getString(IP, __FUNCTION__))), serverPort)));\r\n\t\t} else {\r\n\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4(INADDR_ANY)), serverPort)));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "256cc78d5ea2cfb2", + "equalIndicator/v1": "b6f63f1976c50d0b0d0256fe293079c7f3aa163bb43c18b278ba8db70878e329" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: nodesTable, calculatedNodes", + "markdown": "Constructor does not initialize these fields: nodesTable, calculatedNodes" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 16, + "startColumn": 13, + "charOffset": 525, + "charLength": 10, + "snippet": { + "text": "AStarNodes" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 471, + "charLength": 163, + "snippet": { + "text": "#include \"creatures/combat/combat.hpp\"\r\n\r\nAStarNodes::AStarNodes(uint32_t x, uint32_t y, int_fast32_t extraCost) :\r\n\topenNodes(), nodes() {\r\n#if defined(__AVX2__)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "05e77cfde4fd3aa7", + "equalIndicator/v1": "b74fc40db36f6b92710d390fb5669cc4919b15797515a6dc980ead5c4325f7ed" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 301, + "startColumn": 84, + "charOffset": 12647, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 299, + "startColumn": 1, + "charOffset": 12261, + "charLength": 492, + "snippet": { + "text": "\tvoid playerBosstiarySlot(uint32_t playerId, uint8_t slotId, uint32_t selectedBossId);\r\n\tvoid playerSetMonsterPodium(uint32_t playerId, uint32_t monsterRaceId, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t direction, const std::pair &podiumAndMonsterVisible);\r\n\tvoid playerRotatePodium(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\r\n\tvoid playerRequestInventoryImbuements(uint32_t playerId, bool isTrackerOpen);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "090b9bfbaff156e4", + "equalIndicator/v1": "b74fe1203a57df8d558356bac1bcdbb48dd5c6b8b324a5da8d11e3947139c30c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Tree, std::less>, std::allocator>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Tree, std::less\\>, std::allocator\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 995, + "startColumn": 2, + "charOffset": 30134, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 993, + "startColumn": 1, + "charOffset": 30057, + "charLength": 211, + "snippet": { + "text": "\tint index = 0;\r\n\tlua_createtable(L, monsterType->info.scripts.size(), 0);\r\n\tfor (const std::string &creatureEvent : monsterType->info.scripts) {\r\n\t\tpushString(L, creatureEvent);\r\n\t\tlua_rawseti(L, -2, ++index);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "49ef07c9dbe31692", + "equalIndicator/v1": "b7558bcfd2e068059f3eaae778c5dd9f1fa0162b415bc57ad490a78038bb7d42" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1724, + "startColumn": 61, + "charOffset": 60170, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1722, + "startColumn": 1, + "charOffset": 60103, + "charLength": 219, + "snippet": { + "text": "\t}\r\n}\r\nvoid ChainCallback::onChainCombat(std::shared_ptr creature, uint8_t &maxTargets, uint8_t &chainDistance, bool &backtracking) {\r\n\t// onChainCombat(creature)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "99c306a83af5764e", + "equalIndicator/v1": "b786b1ce9f45ed9c997a6e2815a31e777c488725d72d1a9f28f103896f1173a6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8435, + "startColumn": 49, + "charOffset": 293354, + "charLength": 6, + "snippet": { + "text": "result" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8433, + "startColumn": 1, + "charOffset": 293301, + "charLength": 229, + "snippet": { + "text": "}\r\n\r\nvoid Game::processHighscoreResults(DBResult_ptr result, uint32_t playerID, uint8_t category, uint32_t vocation, uint8_t entriesPerPage) {\r\n\tstd::shared_ptr player = g_game().getPlayerByID(playerID);\r\n\tif (!player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aae1e2c0123de377", + "equalIndicator/v1": "b7b018b313dfcf97529c88fe592a0e2d4ee67a6f1a57bea17bfbe389e0d45d9e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6915, + "startColumn": 31, + "charOffset": 240099, + "charLength": 38, + "snippet": { + "text": "(damage.secondary.value * damageBonus)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6913, + "startColumn": 1, + "charOffset": 239967, + "charLength": 190, + "snippet": { + "text": "\t\t\tif (damageBonus != 0) {\r\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\r\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2eca040cc8389a90", + "equalIndicator/v1": "b7d0972c7e41fb86caf010c1624429bb644d0c1012d67696fc71034148809883" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'guild' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'guild' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 565, + "startColumn": 16, + "charOffset": 29537, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 563, + "startColumn": 1, + "charOffset": 29342, + "charLength": 272, + "snippet": { + "text": "\tstd::shared_ptr getGuild(uint32_t id, bool allowOffline = false) const;\r\n\tstd::shared_ptr getGuildByName(const std::string &name, bool allowOffline = false) const;\r\n\tvoid addGuild(const std::shared_ptr guild);\r\n\tvoid removeGuild(uint32_t guildId);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1405918100b1863d", + "equalIndicator/v1": "b8172ebdfb1c0f414da73e48a1ceb3bd40422b18c36891dacd6385b755a57fac" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'name' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'name' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 205, + "startColumn": 16, + "charOffset": 4775, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 203, + "startColumn": 1, + "charOffset": 4715, + "charLength": 72, + "snippet": { + "text": "\t}\r\n\tvoid setScriptName(std::string name) {\r\n\t\tscriptName = name;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "26797eddd083ecbe", + "equalIndicator/v1": "b85d61a72690d0a6a38ae19415e95139a866dc09b512a7c1e1daa9e87ccc8d47" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2483, + "startColumn": 32, + "charOffset": 73898, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2481, + "startColumn": 1, + "charOffset": 73848, + "charLength": 61, + "snippet": { + "text": "\t}\r\n\tsendStats();\r\n\tsendExperienceTracker(rawExp, exp);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "56d4e80384a3fb3c", + "equalIndicator/v1": "b8614a966843ce9095cc9ee829e0598895fbcc0a6fbbd997f9a36a9988a8568f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'door' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'door' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 411, + "startColumn": 46, + "charOffset": 12009, + "charLength": 4, + "snippet": { + "text": "door" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 409, + "startColumn": 1, + "charOffset": 11959, + "charLength": 151, + "snippet": { + "text": "}\r\n\r\nvoid House::removeDoor(std::shared_ptr door) {\r\n\tauto it = std::find(doorList.begin(), doorList.end(), door);\r\n\tif (it != doorList.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b919e7577a6fb48c", + "equalIndicator/v1": "b86e38d5653908903629ca164203020be750228eabaff06fdb54cc6ee40d7b74" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1344, + "startColumn": 3, + "charOffset": 39394, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1342, + "startColumn": 1, + "charOffset": 39332, + "charLength": 173, + "snippet": { + "text": "\r\n\tif (const CreatureVector* creatures = getCreatures()) {\r\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\r\n\t\t\tif (*it == creature) {\r\n\t\t\t\treturn n;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "33782713e833e59f", + "equalIndicator/v1": "b87baf031bd0cc2513e9836635bdbcc05773ae7425ba157f0229ec926a841191" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 630, + "startColumn": 27, + "charOffset": 16959, + "charLength": 56, + "snippet": { + "text": "(100 - creature->getAbsorbPercent(indexToCombatType(i)))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 628, + "startColumn": 1, + "charOffset": 16914, + "charLength": 128, + "snippet": { + "text": "\t\t\tcontinue;\r\n\t\t}\r\n\t\tsetAbsorb(i, std::round((100 - creature->getAbsorbPercent(indexToCombatType(i))) * value / 100.f));\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "136b3592728a2493", + "equalIndicator/v1": "b8ac133beb52d3a6b91b7410593caa849cc6b500df2783047bd7d10cf748b777" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3491, + "startColumn": 15, + "charOffset": 105783, + "charLength": 12, + "snippet": { + "text": "tmpContainer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3489, + "startColumn": 1, + "charOffset": 105628, + "charLength": 241, + "snippet": { + "text": "\t\t\t\twhile (n) {\r\n\t\t\t\t\tif (tmpContainer->queryAdd(tmpContainer->capacity() - n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\r\n\t\t\t\t\t\tindex = tmpContainer->capacity() - n;\r\n\t\t\t\t\t\t*destItem = nullptr;\r\n\t\t\t\t\t\treturn tmpContainer;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4b14cbcc02825520", + "equalIndicator/v1": "b8b69af396730b5f04a90381d7668d473b50ed2aab4118de59fc3a27ec6b42eb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 40, + "startColumn": 16, + "charOffset": 1053, + "charLength": 16, + "snippet": { + "text": "internalAddThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 38, + "startColumn": 1, + "charOffset": 1033, + "charLength": 71, + "snippet": { + "text": "}\r\n\r\nvoid Cylinder::internalAddThing(std::shared_ptr) {\r\n\t//\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f5870b2214122e7e", + "equalIndicator/v1": "b8ce5609a4d56f1ea544b7190848cfc80256bb47edbabe84c95c7621669c8bdd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 590, + "startColumn": 13, + "charOffset": 28431, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 588, + "startColumn": 1, + "charOffset": 28241, + "charLength": 413, + "snippet": { + "text": "\t} else if (stringValue == \"absorbpercentholy\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentdeath\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentlifedrain\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cdedfbebc46519d6", + "equalIndicator/v1": "b92fde3b733b3a940c6bff93f4fc9438e8c53408d1b9edd34b60988ba3192d21" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 355, + "startColumn": 9, + "charOffset": 11543, + "charLength": 40, + "snippet": { + "text": "(player->getMaxHealth() * healthPercent)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 353, + "startColumn": 1, + "charOffset": 11529, + "charLength": 67, + "snippet": { + "text": "\t}\r\n\r\n\treturn (player->getMaxHealth() * healthPercent) / 100;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b0abbdedf36c042e", + "equalIndicator/v1": "b94131d9dee1d2988a656feb6ffc8a6624e83c0a2523285acde1a19f74cdc9dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 58, + "startColumn": 35, + "charOffset": 1617, + "charLength": 12, + "snippet": { + "text": "getContainer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 56, + "startColumn": 1, + "charOffset": 1577, + "charLength": 123, + "snippet": { + "text": "\t}\r\n\r\n\tstd::shared_ptr getContainer() const override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b57bed8c87f043e", + "equalIndicator/v1": "b941683b25e869c07b2a856f6bb772b997f4ed36adc39f83948a2fbc949aadad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 173, + "startColumn": 47, + "charOffset": 6504, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 171, + "startColumn": 1, + "charOffset": 6403, + "charLength": 214, + "snippet": { + "text": "\tscriptInterface.pushFunction(info.monsterOnSpawn);\r\n\r\n\tLuaScriptInterface::pushUserdata(L, monster);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\r\n\tLuaScriptInterface::pushPosition(L, position);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7d2bcec969a60dcf", + "equalIndicator/v1": "b952d02d2339bc17be7bfb0bc47b8b1a5eef2b9b58a1a8fbfa0c032cc3b06648" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 397, + "startColumn": 70, + "charOffset": 17132, + "charLength": 31, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 395, + "startColumn": 1, + "charOffset": 16900, + "charLength": 349, + "snippet": { + "text": "\tvoid sendUpdateTileItem(const Position &pos, uint32_t stackpos, std::shared_ptr item);\r\n\tvoid sendRemoveTileThing(const Position &pos, uint32_t stackpos);\r\n\tvoid sendUpdateTileCreature(const Position &pos, uint32_t stackpos, const std::shared_ptr creature);\r\n\tvoid sendUpdateTile(std::shared_ptr tile, const Position &pos);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd570a2792e1442b", + "equalIndicator/v1": "b975affac7d829f71a2ef53c8af4a45bd9c40860ca5a675db68caf3c7b90dbf3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 381, + "startColumn": 55, + "charOffset": 12564, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 379, + "startColumn": 1, + "charOffset": 12505, + "charLength": 127, + "snippet": { + "text": "}\r\n\r\nvoid Weapon::decrementItemCount(std::shared_ptr item) {\r\n\tuint16_t count = item->getItemCount();\r\n\tif (count > 1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cc5162903f5dc3bb", + "equalIndicator/v1": "b979f32720469306d33e3292b251ba11b5582c482f4c7706aa2eb7ae4d1fb4c8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'exclude' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'exclude' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 60, + "startColumn": 46, + "charOffset": 2128, + "charLength": 7, + "snippet": { + "text": "exclude" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 58, + "startColumn": 1, + "charOffset": 2078, + "charLength": 167, + "snippet": { + "text": "}\r\n\r\nbool Tile::hasProperty(std::shared_ptr exclude, ItemProperty prop) const {\r\n\tif (!exclude) {\r\n\t\tg_logger().error(\"[{}]: exclude is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "80269993f729f9aa", + "equalIndicator/v1": "b97a812ec4e53d3dcf3564a1eb3b51160417ff880c7b64368053b948d984078f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 473, + "startColumn": 45, + "charOffset": 16907, + "charLength": 5, + "snippet": { + "text": "party" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 471, + "startColumn": 1, + "charOffset": 16810, + "charLength": 159, + "snippet": { + "text": "\tscriptInterface.pushFunction(info.partyOnLeave);\r\n\r\n\tLuaScriptInterface::pushUserdata(L, party);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4ea6b43a2d976d71", + "equalIndicator/v1": "b98777237896234e8a09b8b6bb87a4f2edf17591b0411b48d54f4998679edc61" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'owner' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'owner' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1030, + "startColumn": 47, + "charOffset": 28857, + "charLength": 5, + "snippet": { + "text": "owner" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1028, + "startColumn": 1, + "charOffset": 28806, + "charLength": 121, + "snippet": { + "text": "}\r\n\r\nvoid Item::setOwner(std::shared_ptr owner) {\r\n\tauto ownerId = owner->getID();\r\n\tif (owner->getPlayer()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79e397becc2f6712", + "equalIndicator/v1": "b9acb47438f81a9c3435f9eccfe5f4affb246b0deb8ef50495966a4aec822125" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 303, + "startColumn": 80, + "charOffset": 9030, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 301, + "startColumn": 1, + "charOffset": 8810, + "charLength": 327, + "snippet": { + "text": "\tstatic std::string parseShowDurationSpeed(int32_t speed, bool &begin);\r\n\tstatic std::string parseShowDuration(std::shared_ptr item);\r\n\tstatic std::string parseShowAttributesDescription(std::shared_ptr item, const uint16_t itemId);\r\n\tstatic std::string parseClassificationDescription(std::shared_ptr item);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9bb6503f8845321f", + "equalIndicator/v1": "b9b6605603fa23fdcf4fa038511fd8529eca4b4c9a54c05528df522bee62a862" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 38, + "startColumn": 71, + "charOffset": 1131, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 36, + "startColumn": 1, + "charOffset": 1056, + "charLength": 192, + "snippet": { + "text": "}\r\n\r\nvoid CreatureCallback::pushSpecificCreature(std::shared_ptr creature) {\r\n\tif (std::shared_ptr npc = creature->getNpc()) {\r\n\t\tLuaScriptInterface::pushUserdata(L, npc);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7505d9d72ef24c4a", + "equalIndicator/v1": "b9d3a7627af97c5fd6e3f72346e3dd407f03ed5bc567b8341cf9049d047f938a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 218, + "startColumn": 8, + "charOffset": 6952, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 216, + "startColumn": 1, + "charOffset": 6812, + "charLength": 339, + "snippet": { + "text": "\t\t// onCreatureMove(self, creature, oldPosition, newPosition)\r\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\r\n\t\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\t\tg_logger().error(\"[Monster::onCreatureMove - Monster {} creature {}] \"\r\n\t\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eab79466dd035d3e", + "equalIndicator/v1": "ba288255bb788647ac97b0bcc9c8ce327bde5f3adab4af5a0006a6fe1864ff97" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 730, + "startColumn": 71, + "charOffset": 35925, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 728, + "startColumn": 1, + "charOffset": 35850, + "charLength": 234, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Game::internalGetThing(std::shared_ptr player, const Position &pos, int32_t index, uint32_t itemId, StackPosType_t type) {\r\n\tif (pos.x != 0xFFFF) {\r\n\t\tstd::shared_ptr tile = map.getTile(pos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "90530e80b87e2982", + "equalIndicator/v1": "ba298a4f506fda05fa9f16b824316ea9667beac22435cb15ed3ea522100191ed" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1405, + "startColumn": 35, + "charOffset": 49101, + "charLength": 17, + "snippet": { + "text": "m_playerBonusData" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1403, + "startColumn": 1, + "charOffset": 48933, + "charLength": 335, + "snippet": { + "text": "\taddStat(WheelStat_t::MANA, m_playerBonusData.stats.mana);\r\n\taddStat(WheelStat_t::CAPACITY, m_playerBonusData.stats.capacity * 100);\r\n\taddStat(WheelStat_t::MITIGATION, m_playerBonusData.mitigation * 100);\r\n\taddStat(WheelStat_t::DAMAGE, m_playerBonusData.stats.damage);\r\n\taddStat(WheelStat_t::HEALING, m_playerBonusData.stats.healing);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a129cf8012047e07", + "equalIndicator/v1": "ba2b4026ba8031943d673bbe5d8e213925073a462ac50ade23fd7b363e710476" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1303, + "startColumn": 20, + "charOffset": 46363, + "charLength": 11, + "snippet": { + "text": "currentTime" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1301, + "startColumn": 1, + "charOffset": 46285, + "charLength": 133, + "snippet": { + "text": "\tlua_pushnumber(L, value);\r\n\tlua_pushnumber(L, oldValue);\r\n\tlua_pushnumber(L, currentTime);\r\n\r\n\tscriptInterface.callVoidFunction(5);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "879cdac0387c621c", + "equalIndicator/v1": "ba304b27deea222a8cab37119f1ccb5ddfa38d4145449f60a672b704bdda2da0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 2, + "charOffset": 836, + "charLength": 6, + "snippet": { + "text": "size_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 813, + "charLength": 128, + "snippet": { + "text": "\tstd::string line;\r\n\r\n\tsize_t offset = static_cast(result.offset);\r\n\tsize_t lineOffsetPosition = 0;\r\n\tsize_t index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c28dfbff83e9eca4", + "equalIndicator/v1": "ba3a4cfa8fcb1dc62091138dc69216c98b413502ea6c040dbe0ea64aecd33cce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3277, + "startColumn": 64, + "charOffset": 121419, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3275, + "startColumn": 1, + "charOffset": 121351, + "charLength": 308, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr searchForItem(std::shared_ptr container, uint16_t itemId, bool hasTier /* = false*/, uint8_t tier /* = 0*/) {\r\n\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\r\n\t\tif ((*it)->getID() == itemId && (!hasTier || (*it)->getTier() == tier)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bca041fbbd216611", + "equalIndicator/v1": "ba4c07e477f7fddb2e14224555e833d96d74684c31a352deb61954eae9a0a40b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 289, + "startColumn": 84, + "charOffset": 8995, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 287, + "startColumn": 1, + "charOffset": 8907, + "charLength": 276, + "snippet": { + "text": "}\r\n\r\nbool Combat::isProtected(std::shared_ptr attacker, std::shared_ptr target) {\r\n\tuint32_t protectionLevel = g_configManager().getNumber(PROTECTION_LEVEL, __FUNCTION__);\r\n\tif (target->getLevel() < protectionLevel || attacker->getLevel() < protectionLevel) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a8e39ac610231395", + "equalIndicator/v1": "ba52c76dfc358e2c719425821c7b8921163437d162c1633a5a6d0e6d6b4bff0e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3655, + "startColumn": 65, + "charOffset": 109869, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3653, + "startColumn": 1, + "charOffset": 109761, + "charLength": 176, + "snippet": { + "text": "\t\t\tinventory[index] = nullptr;\r\n\t\t} else {\r\n\t\t\tuint8_t newCount = static_cast(std::max(0, item->getItemCount() - count));\r\n\t\t\titem->setItemCount(newCount);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9439f873341587a7", + "equalIndicator/v1": "ba792a986d4256f6c7b7092558fc24b17e4008e983ab0e2921d8dce7f76760c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 26, + "startColumn": 7, + "charOffset": 955, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 24, + "startColumn": 1, + "charOffset": 794, + "charLength": 346, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\n\tbool isInbox() const override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "85ad79c6b878e037", + "equalIndicator/v1": "ba949f6d4d7fba0f9f5a527254f77f279d5f5610422d3adca675905e047df15b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1115, + "startColumn": 27, + "charOffset": 39991, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1113, + "startColumn": 1, + "charOffset": 39959, + "charLength": 133, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnGainSkillTries, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "37761705e03b1d24", + "equalIndicator/v1": "baad084a5181d6e603c861aa56f7853d95d05cc1e83ef35c048acdbf45f697e8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6543, + "startColumn": 57, + "charOffset": 205922, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6541, + "startColumn": 1, + "charOffset": 205861, + "charLength": 123, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendUpdateTile(std::shared_ptr tile, const Position &pos) {\r\n\tif (!canSee(pos)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "370438f7b26532e4", + "equalIndicator/v1": "babcc6116ada04d09c5891af43faae92efd1554b2793296ed2ef1e9e3d05935b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 21, + "charOffset": 2186, + "charLength": 9, + "snippet": { + "text": "creatures" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2061, + "charLength": 250, + "snippet": { + "text": "\tfor (const auto &tile : houseTiles) {\r\n\t\tif (const CreatureVector* creatures = tile->getCreatures()) {\r\n\t\t\tfor (int32_t i = creatures->size(); --i >= 0;) {\r\n\t\t\t\tconst auto creature = (*creatures)[i];\r\n\t\t\t\tkickPlayer(nullptr, creature->getPlayer());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fba61608409f7651", + "equalIndicator/v1": "bac56c4810c0ff9be41a538a9f2498f27e2efd8999ee16ed9ea3761c87f1e289" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4841, + "startColumn": 16, + "charOffset": 144717, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4839, + "startColumn": 1, + "charOffset": 144696, + "charLength": 50, + "snippet": { + "text": "\t}\r\n\r\n\taddExperience(target, gainExp, true);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9a856dd95af61b8a", + "equalIndicator/v1": "bac94d54c87d1c8db42700b813082a826830f7836f1273ca484dc1bf4f18a006" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'container' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'container' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2029, + "startColumn": 25, + "charOffset": 60183, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2027, + "startColumn": 1, + "charOffset": 59993, + "charLength": 217, + "snippet": { + "text": "void Player::onUpdateContainerItem(std::shared_ptr container, std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tif (oldItem != newItem) {\r\n\t\tonRemoveContainerItem(container, oldItem);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc00a8d8f036f272", + "equalIndicator/v1": "bb071858e0b1bba92cbd54ef8707b53f1221ed3dfbb8a34889a1193252f99d3a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1126, + "startColumn": 61, + "charOffset": 32951, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1124, + "startColumn": 1, + "charOffset": 32886, + "charLength": 109, + "snippet": { + "text": "}\r\n\r\nvoid Player::checkLootContainers(std::shared_ptr container) {\r\n\tif (!container) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67a11ff8bfebdf4d", + "equalIndicator/v1": "bb252e4c1720cd3163db8bd2c9ace9f37c8f9a4205adb19697048ab85a7dfb24" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 360, + "startColumn": 7, + "charOffset": 11727, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 358, + "startColumn": 1, + "charOffset": 11597, + "charLength": 322, + "snippet": { + "text": "bool Weapon::executeUseWeapon(std::shared_ptr player, const LuaVariant &var) const {\r\n\t// onUseWeapon(player, var)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tstd::string playerName = player ? player->getName() : \"Player nullptr\";\r\n\t\tg_logger().error(\"[Weapon::executeUseWeapon - Player {} weaponId {}]\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f5e64fd2ead17942", + "equalIndicator/v1": "bb4a30c083d788dca157b436b27d835284453d4493e414d39159d8bd56f4dc6f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2032, + "startColumn": 2, + "charOffset": 62242, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2030, + "startColumn": 1, + "charOffset": 62144, + "charLength": 244, + "snippet": { + "text": "void ProtocolGame::parseWrapableItem(NetworkMessage &msg) {\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tg_game().playerWrapableItem(player->getID(), pos, stackpos, itemId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8eb05c3a05d8775d", + "equalIndicator/v1": "bb505c042e9468713625242ff06bdce356181676d4dcb04fdc61879c7aa663b0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::any_of()'", + "markdown": "Replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 161, + "startColumn": 3, + "charOffset": 5118, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 159, + "startColumn": 1, + "charOffset": 5064, + "charLength": 158, + "snippet": { + "text": "\r\n\tbool hasAttribute(ItemAttribute_t type) const {\r\n\t\tfor (const auto &attr : attributeVector) {\r\n\t\t\tif (attr.getAttributeType() == type) {\r\n\t\t\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4589fb673eb863f7", + "equalIndicator/v1": "bb5e5944ee413f788e3fec2fff4320c19f99c305baa95117d9655cfc1832cf98" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'playerPtr' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'playerPtr' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 53, + "startColumn": 56, + "charOffset": 1400, + "charLength": 9, + "snippet": { + "text": "playerPtr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 51, + "startColumn": 1, + "charOffset": 1340, + "charLength": 136, + "snippet": { + "text": "}\r\n\r\nvoid SaveManager::schedulePlayer(std::weak_ptr playerPtr) {\r\n\tauto playerToSave = playerPtr.lock();\r\n\tif (!playerToSave) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1d657e4012c148f8", + "equalIndicator/v1": "bb651f09f9f9fef9721d0fa9907c5cccdc8a65ab1c360cc2cc55fa0fb39d058a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 254, + "startColumn": 24, + "charOffset": 7101, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 252, + "startColumn": 1, + "charOffset": 7002, + "charLength": 208, + "snippet": { + "text": "\tconst auto &weapon = getUserdataShared(L, 1);\r\n\tif (weapon) {\r\n\t\tweapon->setMinChange(getNumber(L, 2));\r\n\t\tif (lua_gettop(L) > 2) {\r\n\t\t\tweapon->setMaxChange(getNumber(L, 3));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "97179b35de9ae7ce", + "equalIndicator/v1": "bbcfef467714423b0d34639514112b143d502d33d5583d4af454d7f632061ac9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 46, + "startColumn": 64, + "charOffset": 1865, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 44, + "startColumn": 1, + "charOffset": 1797, + "charLength": 176, + "snippet": { + "text": "}\r\n\r\nCombatDamage Combat::getCombatDamage(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tCombatDamage damage;\r\n\tdamage.origin = params.origin;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "766aa76056900bb9", + "equalIndicator/v1": "bbe4ed4b7fc336f9c08b28b23ead159832a038f3e2e84845edb4dd4db9a70ada" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: delay", + "markdown": "Constructor does not initialize these fields: delay" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 141, + "startColumn": 7, + "charOffset": 3345, + "charLength": 9, + "snippet": { + "text": "RaidEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 139, + "startColumn": 1, + "charOffset": 3333, + "charLength": 67, + "snippet": { + "text": "};\r\n\r\nclass RaidEvent {\r\npublic:\r\n\tvirtual ~RaidEvent() = default;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9a3dfdd73fd6ad1d", + "equalIndicator/v1": "bbef9aa54de097416dd3be632d896524b6b6462e40b5e2452b8954a2dc1445f9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 277, + "startColumn": 59, + "charOffset": 10218, + "charLength": 5, + "snippet": { + "text": "party" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 275, + "startColumn": 1, + "charOffset": 10155, + "charLength": 213, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::partyOnDisband(std::shared_ptr party) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::partyOnDisband - Party leader {}] Call stack \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "291567f21a0aedf4", + "equalIndicator/v1": "bc084c804b340f653187055083b0ef90318032ac8b27ced3a2cd6342096f69e2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 178, + "startColumn": 7, + "charOffset": 6525, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 176, + "startColumn": 1, + "charOffset": 6232, + "charLength": 448, + "snippet": { + "text": "\r\nvoid EventCallback::creatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnDrainHealth - \"\r\n\t\t \"Creature {} attacker {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bb75a1b24d849a1a", + "equalIndicator/v1": "bc11f6e783428234efaad76aaf30825e7aeb5c9ae02c31d023afef7066ff4d05" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 295, + "startColumn": 25, + "charOffset": 10460, + "charLength": 20, + "snippet": { + "text": "pugi::cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 293, + "startColumn": 1, + "charOffset": 10425, + "charLength": 192, + "snippet": { + "text": "\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\timbuement.speed = pugi::cast(attr.value());\r\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"capacity\") == 0) {\r\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "31cf4026ee2cd779", + "equalIndicator/v1": "bc16b7f137d3fed68cc680e64491feddc1ce761431b9df70edaba9d5165ddffb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getIsLootTrackeable' can be made const", + "markdown": "Method 'getIsLootTrackeable' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 268, + "startColumn": 7, + "charOffset": 8014, + "charLength": 19, + "snippet": { + "text": "getIsLootTrackeable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 266, + "startColumn": 1, + "charOffset": 8002, + "charLength": 68, + "snippet": { + "text": "\t}\r\n\r\n\tbool getIsLootTrackeable() {\r\n\t\treturn isLootTrackeable;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "42259d07ec94020b", + "equalIndicator/v1": "bc2730bad868ff1d9474f49d042ac20c1d7997395c1e8f65903307f9c6342567" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 873, + "startColumn": 24, + "charOffset": 24377, + "charLength": 11, + "snippet": { + "text": "damageEntry" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 871, + "startColumn": 1, + "charOffset": 24274, + "charLength": 176, + "snippet": { + "text": "\t\tlua_createtable(L, 0, 2);\r\n\t\tsetField(L, \"total\", damageEntry.second.total);\r\n\t\tsetField(L, \"ticks\", damageEntry.second.ticks);\r\n\t\tlua_rawseti(L, -2, damageEntry.first);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bbe18e66c7a0e76d", + "equalIndicator/v1": "bc393a7e9dff1756ddd2f32352dbcb0fdf58a7010c3ae95578eced756455da42" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 334, + "startColumn": 41, + "charOffset": 12426, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 332, + "startColumn": 1, + "charOffset": 12380, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "65ecab3dc4af74b0", + "equalIndicator/v1": "bc6826e8b09e4876999f164eddf67da7d273875ed0b7d47fae9923d5b73e465a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7190, + "startColumn": 46, + "charOffset": 214099, + "charLength": 4, + "snippet": { + "text": "cost" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7188, + "startColumn": 1, + "charOffset": 214037, + "charLength": 174, + "snippet": { + "text": "\t\t\treturn;\r\n\t\t}\r\n\t\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_convergence_fuse\" } });\r\n\t\thistory.cost = cost;\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "640ed643f5e8bc43", + "equalIndicator/v1": "bca84f4b18cd91bbc322da2cdf79d8f8c3fb8aa2a667b1ba4df5d9bba1382b7c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 376, + "startColumn": 2, + "charOffset": 12411, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 374, + "startColumn": 1, + "charOffset": 12302, + "charLength": 202, + "snippet": { + "text": "\tLuaScriptInterface::pushUserdata(L, player);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\tgetScriptInterface()->pushVariant(L, var);\r\n\r\n\treturn getScriptInterface()->callFunction(2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79df5129bbb86b32", + "equalIndicator/v1": "bcb2274f84d4af1120dd9b35765e9eba6b79b84b0615e50d0e32ce0ef18b0519" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6794, + "startColumn": 83, + "charOffset": 234825, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6792, + "startColumn": 1, + "charOffset": 234715, + "charLength": 263, + "snippet": { + "text": "\r\n// Hazard combat helpers\r\nvoid Game::handleHazardSystemAttack(CombatDamage &damage, std::shared_ptr player, std::shared_ptr monster, bool isPlayerAttacker) {\r\n\tif (damage.primary.value != 0 && monster->getHazard()) {\r\n\t\tif (isPlayerAttacker) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8ab29dc5a3c84856", + "equalIndicator/v1": "bcc43c187a72c87bf16a1377306c5d9bf997a06b5996e03507129fa7acff12d7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 731, + "startColumn": 28, + "charOffset": 22362, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 729, + "startColumn": 1, + "charOffset": 22329, + "charLength": 102, + "snippet": { + "text": "\t}\r\n\r\n\tconst int32_t oldWeight = item->getWeight();\r\n\titem->setID(itemId);\r\n\titem->setSubType(count);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "731b12dea705c446", + "equalIndicator/v1": "bcdb3343ac3f1b7918dc042732e6ae0f6573c9debca06fe401970a9d6dc0489c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'newRunning' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'newRunning' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 59, + "startColumn": 46, + "charOffset": 1529, + "charLength": 10, + "snippet": { + "text": "newRunning" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 57, + "startColumn": 1, + "charOffset": 1461, + "charLength": 111, + "snippet": { + "text": "\t\treturn running;\r\n\t}\r\n\tvoid setRunning(const std::shared_ptr newRunning) {\r\n\t\trunning = newRunning;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71ae3c07e32d7224", + "equalIndicator/v1": "bcfbd815b53b74dfa4a516c4fb36aaf7212534b50816b2480957daec0cd58f1b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 62, + "startColumn": 60, + "charOffset": 2286, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 60, + "startColumn": 1, + "charOffset": 2022, + "charLength": 419, + "snippet": { + "text": "\tvoid addCharmPoints(std::shared_ptr player, uint16_t amount, bool negative = false);\r\n\tvoid sendBuyCharmRune(std::shared_ptr player, charmRune_t runeID, uint8_t action, uint16_t raceid);\r\n\tvoid setCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm, uint16_t raceid);\r\n\tvoid resetCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8f6b90841129e655", + "equalIndicator/v1": "bcfcd9cdbc41068fc81d1318873fe6bae653cbec77350fdb9752e1991b7bb543" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 50, + "startColumn": 70, + "charOffset": 1440, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 48, + "startColumn": 1, + "charOffset": 1340, + "charLength": 270, + "snippet": { + "text": "// Lua functions\r\n// Creature\r\nbool EventCallback::creatureOnChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnChangeOutfit - Creature {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5ab4e2cd9f89f02c", + "equalIndicator/v1": "bd05ad01dfa4a31cd9aa2b04aafdb5ac1799dcd40acc728c974165263d4342f5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2103, + "startColumn": 52, + "charOffset": 62049, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2101, + "startColumn": 1, + "charOffset": 61993, + "charLength": 127, + "snippet": { + "text": "}\r\n\r\nvoid Player::checkTradeState(std::shared_ptr item) {\r\n\tif (!tradeItem || tradeState == TRADE_TRANSFER) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5e72d5d5f2a21572", + "equalIndicator/v1": "bd10227f54bd7788dd20380a5a062cae69e0011f3a45bf368d1363d9be95f936" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The value returned by this function should not be disregarded; neglecting it may lead to errors", + "markdown": "The value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 89, + "startColumn": 3, + "charOffset": 2783, + "charLength": 6, + "snippet": { + "text": "socket" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 87, + "startColumn": 1, + "charOffset": 2774, + "charLength": 182, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tsocket.close(error);\r\n\t\tif (error && error != asio::error::not_connected) {\r\n\t\t\tg_logger().error(\"[Connection::closeSocket] - Failed to close socket: {}\", error.message());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c77558111e0ee32b", + "equalIndicator/v1": "bd2402ffe0be7d68f18db3cdc8cbde15426b3e57ac83d604fd48e920e8d4ae03" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 700, + "startColumn": 121, + "charOffset": 23006, + "charLength": 18, + "snippet": { + "text": "spellGroupCooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 698, + "startColumn": 1, + "charOffset": 22848, + "charLength": 253, + "snippet": { + "text": "\t\t}\r\n\t\tif (spellGroupCooldown > 0) {\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellGroupCooldown / rateCooldown, 0, false, group);\r\n\t\t\tplayer->addCondition(condition);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db98d9708b78c328", + "equalIndicator/v1": "bd2eaed58218b7e08f8ccc41aef31b8112a4dcdabb1d21d880a1e649a4263a2f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1291, + "startColumn": 88, + "charOffset": 51888, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1289, + "startColumn": 1, + "charOffset": 51695, + "charLength": 212, + "snippet": { + "text": "\t\t// Registering missile effects\r\n\t\tfor (uint32_t it = 0; it < m_appearancesPtr->missile_size(); it++) {\r\n\t\t\tregisteredDistanceEffects.push_back(static_cast(m_appearancesPtr->missile(it).id()));\r\n\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f98a92ea6016ba04", + "equalIndicator/v1": "bd3fd899fcecf49096758d7d4118c393b589081b4d15f7b29b4b3ae426217c4d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 226, + "startColumn": 10, + "charOffset": 6511, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 224, + "startColumn": 1, + "charOffset": 6403, + "charLength": 163, + "snippet": { + "text": "\tif (it == listNames.end()) {\r\n\t\tg_logger().error(\"Column '{}' does not exist in result set\", s);\r\n\t\treturn std::string();\r\n\t}\r\n\tif (row[it->second] == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d72cc4df4e599270", + "equalIndicator/v1": "bd8bba250da04dbe1217a548f3294ee39f7805f0c2416cdafb58f6aa4fa62c92" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 855, + "startColumn": 33, + "charOffset": 27854, + "charLength": 9, + "snippet": { + "text": "getCorpse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 853, + "startColumn": 1, + "charOffset": 27817, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Creature::getCorpse(std::shared_ptr, std::shared_ptr) {\r\n\tif (getLookCorpse() != 0) {\r\n\t\treturn Item::CreateItem(getLookCorpse());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6fe35fd8940d204f", + "equalIndicator/v1": "bd8f7371a766c282242bdf9e83e3f7ac78e1c56d85d367220440faf8e7234472" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/global_event_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 140, + "startColumn": 3, + "charOffset": 4466, + "charLength": 6, + "snippet": { + "text": "time_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 138, + "startColumn": 1, + "charOffset": 4435, + "charLength": 208, + "snippet": { + "text": "\t\ttimeinfo->tm_sec = sec;\r\n\r\n\t\ttime_t difference = static_cast(difftime(mktime(timeinfo), current_time));\r\n\t\t// If the difference is negative, add 86400 seconds (1 day) to it\r\n\t\tif (difference < 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5630eb6fbdb25cc9", + "equalIndicator/v1": "bd9c8e61930f9d69bea21d6dedaeb3dbb237e37acb7cf6ed715f12ccc108bab1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 134, + "startColumn": 78, + "charOffset": 3643, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 132, + "startColumn": 1, + "charOffset": 3561, + "charLength": 244, + "snippet": { + "text": "}\r\n\r\nbool Weapon::useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const {\r\n\tint32_t damageModifier = playerWeaponCheck(player, target, item->getShootRange());\r\n\tif (damageModifier == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62072f087909cec2", + "equalIndicator/v1": "bdaee783d294ef6f0ec6f4c97b0a1b1ebb6d633bff62a5a35a14658aa8f6924e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 299, + "startColumn": 28, + "charOffset": 9775, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 297, + "startColumn": 1, + "charOffset": 9741, + "charLength": 137, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\t\tenv->setScriptId(mType->info.creatureSayEvent, scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "041ad22d877d2823", + "equalIndicator/v1": "bdd22e94df0116b96b03ea5519eefcf2f77cfa8a4a177e7e2777f1a3bb8063c0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 141, + "startColumn": 26, + "charOffset": 3847, + "charLength": 4, + "snippet": { + "text": "guid" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 139, + "startColumn": 1, + "charOffset": 3771, + "charLength": 126, + "snippet": { + "text": "\r\n\t\tuint32_t guid = getNumber(L, 2, 0);\r\n\t\thouse->setNewOwnerGuid(guid, false);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7483ec093dc30cfa", + "equalIndicator/v1": "bdd5821fa610d704c83b53d927b7e5f8eb2104b542d1978d953c1b4567defa80" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 27, + "charOffset": 2130, + "charLength": 4, + "snippet": { + "text": "from" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2067, + "charLength": 83, + "snippet": { + "text": "\r\n\tPositionIterator begin() const {\r\n\t\treturn PositionIterator(from, *this);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef52dd19a3c31415", + "equalIndicator/v1": "bdebbd97fdfcba7dcde7bb1afd81d49ef6cd65b80766cc9e668be27467566f45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3534, + "startColumn": 13, + "charOffset": 106881, + "charLength": 1, + "snippet": { + "text": "n" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3532, + "startColumn": 1, + "charOffset": 106740, + "charLength": 196, + "snippet": { + "text": "\r\n\t\t\tif (n < tmpContainer->capacity() && tmpContainer->queryAdd(n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\r\n\t\t\t\tindex = n;\r\n\t\t\t\t*destItem = nullptr;\r\n\t\t\t\treturn tmpContainer;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d91d3c9dfd13ce78", + "equalIndicator/v1": "be14f40f934ceac4c0bb2ce01a2b8663cfea7a7af4b88f44b39aa77a1381a518" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'name' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'name' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2799, + "startColumn": 49, + "charOffset": 98337, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2797, + "startColumn": 1, + "charOffset": 98284, + "charLength": 170, + "snippet": { + "text": "}\r\n\r\nuint8_t PlayerWheel::getStage(const std::string name) const {\r\n\tif (name == \"Battle Instinct\") {\r\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_INSTINCT);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6dedc4d4558de18", + "equalIndicator/v1": "be30e6bdc128a471bc4b969b10bb64db18f3db3a88bc4929729037a9badfe83d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 588, + "startColumn": 13, + "charOffset": 28253, + "charLength": 34, + "snippet": { + "text": "stringValue == \"absorbpercentholy\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 586, + "startColumn": 1, + "charOffset": 28065, + "charLength": 405, + "snippet": { + "text": "\t} else if (stringValue == \"absorbpercentice\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentholy\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentdeath\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fae2faa002b1fb49", + "equalIndicator/v1": "be4c36d804a5b22a38d34c26caf743b36a361575dde6851a60349de4dfb76067" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'updateCreatureSkull' can be made const", + "markdown": "Method 'updateCreatureSkull' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8042, + "startColumn": 12, + "charOffset": 279964, + "charLength": 19, + "snippet": { + "text": "updateCreatureSkull" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8040, + "startColumn": 1, + "charOffset": 279948, + "charLength": 127, + "snippet": { + "text": "}\r\n\r\nvoid Game::updateCreatureSkull(std::shared_ptr creature) {\r\n\tif (getWorldType() != WORLD_TYPE_PVP) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ae812b726ee28e1c", + "equalIndicator/v1": "be4f45a527090727b34dc9be0988fbabbb31b1d85f24eb781fb66a264d188447" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 460, + "startColumn": 50, + "charOffset": 27419, + "charLength": 10, + "snippet": { + "text": "m_monsters" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 458, + "startColumn": 1, + "charOffset": 27338, + "charLength": 115, + "snippet": { + "text": "\r\n\t\tif (!m_monsters.empty()) {\r\n\t\t\tselectedMonster = m_monsters[normal_random(0, m_monsters.size() - 1)];\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "df13332ff1a99aae", + "equalIndicator/v1": "be539084d4fb6b78e2d54739d7946368f400a9deb290c1cdc886a85e53cbc1e9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 164, + "startColumn": 7, + "charOffset": 5444, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 162, + "startColumn": 1, + "charOffset": 5389, + "charLength": 359, + "snippet": { + "text": "\tItemVector getItems(bool recursive = false);\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "01d0e5771c0c8bc1", + "equalIndicator/v1": "be5a3574a33c9ba392b4cff5e8a12b496410af17d8c0dddc4a02f73491e808d9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 461, + "startColumn": 56, + "charOffset": 13722, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 459, + "startColumn": 1, + "charOffset": 13662, + "charLength": 202, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::AddItemField(std::shared_ptr item, std::shared_ptr, const Position &) {\r\n\tif (item == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::AddItemField] - Item is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c991ee0bf0842f7", + "equalIndicator/v1": "be69cd1186857d0ac7f1881855d3add9291da4c37b993e992e7c37c55d701bc0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10489, + "startColumn": 70, + "charOffset": 364092, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10487, + "startColumn": 1, + "charOffset": 364018, + "charLength": 289, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::beforeCreatureZoneChange(std::shared_ptr creature, const std::unordered_set> &fromZones, const std::unordered_set> &toZones, bool force /* = false*/) const {\r\n\tif (!creature) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2e1737f50efd8f79", + "equalIndicator/v1": "be6d3e46264f219efefe50349248698778b6e580679b96f601440a8655b826aa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4635, + "startColumn": 26, + "charOffset": 138397, + "charLength": 5, + "snippet": { + "text": "delay" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4633, + "startColumn": 1, + "charOffset": 138299, + "charLength": 247, + "snippet": { + "text": "\t\tif (!canDoAction()) {\r\n\t\t\tconst uint32_t delay = getNextActionTime();\r\n\t\t\tconst int32_t ticks = delay - (delay % EVENT_CREATURE_THINK_INTERVAL);\r\n\t\t\tif (ticks < 0 || condition->getType() == CONDITION_PARALYZE) {\r\n\t\t\t\tremoveCondition(condition);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f881ee6792f10113", + "equalIndicator/v1": "be737705062d9a4a4a2b1bfdbdcac6848376c0a70d71a57391013769c5db71fa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 58, + "startColumn": 55, + "charOffset": 1759, + "charLength": 34, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 56, + "startColumn": 1, + "charOffset": 1609, + "charLength": 507, + "snippet": { + "text": "\r\n\tstd::shared_ptr getBestiaryCharm(charmRune_t activeCharm, bool force = false) const;\r\n\tvoid addBestiaryKill(std::shared_ptr player, const std::shared_ptr mtype, uint32_t amount = 1);\r\n\tbool parseCharmCombat(const std::shared_ptr charm, std::shared_ptr player, std::shared_ptr target, int32_t realDamage, bool dueToPotion = false, bool checkArmor = false);\r\n\tvoid addCharmPoints(std::shared_ptr player, uint16_t amount, bool negative = false);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f222bc876d6afbed", + "equalIndicator/v1": "be8242a6c8fb466aa913b2ab8c2d1d1624d7d085f38ef8ebb7ff16b64eb3e0b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 653, + "startColumn": 16, + "charOffset": 17972, + "charLength": 3, + "snippet": { + "text": "sep" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 651, + "startColumn": 1, + "charOffset": 17931, + "charLength": 109, + "snippet": { + "text": "\t\t\treturn 2;\r\n\t\t} else {\r\n\t\t\tstd::string sep = \"\";\r\n\t\t\tif (lua_gettop(L) == 3) {\r\n\t\t\t\tsep = getString(L, 3);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "80e0896426a41b26", + "equalIndicator/v1": "be90da537749777144ffe8fc4033ece6dcfe6c32436f563cce78ec262b67d067" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 616, + "startColumn": 101, + "charOffset": 18759, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 614, + "startColumn": 1, + "charOffset": 18654, + "charLength": 257, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::DeEquipItem(const std::shared_ptr MoveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9e9a87486651f830", + "equalIndicator/v1": "be965cc8f3f7eb048a00be69fb768d30c557b6623c77e1bca36df1126349f68f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 307, + "startColumn": 27, + "charOffset": 9967, + "charLength": 5, + "snippet": { + "text": "depot" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 305, + "startColumn": 1, + "charOffset": 9845, + "charLength": 187, + "snippet": { + "text": "\t\t\tmyDepotLocker->setParent(depot->getParent()->getTile());\r\n\t\t\topenContainer = myDepotLocker;\r\n\t\t\tplayer->setLastDepotId(depot->getDepotId());\r\n\t\t} else {\r\n\t\t\topenContainer = container;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2680360d0fc8ee1f", + "equalIndicator/v1": "beb9fbf6e757f4ca09f991076af94938a2e3ef1e5dd8018e6678a13bec5ad424" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1705, + "startColumn": 22, + "charOffset": 48722, + "charLength": 7, + "snippet": { + "text": "toupper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1703, + "startColumn": 1, + "charOffset": 48547, + "charLength": 278, + "snippet": { + "text": "\t\t\t\t\tss << std::showpos << it.abilities->specializedMagicLevel[i] << std::noshowpos;\r\n\t\t\t\t\tstd::string combatName = getCombatName(indexToCombatType(i));\r\n\t\t\t\t\tcombatName[0] = toupper(combatName[0]);\r\n\t\t\t\t\tdescriptions.emplace_back(combatName + \" Magic Level\", ss.str());\r\n\t\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d8be761dec40a07", + "equalIndicator/v1": "bec39f7346b9b2114647397062955ee0b63fe841959ac54ab48d48dce58ce49d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly", + "markdown": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2384, + "startColumn": 59, + "charOffset": 90754, + "charLength": 12, + "snippet": { + "text": "__FUNCTION__" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2382, + "startColumn": 1, + "charOffset": 90472, + "charLength": 327, + "snippet": { + "text": "\t\tif (internalAddItem(toCylinder, autoContainer, CONST_SLOT_WHEREEVER, flags) != RETURNVALUE_NOERROR) {\r\n\t\t\tif (internalAddItem(toCylinder->getTile(), autoContainer, INDEX_WHEREEVER, FLAG_NOLIMIT) != RETURNVALUE_NOERROR) {\r\n\t\t\t\tg_logger().error(\"[{}] Failed to add auto container\", __FUNCTION__);\r\n\t\t\t\treturn toCylinder;\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5a95fab3a2a33932", + "equalIndicator/v1": "bef118456a8305364ae47f51b83895ee2a4fe718ebecce4ef81fdd41f3a018bc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 570, + "startColumn": 24, + "charOffset": 17134, + "charLength": 7, + "snippet": { + "text": "getTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 568, + "startColumn": 1, + "charOffset": 17105, + "charLength": 85, + "snippet": { + "text": "\t}\r\n\r\n\tstd::shared_ptr getTile() override final {\r\n\t\treturn m_tile.lock();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cbf84c411f56a50a", + "equalIndicator/v1": "bf00b83e7cb370ebe54aac4cc5d83337466404dbee0fc5ae0c08d23d229c8e29" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 137, + "startColumn": 10, + "charOffset": 3646, + "charLength": 17, + "snippet": { + "text": "getReflectPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 135, + "startColumn": 1, + "charOffset": 3631, + "charLength": 167, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t getReflectPercent(CombatType_t combatType, bool useCharges = false) const override;\r\n\tuint32_t getHealingCombatValue(CombatType_t healingType) const;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "026b5c7157d91110", + "equalIndicator/v1": "bf16ae4106bc87d856e2566af0a6b63fc0ce1590a642db11717ec2051ffd5d1c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1286, + "startColumn": 84, + "charOffset": 51675, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1284, + "startColumn": 1, + "charOffset": 51486, + "charLength": 208, + "snippet": { + "text": "\t\t// Registering distance effects\r\n\t\tfor (uint32_t it = 0; it < m_appearancesPtr->effect_size(); it++) {\r\n\t\t\tregisteredMagicEffects.push_back(static_cast(m_appearancesPtr->effect(it).id()));\r\n\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c38b79d11c5a02e", + "equalIndicator/v1": "bf29059df928b88b12cd67b858bd5dc001d68078c0be818fbe8579230d8c0427" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1167, + "startColumn": 67, + "charOffset": 44372, + "charLength": 4, + "snippet": { + "text": "zone" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1165, + "startColumn": 1, + "charOffset": 44301, + "charLength": 237, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::zoneBeforeCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureLeave - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1d779dea83573cc3", + "equalIndicator/v1": "bf5b629864ee6abe35d03635de658b3ed200645750bc8a54323485691a96863c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 522, + "startColumn": 93, + "charOffset": 19754, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 520, + "startColumn": 1, + "charOffset": 19657, + "charLength": 373, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnItemMoved - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62195ff1d3227024", + "equalIndicator/v1": "bf7d31c2b62f6772fe916bcf88e44c6e6b59f8e7e35df36e7b822e8bb6567fb5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 115, + "startColumn": 61, + "charOffset": 6877, + "charLength": 14, + "snippet": { + "text": "const uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 113, + "startColumn": 1, + "charOffset": 6658, + "charLength": 576, + "snippet": { + "text": "\tvoid playerOnRequestQuestLog(std::shared_ptr player) const;\r\n\tvoid playerOnRequestQuestLine(std::shared_ptr player, uint16_t questId) const;\r\n\tvoid playerOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime) const;\r\n\tvoid playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const;\r\n\tvoid playerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a3c0f3466064dab3", + "equalIndicator/v1": "bf7f465f0fec0a0ee331b0108de5229ec94c7d8ed6cf129343cc3d85eee347c9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 340, + "startColumn": 55, + "charOffset": 8872, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 338, + "startColumn": 1, + "charOffset": 8729, + "charLength": 186, + "snippet": { + "text": "\r\nstd::shared_ptr Tile::getTopVisibleThing(std::shared_ptr creature) {\r\n\tstd::shared_ptr thing = getTopVisibleCreature(creature);\r\n\tif (thing) {\r\n\t\treturn thing;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bccbb90beb83bace", + "equalIndicator/v1": "bfaf411758a9773bc74e96ec056f666a8bd3ae6cc136362ce744861b1dd357c1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 163, + "startColumn": 27, + "charOffset": 4980, + "charLength": 10, + "snippet": { + "text": "realDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 161, + "startColumn": 1, + "charOffset": 4862, + "charLength": 181, + "snippet": { + "text": "\t// Setting damage to combat\r\n\tcombat.primary.value = realDamage * weaponAttackProportion;\r\n\tcombat.secondary.value = realDamage * (1 - weaponAttackProportion);\r\n\treturn combat;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aaf73d6cdb65019f", + "equalIndicator/v1": "bfbd8a26a049b162cb0e3e1b0b4ad79e52b0cccfc9c8f070d85b32d390e5f225" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 689, + "startColumn": 70, + "charOffset": 26840, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 687, + "startColumn": 1, + "charOffset": 26766, + "charLength": 185, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerForgeHistory(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b08abd3f5db35360", + "equalIndicator/v1": "c010f37984b8fe5dc15ddaa68f0108973d96354297ce2c8337191e0560594a64" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1777, + "startColumn": 2, + "charOffset": 53547, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1775, + "startColumn": 1, + "charOffset": 53455, + "charLength": 232, + "snippet": { + "text": "void ProtocolGame::parseLookAt(NetworkMessage &msg) {\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tg_game().playerLookAt(player->getID(), itemId, pos, stackpos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0963cb2aca137149", + "equalIndicator/v1": "c020e7c57be903917ebf8870e39b246d70b9feffd5290521ec3dac7cf134968e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1369, + "startColumn": 2, + "charOffset": 40897, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1367, + "startColumn": 1, + "charOffset": 40890, + "charLength": 189, + "snippet": { + "text": "\t}\r\n\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t tier = msg.get();\r\n\tg_game().playerEquipItem(player->getID(), itemId, Item::items[itemId].upgradeClassification > 0, tier);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "73aab12543c7917f", + "equalIndicator/v1": "c024ef514e26cb328a6e028c284c4f97b09e540199c0d469310ab3688b08d654" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Kty', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Kty', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/hash.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4, + "startColumn": 18, + "charOffset": 53, + "charLength": 4, + "snippet": { + "text": "_Kty" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2, + "startColumn": 1, + "charOffset": 14, + "charLength": 81, + "snippet": { + "text": "\r\nnamespace stdext {\r\n\ttemplate \r\n\tusing hash = phmap::Hash<_Kty>;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3af3641d28bc93b3", + "equalIndicator/v1": "c02aaf6f19c59d865729f3741ee48bcfb0dd49998be40d5c13a281d5baa1c8c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 37, + "startColumn": 18, + "charOffset": 1136, + "charLength": 12, + "snippet": { + "text": "ValueWrapper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 35, + "startColumn": 1, + "charOffset": 987, + "charLength": 348, + "snippet": { + "text": "\texplicit ValueWrapper(uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const ValueVariant &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const std::string &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(bool value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(int value, uint64_t timestamp = 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "02f3f1918bd1d065", + "equalIndicator/v1": "c039cf6b84fc24e1a495f08b4b4acd78da21c5623da739e9369082ae716afc73" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1385, + "startColumn": 87, + "charOffset": 40297, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1383, + "startColumn": 1, + "charOffset": 40206, + "charLength": 138, + "snippet": { + "text": "}\r\n\r\nint32_t Tile::getStackposOfItem(std::shared_ptr player, std::shared_ptr item) const {\r\n\tint32_t n = 0;\r\n\tif (ground) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f5963609377c9a87", + "equalIndicator/v1": "c04ac5335438ad5ac53bb60420b72b2bd8513a9842cfe2b38192a105d841d945" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Where', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Where', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorset.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 72, + "startColumn": 56, + "charOffset": 1900, + "charLength": 6, + "snippet": { + "text": "_Where" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 70, + "startColumn": 1, + "charOffset": 1838, + "charLength": 159, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, T &&_Val) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, std::move(_Val));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bebc90960f5c4810", + "equalIndicator/v1": "c07ca9a6b5b37ac0bb1b30552973635a689c3b98521be5ac88e51152cb20ec60" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 14, + "charOffset": 1339, + "charLength": 7, + "snippet": { + "text": "npcType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1200, + "charLength": 255, + "snippet": { + "text": "\tfloat multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__);\r\n\thealth = npcType->info.health * multiplier;\r\n\thealthMax = npcType->info.healthMax * multiplier;\r\n\tbaseSpeed = npcType->info.baseSpeed;\r\n\tinternalLight = npcType->info.light;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8cbf6660ee1c096e", + "equalIndicator/v1": "c089a5e683d9628194b2138d1a78164b2ed26b6d75c9ff1f1945fdfaabe6ce53" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 527, + "startColumn": 2, + "charOffset": 14800, + "charLength": 26, + "snippet": { + "text": "// Game.getBestiaryCharm()" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 525, + "startColumn": 1, + "charOffset": 14737, + "charLength": 177, + "snippet": { + "text": "\r\nint GameFunctions::luaGameGetBestiaryCharm(lua_State* L) {\r\n\t// Game.getBestiaryCharm()\r\n\tconst auto c_list = g_game().getCharmList();\r\n\tlua_createtable(L, c_list.size(), 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "69f7f1220986ce8e", + "equalIndicator/v1": "c09ca4086976e13a31204e6fd87d707a93e833fd32b603193bfd33f2fad4d2b9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 84, + "startColumn": 7, + "charOffset": 2790, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 82, + "startColumn": 1, + "charOffset": 2605, + "charLength": 397, + "snippet": { + "text": "bool TalkAction::executeSay(std::shared_ptr player, const std::string &words, const std::string ¶m, SpeakClasses type) const {\r\n\t// onSay(player, words, param, type)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[TalkAction::executeSay - Player {} words {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested. Script name {}\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62085dd929bd2a96", + "equalIndicator/v1": "c09ef862b48497c212c8144acca12f272285f5583931bd91253d92bc46388e50" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 278, + "startColumn": 58, + "charOffset": 7723, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 276, + "startColumn": 1, + "charOffset": 7661, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nvoid BedItem::internalSetSleeper(std::shared_ptr player) {\r\n\tstd::string desc_str = player->getName() + \" is sleeping there.\";\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8131ecb0f1d40ad9", + "equalIndicator/v1": "c0b025a37399902d8b7fed395b53a01e9a78a5c0782bccc6e20ce562c81a6e31" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 34, + "startColumn": 21, + "charOffset": 1057, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 941, + "charLength": 166, + "snippet": { + "text": "\tstd::shared_ptr container = getUserdataShared(L, 1);\r\n\tif (container) {\r\n\t\tlua_pushnumber(L, container->size());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1baf3f104f4ccf05", + "equalIndicator/v1": "c0ce619dc1d13e78da05a8d030ea65f7164b8fc954e3a86e6b829befdd3ccb28" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6874, + "startColumn": 15, + "charOffset": 215315, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6872, + "startColumn": 1, + "charOffset": 215254, + "charLength": 99, + "snippet": { + "text": "\tmsg.addByte(cid);\r\n\tmsg.add(slot);\r\n\tAddItem(msg, item);\r\n\twriteToOutputBuffer(msg);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "da1cece9b4882d55", + "equalIndicator/v1": "c10668394c9adc5f7a39537c505acc6cc5e3604ee1b870c58aee90a2079dab69" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4734, + "startColumn": 50, + "charOffset": 149248, + "charLength": 3, + "snippet": { + "text": "npc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4732, + "startColumn": 1, + "charOffset": 149194, + "charLength": 107, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendShop(std::shared_ptr npc) {\r\n\tBenchmark brenchmark;\r\n\tNetworkMessage msg;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "071f0576baac9a5d", + "equalIndicator/v1": "c114037d2653b12ddedbbad5749ac8898317780747c45bfae3506133098b6c9f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 11, + "charOffset": 1290, + "charLength": 7, + "snippet": { + "text": "npcType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1160, + "charLength": 256, + "snippet": { + "text": "\tcurrentOutfit = npcType->info.outfit;\r\n\tfloat multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__);\r\n\thealth = npcType->info.health * multiplier;\r\n\thealthMax = npcType->info.healthMax * multiplier;\r\n\tbaseSpeed = npcType->info.baseSpeed;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "04a577fa6a03204a", + "equalIndicator/v1": "c1141ea43445804bfc4b8955f151eb147dddd5b1d46214f329c102c3970c7b98" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 126, + "startColumn": 46, + "charOffset": 3308, + "charLength": 6, + "snippet": { + "text": "amount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 124, + "startColumn": 1, + "charOffset": 3230, + "charLength": 177, + "snippet": { + "text": "\r\n\tif (bankable->getPlayer()) {\r\n\t\tg_metrics().addCounter(\"balance_decrease\", amount, { { \"player\", bankable->getPlayer()->getName() }, { \"context\", \"bank_transfer\" } });\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9412f3c28392d277", + "equalIndicator/v1": "c12c88c5b0caef11b8d302a0723ea9ad7a339fe244555ecb57620410a4d97357" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 76, + "startColumn": 28, + "charOffset": 2356, + "charLength": 11, + "snippet": { + "text": "getCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 74, + "startColumn": 1, + "charOffset": 2277, + "charLength": 154, + "snippet": { + "text": "\tCreature &operator=(const Creature &) = delete;\r\n\r\n\tstd::shared_ptr getCreature() override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "47ab6d62b9ba94b4", + "equalIndicator/v1": "c13b3547ea03278ae82819e7e99bc1d66ef0d4dc84a8f0810cef7bb07e468514" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2063, + "startColumn": 57, + "charOffset": 60994, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2061, + "startColumn": 1, + "charOffset": 60933, + "charLength": 116, + "snippet": { + "text": "}\r\n\r\nvoid Player::onSendContainer(std::shared_ptr container) {\r\n\tif (!client || !container) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2fbd2b6c5d09cac8", + "equalIndicator/v1": "c154ef108933580003acc4bda100deef709db91262d86977722df7842c59b3aa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3300, + "startColumn": 65, + "charOffset": 100805, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3298, + "startColumn": 1, + "charOffset": 100736, + "charLength": 119, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureShield(std::shared_ptr creature) {\r\n\tif (!canSee(creature)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bdbc6af35ea53b19", + "equalIndicator/v1": "c1657cc6d68743b28bfa8ab1bd2c044a0d637232f49a39c63481c9fc3d33219c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'speaker' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'speaker' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1154, + "startColumn": 31, + "charOffset": 33969, + "charLength": 7, + "snippet": { + "text": "speaker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1152, + "startColumn": 1, + "charOffset": 33817, + "charLength": 183, + "snippet": { + "text": "\tvoid sendPrivateMessage(std::shared_ptr speaker, SpeakClasses type, const std::string &text) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPrivateMessage(speaker, type, text);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eda073cf7a7f3ddf", + "equalIndicator/v1": "c17ed58fe2d32e27685a8ad0372801af1711f22b23f879267ab268726c1152dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 660, + "startColumn": 72, + "charOffset": 20134, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 658, + "startColumn": 1, + "charOffset": 19967, + "charLength": 280, + "snippet": { + "text": "\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\r\n\t\t\tif (it.abilities->statsPercent[s]) {\r\n\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "437d1c44cf32c8d2", + "equalIndicator/v1": "c1cb3458da8e491f37e8c5baab2375c643ae8df474c874fdeeffe62fc7c51b98" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 159, + "startColumn": 7, + "charOffset": 5975, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 157, + "startColumn": 1, + "charOffset": 5963, + "charLength": 112, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"{} - \"\r\n\t\t \"Position {}\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a4004dbbd452b4c0", + "equalIndicator/v1": "c1db9c28bc65f861f0cea13ec4df719920968b9b18ac9e2d1266c133238b42c1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5183, + "startColumn": 53, + "charOffset": 152962, + "charLength": 8, + "snippet": { + "text": "attacked" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5181, + "startColumn": 1, + "charOffset": 152905, + "charLength": 126, + "snippet": { + "text": "}\r\n\r\nvoid Player::removeAttacked(std::shared_ptr attacked) {\r\n\tif (!attacked || attacked == getPlayer()) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1f3808705648fd71", + "equalIndicator/v1": "c1e10c74acc8771804f74f6135999553d6201490c4611ac551286d1864bd550a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 86, + "startColumn": 30, + "charOffset": 2632, + "charLength": 3, + "snippet": { + "text": "get" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 84, + "startColumn": 1, + "charOffset": 2529, + "charLength": 193, + "snippet": { + "text": "\tvoid set(const std::string &key, const ValueWrapper &value) override;\r\n\r\n\tstd::optional get(const std::string &key, bool forceLoad = false) override;\r\n\r\n\tvoid flush() override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "03969a1f6b525eb0", + "equalIndicator/v1": "c24b89b3fb884c75fb09af0ffe82c94b83f61cc54a1804ab9de5e762949086df" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1793, + "startColumn": 2, + "charOffset": 54005, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1791, + "startColumn": 1, + "charOffset": 53966, + "charLength": 153, + "snippet": { + "text": "\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tbool lootAllCorpses = msg.getByte();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f9ff848363e88fba", + "equalIndicator/v1": "c29aac759a32ef6e82d1c9835a70bc18b24b40bba8b76ec33b58bd33f4bd2ebb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 147, + "startColumn": 7, + "charOffset": 4559, + "charLength": 8, + "snippet": { + "text": "addThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 145, + "startColumn": 1, + "charOffset": 4489, + "charLength": 190, + "snippet": { + "text": "\r\n\tvoid addThing(std::shared_ptr thing) override final;\r\n\tvoid addThing(int32_t index, std::shared_ptr thing) override final;\r\n\tvoid addItemBack(std::shared_ptr item);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0d008b07ce96b602", + "equalIndicator/v1": "c29b0b3c5eb15097ec7de3f90e0e5d0a7975cba65c6f881082ef0b7072346100" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1407, + "startColumn": 31, + "charOffset": 42338, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1405, + "startColumn": 1, + "charOffset": 42225, + "charLength": 131, + "snippet": { + "text": "\tvoid sendPlayerVocation(std::shared_ptr player) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPlayerVocation(player);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b2e4a415531f5dc9", + "equalIndicator/v1": "c29cb9efb0272ef95b58ff8361003ad39e467e83e2cf01e0e928a5fb4b85429a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/metrics/metrics.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 188, + "startColumn": 2, + "charOffset": 6930, + "charLength": 20, + "snippet": { + "text": "DEFINE_LATENCY_CLASS" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 186, + "startColumn": 1, + "charOffset": 6875, + "charLength": 203, + "snippet": { + "text": "\r\n\tDEFINE_LATENCY_CLASS(method, \"method\", \"method\");\r\n\tDEFINE_LATENCY_CLASS(lua, \"lua\", \"scope\");\r\n\tDEFINE_LATENCY_CLASS(query, \"query\", \"truncated_query\");\r\n\tDEFINE_LATENCY_CLASS(task, \"task\", \"task\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9fe21a55d5ea3fd2", + "equalIndicator/v1": "c2a01748caa609b8947c249b238fa2762b7cfdeded904abcbe996b982763fb6d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 522, + "startColumn": 63, + "charOffset": 19724, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 520, + "startColumn": 1, + "charOffset": 19657, + "charLength": 373, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnItemMoved - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "95d86829b916ff45", + "equalIndicator/v1": "c2c37d727d7d2b62a7068cd07f1bf3743d38d27ace304484abaf5b4a816a3c86" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 741, + "startColumn": 81, + "charOffset": 23387, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 739, + "startColumn": 1, + "charOffset": 23302, + "charLength": 139, + "snippet": { + "text": "}\r\n\r\nvoid Party::addPlayerLoot(std::shared_ptr player, std::shared_ptr item) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f7b5746f14c38fc1", + "equalIndicator/v1": "c3066f8d65a99d3fc71d5c618f6bb511e55d7631a69e0dfe8ae163139374fc0a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 554, + "startColumn": 14, + "charOffset": 15857, + "charLength": 8, + "snippet": { + "text": "tileItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 552, + "startColumn": 1, + "charOffset": 15836, + "charLength": 176, + "snippet": { + "text": "\t\t\t}\r\n\r\n\t\t\tfor (auto tileItem : *tile->getItemList()) {\r\n\t\t\t\tif (tileItem && tileItem->getID() == item->getID()) {\r\n\t\t\t\t\ttile->removeThing(tileItem, tileItem->getItemCount());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "242c823482c0a50b", + "equalIndicator/v1": "c31b02b15d7a074d70561fc1744aa2b8a6b814f7a07131d0d1cbba27e3c7782f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 585, + "startColumn": 103, + "charOffset": 28039, + "charLength": 14, + "snippet": { + "text": "valueAttribute" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 583, + "startColumn": 1, + "charOffset": 27718, + "charLength": 522, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentpoison\" || stringValue == \"absorbpercentearth\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentice\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += pugi::cast(valueAttribute.value());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b0b7bd718cd354e9", + "equalIndicator/v1": "c34a061f00d1d8fdd116e00a22f97c6a95b38f7fe03fcf318ffc9fa708c3e2b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 373, + "startColumn": 4, + "charOffset": 12367, + "charLength": 88, + "snippet": { + "text": "case COMBAT_DEATHDAMAGE:\r\n\t\t\t\tdefaultMap[6] -= static_cast(elementEntry.second)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 371, + "startColumn": 1, + "charOffset": 12287, + "charLength": 207, + "snippet": { + "text": "\t\t\t\tdefaultMap[5] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_DEATHDAMAGE:\r\n\t\t\t\tdefaultMap[6] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_HEALING:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5734cc58448cf5f8", + "equalIndicator/v1": "c3656cff8ff21d88f120404e6fb5536c04fa4e3bbd69e35605176af95ab3daf3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 154, + "startColumn": 6, + "charOffset": 5077, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 152, + "startColumn": 1, + "charOffset": 5047, + "charLength": 114, + "snippet": { + "text": "\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tuint16_t sourceId = pugi::cast(attr.value());\r\n\r\n\t\t\t\t\tuint16_t count = 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9fbd7962898970f3", + "equalIndicator/v1": "c36fb7b781603139df6bffc2f9948864102000a496adaf965a34293acb79b54e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1315, + "startColumn": 7, + "charOffset": 46637, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1313, + "startColumn": 1, + "charOffset": 46625, + "charLength": 149, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventMonsterOnDropLoot - \"\r\n\t\t \"Monster corpse {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d5df04e310733545", + "equalIndicator/v1": "c38da5b6799100f1308d72b43951dae871cfd9559be7d6a520db079b6f03f28f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5517, + "startColumn": 57, + "charOffset": 194247, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5515, + "startColumn": 1, + "charOffset": 194186, + "charLength": 212, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerLootAllCorpses(std::shared_ptr player, const Position &pos, bool lootAllCorpses) {\r\n\tif (lootAllCorpses) {\r\n\t\tstd::shared_ptr tile = g_game().map.getTile(pos.x, pos.y, pos.z);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71a466e3f759c985", + "equalIndicator/v1": "c39b169925ec84a1990b5dbf87bc001f615f1e6fed383a4e426d6f879c824395" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6309, + "startColumn": 51, + "charOffset": 184848, + "charLength": 8, + "snippet": { + "text": "vocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6307, + "startColumn": 1, + "charOffset": 184679, + "charLength": 369, + "snippet": { + "text": "\tstd::shared_ptr condition = getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT);\r\n\tif (condition) {\r\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, vocation->getHealthGainAmount());\r\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef5d5617a169e6ef", + "equalIndicator/v1": "c3b910edc023bc86e0cd73239bd64bde13ba78ecd84438cddd267eb2da892cdf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 782, + "startColumn": 27, + "charOffset": 28288, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 780, + "startColumn": 1, + "charOffset": 28256, + "charLength": 128, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnItemMoved, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5584d755862c201e", + "equalIndicator/v1": "c3cd3b597d954be51092a366504bae11dc26a5261755aa7fa4bffa3b9b9d8c54" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'lastItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'lastItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6878, + "startColumn": 94, + "charOffset": 215449, + "charLength": 8, + "snippet": { + "text": "lastItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6876, + "startColumn": 1, + "charOffset": 215351, + "charLength": 153, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendRemoveContainerItem(uint8_t cid, uint16_t slot, std::shared_ptr lastItem) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0x72);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "39aa4814cf76582b", + "equalIndicator/v1": "c40b43c7012ede4df3a8ef21bbed15149eb59596e1eae2f31131622ed7394db1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1447, + "startColumn": 59, + "charOffset": 44152, + "charLength": 9, + "snippet": { + "text": "condition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1445, + "startColumn": 1, + "charOffset": 44089, + "charLength": 180, + "snippet": { + "text": "}\r\n\r\nvoid Creature::removeCondition(std::shared_ptr condition) {\r\n\tauto it = std::find(conditions.begin(), conditions.end(), condition);\r\n\tif (it == conditions.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5bfc567e765c329c", + "equalIndicator/v1": "c4242648b5d13705d0185276600224350ad66325fdbde21110efbf300f4c16e9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 112, + "startColumn": 30, + "charOffset": 3347, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 110, + "startColumn": 1, + "charOffset": 3170, + "charLength": 364, + "snippet": { + "text": "\tbool registerLuaItemEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaActionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaEvent(const std::shared_ptr event);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b12238c6227a6ce", + "equalIndicator/v1": "c43f79316cffa44c896902425e91ffa824c3bc350e1432bae9ecc08520e7fe4d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 189, + "startColumn": 73, + "charOffset": 6047, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 187, + "startColumn": 1, + "charOffset": 5882, + "charLength": 280, + "snippet": { + "text": "\t\t\t\tif (it.abilities && it.abilities->statsPercent[s] != 0) {\r\n\t\t\t\t\tneedUpdateStats = true;\r\n\t\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\r\n\t\t\t\t}\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d082d9a41bdb6667", + "equalIndicator/v1": "c44ad9f66a938fcbf2b1a0812e9ce767fc97a9594212e28a0cf960ef6b3be72e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 144, + "startColumn": 50, + "charOffset": 4482, + "charLength": 10, + "snippet": { + "text": "const bool" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 142, + "startColumn": 1, + "charOffset": 4285, + "charLength": 309, + "snippet": { + "text": "\tvoid setCustomAttribute(const std::string &key, const std::string &value);\r\n\tvoid setCustomAttribute(const std::string &key, const double value);\r\n\tvoid setCustomAttribute(const std::string &key, const bool value);\r\n\r\n\tvoid addCustomAttribute(const std::string &key, const CustomAttribute &customAttribute);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ffb4d30ab4859b7a", + "equalIndicator/v1": "c45136c2c783d055b31379c46c4ad140bb99e71ff01f9dedb5d2acc3e20fc4c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 408, + "startColumn": 128, + "charOffset": 15364, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 406, + "startColumn": 1, + "charOffset": 15232, + "charLength": 280, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInTrade - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5430fdca4406a6e", + "equalIndicator/v1": "c456eb9ea7effd58e2ad0d36f9763b9782108ff047cd6c4732f49efc9751f000" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 738, + "startColumn": 7, + "charOffset": 26467, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 736, + "startColumn": 1, + "charOffset": 26455, + "charLength": 148, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnMoveItem - \"\r\n\t\t \"Player {} item {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e53967257884b96e", + "equalIndicator/v1": "c47a969c49f50aa7bfd58fbbe718116413a0756af03a4eb2228efb2a57a491ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 62, + "startColumn": 13, + "charOffset": 1776, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 60, + "startColumn": 1, + "charOffset": 1759, + "charLength": 227, + "snippet": { + "text": "}\r\n\r\nvoid Inbox::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr localParent = getParent();\r\n\tif (localParent != nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6a2cf5fd516bafd", + "equalIndicator/v1": "c49b4ab63284acd01a9de1f656841f5829ecd659380d4b2eff93580f2f654189" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3170, + "startColumn": 2, + "charOffset": 97331, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3168, + "startColumn": 1, + "charOffset": 97227, + "charLength": 262, + "snippet": { + "text": "void ProtocolGame::parseSeekInContainer(NetworkMessage &msg) {\r\n\tuint8_t containerId = msg.getByte();\r\n\tuint16_t index = msg.get();\r\n\tauto primaryType = msg.getByte();\r\n\tg_game().playerSeekInContainer(player->getID(), containerId, index, primaryType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82e4c66730c1127f", + "equalIndicator/v1": "c49b4eb797e034063b26f37ab680050a71b14715c503312736b11512faf27c5b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2348, + "startColumn": 23, + "charOffset": 69278, + "charLength": 15, + "snippet": { + "text": "magLevelPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2346, + "startColumn": 1, + "charOffset": 69231, + "charLength": 169, + "snippet": { + "text": "\tmanaSpent += amount;\r\n\r\n\tuint8_t oldPercent = magLevelPercent;\r\n\tif (nextReqMana > currReqMana) {\r\n\t\tmagLevelPercent = Player::getPercentLevel(manaSpent, nextReqMana);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "221e0f48c1c62109", + "equalIndicator/v1": "c4c472b0fc7247c862bee667f17d7240c3755157a796d1688fb5a93de219cd47" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 669, + "startColumn": 25, + "charOffset": 21624, + "charLength": 13, + "snippet": { + "text": "imbuementInfo" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 667, + "startColumn": 1, + "charOffset": 21593, + "charLength": 145, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tfloat damagePercent = imbuementInfo.imbuement->elementDamage / 100.0;\r\n\r\n\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6fd9933bfc57e814", + "equalIndicator/v1": "c4e5c09e93ade4fe25e0e3b3b06ae066e18a0a47d59b98f95b95f899c68a02bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 342, + "startColumn": 7, + "charOffset": 12216, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 340, + "startColumn": 1, + "charOffset": 12204, + "charLength": 151, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventCreatureOnHear - \"\r\n\t\t \"Creature {} speaker {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "df430db853e3405a", + "equalIndicator/v1": "c50a562ce854877de50169c8d9241725633cd5ef8456b94929eb1633b00da053" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 420, + "startColumn": 44, + "charOffset": 14073, + "charLength": 11, + "snippet": { + "text": "totalWeight" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 418, + "startColumn": 1, + "charOffset": 14000, + "charLength": 254, + "snippet": { + "text": "\t\ttotalWeight += weight;\r\n\t}\r\n\tuint32_t randomWeight = uniform_random(0, totalWeight - 1);\r\n\t// order monsters by weight DESC\r\n\tstd::vector, uint32_t>> orderedMonsterTypes(monsterTypes.begin(), monsterTypes.end());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d39539351d51b0a", + "equalIndicator/v1": "c51cb20090ae289c2650bca69bd66eafffaade0e3792effed82bb53d36f4998a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'acc' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'acc' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1076, + "startColumn": 89, + "charOffset": 44817, + "charLength": 3, + "snippet": { + "text": "acc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1074, + "startColumn": 1, + "charOffset": 44724, + "charLength": 243, + "snippet": { + "text": "}\r\n\r\nstd::vector> Game::getPlayersByAccount(std::shared_ptr acc, bool allowOffline /* = false */) {\r\n\tauto [accountPlayers, error] = acc->getAccountPlayers();\r\n\tif (error != enumToValue(AccountErrors_t::Ok)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cbb4e0d0f2fd2890", + "equalIndicator/v1": "c528686be44f51c2cd9faa1f003e684b558fba2901679f3675c276d4d261dedf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 673, + "startColumn": 13, + "charOffset": 20989, + "charLength": 1, + "snippet": { + "text": "n" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 671, + "startColumn": 1, + "charOffset": 20841, + "charLength": 185, + "snippet": { + "text": "\t\t\tif (listItem != item && listItem->equals(item) && listItem->getItemCount() < listItem->getStackSize()) {\r\n\t\t\t\t*destItem = listItem;\r\n\t\t\t\tindex = n;\r\n\t\t\t\treturn getContainer();\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d257f92716a83d2", + "equalIndicator/v1": "c52b45e075bf83914916f9b28b2f77c170eaa0b3dc1459e18a782919d2ebf8f0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 218, + "startColumn": 2, + "charOffset": 8998, + "charLength": 1271, + "snippet": { + "text": "const __m128i key = _mm_set1_epi32(xy);\r\n\r\n\tint32_t pos = 0;\r\n\tint32_t curRound = curNode - 16;\r\n\tfor (; pos <= curRound; pos += 16) {\r\n\t\t__m128i v[4];\r\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\r\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\r\n\t\tv[2] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 8])), key);\r\n\t\tv[3] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 12])), key);\r\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi16(_mm_packs_epi32(v[0], v[1]), _mm_packs_epi32(v[2], v[3])));\r\n\t\tif (mask != 0) {\r\n\t\t\treturn &nodes[pos + _mm_ctz(mask)];\r\n\t\t}\r\n\t}\r\n\tcurRound = curNode - 8;\r\n\tif (pos <= curRound) {\r\n\t\t__m128i v[2];\r\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\r\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\r\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi32(v[0], v[1]));\r\n\t\tif (mask != 0) {\r\n\t\t\treturn &nodes[pos + (_mm_ctz(mask) >> 1)];\r\n\t\t}\r\n\t\tpos += 8;\r\n\t}\r\n\tfor (; pos < curNode; ++pos) {\r\n\t\tif (nodesTable[pos] == xy) {\r\n\t\t\treturn &nodes[p" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 216, + "startColumn": 1, + "charOffset": 8943, + "charLength": 1340, + "snippet": { + "text": "\tuint32_t xy = (x << 16) | y;\r\n#if defined(__SSE2__)\r\n\tconst __m128i key = _mm_set1_epi32(xy);\r\n\r\n\tint32_t pos = 0;\r\n\tint32_t curRound = curNode - 16;\r\n\tfor (; pos <= curRound; pos += 16) {\r\n\t\t__m128i v[4];\r\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\r\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\r\n\t\tv[2] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 8])), key);\r\n\t\tv[3] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 12])), key);\r\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi16(_mm_packs_epi32(v[0], v[1]), _mm_packs_epi32(v[2], v[3])));\r\n\t\tif (mask != 0) {\r\n\t\t\treturn &nodes[pos + _mm_ctz(mask)];\r\n\t\t}\r\n\t}\r\n\tcurRound = curNode - 8;\r\n\tif (pos <= curRound) {\r\n\t\t__m128i v[2];\r\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\r\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\r\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi32(v[0], v[1]));\r\n\t\tif (mask != 0) {\r\n\t\t\treturn &nodes[pos + (_mm_ctz(mask) >> 1)];\r\n\t\t}\r\n\t\tpos += 8;\r\n\t}\r\n\tfor (; pos < curNode; ++pos) {\r\n\t\tif (nodesTable[pos] == xy) {\r\n\t\t\treturn &nodes[pos];\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2569dd1f870b8550", + "equalIndicator/v1": "c52cda06c5a8c3733e7e3915e3536e11da244a38394fd7a78aa7f899d042d4ff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 845, + "startColumn": 27, + "charOffset": 30563, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 843, + "startColumn": 1, + "charOffset": 30531, + "charLength": 131, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnMoveCreature, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b2ac02eb64c4b1b3", + "equalIndicator/v1": "c5446e061b157c2dacbd577c37217df180c236aeea08a2dbdacf803ceedd8354" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 157, + "startColumn": 9, + "charOffset": 5076, + "charLength": 12, + "snippet": { + "text": "getLastIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 155, + "startColumn": 1, + "charOffset": 4945, + "charLength": 371, + "snippet": { + "text": "\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r\n\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::map &getAllItemTypeCount(std::map &countMap) const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "95dd1c6854b0cfc9", + "equalIndicator/v1": "c544f6796049eea4c57088e68a8d0a1b709a0af2d5865dfdd7cb25b6e84f5d0e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1355, + "startColumn": 95, + "charOffset": 39689, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1353, + "startColumn": 1, + "charOffset": 39590, + "charLength": 146, + "snippet": { + "text": "}\r\n\r\nint32_t Tile::getStackposOfCreature(std::shared_ptr player, std::shared_ptr creature) const {\r\n\tint32_t n;\r\n\tif (ground) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c279195c2c2b1d8b", + "equalIndicator/v1": "c54a45b62a52f1656f4260bbdf99bb2e955bde3f7dc1649832a73b62f7c7a7a9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 174, + "startColumn": 11, + "charOffset": 6074, + "charLength": 10, + "snippet": { + "text": "getOwnerId" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 172, + "startColumn": 1, + "charOffset": 5972, + "charLength": 172, + "snippet": { + "text": "\tvirtual void removeItem(std::shared_ptr thing, bool sendUpdateToClient = false);\r\n\r\n\tuint32_t getOwnerId() const override final;\r\n\r\n\tbool isAnyKindOfRewardChest();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c9ad7219df6b5f34", + "equalIndicator/v1": "c56697eb89cd1c2a74a0d2f0c180e07fa698a0770b7099ec72883b34cc790ac7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1330, + "startColumn": 98, + "charOffset": 39147, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1328, + "startColumn": 1, + "charOffset": 39045, + "charLength": 149, + "snippet": { + "text": "}\r\n\r\nint32_t Tile::getClientIndexOfCreature(std::shared_ptr player, std::shared_ptr creature) const {\r\n\tint32_t n;\r\n\tif (ground) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f6aae94d1160f9f5", + "equalIndicator/v1": "c5753511ce143392588f957af49d9d3308067c98f217f249966d194a41298fdc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned long long' to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'unsigned long long' to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/network_message_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 60, + "startColumn": 21, + "charOffset": 1826, + "charLength": 7, + "snippet": { + "text": "message" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 58, + "startColumn": 1, + "charOffset": 1724, + "charLength": 159, + "snippet": { + "text": "\tconst auto &message = getUserdataShared(L, 1);\r\n\tif (message) {\r\n\t\tlua_pushnumber(L, message->get());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d7e538b021992147", + "equalIndicator/v1": "c5b008c65fc0c51e807436105002509ce165766efa69b53e2cc05edd13cd6bc5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 44, + "startColumn": 4, + "charOffset": 1172, + "charLength": 9, + "snippet": { + "text": "interface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 42, + "startColumn": 1, + "charOffset": 1110, + "charLength": 133, + "snippet": { + "text": "\t\t// nested callbacks are not allowed\r\n\t\tif (interface) {\r\n\t\t\tinterface->reportErrorFunc(\"Nested callbacks!\");\r\n\t\t}\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8a69b51faf72a437", + "equalIndicator/v1": "c5b085bc62aa61c4cebdf388a1306a9261bd152d152733ddc85cffe1389c48e8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 673, + "startColumn": 15, + "charOffset": 22037, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 671, + "startColumn": 1, + "charOffset": 21997, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 0.80f) + 3;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "76df6092bb5abdf8", + "equalIndicator/v1": "c5b4c63b47509a54d65e54c6fe2bc50cc5592aaadfd3b8a9931bd7178d8f33b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Annotate this function with 'override' or (rarely) 'final'", + "markdown": "Annotate this function with 'override' or (rarely) 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 126, + "startColumn": 3, + "charOffset": 3334, + "charLength": 6, + "snippet": { + "text": "Player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 124, + "startColumn": 1, + "charOffset": 3291, + "charLength": 73, + "snippet": { + "text": "\r\n\texplicit Player(ProtocolGame_ptr p);\r\n\t~Player();\r\n\r\n\t// non-copyable\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e5cc0ef2b54b51b5", + "equalIndicator/v1": "c5c8d296eca93224ab6736e08968a2c3faa18529b34f3d243528b56d63de29ab" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 238, + "startColumn": 15, + "charOffset": 7777, + "charLength": 16, + "snippet": { + "text": "internalAddThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 236, + "startColumn": 1, + "charOffset": 7697, + "charLength": 204, + "snippet": { + "text": "\r\n\tvoid internalAddThing(std::shared_ptr thing) override;\r\n\tvoid virtual internalAddThing(uint32_t index, std::shared_ptr thing) override;\r\n\r\n\tconst Position &getPosition() override final {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59fda8d8486aa759", + "equalIndicator/v1": "c5cad44afbd5a0c38ab95993abfae8ca135120e2b503298e9d089c0883c50554" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1811, + "startColumn": 68, + "charOffset": 48879, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1809, + "startColumn": 1, + "charOffset": 48807, + "charLength": 163, + "snippet": { + "text": "}\r\n\r\nbool ConditionFeared::getRandomDirection(std::shared_ptr creature, Position pos) {\r\n\tstatic std::vector directions {\r\n\t\tDIRECTION_NORTH,\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e4622e03576065fd", + "equalIndicator/v1": "c5cf73d707f68a3e3a0887e91d3681970e80077e21a9816a727246edd7ded4bd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1122, + "startColumn": 51, + "charOffset": 36714, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1120, + "startColumn": 1, + "charOffset": 36659, + "charLength": 269, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatFunc(std::shared_ptr caster, const Position &origin, const Position &pos, const std::unique_ptr &area, const CombatParams ¶ms, CombatFunction func, CombatDamage* data) {\r\n\tstd::vector> tileList;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c89a05eb5c859d55", + "equalIndicator/v1": "c61643ef5611f631f37fa5b593fc97077dc0f08f44074eb7f771de5ae8177a07" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Tree, std::shared_ptr, std::less>, std::allocator, std::shared_ptr>>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Tree, std::shared_ptr, std::less\\>, std::allocator, std::shared_ptr\\>\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 224, + "startColumn": 57, + "charOffset": 7029, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 222, + "startColumn": 1, + "charOffset": 6968, + "charLength": 134, + "snippet": { + "text": "}\r\n\r\nint GameFunctions::luaGameGetMonsterTypes(lua_State* L) {\r\n\t// Game.getMonsterTypes()\r\n\tconst auto type = g_monsters().monsters;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f51483a865158482", + "equalIndicator/v1": "c622f8b5bb64f14f4b9bcad5fd38b458f6206531e1b84cddd1e8249222fa8298" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 762, + "startColumn": 20, + "charOffset": 29376, + "charLength": 6, + "snippet": { + "text": "rawExp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 760, + "startColumn": 1, + "charOffset": 29329, + "charLength": 117, + "snippet": { + "text": "\r\n\tlua_pushnumber(L, exp);\r\n\tlua_pushnumber(L, rawExp);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 4, 1) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "05604dab05f94c34", + "equalIndicator/v1": "c636be510befa2112bf26e390fc80cdccd574d04a0c58f71ea04da7f680eedb2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1438, + "startColumn": 41, + "charOffset": 51065, + "charLength": 17, + "snippet": { + "text": "m_playerBonusData" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1436, + "startColumn": 1, + "charOffset": 50931, + "charLength": 191, + "snippet": { + "text": "\t// Leech\r\n\tsetPlayerCombatStats(COMBAT_LIFEDRAIN, m_playerBonusData.leech.lifeLeech * 100);\r\n\tsetPlayerCombatStats(COMBAT_MANADRAIN, m_playerBonusData.leech.manaLeech * 100);\r\n\r\n\t// Instant\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ceb82c988fc16068", + "equalIndicator/v1": "c66efbbeb4874b943afe2d66b101e1a237618eb8ac8d0ec9d7c8b19473dd1ca8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 727, + "startColumn": 7, + "charOffset": 22521, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 725, + "startColumn": 1, + "charOffset": 22509, + "charLength": 166, + "snippet": { + "text": "\t}\r\n\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tif (item != nullptr) {\r\n\t\t\tg_logger().error(\"[MoveEvent::executeStep - Creature {} item {}, position {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0caf87f2eff1d176", + "equalIndicator/v1": "c67d366eebdaf1f5bcc0e06c4476abc6781d19a18fb169fb7c1f521541187398" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: type", + "markdown": "Constructor does not initialize these fields: type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 45, + "startColumn": 7, + "charOffset": 1293, + "charLength": 12, + "snippet": { + "text": "TileCallback" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 43, + "startColumn": 1, + "charOffset": 1281, + "charLength": 151, + "snippet": { + "text": "};\r\n\r\nclass TileCallback final : public CallBack {\r\npublic:\r\n\tvoid onTileCombat(std::shared_ptr creature, std::shared_ptr tile) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "33e2f02baf2d43be", + "equalIndicator/v1": "c681bccd36523227faa7d865883c6ff5c13df24a83cf0b2696e678e6c8391ec6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'fromCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'fromCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1840, + "startColumn": 101, + "charOffset": 71727, + "charLength": 12, + "snippet": { + "text": "fromCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1838, + "startColumn": 1, + "charOffset": 71622, + "charLength": 279, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\r\n\tif (!player || !toCylinder || !item) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f48521851f5764e", + "equalIndicator/v1": "c689838cd09db5c407ccc11d8d683d767579be4e89a5ee7647cf9773fd3d450e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 167, + "startColumn": 46, + "charOffset": 5091, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 165, + "startColumn": 1, + "charOffset": 5041, + "charLength": 194, + "snippet": { + "text": "}\r\n\r\nbool Weapon::useFist(std::shared_ptr player, std::shared_ptr target) {\r\n\tif (!Position::areInRange<1, 1>(player->getPosition(), target->getPosition())) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4d5ccd204a7b62cc", + "equalIndicator/v1": "c690ba6c46480e214e4d5cd1689b3c7f4296a14b0d5f46e1612e7f1e7036c352" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 695, + "startColumn": 32, + "charOffset": 22714, + "charLength": 13, + "snippet": { + "text": "groupCooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 693, + "startColumn": 1, + "charOffset": 22654, + "charLength": 193, + "snippet": { + "text": "\r\n\tif (groupCooldown > 0) {\r\n\t\tint32_t spellGroupCooldown = groupCooldown;\r\n\t\tif (isUpgraded) {\r\n\t\t\tspellGroupCooldown -= getWheelOfDestinyBoost(WheelSpellBoost_t::GROUP_COOLDOWN, spellGrade);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e35cc6c80c0afcc", + "equalIndicator/v1": "c6c5aa5973961541f53c648a8c0702317ded2357ef1d20bfeb17c7a7648c38df" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 709, + "startColumn": 7, + "charOffset": 25205, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 707, + "startColumn": 1, + "charOffset": 25193, + "charLength": 144, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnMove - \"\r\n\t\t \"Player {} item {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f16469b190dbc16d", + "equalIndicator/v1": "c6d4289d59536fa7cebc67910952d087a29235beb1a977338c8d064a8afd1572" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1628, + "startColumn": 2, + "charOffset": 57021, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1626, + "startColumn": 1, + "charOffset": 57014, + "charLength": 47, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c01e49200c472193", + "equalIndicator/v1": "c7041a26e75f99842f99c46ec476a3d78cefaed58292f4a6b34669f3b191f036" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 21, + "charOffset": 829, + "charLength": 8, + "snippet": { + "text": "lootList" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 693, + "charLength": 176, + "snippet": { + "text": "\r\nvoid MonsterTypeFunctions::createMonsterTypeLootLuaTable(lua_State* L, const std::vector &lootList) {\r\n\tlua_createtable(L, lootList.size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2180dd10f2cb0815", + "equalIndicator/v1": "c7060fd2a9d4f9d84ecd1eebdd4dc12c6d4ccd3ff322ad2d7223bbc7bb765e46" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')", + "markdown": "Narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 177, + "startColumn": 27, + "charOffset": 7133, + "charLength": 64, + "snippet": { + "text": "(std::floor(100. - itemType.abilities->absorbPercent[i]) / 100.)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 175, + "startColumn": 1, + "charOffset": 7055, + "charLength": 152, + "snippet": { + "text": "\r\n\t\t\tfor (uint16_t i = 0; i < COMBAT_COUNT; ++i) {\r\n\t\t\t\tdamageModifiers[i] *= (std::floor(100. - itemType.abilities->absorbPercent[i]) / 100.);\r\n\t\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f4832481af521118", + "equalIndicator/v1": "c7150dbf34dabaaa6c4307794f10555fc29e70ba86a9d28aa65997ef7f642956" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1157, + "startColumn": 59, + "charOffset": 35985, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1155, + "startColumn": 1, + "charOffset": 35922, + "charLength": 140, + "snippet": { + "text": "}\r\n\r\ndouble Creature::getDamageRatio(std::shared_ptr attacker) const {\r\n\tuint32_t totalDamage = 0;\r\n\tuint32_t attackerDamage = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75ee2c0bedc22d4d", + "equalIndicator/v1": "c72b19527a45d6329084b249eb0e2c1df51e7e680388da089dfdd32b307d9a7e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 194, + "startColumn": 35, + "charOffset": 5955, + "charLength": 7, + "snippet": { + "text": "npcType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 192, + "startColumn": 1, + "charOffset": 5794, + "charLength": 325, + "snippet": { + "text": "\r\n\t\tif (!npcType->info.soundVector.empty() && (npcType->info.soundChance >= static_cast(uniform_random(1, 100)))) {\r\n\t\t\tauto index = uniform_random(0, npcType->info.soundVector.size() - 1);\r\n\t\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), npcType->info.soundVector[index], getNpc());\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d6d47c4df238210a", + "equalIndicator/v1": "c734043385011a3681916f2e59994b1f5e8fb5220abdf8bdb7b9c97fa3e6e172" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2820, + "startColumn": 2, + "charOffset": 86185, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2818, + "startColumn": 1, + "charOffset": 86086, + "charLength": 208, + "snippet": { + "text": "\tcharmRune_t runeID = static_cast(msg.getByte());\r\n\tuint8_t action = msg.getByte();\r\n\tuint16_t raceid = msg.get();\r\n\tg_iobestiary().sendBuyCharmRune(player, runeID, action, raceid);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eda7271e53576830", + "equalIndicator/v1": "c7423f69c53112458ab8c4acab235ec815bd2c2038a830c4096a083235083308" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 50, + "startColumn": 72, + "charOffset": 1532, + "charLength": 9, + "snippet": { + "text": "moveEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 48, + "startColumn": 1, + "charOffset": 1456, + "charLength": 172, + "snippet": { + "text": "}\r\n\r\nbool MoveEvents::registerLuaItemEvent(const std::shared_ptr moveEvent) {\r\n\tauto itemIdVector = moveEvent->getItemIdsVector();\r\n\tif (itemIdVector.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "31515f3bc266444d", + "equalIndicator/v1": "c74adb46bbecf343c07fae2c69aa09d9368b881cb562061b0d0eb1c7ada01dfe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'condition' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'condition' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 322, + "startColumn": 53, + "charOffset": 10709, + "charLength": 9, + "snippet": { + "text": "condition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 320, + "startColumn": 1, + "charOffset": 10626, + "charLength": 149, + "snippet": { + "text": "\t\treturn area != nullptr;\r\n\t}\r\n\tvoid addCondition(const std::shared_ptr condition) {\r\n\t\tparams.conditionList.emplace_back(condition);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f31f7f5af9e0b868", + "equalIndicator/v1": "c74c59d7e2e3603e15c26529bbea0ee5c5219e48a16519822111cc9171a3a514" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Escaped string literal can be written as a raw string literal", + "markdown": "Escaped string literal can be written as a raw string literal" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 130, + "startColumn": 15, + "charOffset": 4115, + "charLength": 21, + "snippet": { + "text": "\"\\\"description\\\": \\\"\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 128, + "startColumn": 1, + "charOffset": 4024, + "charLength": 214, + "snippet": { + "text": "\t\tpayload << \"\\\"title\\\": \\\"\" << title << \"\\\", \";\r\n\t\tif (!message.empty()) {\r\n\t\t\tpayload << \"\\\"description\\\": \\\"\" << message << \"\\\", \";\r\n\t\t}\r\n\t\tif (g_configManager().getBoolean(DISCORD_SEND_FOOTER, __FUNCTION__)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a04986faf44daca0", + "equalIndicator/v1": "c7dfed97573832fbeb4e5acbfdba4f3febbdf1f26c888f4df5868ab5c9a8cb0e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 555, + "startColumn": 63, + "charOffset": 21427, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 553, + "startColumn": 1, + "charOffset": 21360, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerInbox(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eb52c5fefc6ff7c9", + "equalIndicator/v1": "c7eb2991aa51aad8283b5d5eb2b53072f546d4eddc7750a49ba37b9d7ed5df2d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6132, + "startColumn": 50, + "charOffset": 211804, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6130, + "startColumn": 1, + "charOffset": 211750, + "charLength": 280, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerWhisper(std::shared_ptr player, const std::string &text) {\r\n\tauto spectators = Spectators().find(player->getPosition(), false, MAP_MAX_CLIENT_VIEW_PORT_X, MAP_MAX_CLIENT_VIEW_PORT_X, MAP_MAX_CLIENT_VIEW_PORT_Y, MAP_MAX_CLIENT_VIEW_PORT_Y);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "16707216cd193c8a", + "equalIndicator/v1": "c7fa12677e8aa5aad50a501a528bd9c61cd99d00e06804aa04cdbca51f70b930" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 137, + "startColumn": 48, + "charOffset": 3694, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 135, + "startColumn": 1, + "charOffset": 3642, + "charLength": 118, + "snippet": { + "text": "}\r\n\r\nbool BedItem::trySleep(std::shared_ptr player) {\r\n\tif (!house || player->isRemoved()) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d13adac225c8da5", + "equalIndicator/v1": "c817b69075ffe9293d81490e2c00041058e59af8ef48693015b13448e25f711c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'nextBedItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'nextBedItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 120, + "startColumn": 54, + "charOffset": 3173, + "charLength": 11, + "snippet": { + "text": "nextBedItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 118, + "startColumn": 1, + "charOffset": 3115, + "charLength": 115, + "snippet": { + "text": "}\r\n\r\nbool BedItem::isBedComplete(std::shared_ptr nextBedItem) {\r\n\tconst ItemType &it = Item::items[id];\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e474df5cab30c691", + "equalIndicator/v1": "c820a9831ff96ff4c814fe5b25283678eec5682c1b0d7abbe78246c878171cc3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2786, + "startColumn": 3, + "charOffset": 82892, + "charLength": 8, + "snippet": { + "text": "uint64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2784, + "startColumn": 1, + "charOffset": 82871, + "charLength": 311, + "snippet": { + "text": "\r\n\t\t// Level loss\r\n\t\tuint64_t expLoss = static_cast(experience * deathLossPercent);\r\n\t\tg_events().eventPlayerOnLoseExperience(static_self_cast(), expLoss);\r\n\t\tg_callbacks().executeCallback(EventCallback_t::playerOnLoseExperience, &EventCallback::playerOnLoseExperience, getPlayer(), expLoss);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "729b71945485428f", + "equalIndicator/v1": "c82632a935a69a1f90047b5b2143ea8dfa20e511d9785fc14e0248debfcfa192" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'podium' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'podium' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2517, + "startColumn": 36, + "charOffset": 73072, + "charLength": 6, + "snippet": { + "text": "podium" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2515, + "startColumn": 1, + "charOffset": 72890, + "charLength": 228, + "snippet": { + "text": "\tvoid sendMonsterPodiumWindow(std::shared_ptr podium, const Position &position, uint16_t itemId, uint8_t stackpos) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendMonsterPodiumWindow(podium, position, itemId, stackpos);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bbd1fae3b8dca35f", + "equalIndicator/v1": "c8334dd5010068e15c804981b424037eccbb1bb02a21811e4729b6b66eb47e4c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", + "markdown": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 262, + "startColumn": 36, + "charOffset": 7579, + "charLength": 9, + "snippet": { + "text": "std::atoi" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 260, + "startColumn": 1, + "charOffset": 7442, + "charLength": 353, + "snippet": { + "text": "\r\nint8_t DBResult::getInt8FromString(const std::string &string, const std::string &function) const {\r\n\tauto result = static_cast(std::atoi(string.c_str()));\r\n\tif (result > std::numeric_limits::max()) {\r\n\t\tg_logger().error(\"[{}] Failed to get number value {} for tier table result, on function call: {}\", __FUNCTION__, result, function);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "91e07de85fa66505", + "equalIndicator/v1": "c842267f9db77c8462b617a91c77e5dd04efd9b606352aa64de1a93ae84045f8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 245, + "startColumn": 14, + "charOffset": 6903, + "charLength": 13, + "snippet": { + "text": "outfitMonster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 243, + "startColumn": 1, + "charOffset": 6864, + "charLength": 88, + "snippet": { + "text": "\r\n\tOutfit_t outfit = {};\r\n\tstd::string outfitMonster = \"\";\r\n\tuint16_t outfitItem = 0;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "609266acbf2abd50", + "equalIndicator/v1": "c8452effc6d3a52e84715f5b167e4dbb4b8eafeafc78709962134b007a88eebc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'event' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'event' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 87, + "startColumn": 24, + "charOffset": 3324, + "charLength": 36, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 85, + "startColumn": 1, + "charOffset": 3200, + "charLength": 215, + "snippet": { + "text": "\tstd::shared_ptr getEventByName(const std::string &name, bool forceLoaded = true);\r\n\r\n\tbool registerLuaEvent(const std::shared_ptr event);\r\n\tvoid removeInvalidEvents();\r\n\tvoid clear();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c5736a0a2fef186c", + "equalIndicator/v1": "c8a2afe364d6733c71f5943cca3de39ac42b212f8c7ee9a296ce2edde4e78619" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 258, + "startColumn": 25, + "charOffset": 7247, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 256, + "startColumn": 1, + "charOffset": 7158, + "charLength": 147, + "snippet": { + "text": "\t\t\tweapon->setMaxChange(getNumber(L, 3));\r\n\t\t} else {\r\n\t\t\tweapon->setMaxChange(getNumber(L, 2));\r\n\t\t}\r\n\t\tpushBoolean(L, true);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7279865bb942fa18", + "equalIndicator/v1": "c8c83d3ecf891febc5faac0541dac775f3ff41495220a434174739dfce63086f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 116, + "startColumn": 21, + "charOffset": 2956, + "charLength": 19, + "snippet": { + "text": "luaPartyGetInvitees" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 114, + "startColumn": 1, + "charOffset": 2931, + "charLength": 151, + "snippet": { + "text": "}\r\n\r\nint PartyFunctions::luaPartyGetInvitees(lua_State* L) {\r\n\t// party:getInvitees()\r\n\tstd::shared_ptr party = getUserdataShared(L, 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1c6e6110662a6e4", + "equalIndicator/v1": "c8d7b1417d417a430bf230cebf890dfd75a6e22fdef520ffbf1edded597a804c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1169, + "startColumn": 67, + "charOffset": 34207, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1167, + "startColumn": 1, + "charOffset": 34136, + "charLength": 115, + "snippet": { + "text": "}\r\n\r\nvoid Player::setMainBackpackUnassigned(std::shared_ptr container) {\r\n\tif (!container) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9031f9cd5ab672dc", + "equalIndicator/v1": "c8dd75f46cf1aaa6e9ec77d6fbce09951d8da08d2f19b0c0d21aa27db59d8bd4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'updateTile' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'updateTile' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1092, + "startColumn": 27, + "charOffset": 31999, + "charLength": 10, + "snippet": { + "text": "updateTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1090, + "startColumn": 1, + "charOffset": 31877, + "charLength": 149, + "snippet": { + "text": "\tvoid sendUpdateTile(std::shared_ptr updateTile, const Position &pos) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendUpdateTile(updateTile, pos);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6d1373dc3e620c82", + "equalIndicator/v1": "c8e5fbabfc23700805c908a65157a1f5d0f2ba88c0b78a5088764cae18383e69" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1284, + "startColumn": 36, + "charOffset": 38045, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1282, + "startColumn": 1, + "charOffset": 37924, + "charLength": 137, + "snippet": { + "text": "\tvoid sendInventoryItem(Slots_t slot, std::shared_ptr item) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendInventoryItem(slot, item);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9846affbd9b3dae5", + "equalIndicator/v1": "c921d5e0a527525e2cce217d615ef0ae9149cdb852c06ac74e19a5d5c2538a50" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 383, + "startColumn": 7, + "charOffset": 14371, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 381, + "startColumn": 1, + "charOffset": 14219, + "charLength": 296, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInBattleList - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f185586b5e2d73a2", + "equalIndicator/v1": "c9357842f32fa40234089a0072fafa1cce312be136ad92704854c343cd0afee9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 231, + "startColumn": 9, + "charOffset": 6604, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 229, + "startColumn": 1, + "charOffset": 6567, + "charLength": 72, + "snippet": { + "text": "\t\treturn std::string();\r\n\t}\r\n\treturn std::string(row[it->second]);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8a6873eed3ffff5e", + "equalIndicator/v1": "c95134353dccc39fef735ba1ee965bc1e57ad0f7a200d99122bf7a3a4107667b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 15, + "startColumn": 26, + "charOffset": 488, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 13, + "startColumn": 1, + "charOffset": 435, + "charLength": 237, + "snippet": { + "text": "#include \"game/game.hpp\"\r\n\r\nReturnValue TrashHolder::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t, std::shared_ptr actor) {\r\n\tstd::shared_ptr item = thing->getItem();\r\n\tif (item == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a7613bbc0f6a04d7", + "equalIndicator/v1": "c9515e696a6a3c1efca2fcf8a904af1695576eeeabe323cc64a87969f9f5ed81" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'isLogin' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'isLogin' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 522, + "startColumn": 64, + "charOffset": 14125, + "charLength": 10, + "snippet": { + "text": "const bool" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 520, + "startColumn": 1, + "charOffset": 14014, + "charLength": 195, + "snippet": { + "text": "\tbool canOpenCorpse(uint32_t ownerId) const;\r\n\r\n\tvoid addStorageValue(const uint32_t key, const int32_t value, const bool isLogin = false);\r\n\tint32_t getStorageValue(const uint32_t key) const;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f706fb9b653d6c94", + "equalIndicator/v1": "c9555d14255db2c576ecc849f03ed7d353f49ce1a5f17badcabdac65bb9f5402" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2534, + "startColumn": 37, + "charOffset": 75710, + "charLength": 9, + "snippet": { + "text": "healthMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2532, + "startColumn": 1, + "charOffset": 75586, + "charLength": 303, + "snippet": { + "text": "\t\t\tcapacity = std::max(0, capacity - noneVocation->getCapGain());\r\n\t\t} else {\r\n\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r\n\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\r\n\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "747f50c225e5ce15", + "equalIndicator/v1": "c972394a8afdcc5ee4c1b4e906b5540c12f09a7f062134bef94067dc507acd18" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4449, + "startColumn": 93, + "charOffset": 160188, + "charLength": 5, + "snippet": { + "text": "house" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4447, + "startColumn": 1, + "charOffset": 160091, + "charLength": 248, + "snippet": { + "text": "}\r\n\r\nvoid Game::unwrapItem(std::shared_ptr item, uint16_t unWrapId, std::shared_ptr house, std::shared_ptr player) {\r\n\tif (item->hasOwner() && !item->isOwner(player)) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_ITEMISNOTYOURS);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6e9c105fb4b84549", + "equalIndicator/v1": "c9847fae1b0027f477f60c8ae09ed94f357f0ea70953843a27e1ef5f3acddbf7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::array::size_type'", + "markdown": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::array::size_type'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1208, + "startColumn": 22, + "charOffset": 42461, + "charLength": 1, + "snippet": { + "text": "i" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1206, + "startColumn": 1, + "charOffset": 42376, + "charLength": 167, + "snippet": { + "text": "\tPropWriteStream stream;\r\n\tconst auto wheelSlots = getSlots();\r\n\tfor (uint8_t i = 1; i < wheelSlots.size(); ++i) {\r\n\t\tauto value = wheelSlots[i];\r\n\t\tif (value == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3557dbeec76d87f1", + "equalIndicator/v1": "c99b9004ced40230570e267ce07498af64b6b6e944a46d8cf9bec5116c0aa045" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 174, + "startColumn": 28, + "charOffset": 4524, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 172, + "startColumn": 1, + "charOffset": 4432, + "charLength": 155, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.attack = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b87995649bc6744c", + "equalIndicator/v1": "c99ce84797e15508b4012c7d14ff3cfb9c8da3ee6709f90565d69c1e88bc4929" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'achievementsUnlocked' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'achievementsUnlocked' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6184, + "startColumn": 64, + "charOffset": 181749, + "charLength": 20, + "snippet": { + "text": "achievementsUnlocked" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6182, + "startColumn": 1, + "charOffset": 181524, + "charLength": 255, + "snippet": { + "text": "void Player::sendCyclopediaCharacterAchievements(uint16_t secretsUnlocked, std::vector> achievementsUnlocked) {\r\n\tif (client) {\r\n\t\tclient->sendCyclopediaCharacterAchievements(secretsUnlocked, achievementsUnlocked);\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "95a0e4abb4b75193", + "equalIndicator/v1": "c9ae76cc9c5dad4bb1c2a692bce961203a6ff60ceb7c7f91ea820dc1a71b13b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1365, + "startColumn": 8, + "charOffset": 39843, + "charLength": 5, + "snippet": { + "text": "items" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1363, + "startColumn": 1, + "charOffset": 39774, + "charLength": 128, + "snippet": { + "text": "\tconst TileItemVector* items = getItemList();\r\n\tif (items) {\r\n\t\tn += items->getTopItemCount();\r\n\t\tif (n >= 10) {\r\n\t\t\treturn -1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5123391bd292e89d", + "equalIndicator/v1": "c9c8ba9f855aab4ec6e424106018a6d6575ffe00fcfec6076e0e6f8190234ad8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2313, + "startColumn": 98, + "charOffset": 66502, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2311, + "startColumn": 1, + "charOffset": 66400, + "charLength": 205, + "snippet": { + "text": "}\r\n\r\nstd::string Item::getDescription(const ItemType &it, int32_t lookDistance, std::shared_ptr item /*= nullptr*/, int32_t subType /*= -1*/, bool addArticle /*= true*/) {\r\n\tstd::string text = \"\";\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c813a5fd011ccea3", + "equalIndicator/v1": "c9fd785164eb9c9fba19fdf832400ca1c5d5856e6c756069a62a02ba7fbe772a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 128, + "startColumn": 60, + "charOffset": 3822, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 126, + "startColumn": 1, + "charOffset": 3742, + "charLength": 128, + "snippet": { + "text": "\t\treturn skull;\r\n\t}\r\n\tvirtual Skulls_t getSkullClient(std::shared_ptr creature) {\r\n\t\treturn creature->getSkull();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "250226c04c46c758", + "equalIndicator/v1": "ca074188d2b75119bea6d6c7870ad7497ac27bc1815bdf20a0b99bcad8670488" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1777, + "startColumn": 3, + "charOffset": 62059, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1775, + "startColumn": 1, + "charOffset": 61941, + "charLength": 173, + "snippet": { + "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r\n\t\treturn true;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "65e613a8a3fd601a", + "equalIndicator/v1": "ca110eab22a95fc71739226c9d49a1af1f46c309bc1accd3db1bfc15b5453caf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 276, + "startColumn": 45, + "charOffset": 8492, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 274, + "startColumn": 1, + "charOffset": 8372, + "charLength": 261, + "snippet": { + "text": "\t\tauto rank = m_player.getGuildRank();\r\n\t\treturn rank && rank->level == 3;\r\n\t} else if (name == \"Proconsul of Iksupan\") {\r\n\t\t// Win Ancient Aucar Outfits complete so fight with Atab and be teleported to the arena.\r\n\t} else if (name == \"Admirer of the Crown\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9e76e7833bed8968", + "equalIndicator/v1": "ca11e4b2dae080c970fb9882c4caddc65a91912b46349da41e0eeb6655e0c41d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Val', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Val', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorset.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 67, + "startColumn": 73, + "charOffset": 1763, + "charLength": 4, + "snippet": { + "text": "_Val" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 65, + "startColumn": 1, + "charOffset": 1684, + "charLength": 153, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, const T &_Val) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, _Val);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "50f6fd67650c2236", + "equalIndicator/v1": "ca207b9faea9f705c48840b6ed85f7b9d1e8bd0ed1b3760cb5efbc0e7cc30022" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 43, + "startColumn": 18, + "charOffset": 1473, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 41, + "startColumn": 1, + "charOffset": 1326, + "charLength": 279, + "snippet": { + "text": "\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\r\n\tbaseSpeed = mType->getBaseSpeed();\r\n\tinternalLight = mType->info.light;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "273034a42204e834", + "equalIndicator/v1": "ca50da4890eaa18f3b64111017ae865a871234dd1db1958bd2f7bfd219b8c69e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1277, + "startColumn": 59, + "charOffset": 45410, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1275, + "startColumn": 1, + "charOffset": 45347, + "charLength": 260, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime) {\r\n\t// Player::onStorageUpdate(key, value, oldValue, currentTime)\r\n\tif (info.playerOnStorageUpdate == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8650b30bc399e3d0", + "equalIndicator/v1": "ca5ab84eb94be14305cf349475e88aa01139b973071e7235ad874d9b875d8a36" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2276, + "startColumn": 82, + "charOffset": 79397, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2274, + "startColumn": 1, + "charOffset": 79311, + "charLength": 166, + "snippet": { + "text": "}\r\n\r\nint32_t PlayerWheel::checkBlessingGroveHealingByTarget(std::shared_ptr target) const {\r\n\tif (!target || target == m_player.getPlayer()) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3a5b8757e7142743", + "equalIndicator/v1": "ca62c6548650960ee53ba7d5affc7489f4c48e377f4a8b16ff0eba6e1103152f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 143, + "startColumn": 22, + "charOffset": 4618, + "charLength": 4, + "snippet": { + "text": "rune" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 141, + "startColumn": 1, + "charOffset": 4543, + "charLength": 138, + "snippet": { + "text": "\t\t\t}\r\n\t\t\tiType.runeMagLevel = rune->getMagicLevel();\r\n\t\t\tiType.runeLevel = rune->getLevel();\r\n\t\t\tiType.charges = rune->getCharges();\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5cfd173c0fb33469", + "equalIndicator/v1": "ca987078b08902fbc281d7c9833b4bf4c18f7035404483b93b6996bd992227f8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8524, + "startColumn": 53, + "charOffset": 297460, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8522, + "startColumn": 1, + "charOffset": 297403, + "charLength": 261, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerHighscores(std::shared_ptr player, HighscoreType_t type, uint8_t category, uint32_t vocation, const std::string &, uint16_t page, uint8_t entriesPerPage) {\r\n\tif (player->hasAsyncOngoingTask(PlayerAsyncTask_Highscore)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1731b6b36c69228b", + "equalIndicator/v1": "caa7fbb6329ebdb2a331e9b3a569cbd25da9687f18164b6f8e56697b71fece0d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'initConnection' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'initConnection' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 250, + "startColumn": 11, + "charOffset": 10026, + "charLength": 14, + "snippet": { + "text": "initConnection" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 248, + "startColumn": 1, + "charOffset": 9953, + "charLength": 122, + "snippet": { + "text": "\r\nProtocolGame::ProtocolGame(Connection_ptr initConnection) :\r\n\tProtocol(initConnection) {\r\n\tversion = CLIENT_VERSION;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e084b284fe6ec853", + "equalIndicator/v1": "cac05fb1d4310b2b8f59808e13d570067f19878532101e345b07c27293652174" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 283, + "startColumn": 53, + "charOffset": 7837, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 281, + "startColumn": 1, + "charOffset": 7780, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nbool House::transferToDepot(std::shared_ptr player, std::shared_ptr tile) const {\r\n\tif (townId == 0 || !player) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e6679dc0cdb654d5", + "equalIndicator/v1": "cad2965dd9e5de2823c357494e9772fc1ea655c90dbf19e481c2e50ca818ac36" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'createNpcTypeShopLuaTable' is within a recursive call chain", + "markdown": "Function 'createNpcTypeShopLuaTable' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 17, + "startColumn": 24, + "charOffset": 587, + "charLength": 25, + "snippet": { + "text": "createNpcTypeShopLuaTable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 15, + "startColumn": 1, + "charOffset": 536, + "charLength": 181, + "snippet": { + "text": "#include \"game/game.hpp\"\r\n\r\nvoid NpcTypeFunctions::createNpcTypeShopLuaTable(lua_State* L, const std::vector &shopVector) {\r\n\tlua_createtable(L, shopVector.size(), 0);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cba8fb68cc526fd5", + "equalIndicator/v1": "caddf65b53df686d2c3a887cd52de1024dfeacc7d0de857f7302662aa42e9e6e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'long long' is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'long long' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2498, + "startColumn": 36, + "charOffset": 74349, + "charLength": 10, + "snippet": { + "text": "experience" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2496, + "startColumn": 1, + "charOffset": 74279, + "charLength": 109, + "snippet": { + "text": "\r\n\tuint64_t lostExp = experience;\r\n\texperience = std::max(0, experience - exp);\r\n\r\n\tif (sendText) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "462ceff742f5a27d", + "equalIndicator/v1": "cb10675c69787ac7ab1c26bca00884a1bcc443de54eb618cc421348dfef491da" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 344, + "startColumn": 14, + "charOffset": 8579, + "charLength": 12, + "snippet": { + "text": "std::tolower" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 342, + "startColumn": 1, + "charOffset": 8520, + "charLength": 143, + "snippet": { + "text": "\t\tif (std::isupper(ch)) {\r\n\t\t\tresult += '-';\r\n\t\t\tresult += std::tolower(ch);\r\n\t\t} else if (std::isspace(ch) || ch == '_') {\r\n\t\t\tresult += '-';\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "022c391b13fe1d66", + "equalIndicator/v1": "cb30ee381d1cd172e420163c165e46e347a74ca84ba191f8d6a35faa5297d740" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 158, + "startColumn": 53, + "charOffset": 6439, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 156, + "startColumn": 1, + "charOffset": 6295, + "charLength": 353, + "snippet": { + "text": "\t * @param[in] player The pointer to the player whose equipped items are considered.\r\n\t */\r\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\r\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "357e28b6052a6a57", + "equalIndicator/v1": "cb318a9b613a478e8ff19b60de11b063f6f2ec0a912f01cbadf9d514d9522b73" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 868, + "startColumn": 63, + "charOffset": 25258, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 866, + "startColumn": 1, + "charOffset": 25191, + "charLength": 186, + "snippet": { + "text": "}\r\n\r\nint GameFunctions::luaGameGetSecretAchievements(lua_State* L) {\r\n\t// Game.getSecretAchievements()\r\n\tconst std::vector &achievements = g_game().getSecretAchievements();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b1431330ea6fc05b", + "equalIndicator/v1": "cb4bce2f723e80e9d9731c55cf0355d38711efb68d43b25a0da2bd0b447fcdce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 238, + "startColumn": 41, + "charOffset": 8748, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 236, + "startColumn": 1, + "charOffset": 8702, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ad0d02a752f8a18e", + "equalIndicator/v1": "cb4e5718fee91369ab78258b51792acf9d66e2349c5dfb4498ef0c7ac0d50563" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 463, + "startColumn": 95, + "charOffset": 17485, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 461, + "startColumn": 1, + "charOffset": 17386, + "charLength": 218, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnMove - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a41037a0e08be717", + "equalIndicator/v1": "cb7e8742b3d48f2b05575ecc09b3550d98aa5e3290e31736281044d0e5e95b42" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'destTile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'destTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 275, + "startColumn": 109, + "charOffset": 9174, + "charLength": 8, + "snippet": { + "text": "destTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 273, + "startColumn": 1, + "charOffset": 9061, + "charLength": 209, + "snippet": { + "text": "}\r\n\r\nvoid Weapon::onUsedWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr destTile) const {\r\n\tif (!player->hasFlag(PlayerFlags_t::NotGainSkill)) {\r\n\t\tskills_t skillType;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9708f525b6758435", + "equalIndicator/v1": "cb81817531851e51e5aeb09ba8d15dfa34ad06cd7d7dc5a52fe258c7dc6a25ef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: m_cost, t_cost, parallelism", + "markdown": "Constructor does not initialize these fields: m_cost, t_cost, parallelism" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 9, + "charOffset": 720, + "charLength": 6, + "snippet": { + "text": "Argon2" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 600, + "charLength": 155, + "snippet": { + "text": "const std::string Argon2::base64_chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\r\n\r\nArgon2::Argon2() {\r\n\tupdateConstants();\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab38ea0476f52601", + "equalIndicator/v1": "cbc434f065bccde457a2129c3348d5620b892f689bde2b61eba383e788293ff8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1666, + "startColumn": 7, + "charOffset": 58435, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1664, + "startColumn": 1, + "charOffset": 58276, + "charLength": 352, + "snippet": { + "text": "void TargetCallback::onTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\t// onTargetCombat(creature, target)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[TargetCallback::onTargetCombat - Creature {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29418000251213f1", + "equalIndicator/v1": "cbccec5d6fb9072e098683529048f00e1faed34b5725a82e84ff049c58abbcf6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6855, + "startColumn": 20, + "charOffset": 237473, + "charLength": 15, + "snippet": { + "text": "levelDifference" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6853, + "startColumn": 1, + "charOffset": 237317, + "charLength": 332, + "snippet": { + "text": "\tif (isLowerLevel) {\r\n\t\tfloat rateDamageTakenByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, __FUNCTION__) / 100;\r\n\t\tlevelDiffRate += levelDifference * rateDamageTakenByLevel;\r\n\t} else {\r\n\t\tfloat rateDamageReductionByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, __FUNCTION__) / 100;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6717ce3e867a529e", + "equalIndicator/v1": "cc84a9c5d97d854086f8c56c5c338fa800785988906da75abdae6d9f4124a387" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'newName' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'newName' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 56, + "startColumn": 25, + "charOffset": 1844, + "charLength": 22, + "snippet": { + "text": "const std::string_view" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 54, + "startColumn": 1, + "charOffset": 1753, + "charLength": 132, + "snippet": { + "text": "\t * @param newName The new name to set for the script type.\r\n\t */\r\n\tvoid setScriptTypeName(const std::string_view newName);\r\n\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fa2da6a0ca66b431", + "equalIndicator/v1": "cc8748f702f66b23c596ef4f33008b3e695968992f9b6f31e7de8e78b5224c12" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'", + "markdown": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 70, + "startColumn": 11, + "charOffset": 2205, + "charLength": 8, + "snippet": { + "text": "Creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 68, + "startColumn": 1, + "charOffset": 2148, + "charLength": 89, + "snippet": { + "text": "\tstatic constexpr double speedC = -4795.01;\r\n\r\n\tvirtual ~Creature();\r\n\r\n\t// non-copyable\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "24f8154fa42f563b", + "equalIndicator/v1": "cc98a78eaa7a0a0f2f7adfd4e5b49dca39ab74f92ec7a07f2156b85ffa9f3ef1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 303, + "startColumn": 41, + "charOffset": 11342, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 301, + "startColumn": 1, + "charOffset": 11296, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0c67deeffda2b377", + "equalIndicator/v1": "ccdd28e6a58182f8eb084705128a21c80e3b7e21515d7404bab148888ec2597f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 806, + "startColumn": 9, + "charOffset": 26110, + "charLength": 13, + "snippet": { + "text": "elementDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 804, + "startColumn": 1, + "charOffset": 26043, + "charLength": 87, + "snippet": { + "text": "\r\nint16_t WeaponDistance::getElementDamageValue() const {\r\n\treturn elementDamage;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1fbec82dfdaf6103", + "equalIndicator/v1": "cce70086cdc860c21d952b82cc35e1b6401948f5d8ad6010008d7d62de74c8f8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 676, + "startColumn": 49, + "charOffset": 18492, + "charLength": 23, + "snippet": { + "text": "(buffsPercent[i] - 100)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 674, + "startColumn": 1, + "charOffset": 18396, + "charLength": 138, + "snippet": { + "text": "\r\n\t\tint32_t actualBuff = creature->getBuff(i);\r\n\t\tbuffs[i] = static_cast(actualBuff * ((buffsPercent[i] - 100) / 100.f));\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29d8c7184b47cf50", + "equalIndicator/v1": "cd0fa11194916da83fe4567b5acdecfbd2d9d4397f0cb9b6fe410b5feea3984e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 568, + "startColumn": 113, + "charOffset": 20157, + "charLength": 5, + "snippet": { + "text": "thing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 566, + "startColumn": 1, + "charOffset": 20040, + "charLength": 295, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) {\r\n\t// Player:onLook(thing, position, distance) or Player.onLook(self, thing, position, distance)\r\n\tif (info.playerOnLook == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4fbfe9e54d44881d", + "equalIndicator/v1": "cd116ebbcfd4f801ce676b14569285c863c618cedec005e40a67edc67beff89f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 521, + "startColumn": 63, + "charOffset": 20363, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 519, + "startColumn": 1, + "charOffset": 20296, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::saveRewardItems(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dc3a121be3ed2bcd", + "equalIndicator/v1": "cd1258ebb7b6eac4f1c7d3e337b4dae87536e40b71c4d5ecd1d89f557f680cdb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'loginConnection' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'loginConnection' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 12, + "charOffset": 829, + "charLength": 15, + "snippet": { + "text": "loginConnection" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 757, + "charLength": 143, + "snippet": { + "text": "\r\n\texplicit ProtocolLogin(Connection_ptr loginConnection) :\r\n\t\tProtocol(loginConnection) { }\r\n\r\n\tvoid onRecvFirstMessage(NetworkMessage &msg);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "40ecea0fc4dc4b0e", + "equalIndicator/v1": "cd210aa6250fa864508986c59b03152212ded6cb6b762df580ad45eea49d31d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 491, + "startColumn": 81, + "charOffset": 14641, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 489, + "startColumn": 1, + "charOffset": 14556, + "charLength": 122, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::RemoveItemField(std::shared_ptr, std::shared_ptr, const Position &) {\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8e6c3e38e1491bea", + "equalIndicator/v1": "cd316636e782810c1530a35113782fb04153685e849e3772b11794cb082a78c5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use nullptr", + "markdown": "Use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 434, + "startColumn": 26, + "charOffset": 26773, + "charLength": 1, + "snippet": { + "text": "0" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 432, + "startColumn": 1, + "charOffset": 26685, + "charLength": 123, + "snippet": { + "text": "\r\n\tconst uint16_t date = result->getNumber(\"date\");\r\n\tconst time_t now = time(0);\r\n\ttm* ltm = localtime(&now);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "66a16b429530b713", + "equalIndicator/v1": "cd447b5c8ce52ddff59d20264441f01174c11a83f79778cda1de137e36f51909" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1946, + "startColumn": 2, + "charOffset": 59434, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1944, + "startColumn": 1, + "charOffset": 59366, + "charLength": 252, + "snippet": { + "text": "\r\nvoid ProtocolGame::parsePlayerSellOnShop(NetworkMessage &msg) {\r\n\tuint16_t id = msg.get();\r\n\tuint8_t count = std::max(msg.getByte(), (uint8_t)1);\r\n\tuint16_t amount = oldProtocol ? static_cast(msg.getByte()) : msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "464b58620b20e032", + "equalIndicator/v1": "cd53731fa086ec81da51e49d81507b20ab76f43dc637ff470636047e8591855a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'operator basic_string' must be marked explicit to avoid unintentional implicit conversions", + "markdown": "'operator basic_string' must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 100, + "startColumn": 27, + "charOffset": 3057, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 98, + "startColumn": 1, + "charOffset": 2979, + "charLength": 133, + "snippet": { + "text": "\tbool operator==(const ValueWrapper &rhs) const;\r\n\r\n\texplicit(false) operator std::string() const {\r\n\t\treturn get();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e54bef897fda93f", + "equalIndicator/v1": "cd5dab4050dd2b733a0cde76cef51d473515fa15bebd6bfe0f973f7dc82a0a54" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1627, + "startColumn": 113, + "charOffset": 48566, + "charLength": 7, + "snippet": { + "text": "newItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1625, + "startColumn": 1, + "charOffset": 48449, + "charLength": 156, + "snippet": { + "text": "}\r\n\r\nvoid Player::sendUpdateContainerItem(std::shared_ptr container, uint16_t slot, std::shared_ptr newItem) {\r\n\tif (!client) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d84394e96e6bcbe3", + "equalIndicator/v1": "cd6c5f63533d687c8d718e91c1e4209dad71a815ba39441c383c1fb4d8975529" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1076, + "startColumn": 11, + "charOffset": 30777, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1074, + "startColumn": 1, + "charOffset": 30733, + "charLength": 66, + "snippet": { + "text": "\t\t\treturn \"missile\";\r\n\t\tdefault:\r\n\t\t\treturn std::string();\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "011de28de5249aa4", + "equalIndicator/v1": "cd83f140d0ca63cdf30ba00606733c42f2269703cd6cf128ed5b0811edbb2de9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 36, + "startColumn": 14, + "charOffset": 1031, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 34, + "startColumn": 1, + "charOffset": 986, + "charLength": 346, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "260495c4e4c32ed4", + "equalIndicator/v1": "cd96db046997770a83140e33937b8a57b7c40785539670fd504672818ea10e91" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'initConnection' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'initConnection' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 17, + "startColumn": 35, + "charOffset": 596, + "charLength": 14, + "snippet": { + "text": "initConnection" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 15, + "startColumn": 1, + "charOffset": 487, + "charLength": 166, + "snippet": { + "text": "class Protocol : public std::enable_shared_from_this {\r\npublic:\r\n\texplicit Protocol(Connection_ptr initConnection) :\r\n\t\tconnectionPtr(initConnection) { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5f0307fcbb6bfa23", + "equalIndicator/v1": "cda65f82b68fb39377c7511e739a538b285c39756d811a3130944ab8b10d3eca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 83, + "startColumn": 65, + "charOffset": 2493, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 81, + "startColumn": 1, + "charOffset": 2424, + "charLength": 79, + "snippet": { + "text": "}\r\n\r\nvoid TrashHolder::removeThing(std::shared_ptr, uint32_t) {\r\n\t//\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b361df66f0f50796", + "equalIndicator/v1": "cda9d43532d75af35fd886317ef80c592184ce1f270a41096da6794f79bf467f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Annotate this function with 'override' or (rarely) 'final'", + "markdown": "Annotate this function with 'override' or (rarely) 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 3, + "charOffset": 1036, + "charLength": 9, + "snippet": { + "text": "Container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 907, + "charLength": 203, + "snippet": { + "text": "\texplicit Container(uint16_t type);\r\n\tContainer(uint16_t type, uint16_t size, bool unlocked = true, bool pagination = false);\r\n\t~Container();\r\n\r\n\tstatic std::shared_ptr create(uint16_t type);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b4092e451abcb4f", + "equalIndicator/v1": "cdb75fd06462757255dabe7e9fa81910fbba2160e24a4de2bd32f3936dd57b72" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 350, + "startColumn": 27, + "charOffset": 12545, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 348, + "startColumn": 1, + "charOffset": 12513, + "charLength": 125, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.creatureOnHear, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "19b2f1c2afc3d4b1", + "equalIndicator/v1": "cdbae4ff22bf44d3e811851fe449b5d50603b201c36146bae3fad8cb2b1896c8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 345, + "startColumn": 22, + "charOffset": 9211, + "charLength": 8, + "snippet": { + "text": "blockHit" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 343, + "startColumn": 1, + "charOffset": 9082, + "charLength": 414, + "snippet": { + "text": "\t */\r\n\tvoid mitigateDamage(const CombatType_t &combatType, BlockType_t &blockType, int32_t &damage) const;\r\n\tvirtual BlockType_t blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense = false, bool checkArmor = false, bool field = false);\r\n\r\n\tvoid applyAbsorbDamageModifications(std::shared_ptr attacker, int32_t &damage, CombatType_t combatType) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "407c33bb4201c9a4", + "equalIndicator/v1": "cddc89111b649f28c190c4d83e23b9a8c61a6501a7650ead479c20a0ce6f1707" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 88, + "startColumn": 2, + "charOffset": 2646, + "charLength": 71, + "snippet": { + "text": "getParent()->postAddNotification(thing, oldParent, index, LINK_PARENT);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 86, + "startColumn": 1, + "charOffset": 2504, + "charLength": 219, + "snippet": { + "text": "\r\nvoid TrashHolder::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tgetParent()->postAddNotification(thing, oldParent, index, LINK_PARENT);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "afe8c8e837bd84ec", + "equalIndicator/v1": "cde2789d9ab8835c4c90b79d523f083eaac243ddb55787db2c2f06373a71a98d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9801, + "startColumn": 51, + "charOffset": 342994, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9799, + "startColumn": 1, + "charOffset": 342939, + "charLength": 105, + "snippet": { + "text": "}\r\n\r\nvoid Game::removeMonster(std::shared_ptr monster) {\r\n\tmonsters.erase(monster->getID());\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f2aa64df1c6d21d4", + "equalIndicator/v1": "ce0107342cb8e14e33e61c0b542e0a6773834d436e0f0a2cd692c9fe6181c858" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2563, + "startColumn": 50, + "charOffset": 97273, + "charLength": 8, + "snippet": { + "text": "cylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2561, + "startColumn": 1, + "charOffset": 97219, + "charLength": 227, + "snippet": { + "text": "}\r\n\r\nbool Game::removeMoney(std::shared_ptr cylinder, uint64_t money, uint32_t flags /*= 0*/, bool useBalance /*= false*/) {\r\n\tif (cylinder == nullptr) {\r\n\t\tg_logger().error(\"[{}] cylinder is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab9866911fe0bee0", + "equalIndicator/v1": "ce1a379e9a34a18476017126697c433440577da8eb41b88d83f14364355add16" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getIconID' can be made const", + "markdown": "Method 'getIconID' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 119, + "startColumn": 11, + "charOffset": 2877, + "charLength": 9, + "snippet": { + "text": "getIconID" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 117, + "startColumn": 1, + "charOffset": 2861, + "charLength": 65, + "snippet": { + "text": "\t}\r\n\r\n\tuint16_t getIconID() {\r\n\t\treturn icon + (baseid - 1);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4afe8098bb769b20", + "equalIndicator/v1": "ce2f5fc2a9a29cd4abf32713b8c16e86d782373b0529506bf5380f8dc68f1bf8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 568, + "startColumn": 56, + "charOffset": 20100, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 566, + "startColumn": 1, + "charOffset": 20040, + "charLength": 295, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) {\r\n\t// Player:onLook(thing, position, distance) or Player.onLook(self, thing, position, distance)\r\n\tif (info.playerOnLook == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7c7c33ca185ca10f", + "equalIndicator/v1": "ce3ee7261e4e9e74acbe7709a444a09019231b9d56f18dae6494c9c24b3a4e8e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1192, + "startColumn": 7, + "charOffset": 45411, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1190, + "startColumn": 1, + "charOffset": 45287, + "charLength": 276, + "snippet": { + "text": "\r\nvoid EventCallback::zoneAfterCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureEnter - \"\r\n\t\t \"Zone {} Creature {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0e8b8097dc0ab271", + "equalIndicator/v1": "ce41ca9a1ac229581d3fc65b39eb6997eae088ad5b5417b77c9bb41abadfacd6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 88, + "startColumn": 8, + "charOffset": 2294, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 86, + "startColumn": 1, + "charOffset": 2206, + "charLength": 201, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsRune(lua_State* L) {\r\n\t// itemType:isRune()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isRune());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "49cbd00229e399c1", + "equalIndicator/v1": "ce66311a576f1dcbcabee6129d52058b4530d7b909870981e5116e49d4ccc400" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 643, + "startColumn": 35, + "charOffset": 20214, + "charLength": 7, + "snippet": { + "text": "augment" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 641, + "startColumn": 1, + "charOffset": 20027, + "charLength": 397, + "snippet": { + "text": "\t\t\t\t}\r\n\t\t\t\tif (augment->type == Augment_t::IncreasedDamage || augment->type == Augment_t::PowerfulImpact || augment->type == Augment_t::StrongImpact) {\r\n\t\t\t\t\tconst float augmentPercent = augment->value / 100.0;\r\n\t\t\t\t\tdamage.primary.value += static_cast(damage.primary.value * augmentPercent);\r\n\t\t\t\t\tdamage.secondary.value += static_cast(damage.secondary.value * augmentPercent);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "80531f06673a7e96", + "equalIndicator/v1": "ceb90e6d76a624c52b430274ab0630dcd426c384aef970a07906811348192e91" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 384, + "startColumn": 54, + "charOffset": 11112, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 382, + "startColumn": 1, + "charOffset": 11054, + "charLength": 148, + "snippet": { + "text": "}\r\n\r\nbool Spell::playerSpellCheck(std::shared_ptr player) const {\r\n\tif (player->hasFlag(PlayerFlags_t::CannotUseSpells)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "97486e04c7f6707b", + "equalIndicator/v1": "cec42e6cf344058e52aaec36f4fd416fde2b03119b88d9e8f0956b9249769e39" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1225, + "startColumn": 29, + "charOffset": 36073, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1223, + "startColumn": 1, + "charOffset": 35944, + "charLength": 163, + "snippet": { + "text": "\tvoid sendCreatureType(std::shared_ptr creature, uint8_t creatureType) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureType(creature, creatureType);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4716779d817b5a0a", + "equalIndicator/v1": "ceee5971c9533b27053d94af8988f92e113c161819f674c9edb451eba87a2601" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 191, + "startColumn": 20, + "charOffset": 5746, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 189, + "startColumn": 1, + "charOffset": 5707, + "charLength": 78, + "snippet": { + "text": "\r\n\t\taddItem(item);\r\n\t\tupdateItemWeight(item->getWeight());\r\n\t}\r\n\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c1aebafdaa87ee23", + "equalIndicator/v1": "cef1f8190e96f94fa516d8aae3d4535783342bc8119a5eaa0f54db8380a86773" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'reloadAll' is within a recursive call chain", + "markdown": "Function 'reloadAll' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 85, + "startColumn": 18, + "charOffset": 2681, + "charLength": 9, + "snippet": { + "text": "reloadAll" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 83, + "startColumn": 1, + "charOffset": 2589, + "charLength": 202, + "snippet": { + "text": " * Changing this to public may cause some unexpected behavior or bug\r\n */\r\nbool GameReload::reloadAll() {\r\n\tstd::vector reloadResults;\r\n\treloadResults.reserve(magic_enum::enum_count());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a5d791785ca1c016", + "equalIndicator/v1": "cf12453c25f68eb3f0f1b652461963c53ea058613bdbbb127f3685ac691ee40d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 508, + "startColumn": 31, + "charOffset": 20079, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 506, + "startColumn": 1, + "charOffset": 19984, + "charLength": 177, + "snippet": { + "text": "\r\n\t\tfor (const auto &[pid, depotChest] : player->depotChests) {\r\n\t\t\tfor (std::shared_ptr item : depotChest->getItemList()) {\r\n\t\t\t\tdepotList.emplace_back(pid, item);\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e71b1fdc797587b0", + "equalIndicator/v1": "cf2c30c15a542e42284b302d869d79e52c7d8b5c37f62c7849b7a63089ae44a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1137, + "startColumn": 92, + "charOffset": 40730, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1135, + "startColumn": 1, + "charOffset": 40634, + "charLength": 286, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) {\r\n\t// Player:onCombat(target, item, primaryDamage, primaryType, secondaryDamage, secondaryType)\r\n\tif (info.playerOnCombat == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "990f8b9fcbfc1fed", + "equalIndicator/v1": "cf4d8bcf72c65a683d4ed3c9b239a2cec00fe8c7b9d102633cef8acc4dc0c4d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 43, + "startColumn": 18, + "charOffset": 1473, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 41, + "startColumn": 1, + "charOffset": 1326, + "charLength": 279, + "snippet": { + "text": "\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\r\n\tbaseSpeed = mType->getBaseSpeed();\r\n\tinternalLight = mType->info.light;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "273034a42204e834", + "equalIndicator/v1": "cf52bf143b34ea3e085776bd14850d3bf5331f4fa5a545f4e8e870717ece2539" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7858, + "startColumn": 54, + "charOffset": 274862, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7856, + "startColumn": 1, + "charOffset": 274804, + "charLength": 156, + "snippet": { + "text": "}\r\n\r\nvoid Game::addPlayerVocation(std::shared_ptr target) {\r\n\tif (const auto &party = target->getParty()) {\r\n\t\tparty->updatePlayerVocation(target);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "859389ce836c2c57", + "equalIndicator/v1": "cf54a63b817c4226b48ac9fb114684b79d8cf7dfcff4c964c55aedfcde8d59a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 421, + "startColumn": 3, + "charOffset": 13904, + "charLength": 6, + "snippet": { + "text": "return" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 419, + "startColumn": 1, + "charOffset": 13853, + "charLength": 110, + "snippet": { + "text": "\t\treturn 4;\r\n\t} else if (chanceInPercent < 1) {\r\n\t\treturn 3;\r\n\t} else if (chanceInPercent < 5) {\r\n\t\treturn 2;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e23f62820cc50220", + "equalIndicator/v1": "cf58ac7c782c13bd06657941cf161ae2b142698bc4d62ecc5e81d2253ff90e8a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 670, + "startColumn": 37, + "charOffset": 21952, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 668, + "startColumn": 1, + "charOffset": 21890, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.25f) + 3;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e3e202c5d5f2105", + "equalIndicator/v1": "cf8af8e2d026635c4ccc450f835a716e15d27591b27ad9d5d6c21b16fced788f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6804, + "startColumn": 114, + "charOffset": 235235, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6802, + "startColumn": 1, + "charOffset": 235117, + "charLength": 251, + "snippet": { + "text": "}\r\n\r\nvoid Game::notifySpectators(const CreatureVector &spectators, const Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetMonster) {\r\n\tif (!spectators.empty()) {\r\n\t\tfor (const auto &spectator : spectators) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82d0892864069cc6", + "equalIndicator/v1": "cf9ce2c44820666bde6874faa738b120e156da5c231d9a94bdf15995134c0a50" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 253, + "startColumn": 24, + "charOffset": 6692, + "charLength": 5, + "snippet": { + "text": "regen" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 251, + "startColumn": 1, + "charOffset": 6662, + "charLength": 201, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tplayer->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false);\r\n\t\tplayer->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__));\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "886591dc0bec17cd", + "equalIndicator/v1": "cf9e9ed4e19a8da6a20b12bae224540abc06f07be35fbdb9cd1d07b11c9bfefb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 545, + "startColumn": 40, + "charOffset": 16604, + "charLength": 8, + "snippet": { + "text": "capacity" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 543, + "startColumn": 1, + "charOffset": 16559, + "charLength": 101, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t freeSlots = std::max(capacity() - size(), 0);\r\n\r\n\tif (item->isStackable()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d1f9e13e4672f0fb", + "equalIndicator/v1": "cfccc5207c1b6ac5a8524e8e53342c3932106095d0dd15b76d941aa7c110518f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", + "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 679, + "startColumn": 15, + "charOffset": 22253, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 677, + "startColumn": 1, + "charOffset": 22212, + "charLength": 74, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tchance = it.hitChance;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d9512e3ea8d0367b", + "equalIndicator/v1": "cfcef4de1668c9d2ec141a6d93277f73daf4e76ba5c844e3c51d73232a1a4213" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Tree, std::less, std::allocator>>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Tree, std::less, std::allocator\\>\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 239, + "startColumn": 2, + "charOffset": 7406, + "charLength": 10, + "snippet": { + "text": "const auto" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 237, + "startColumn": 1, + "charOffset": 7332, + "charLength": 165, + "snippet": { + "text": "int GameFunctions::luaGameGetTowns(lua_State* L) {\r\n\t// Game.getTowns()\r\n\tconst auto towns = g_game().map.towns.getTowns();\r\n\tlua_createtable(L, towns.size(), 0);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ff71daffcbce398", + "equalIndicator/v1": "cfe72cc1be801e3ecf891a0433d2fb41c3a6d0a8e5f5b3d9d92f01fa8bcd2031" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3083, + "startColumn": 61, + "charOffset": 92619, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3081, + "startColumn": 1, + "charOffset": 92512, + "charLength": 197, + "snippet": { + "text": "\r\n// close container and its child containers\r\nvoid Player::autoCloseContainers(std::shared_ptr container) {\r\n\tstd::vector closeList;\r\n\tfor (const auto &it : openContainers) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4970b8598459fde4", + "equalIndicator/v1": "cff086b035890e26b2c53903a181d973f7db1f7fc7d8b939d0a53e2e4e3ec81e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 222, + "startColumn": 20, + "charOffset": 6441, + "charLength": 6, + "snippet": { + "text": "uptime" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 220, + "startColumn": 1, + "charOffset": 6329, + "charLength": 136, + "snippet": { + "text": "\t// getWorldUpTime()\r\n\tuint64_t uptime = (OTSYS_TIME(true) - ProtocolStatus::start) / 1000;\r\n\tlua_pushnumber(L, uptime);\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5151ec61110c1a5c", + "equalIndicator/v1": "d01dfe708011c6fc9821feef0851187a861f09bec12c54693420b4ae37e5aea1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 113, + "startColumn": 7, + "charOffset": 3856, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 111, + "startColumn": 1, + "charOffset": 3719, + "charLength": 291, + "snippet": { + "text": "\r\nReturnValue EventCallback::creatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnTargetCombat - \"\r\n\t\t \"Creature {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c5cef372182c58d", + "equalIndicator/v1": "d0ac9dbd0c85103096ef86e7e2dbded592fce9cee137e45f13f3c73218c8f5e9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 513, + "startColumn": 7, + "charOffset": 18210, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 511, + "startColumn": 1, + "charOffset": 18198, + "charLength": 227, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"Party leader {}. Call stack overflow. Too many lua script calls being nested.\", party->getLeader() ? party->getLeader()->getName() : \"unknown\");\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f029d91262371d61", + "equalIndicator/v1": "d0f968e0907bb768c8ba9c9135a9775402d24c1bace287596527cdc722f98cf8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6844, + "startColumn": 106, + "charOffset": 236923, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6842, + "startColumn": 1, + "charOffset": 236813, + "charLength": 238, + "snippet": { + "text": "}\r\n\r\nfloat Game::pvpLevelDifferenceDamageMultiplier(std::shared_ptr attacker, std::shared_ptr target) {\r\n\tint32_t levelDifference = target->getLevel() - attacker->getLevel();\r\n\tlevelDifference = std::abs(levelDifference);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bb6a8bf8ff62ca22", + "equalIndicator/v1": "d0ff4014b5e06f1b6e49f479c634f9dc2aa8f305788861a0df1fa9f9aea6a495" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 208, + "startColumn": 17, + "charOffset": 5126, + "charLength": 3, + "snippet": { + "text": "key" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 206, + "startColumn": 1, + "charOffset": 5011, + "charLength": 152, + "snippet": { + "text": "\tstd::string iKeyPad(64, 0x36), oKeyPad(64, 0x5C);\r\n\tfor (uint8_t i = 0; i < key.length(); ++i) {\r\n\t\tiKeyPad[i] ^= key[i];\r\n\t\toKeyPad[i] ^= key[i];\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "608ee0c0c3afe73d", + "equalIndicator/v1": "d10b1888ad6e849af70949f6f52ff5b2cf06615f88c0974985733a7c4ea5a63f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 774, + "startColumn": 7, + "charOffset": 27966, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 772, + "startColumn": 1, + "charOffset": 27954, + "charLength": 149, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnItemMoved - \"\r\n\t\t \"Player {} item {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c758912590acc6e1", + "equalIndicator/v1": "d12d92816a0b9416834fb6405d9cbb7958221e171f8fe35c4c0c4625d5d96c0c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9200, + "startColumn": 46, + "charOffset": 321497, + "charLength": 10, + "snippet": { + "text": "totalPrice" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9198, + "startColumn": 1, + "charOffset": 321399, + "charLength": 219, + "snippet": { + "text": "\t\t\tg_game().removeMoney(player, remainsPrice);\r\n\t\t}\r\n\t\tg_metrics().addCounter(\"balance_decrease\", totalPrice, { { \"player\", player->getName() }, { \"context\", \"market_purchase\" } });\r\n\r\n\t\tif (it.id == ITEM_STORE_COIN) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ae93b9732efa83d5", + "equalIndicator/v1": "d13158035ed0a0cc67d2fc14a6db44fc1a1d8eb49e22a9b9cc8ba88592648109" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 60, + "startColumn": 3, + "charOffset": 2001, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 58, + "startColumn": 1, + "charOffset": 1898, + "charLength": 230, + "snippet": { + "text": "bool Protocol::onRecvMessage(NetworkMessage &msg) {\r\n\tif (checksumMethod != CHECKSUM_METHOD_NONE) {\r\n\t\tuint32_t recvChecksum = msg.get();\r\n\t\tif (checksumMethod == CHECKSUM_METHOD_SEQUENCE) {\r\n\t\t\tif (recvChecksum == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fbdcc1bc61e41aed", + "equalIndicator/v1": "d16d09c895c4f681845d1cbf3995f6c418b359d611116e581d05e5f4457e922d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 157, + "startColumn": 24, + "charOffset": 4403, + "charLength": 29, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 155, + "startColumn": 1, + "charOffset": 4240, + "charLength": 248, + "snippet": { + "text": "\tbool registerLuaActionEvent(const std::shared_ptr action);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr action);\r\n\tbool registerLuaEvent(const std::shared_ptr action);\r\n\t// Clear maps for reloading\r\n\tvoid clear();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2d32dd0fa207c1a9", + "equalIndicator/v1": "d175e908d66ab4a92eaae37162098bc7fe227caad7d67d2d3f8d993b6291e298" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6928, + "startColumn": 81, + "charOffset": 240571, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6926, + "startColumn": 1, + "charOffset": 240486, + "charLength": 149, + "snippet": { + "text": "}\r\n\r\nint32_t Game::applyHealthChange(CombatDamage &damage, std::shared_ptr target) const {\r\n\tint32_t targetHealth = target->getHealth();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "50268917af52f5cd", + "equalIndicator/v1": "d17fa58ae5cc939c77b55519205412235fdc2b155d31a2f2653b09f777065247" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'newHouse' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'newHouse' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 89, + "startColumn": 18, + "charOffset": 2468, + "charLength": 8, + "snippet": { + "text": "newHouse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 87, + "startColumn": 1, + "charOffset": 2385, + "charLength": 181, + "snippet": { + "text": "\r\n\texplicit HouseTransferItem(std::shared_ptr newHouse) :\r\n\t\tItem(0), house(newHouse) { }\r\n\r\n\tvoid onTradeEvent(TradeEvents_t event, std::shared_ptr owner) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e8981aad2f6765bf", + "equalIndicator/v1": "d18596c3c3e1475ac2489b2b208b253359bd3ff1e8dd70c80057055f6c3b787d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 328, + "startColumn": 14, + "charOffset": 8275, + "charLength": 12, + "snippet": { + "text": "std::tolower" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 326, + "startColumn": 1, + "charOffset": 8216, + "charLength": 143, + "snippet": { + "text": "\t\tif (std::isupper(ch)) {\r\n\t\t\tresult += '_';\r\n\t\t\tresult += std::tolower(ch);\r\n\t\t} else if (std::isspace(ch) || ch == '-') {\r\n\t\t\tresult += '_';\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "14a8b88d22bf521a", + "equalIndicator/v1": "d19a55c045d556022c892e3a398d3ab003fd7dd0dbfe03ba54ab00b9db3c3386" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'movingCreature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'movingCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1393, + "startColumn": 89, + "charOffset": 55150, + "charLength": 14, + "snippet": { + "text": "movingCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1391, + "startColumn": 1, + "charOffset": 55057, + "charLength": 264, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerMoveCreature(std::shared_ptr player, std::shared_ptr movingCreature, const Position &movingCreatureOrigPos, std::shared_ptr toTile) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!player->canDoAction()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a305f9cfdd7cd379", + "equalIndicator/v1": "d1ab6e8a0e993b6106acac19b1dd5864c900bb5d7cd92887e6632352de703c2d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 24, + "startColumn": 28, + "charOffset": 721, + "charLength": 11, + "snippet": { + "text": "getCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 688, + "charLength": 96, + "snippet": { + "text": "\t}\r\n\r\n\tstd::shared_ptr getCylinder() override final {\r\n\t\treturn getTrashHolder();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1caf3420f12edf46", + "equalIndicator/v1": "d23dadd0fde8cf83b99ed19b272b9166d925f4b37ed6dd3e0e985e9484bb8c54" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7451, + "startColumn": 45, + "charOffset": 225068, + "charLength": 4, + "snippet": { + "text": "cost" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7449, + "startColumn": 1, + "charOffset": 224997, + "charLength": 250, + "snippet": { + "text": "\t}\r\n\thistory.cost = cost;\r\n\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_transfer\" } });\r\n\r\n\treturnValue = g_game().internalAddItem(static_self_cast(), exaltationContainer, INDEX_WHEREEVER);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "660a94fa7930e16f", + "equalIndicator/v1": "d24684db571ec8a94447ecdf06edc793d8348ee759cb5054750d6f6f1ac1fc0a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 772, + "startColumn": 8, + "charOffset": 23036, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 770, + "startColumn": 1, + "charOffset": 22929, + "charLength": 266, + "snippet": { + "text": "\t\t// onThink(self, interval)\r\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\r\n\t\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\t\tg_logger().error(\"Monster {} Call stack overflow. Too many lua script calls \"\r\n\t\t\t \"being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "457e16007ecdb09d", + "equalIndicator/v1": "d28f9f7124c0086375661ad4827ee15d131bb20f95bb59f636ad0c1ec01b029f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3594, + "startColumn": 45, + "charOffset": 111431, + "charLength": 27, + "snippet": { + "text": "Weapons::getMaxWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3592, + "startColumn": 1, + "charOffset": 111277, + "charLength": 563, + "snippet": { + "text": "\t\t\tint32_t attackSkill = player->getWeaponSkill(weapon);\r\n\t\t\tfloat attackFactor = player->getAttackFactor();\r\n\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\r\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\r\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, it.abilities->elementDamage, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "09aa2e32e0166553", + "equalIndicator/v1": "d290af30aa686b1cfb5b21e1995f1432e1d8d1ee40e49e0fcce81bfeec7ba886" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8449, + "startColumn": 2, + "charOffset": 293735, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8447, + "startColumn": 1, + "charOffset": 293677, + "charLength": 173, + "snippet": { + "text": "\r\n\tuint16_t page = result->getNumber(\"page\");\r\n\tuint32_t pages = result->getNumber(\"entries\");\r\n\tpages += entriesPerPage - 1;\r\n\tpages /= entriesPerPage;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29761348984c3231", + "equalIndicator/v1": "d297d2851fee87130ea66bf842abb38fc2ae1ba31a66dcf9899d59da972a46f9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 133, + "startColumn": 68, + "charOffset": 3881, + "charLength": 9, + "snippet": { + "text": "moveEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 131, + "startColumn": 1, + "charOffset": 3809, + "charLength": 154, + "snippet": { + "text": "}\r\n\r\nbool MoveEvents::registerLuaEvent(const std::shared_ptr moveEvent) {\r\n\t// Check if event is correct\r\n\tif (registerLuaItemEvent(moveEvent)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "040d26612fd53830", + "equalIndicator/v1": "d29ce73ac73b0b1de9b2571de32bd601bf532a06393befb0bc197c7a3ec9765b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2078, + "startColumn": 34, + "charOffset": 61996, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2076, + "startColumn": 1, + "charOffset": 61749, + "charLength": 413, + "snippet": { + "text": "void Monster::changeHealth(int32_t healthChange, bool sendHealthChange /* = true*/) {\r\n\tif (mType && !mType->info.soundVector.empty() && mType->info.soundChance >= static_cast(uniform_random(1, 100))) {\r\n\t\tauto index = uniform_random(0, mType->info.soundVector.size() - 1);\r\n\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), mType->info.soundVector[index], getMonster());\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9c12e9c41aec37ec", + "equalIndicator/v1": "d2a5d18a2845b5709465adb85b532049ace7f1e80fd77b8c5d4d2516ca3675bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3057, + "startColumn": 77, + "charOffset": 113661, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3055, + "startColumn": 1, + "charOffset": 113580, + "charLength": 252, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::processMoveOrAddItemToLootContainer(std::shared_ptr item, std::shared_ptr lootContainer, uint32_t &remainderCount, std::shared_ptr player) {\r\n\tstd::shared_ptr moveItem = nullptr;\r\n\tReturnValue ret;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "84ad88c29c7c161e", + "equalIndicator/v1": "d2e1cdf2c15778af3993e8e4d3e87c9943304136ea305eca25b9eb18985c93cb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 85, + "startColumn": 12, + "charOffset": 2788, + "charLength": 9, + "snippet": { + "text": "healthMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 83, + "startColumn": 1, + "charOffset": 2666, + "charLength": 282, + "snippet": { + "text": "\t\tmonster->skull = mType->info.skull;\r\n\t\tmonster->health = mType->info.health * mType->getHealthMultiplier();\r\n\t\tmonster->healthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\t\tmonster->baseSpeed = mType->getBaseSpeed();\r\n\t\tmonster->internalLight = mType->info.light;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5b763c8c50de29ef", + "equalIndicator/v1": "d2fe495491f1f1a3b856dd707098196091a14cbfa400824f12a2d7ea23b85a61" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7851, + "startColumn": 50, + "charOffset": 274563, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7849, + "startColumn": 1, + "charOffset": 274509, + "charLength": 241, + "snippet": { + "text": "}\r\n\r\nvoid Game::addPlayerMana(std::shared_ptr target) {\r\n\tif (const auto &party = target->getParty()) {\r\n\t\tuint8_t manaPercent = std::ceil((static_cast(target->getMana()) / std::max(target->getMaxMana(), 1)) * 100);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cc6693e77a0c71bb", + "equalIndicator/v1": "d349fa74e41b89c7ee10e35a673da16f5dd865a95efebb42b6f806a8ba28782e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly", + "markdown": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 63, + "startColumn": 132, + "charOffset": 1906, + "charLength": 12, + "snippet": { + "text": "__FUNCTION__" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 61, + "startColumn": 1, + "charOffset": 1751, + "charLength": 260, + "snippet": { + "text": "\t\t\t\tloadConfigLua();\r\n\r\n\t\t\t\tlogger.info(\"Server protocol: {}.{}{}\", CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER, g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__) ? \" and 10x allowed!\" : \"\");\r\n#ifdef FEATURE_METRICS\r\n\t\t\t\tmetrics::Options metricsOptions;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c1f91383e925332a", + "equalIndicator/v1": "d3ab372d8cabd67603deec407ada2ef4ce6d0edde62f42081b9cabf2025f57cc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'operator double' must be marked explicit to avoid unintentional implicit conversions", + "markdown": "'operator double' must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 112, + "startColumn": 27, + "charOffset": 3292, + "charLength": 6, + "snippet": { + "text": "double" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 110, + "startColumn": 1, + "charOffset": 3260, + "charLength": 82, + "snippet": { + "text": "\t}\r\n\r\n\texplicit(false) operator double() const {\r\n\t\treturn get();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6e2b9905f607f85", + "equalIndicator/v1": "d3b6b2a64dd5a7988c697d2f9f28a1320e151fa3210fb0b8c7f5b20d725363fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1212, + "startColumn": 26, + "charOffset": 33751, + "charLength": 8, + "snippet": { + "text": "manaGain" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1210, + "startColumn": 1, + "charOffset": 33591, + "charLength": 259, + "snippet": { + "text": "\t\t\tinternalManaTicks = 0;\r\n\t\t\tif (creature->getZoneType() == ZONE_PROTECTION && dailyStreak >= DAILY_REWARD_DOUBLE_MP_REGENERATION) {\r\n\t\t\t\tcreature->changeMana(manaGain * 2); // Double regen from daily reward\r\n\t\t\t} else {\r\n\t\t\t\tcreature->changeMana(manaGain);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4340e88809cd595c", + "equalIndicator/v1": "d3c99d9278aa72e6a2c0cd61003d441f6eb4f6946f86a78c900ed54e61864d27" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 571, + "startColumn": 68, + "charOffset": 15427, + "charLength": 23, + "snippet": { + "text": "(statsPercent[i] - 100)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 569, + "startColumn": 1, + "charOffset": 15331, + "charLength": 145, + "snippet": { + "text": "\r\n\t\t\tcase STAT_MAGICPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getBaseMagicLevel() * ((statsPercent[i] - 100) / 100.f));\r\n\t\t\t\tbreak;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2369069044a3fa97", + "equalIndicator/v1": "d3d04794cadc15678f6cdec9db9dc376dd61b44905bf3971c6b70e8da1bd2392" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 368, + "startColumn": 67, + "charOffset": 13167, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 366, + "startColumn": 1, + "charOffset": 13096, + "charLength": 334, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventCreatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) {\r\n\tif (info.creatureOnDrainHealth == -1) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "35744ac34fa299fe", + "equalIndicator/v1": "d3e479d6aa50d2aa29ed477e843f1fdc27e4a2f253b8166a9a0f6d652d2827a0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 368, + "startColumn": 30, + "charOffset": 10446, + "charLength": 5, + "snippet": { + "text": "armor" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 366, + "startColumn": 1, + "charOffset": 10408, + "charLength": 79, + "snippet": { + "text": "\t\t}\r\n\t}\r\n\treturn static_cast(armor * vocation->armorMultiplier);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eb6a3e6d5f61a320", + "equalIndicator/v1": "d3f0dc2b3585185ad5b1bcf763d8d7c43b2c325d4ebfff727bd5b7257ff2a0e4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 598, + "startColumn": 13, + "charOffset": 29155, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 596, + "startColumn": 1, + "charOffset": 28963, + "charLength": 419, + "snippet": { + "text": "\t} else if (stringValue == \"absorbpercentdrown\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DROWNDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentphysical\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercenthealing\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "764f42d2b4ebc1d7", + "equalIndicator/v1": "d4608860d9099049148f2b4eb0425cdb08dfc2abe29bb0b203025bd5cf3c04c0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getRecvbyte' can be made const", + "markdown": "Method 'getRecvbyte' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 10, + "charOffset": 1090, + "charLength": 11, + "snippet": { + "text": "getRecvbyte" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1074, + "charLength": 56, + "snippet": { + "text": "\t//\r\n\r\n\tuint8_t getRecvbyte() {\r\n\t\treturn recvbyte;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3f23a2a4621f0710", + "equalIndicator/v1": "d46b4b9c31b617a4eb07502c7858416cfd1d164443d094aee45f6458945bca11" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 51, + "startColumn": 7, + "charOffset": 1489, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 49, + "startColumn": 1, + "charOffset": 1358, + "charLength": 336, + "snippet": { + "text": "// Creature\r\nbool EventCallback::creatureOnChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnChangeOutfit - Creature {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e41969123b8205ac", + "equalIndicator/v1": "d46d2d7b63b6c7c6e0d266309fc0c04242a78ea3b4e3460c65dddfcd2f6ef19f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 177, + "startColumn": 6, + "charOffset": 6625, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 175, + "startColumn": 1, + "charOffset": 6569, + "charLength": 193, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, position);\r\n\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ea09aba65d510c28", + "equalIndicator/v1": "d481f122609313b73eba7201202b39b9802740ff0b083d9d8aa22ed43363d147" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7948, + "startColumn": 84, + "charOffset": 249927, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7946, + "startColumn": 1, + "charOffset": 249839, + "charLength": 156, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::AddCreatureLight(NetworkMessage &msg, std::shared_ptr creature) {\r\n\tLightInfo lightInfo = creature->getCreatureLight();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bcaa199d6d9b2ff7", + "equalIndicator/v1": "d4918f31744119c3372614ccbf9081f24ac11159b611e5f59a83781b386420fa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'bankable' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'bankable' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 19, + "startColumn": 44, + "charOffset": 646, + "charLength": 8, + "snippet": { + "text": "bankable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 17, + "startColumn": 1, + "charOffset": 565, + "charLength": 121, + "snippet": { + "text": "#include \"lib/metrics/metrics.hpp\"\r\n\r\nBank::Bank(const std::shared_ptr bankable) :\r\n\tm_bankable(bankable) {\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "af1488c1c02f02f8", + "equalIndicator/v1": "d49ec58c32a307be010f0a30fad68aa4bf73648f9e12ec831302814a1a5f56f6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/runtime_provider.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 124, + "startColumn": 21, + "charOffset": 3508, + "charLength": 8, + "snippet": { + "text": "injector" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 122, + "startColumn": 1, + "charOffset": 3463, + "charLength": 117, + "snippet": { + "text": "\r\n\t\t\ttemplate \r\n\t\t\t/*non explicit*/ injector(const T &bindings) :\r\n\t\t\t\tinjector() {\r\n\t\t\t\tinstall(bindings);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "337353b0b082036a", + "equalIndicator/v1": "d4c6dc9688192f0a5f79c33d22427ef3984bd3a7bfe9bcf490e0fce26994db46" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 582, + "startColumn": 27, + "charOffset": 20651, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 580, + "startColumn": 1, + "charOffset": 20619, + "charLength": 123, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnLook, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "39c90811686981f1", + "equalIndicator/v1": "d4cc2d477e01fb6ca958b02439dae43b8981a87e7a9d839c7fb00b493fa6c70b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Switch has 2 consecutive identical branches", + "markdown": "Switch has 2 consecutive identical branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 462, + "startColumn": 3, + "charOffset": 12823, + "charLength": 4, + "snippet": { + "text": "case" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 460, + "startColumn": 1, + "charOffset": 12719, + "charLength": 157, + "snippet": { + "text": "\t\tcase FIGHTMODE_BALANCED:\r\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.75f : 1.0f;\r\n\t\tcase FIGHTMODE_DEFENSE:\r\n\t\t\treturn 1.0f;\r\n\t\tdefault:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0a64c2dfa0c0907b", + "equalIndicator/v1": "d4e849e80b9c53686e588a81f08829c01b7710d7f45448825bbfa44df351cf25" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 307, + "startColumn": 2, + "charOffset": 8027, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 305, + "startColumn": 1, + "charOffset": 7909, + "charLength": 183, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\r\n\tstd::shared_ptr creature = getCreature(L, 2);\r\n\tuint32_t topicId = getNumber(L, 3, 0);\r\n\r\n\tif (!npc) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f65ba4ff4636d4fd", + "equalIndicator/v1": "d4eca4310d6a5837c34432a6ac284d7a0086b2fe7f1838ae7cc736b7aabe2398" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 672, + "startColumn": 28, + "charOffset": 21766, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 670, + "startColumn": 1, + "charOffset": 21673, + "charLength": 205, + "snippet": { + "text": "\r\n\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\r\n\t\tdamage.secondary.value = damage.primary.value * (damagePercent);\r\n\t\tdamage.primary.value = damage.primary.value * (1 - damagePercent);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "700f72283a214988", + "equalIndicator/v1": "d516502307fd679b4a59ce3127123a67f9f393f9641284f42473ad62eb4e2de5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'party' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'party' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 356, + "startColumn": 34, + "charOffset": 15267, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 354, + "startColumn": 1, + "charOffset": 15111, + "charLength": 283, + "snippet": { + "text": "\tvoid sendTradeItemRequest(const std::string &traderName, std::shared_ptr item, bool ack);\r\n\tvoid sendCloseTrade();\r\n\tvoid updatePartyTrackerAnalyzer(const std::shared_ptr party);\r\n\r\n\tvoid sendTextWindow(uint32_t windowTextId, uint32_t itemId, const std::string &text);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6801263d3d20e5ff", + "equalIndicator/v1": "d52139143a5e5caf4b3442392f79ef30f318a9874a014221c34232606ea4e8ef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 146, + "startColumn": 7, + "charOffset": 4497, + "charLength": 8, + "snippet": { + "text": "addThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 144, + "startColumn": 1, + "charOffset": 4325, + "charLength": 352, + "snippet": { + "text": "\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override final;\r\n\r\n\tvoid addThing(std::shared_ptr thing) override final;\r\n\tvoid addThing(int32_t index, std::shared_ptr thing) override final;\r\n\tvoid addItemBack(std::shared_ptr item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "147f4be394a20f8b", + "equalIndicator/v1": "d5346eacc7630dcf170a9e3f8567c6e5f24b353780147eccb1cf158da2df94cb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 203, + "startColumn": 14, + "charOffset": 5439, + "charLength": 14, + "snippet": { + "text": "getDescription" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 201, + "startColumn": 1, + "charOffset": 5388, + "charLength": 216, + "snippet": { + "text": "\tbool hasHeight(uint32_t n) const;\r\n\r\n\tstd::string getDescription(int32_t lookDistance) override final;\r\n\r\n\tint32_t getClientIndexOfCreature(std::shared_ptr player, std::shared_ptr creature) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ed102d3b942b4c79", + "equalIndicator/v1": "d5428e20ce42e319968cb3ac91ed459c16ed3d691031584215fc3358c8b2793e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 312, + "startColumn": 15, + "charOffset": 7971, + "charLength": 12, + "snippet": { + "text": "std::toupper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 310, + "startColumn": 1, + "charOffset": 7919, + "charLength": 112, + "snippet": { + "text": "\t\t} else {\r\n\t\t\tif (capitalizeNext) {\r\n\t\t\t\tresult += std::toupper(ch);\r\n\t\t\t\tcapitalizeNext = false;\r\n\t\t\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ba01be090d311590", + "equalIndicator/v1": "d564553e306b7ab39c94b0c7aaf4477465ab828fdf95536e7a941c749be1fbdf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 75, + "startColumn": 73, + "charOffset": 2879, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 73, + "startColumn": 1, + "charOffset": 2801, + "charLength": 345, + "snippet": { + "text": "\t}\r\n\r\n\tvoid addOutfitAndMountBytes(NetworkMessage &msg, std::shared_ptr item, const CustomAttribute* attribute, const std::string &head, const std::string &body, const std::string &legs, const std::string &feet, bool addAddon = false, bool addByte = false) {\r\n\t\tauto look = attribute->getAttribute();\r\n\t\tmsg.add(look);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "47b58038252b7085", + "equalIndicator/v1": "d567d244bb2f6d58fb192dd08c01d1fe92f242dfe1976ca44b4daa5c804029f6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/webhook_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 2, + "charOffset": 795, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 714, + "charLength": 188, + "snippet": { + "text": "\tstd::string title = getString(L, 1);\r\n\tstd::string message = getString(L, 2);\r\n\tuint32_t color = getNumber(L, 3, 0);\r\n\tstd::string url = getString(L, -1);\r\n\tif (url == title) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4539113fff4fd03e", + "equalIndicator/v1": "d56d0c48e622972f006c9231c991657fd8d10ab1e20607039ed743cc12ad040b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 517, + "startColumn": 38, + "charOffset": 19593, + "charLength": 10, + "snippet": { + "text": "toCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 515, + "startColumn": 1, + "charOffset": 19501, + "charLength": 155, + "snippet": { + "text": "\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r\n\treturn getScriptInterface()->callFunction(7);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0684e317875bd302", + "equalIndicator/v1": "d577d6f28a431edc0723c38463160105500a426b7058c64b15741f26cfcb8391" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1262, + "startColumn": 72, + "charOffset": 38719, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1260, + "startColumn": 1, + "charOffset": 38643, + "charLength": 170, + "snippet": { + "text": "}\r\n\r\nvoid Creature::onAttackedCreatureDrainHealth(std::shared_ptr target, int32_t points) {\r\n\ttarget->addDamagePoints(static_self_cast(), points);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "93ef5c610a3d74ea", + "equalIndicator/v1": "d57d7ef842bf8faace37aaf96ecb0e21e5df9867a53ca9fa41dda5f4cf1b76b8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 361, + "startColumn": 52, + "charOffset": 12380, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 359, + "startColumn": 1, + "charOffset": 12324, + "charLength": 228, + "snippet": { + "text": "}\r\n\r\nvoid Npc::onPlayerSellItem(std::shared_ptr player, uint16_t itemId, uint8_t subType, uint16_t amount, bool ignore, uint64_t &totalPrice, std::shared_ptr parent /*= nullptr*/) {\r\n\tif (!player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "23efbbc66c8c32c4", + "equalIndicator/v1": "d58bfb5531d07db3f432d20253525f3401efeb92d83c9d27c927c6464f0244a0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 717, + "startColumn": 51, + "charOffset": 23686, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 715, + "startColumn": 1, + "charOffset": 23631, + "charLength": 207, + "snippet": { + "text": "}\r\n\r\nvoid Spell::postCastSpell(std::shared_ptr player, bool finishedCast /*= true*/, bool payCost /*= true*/) const {\r\n\tif (finishedCast) {\r\n\t\tif (!player->hasFlag(PlayerFlags_t::HasNoExhaustion)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9fd5f028298370de", + "equalIndicator/v1": "d5bbc434afb6d40d34b6f76debe235a43b1a139ff78e9149c911025bd974dd50" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1926, + "startColumn": 5, + "charOffset": 66128, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1924, + "startColumn": 1, + "charOffset": 66097, + "charLength": 176, + "snippet": { + "text": "\r\n\t\t\t\t// perform rotation\r\n\t\t\t\tint32_t rotatedX = static_cast(round(newX * a + newY * b));\r\n\t\t\t\tint32_t rotatedY = static_cast(round(newX * c + newY * d));\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cf32d1db9299ff6b", + "equalIndicator/v1": "d5c0d01b60491fae267f80a0f28ef9fb44d543302a131e32b40c2301269bbaaf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7450, + "startColumn": 64, + "charOffset": 259546, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7448, + "startColumn": 1, + "charOffset": 259444, + "charLength": 288, + "snippet": { + "text": "\r\nvoid Game::buildMessageAsSpectator(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\r\n\tconst std::string &damageString, std::string &spectatorMessage\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c1481dc9f389015d", + "equalIndicator/v1": "d5c9a473d7d0d8159ea755d5465e4981ae1121310140899c7462cef388445d83" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 792, + "startColumn": 85, + "charOffset": 25802, + "charLength": 8, + "snippet": { + "text": "minValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 790, + "startColumn": 1, + "charOffset": 25659, + "charLength": 176, + "snippet": { + "text": "\r\n\tint32_t minValue = std::round(player->getLevel() / 5);\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\r\n\r\n\tif (target) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2998cc461ad4e54e", + "equalIndicator/v1": "d5cd95bf64b2758e32f2932081dbe0eaab79a4032e3d375f4cc4cdf5633c2f37" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6841, + "startColumn": 38, + "charOffset": 236765, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6839, + "startColumn": 1, + "charOffset": 236645, + "charLength": 172, + "snippet": { + "text": "\r\n\tdamage.primary.value = std::round(damage.primary.value * pvpDamageMultiplier);\r\n\tdamage.secondary.value = std::round(damage.secondary.value * pvpDamageMultiplier);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4994fa0a89946d48", + "equalIndicator/v1": "d5ce6ed15d182b1689832d95b0bcd2bb4977497ba451dad04839db7fdeed06e2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2195, + "startColumn": 11, + "charOffset": 65753, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2193, + "startColumn": 1, + "charOffset": 65664, + "charLength": 210, + "snippet": { + "text": "\tmonsterForgeClassification = ForgeClassifications_t::FORGE_NORMAL_MONSTER;\r\n\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "86b6c62b6e2b560d", + "equalIndicator/v1": "d5e854d4d4988d26bac2feabfb09c73d04695371ae8023cc2cb0cc5b2f190029" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 475, + "startColumn": 60, + "charOffset": 15658, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 473, + "startColumn": 1, + "charOffset": 15594, + "charLength": 145, + "snippet": { + "text": "}\r\n\r\nvoid Actions::showUseHotkeyMessage(std::shared_ptr player, std::shared_ptr item, uint32_t count) {\r\n\tstd::ostringstream ss;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "48d62e61fa98db69", + "equalIndicator/v1": "d603b75eae0cda8ea6cc19d2d10482a198561f631213a8bc823f134ca02a9ba4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'createItem' is within a recursive call chain", + "markdown": "Function 'createItem' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 77, + "startColumn": 33, + "charOffset": 2521, + "charLength": 10, + "snippet": { + "text": "createItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 75, + "startColumn": 1, + "charOffset": 2484, + "charLength": 186, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr MapCache::createItem(const std::shared_ptr &BasicItem, Position position) {\r\n\tauto item = Item::CreateItem(BasicItem->id, position);\r\n\tif (!item) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "657ff0f3aa391727", + "equalIndicator/v1": "d62124be4ba6e4eb4dd91c3f4bab8a2e08a7976b790dea4ecc49d4f0d94cc88f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 179, + "startColumn": 22, + "charOffset": 7043, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 177, + "startColumn": 1, + "charOffset": 6961, + "charLength": 239, + "snippet": { + "text": "\tstatic std::shared_ptr virtualCylinder;\r\n\r\n\tvirtual ReturnValue queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr = nullptr) override {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "05ca809f11aa95c3", + "equalIndicator/v1": "d6355914ab8886482f190f8517fe7912afc0643cabc8a1f2fcc2a6d26cd71858" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 105, + "startColumn": 51, + "charOffset": 3702, + "charLength": 9, + "snippet": { + "text": "minRangeX" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 103, + "startColumn": 1, + "charOffset": 3547, + "charLength": 206, + "snippet": { + "text": "\t\tspectators.find(position, multifloor, minRangeX, maxRangeX, minRangeY, maxRangeY);\r\n\t} else {\r\n\t\tspectators.find(position, multifloor, minRangeX, maxRangeX, minRangeY, maxRangeY);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9b906220deee162b", + "equalIndicator/v1": "d669e55f7d6248892612aa99ec5edd96ad9080ad24275d3ceabc2c70a6245cc1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 536, + "startColumn": 52, + "charOffset": 14933, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 534, + "startColumn": 1, + "charOffset": 14877, + "charLength": 140, + "snippet": { + "text": "}\r\n\r\nbool Party::isPlayerActive(std::shared_ptr player) {\r\n\tauto it = ticksMap.find(player->getID());\r\n\tif (it == ticksMap.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1f49093b471a75be", + "equalIndicator/v1": "d67444c5d1a0d33c70de4abf72b909a720d5250deca882ae518309e6b5b74046" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getWieldInfo' can be made const", + "markdown": "Method 'getWieldInfo' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 238, + "startColumn": 11, + "charOffset": 7515, + "charLength": 12, + "snippet": { + "text": "getWieldInfo" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 236, + "startColumn": 1, + "charOffset": 7485, + "charLength": 72, + "snippet": { + "text": "\t\tpremium = b;\r\n\t}\r\n\tuint32_t getWieldInfo() {\r\n\t\treturn wieldInfo;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "45fe1b20a69dd2f6", + "equalIndicator/v1": "d6b8fb4a628e9910bf01bfc34fb61bca26f2d46f27916b9ca1353702309d1c1e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 7, + "charOffset": 1966, + "charLength": 5, + "snippet": { + "text": "clear" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 1824, + "charLength": 221, + "snippet": { + "text": "\tEvent_ptr getEvent(const std::string &nodeName) override;\r\n\tbool registerEvent(Event_ptr event, const pugi::xml_node &node) override;\r\n\tvoid clear(bool) override final;\r\n\r\n\ttypedef std::map ModulesList;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "298b28568834ecba", + "equalIndicator/v1": "d6d7a2fd98f43cfa7faba6ac3a31076471f78207f053b3884f71a50bcc68d828" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tradeItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tradeItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1944, + "startColumn": 299, + "charOffset": 75997, + "charLength": 9, + "snippet": { + "text": "tradeItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1942, + "startColumn": 1, + "charOffset": 75694, + "charLength": 444, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalMoveItem(std::shared_ptr fromCylinder, std::shared_ptr toCylinder, int32_t index, std::shared_ptr item, uint32_t count, std::shared_ptr* movedItem, uint32_t flags /*= 0*/, std::shared_ptr actor /*=nullptr*/, std::shared_ptr tradeItem /* = nullptr*/, bool checkTile /* = true*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (fromCylinder == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7137dc9529856530", + "equalIndicator/v1": "d6e4c3e03dc3b8906cb63ae26f634f1a0d9155b9254843510b385f50e5f0e50b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 608, + "startColumn": 8, + "charOffset": 14999, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 606, + "startColumn": 1, + "charOffset": 14903, + "charLength": 213, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeHasSubType(lua_State* L) {\r\n\t// itemType:hasSubType()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->hasSubType());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8aa6635055568cd2", + "equalIndicator/v1": "d714b332e286575ff04368bd17361ae0f2aa2c120a690958f77efede65b8e92b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 401, + "startColumn": 58, + "charOffset": 11749, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 399, + "startColumn": 1, + "charOffset": 11687, + "charLength": 153, + "snippet": { + "text": "}\r\n\r\nvoid Container::onAddContainerItem(std::shared_ptr item) {\r\n\tauto spectators = Spectators().find(getPosition(), false, 2, 2, 2, 2);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "268c2eae96b2313a", + "equalIndicator/v1": "d732f1328e1529685d365a9dac6627c17f7620e6c58bc1f668a1d9783dc483a5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1180, + "startColumn": 28, + "charOffset": 32507, + "charLength": 10, + "snippet": { + "text": "healthGain" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1178, + "startColumn": 1, + "charOffset": 32388, + "charLength": 199, + "snippet": { + "text": "\t\t\t\tcreature->changeHealth(healthGain * 2); // Double regen from daily reward\r\n\t\t\t} else {\r\n\t\t\t\tcreature->changeHealth(healthGain);\r\n\t\t\t}\r\n\t\t\trealHealthGain = creature->getHealth() - realHealthGain;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8a3f45bcdfcebb15", + "equalIndicator/v1": "d73ffb68a117077f5b4236a074f1f4a6f9082b6c2bf52916dd265cdd69c8c397" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2927, + "startColumn": 14, + "charOffset": 89442, + "charLength": 4, + "snippet": { + "text": "text" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2925, + "startColumn": 1, + "charOffset": 89359, + "charLength": 130, + "snippet": { + "text": "\tstd::ostringstream ss;\r\n\tstd::map race = {};\r\n\tstd::string text = \"\";\r\n\tuint8_t search = msg.getByte();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f6559bcaafa73e32", + "equalIndicator/v1": "d7539fc9fcd41a40d4b129df663417a2bca91bd6a6e3e4ca2b18ba53fda085ef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 343, + "startColumn": 77, + "charOffset": 10996, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 341, + "startColumn": 1, + "charOffset": 10849, + "charLength": 382, + "snippet": { + "text": "\t\t\t\t// nopvp-zone\r\n\t\t\t\tauto attackerTile = attackerPlayer->getTile();\r\n\t\t\t\tif (targetPlayerTile && targetPlayerTile->hasFlag(TILESTATE_NOPVPZONE)) {\r\n\t\t\t\t\treturn RETURNVALUE_ACTIONNOTPERMITTEDINANOPVPZONE;\r\n\t\t\t\t} else if (attackerTile && attackerTile->hasFlag(TILESTATE_NOPVPZONE) && targetPlayerTile && !targetPlayerTile->hasFlag(TILESTATE_NOPVPZONE | TILESTATE_PROTECTIONZONE)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b76b6d4a51e79608", + "equalIndicator/v1": "d786b4adda357359ea43eff9844a38115c6756cc4b03a73248b09c5f50914c6b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 547, + "startColumn": 2, + "charOffset": 14540, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 545, + "startColumn": 1, + "charOffset": 14449, + "charLength": 236, + "snippet": { + "text": "\tuint16_t itemId = getNumber(L, 3);\r\n\tdouble amount = getNumber(L, 4);\r\n\tuint16_t subType = getNumber(L, 5, 1);\r\n\tuint16_t actionId = getNumber(L, 6, 0);\r\n\tbool ignoreCap = getBoolean(L, 7, false);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "20785f8294676b95", + "equalIndicator/v1": "d7a3688876716fb1e979d5996f3ed0f32a64ea39c5da7a80947ac31bd5b147c7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7130, + "startColumn": 30, + "charOffset": 248265, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7128, + "startColumn": 1, + "charOffset": 248073, + "charLength": 312, + "snippet": { + "text": "\t\tif (damage.origin != ORIGIN_NONE && target && damage.primary.type != COMBAT_HEALING) {\r\n\t\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r\n\t\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r\n\t\t}\r\n\t\tauto healthChange = damage.primary.value + damage.secondary.value;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5d85db4496b94175", + "equalIndicator/v1": "d7c67966e159a70909c437aed4aa2946779c426b05c1aae9cd8c519a621cb2dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8607, + "startColumn": 65, + "charOffset": 271443, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8605, + "startColumn": 1, + "charOffset": 271374, + "charLength": 137, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendUpdateCreature(std::shared_ptr creature) {\r\n\tif (oldProtocol || !creature || !player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d37969ba902b340e", + "equalIndicator/v1": "d7cd340a3b99b3f36fe4ab1269cd7f0732599701a05be1d6e4513d671fbbacd9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1144, + "startColumn": 28, + "charOffset": 33651, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1142, + "startColumn": 1, + "charOffset": 33471, + "charLength": 217, + "snippet": { + "text": "\tvoid sendCreatureSay(std::shared_ptr creature, SpeakClasses type, const std::string &text, const Position* pos = nullptr) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureSay(creature, type, text, pos);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4c4e115e088fdd8c", + "equalIndicator/v1": "d7cfe0be11fbddb83543e3fd6bff00a128364c5dcb694296d17451222acc336d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 869, + "startColumn": 6, + "charOffset": 33098, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 867, + "startColumn": 1, + "charOffset": 33040, + "charLength": 201, + "snippet": { + "text": "\tLuaScriptInterface::pushCombatDamage(L, damage);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 8, 4) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "50f5b92d49c9727b", + "equalIndicator/v1": "d7e5d05cbf68b853cb20ca2c69a7d0229991bbf8f06e29cc3e0140d821e5956b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 712, + "startColumn": 19, + "charOffset": 21854, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 710, + "startColumn": 1, + "charOffset": 21760, + "charLength": 143, + "snippet": { + "text": "void Container::addItemBack(std::shared_ptr item) {\r\n\taddItem(item);\r\n\tupdateItemWeight(item->getWeight());\r\n\r\n\t// send change to client\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ed228824368dd43a", + "equalIndicator/v1": "d7f6201e788d77ac4a3969d8d2c48ec7f6f1420953545726584b8da5e4cacc03" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 70, + "startColumn": 30, + "charOffset": 2460, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 68, + "startColumn": 1, + "charOffset": 2424, + "charLength": 94, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tfor (std::shared_ptr item : itemlist) {\r\n\t\t\titem->setParent(getParent());\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c776b20815bb3328", + "equalIndicator/v1": "d7f8abca9fe8062c88fc770228f5a3b5926035472ec7c3332a6075a427ebf10e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'onRemoveTileItem' is within a recursive call chain", + "markdown": "Function 'onRemoveTileItem' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 480, + "startColumn": 12, + "charOffset": 13563, + "charLength": 16, + "snippet": { + "text": "onRemoveTileItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 478, + "startColumn": 1, + "charOffset": 13547, + "charLength": 379, + "snippet": { + "text": "}\r\n\r\nvoid Tile::onRemoveTileItem(const CreatureVector &spectators, const std::vector &oldStackPosVector, std::shared_ptr item) {\r\n\tif ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) {\r\n\t\tauto it = g_game().browseFields.find(getTile());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e34b97f5f8e34209", + "equalIndicator/v1": "d8320bd1343a084400314ac5e5c86a16cf96e09b0c7cd2286715d8c21b326016" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 892, + "startColumn": 7, + "charOffset": 24648, + "charLength": 12, + "snippet": { + "text": "changeHealth" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 890, + "startColumn": 1, + "charOffset": 24564, + "charLength": 246, + "snippet": { + "text": "\tvoid stowItem(std::shared_ptr item, uint32_t count, bool allItems);\r\n\r\n\tvoid changeHealth(int32_t healthChange, bool sendHealthChange = true) override;\r\n\tvoid changeMana(int32_t manaChange) override;\r\n\tvoid changeSoul(int32_t soulChange);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f5e2291f33a28514", + "equalIndicator/v1": "d8324b78ad07ede17684793012b1564fbb7d6f2729958570527c889129d8e932" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8574, + "startColumn": 2, + "charOffset": 270537, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8572, + "startColumn": 1, + "charOffset": 270530, + "charLength": 125, + "snippet": { + "text": "\t}\r\n\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t itemTier = 0;\r\n\tif (Item::items[itemId].upgradeClassification > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5ec79cd01680f466", + "equalIndicator/v1": "d834c992c0478711fa0d87f55f8eb5229a37bb91ec0d283871ffae92518d43b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Last', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Last', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorset.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 84, + "charOffset": 2130, + "charLength": 5, + "snippet": { + "text": "_Last" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2003, + "charLength": 211, + "snippet": { + "text": "\r\n\t\ttemplate \r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, _Iter _First, _Iter _Last) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, _First, _Last);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b2804e91d9b12033", + "equalIndicator/v1": "d850e7ab03a13eedbd37db4d76c67fda6b895c3db787e15294f84b9e74fb18f4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1675, + "startColumn": 3, + "charOffset": 58806, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1673, + "startColumn": 1, + "charOffset": 58688, + "charLength": 168, + "snippet": { + "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r\n\t\treturn;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "500554d73e16e1f4", + "equalIndicator/v1": "d858e631f0163b77c1f8c431284c34d04ad304c32c9560b7d028c933881cb6a1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 25, + "startColumn": 7, + "charOffset": 802, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 23, + "startColumn": 1, + "charOffset": 634, + "charLength": 472, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e09c4ce7cb1682e7", + "equalIndicator/v1": "d87c41ee5dd693b94a7764ca74f51b3fbac3941a9b392e5523b6ebf540b51411" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 79, + "startColumn": 42, + "charOffset": 2375, + "charLength": 4, + "snippet": { + "text": "keys" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 77, + "startColumn": 1, + "charOffset": 2329, + "charLength": 162, + "snippet": { + "text": "}\r\n\r\nstd::unordered_set KVStore::keys(const std::string &prefix /*= \"\"*/) {\r\n\tstd::scoped_lock lock(mutex_);\r\n\tstd::unordered_set keys;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "28be17e8cbb7ffaf", + "equalIndicator/v1": "d87e45a63c0980cd6824b14f0992be6d0af41c0dfb0b2b6545b9b1f26dc16d7d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1980, + "startColumn": 2, + "charOffset": 60677, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1978, + "startColumn": 1, + "charOffset": 60584, + "charLength": 270, + "snippet": { + "text": "void ProtocolGame::parseEditVip(NetworkMessage &msg) {\r\n\tstd::vector vipGroupsId;\r\n\tuint32_t guid = msg.get();\r\n\tconst std::string description = msg.getString();\r\n\tuint32_t icon = std::min(10, msg.get()); // 10 is max icon in 9.63\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f9c7214e0a0b9291", + "equalIndicator/v1": "d89114cbebd48bb1959d9f5bc85e784b0110fdb80a488bf26c02d6c27ac55a44" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Switch has 2 consecutive identical branches", + "markdown": "Switch has 2 consecutive identical branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4381, + "startColumn": 4, + "charOffset": 138875, + "charLength": 4, + "snippet": { + "text": "case" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4379, + "startColumn": 1, + "charOffset": 138854, + "charLength": 98, + "snippet": { + "text": "\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase MESSAGE_TUTORIAL_HINT: {\r\n\t\t\t\tinternalType = MESSAGE_LOGIN;\r\n\t\t\t\tbreak;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0a8fe9e7a9b0c63d", + "equalIndicator/v1": "d8a6531efe1068c6e1d920fc72ff9d28afc33b4d3b99219c8273773d06556b2b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 230, + "startColumn": 7, + "charOffset": 8429, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 228, + "startColumn": 1, + "charOffset": 8310, + "charLength": 250, + "snippet": { + "text": "// Party\r\nbool EventCallback::partyOnJoin(std::shared_ptr party, std::shared_ptr player) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::partyOnJoin - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75ad0e0f6e58a0a3", + "equalIndicator/v1": "d8dd3654ee57238ab7907751df8d2cdfe02321b338dc6446000555ac5db51862" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 212, + "startColumn": 14, + "charOffset": 6165, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 210, + "startColumn": 1, + "charOffset": 5839, + "charLength": 624, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr actor = nullptr) override;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5ecd70e9f8ce3822", + "equalIndicator/v1": "d8e780fc55b34ae64aa6578662fefa9c1c45f38901c43929617102f26ebb17dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::any_of()'", + "markdown": "Replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5060, + "startColumn": 2, + "charOffset": 150028, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5058, + "startColumn": 1, + "charOffset": 150021, + "charLength": 124, + "snippet": { + "text": "\t}\r\n\r\n\tfor (const FamiliarEntry &familiarEntry : familiars) {\r\n\t\tif (familiarEntry.lookType == lookType) {\r\n\t\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d6a694c6f684d16", + "equalIndicator/v1": "d8e7a4deb2027650070232e960193c98e52d0d7ab87c3da43f9f26f04d8517f8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 250, + "startColumn": 4, + "charOffset": 8944, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 248, + "startColumn": 1, + "charOffset": 8933, + "charLength": 147, + "snippet": { + "text": "\t\t\t}\r\n\r\n\t\t\tuint32_t recvChecksum = msg.get();\r\n\t\t\tif (recvChecksum != checksum) {\r\n\t\t\t\t// it might not have been the checksum, step back\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d4d7fc2e6f75fc08", + "equalIndicator/v1": "d90819b2dae26efc160a4064f2f0b3dec3c3e93303b98a349de050b0ef6a4813" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 768, + "startColumn": 61, + "charOffset": 27558, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 766, + "startColumn": 1, + "charOffset": 27493, + "charLength": 449, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) {\r\n\t// Player:onItemMoved(item, count, fromPosition, toPosition) or Player.onItemMoved(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)\r\n\tif (info.playerOnItemMoved == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "25039de2b89798ad", + "equalIndicator/v1": "d919d559c1958677a840392360346cce99582880d0fdcb89964aea7e2675707b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2326, + "startColumn": 71, + "charOffset": 80761, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2324, + "startColumn": 1, + "charOffset": 80686, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nint32_t PlayerWheel::checkExecutionersThrow(std::shared_ptr target) const {\r\n\tif (!target || target == m_player.getPlayer()) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1ae7da2160c38ea8", + "equalIndicator/v1": "d92682ba31d75812bde4676bb6f47fdb05ede3dee4ef667f809b2df0067b34ea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 710, + "startColumn": 51, + "charOffset": 21810, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 708, + "startColumn": 1, + "charOffset": 21755, + "charLength": 119, + "snippet": { + "text": "}\r\n\r\nvoid Container::addItemBack(std::shared_ptr item) {\r\n\taddItem(item);\r\n\tupdateItemWeight(item->getWeight());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "33a110409f1e1234", + "equalIndicator/v1": "d932f03ec1c82c8b5b1ae33b95bb2f6d471828ac2adc5d864ed23c7bc34d730f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1296, + "startColumn": 81, + "charOffset": 52085, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1294, + "startColumn": 1, + "charOffset": 51908, + "charLength": 198, + "snippet": { + "text": "\t\t// Registering outfits\r\n\t\tfor (uint32_t it = 0; it < m_appearancesPtr->outfit_size(); it++) {\r\n\t\t\tregisteredLookTypes.push_back(static_cast(m_appearancesPtr->outfit(it).id()));\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c3e33ca9dc9f6f04", + "equalIndicator/v1": "d94a12c5062c12a5000fc2450bae2b30aeec6c9df4d583e63e5a444fb1bd7f69" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 117, + "startColumn": 60, + "charOffset": 6023, + "charLength": 14, + "snippet": { + "text": "const uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 115, + "startColumn": 1, + "charOffset": 5807, + "charLength": 565, + "snippet": { + "text": "\tvoid eventPlayerOnRequestQuestLog(std::shared_ptr player);\r\n\tvoid eventPlayerOnRequestQuestLine(std::shared_ptr player, uint16_t questId);\r\n\tvoid eventOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime);\r\n\tvoid eventPlayerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage);\r\n\tvoid eventPlayerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "03cde0f23103c208", + "equalIndicator/v1": "d95c7f06dcc5e6dcff00ba6c8c14a82cb227b0f03ff5246945f1b5d30860aaa3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 10, + "charOffset": 812, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 772, + "charLength": 61, + "snippet": { + "text": "\r\n\tif (!canRead(stringLen)) {\r\n\t\treturn std::string();\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bc8a43412c84a312", + "equalIndicator/v1": "d95fa3e827053fb22017d083f6c9f3d544cc53396c8d346b338a39191b71d0fa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 142, + "startColumn": 33, + "charOffset": 3433, + "charLength": 8, + "snippet": { + "text": "subgroup" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 140, + "startColumn": 1, + "charOffset": 3340, + "charLength": 162, + "snippet": { + "text": "\tuint32_t storage = 0;\r\n\tuint16_t id, baseid, category = 0;\r\n\tstd::string name, description, subgroup = \"\";\r\n\r\n\tstd::vector> items;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "afa69c06ebb4bc58", + "equalIndicator/v1": "d9727160403e89e18826bc0ffe27c428652f10cee0de5e2bb6792791dda37522" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2284, + "startColumn": 15, + "charOffset": 71331, + "charLength": 9, + "snippet": { + "text": "BestClass" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2282, + "startColumn": 1, + "charOffset": 71176, + "charLength": 234, + "snippet": { + "text": "\tstd::map mtype_list = g_game().getBestiaryList();\r\n\tfor (uint8_t i = BESTY_RACE_FIRST; i <= BESTY_RACE_LAST; i++) {\r\n\t\tstd::string BestClass = \"\";\r\n\t\tuint16_t count = 0;\r\n\t\tfor (const auto &rit : mtype_list) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "904287fdda2fda12", + "equalIndicator/v1": "d9d75b826bf923589f0f14b21cf7d3db38fa36a309a74de72b2242904692e89c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 317, + "startColumn": 63, + "charOffset": 13348, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 315, + "startColumn": 1, + "charOffset": 13281, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerStash(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2381d6fd49c9476b", + "equalIndicator/v1": "d9eda1b3d7122c4c131dc926c7f5438af1bd43a05f103e77d8ff3dfa5b6b7644" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'time_t' (aka 'long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'time_t' (aka 'long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 242, + "startColumn": 6, + "charOffset": 6471, + "charLength": 7, + "snippet": { + "text": "!player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 240, + "startColumn": 1, + "charOffset": 6371, + "charLength": 174, + "snippet": { + "text": "\t// player:getAccountId()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (!player || player->getAccountId() == 0) {\r\n\t\tlua_pushnil(L);\r\n\t\treturn 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "69231420356bc88c", + "equalIndicator/v1": "d9f9265a5bdf8e558dece20e1ae9f17103bd3536c1eb2de44f21c13481233881" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Potential uncovered code path; add a default label", + "markdown": "Potential uncovered code path; add a default label" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 561, + "startColumn": 3, + "charOffset": 15040, + "charLength": 6, + "snippet": { + "text": "switch" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 559, + "startColumn": 1, + "charOffset": 15031, + "charLength": 148, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tswitch (i) {\r\n\t\t\tcase STAT_MAXHITPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b2860a4c5960afc", + "equalIndicator/v1": "da0e82f4de9d14aaa36ec5af058cca98bab61782b41cabeb773b0989795229e7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1020, + "startColumn": 41, + "charOffset": 38871, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1018, + "startColumn": 1, + "charOffset": 38825, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "57e5b4f4faf6755b", + "equalIndicator/v1": "da1ae489a1ce451b2c2c3788c69983ad7aaa39029740640460f2013786acef45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 733, + "startColumn": 94, + "charOffset": 23587, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 731, + "startColumn": 1, + "charOffset": 23489, + "charLength": 272, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatConditionFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\r\n\tif (params.origin == ORIGIN_MELEE && data && data->primary.value == 0 && data->secondary.value == 0) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b77cfe4de4a1cc47", + "equalIndicator/v1": "da1fb12ee6db1bb9e9799bb544d7874c2de7ea35d9bdc99d6333f2f568d03823" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 31, + "startColumn": 2, + "charOffset": 1101, + "charLength": 11, + "snippet": { + "text": "ReturnValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 29, + "startColumn": 1, + "charOffset": 793, + "charLength": 614, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9f3c9a0ecc5dfaba", + "equalIndicator/v1": "da45a183576d0cc1cb71c9b520278b6492fd296e8123907c7aeaa7b47508a2cb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1890, + "startColumn": 27, + "charOffset": 65323, + "charLength": 23, + "snippet": { + "text": "(output->getRows() / 2)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1888, + "startColumn": 1, + "charOffset": 65226, + "charLength": 146, + "snippet": { + "text": "\t\t// rotation\r\n\t\tint32_t rotateCenterX = (output->getCols() / 2) - 1;\r\n\t\tint32_t rotateCenterY = (output->getRows() / 2) - 1;\r\n\t\tint32_t angle;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f935d296d234774", + "equalIndicator/v1": "da4bfb96cdcf303795736521154dd6963a1f2f4e279fa816b2de9e7de521649e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 68, + "startColumn": 58, + "charOffset": 1879, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 66, + "startColumn": 1, + "charOffset": 1817, + "charLength": 140, + "snippet": { + "text": "}\r\n\r\nbool House::tryTransferOwnership(std::shared_ptr player, bool serverStartup) {\r\n\tbool transferSuccess = false;\r\n\tif (player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "383a8219a78e2dfa", + "equalIndicator/v1": "da4e9ee4ceb8b66245d03f831f2a2812b0e90d7165d8a84c1e1eb78a04db218f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3131, + "startColumn": 2, + "charOffset": 95987, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3129, + "startColumn": 1, + "charOffset": 95918, + "charLength": 194, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseMarketAcceptOffer(NetworkMessage &msg) {\r\n\tuint32_t timestamp = msg.get();\r\n\tuint16_t counter = msg.get();\r\n\tuint16_t amount = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "77517ad6e4125ec6", + "equalIndicator/v1": "da587644f4bf7f5130d94ce1d35e8ad4ab535730205ccfb275bc4867ab30e90b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2434, + "startColumn": 17, + "charOffset": 72411, + "charLength": 12, + "snippet": { + "text": "noneVocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2432, + "startColumn": 1, + "charOffset": 72263, + "charLength": 260, + "snippet": { + "text": "\t\tif (vocation->getId() != VOCATION_NONE && level <= 8) {\r\n\t\t\tconst auto &noneVocation = g_vocations().getVocation(VOCATION_NONE);\r\n\t\t\thealthMax += noneVocation->getHPGain();\r\n\t\t\thealth += noneVocation->getHPGain();\r\n\t\t\tmanaMax += noneVocation->getManaGain();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9e2bdc7e1ae62c38", + "equalIndicator/v1": "da6681724456ca438fe7bae839669b54abec277cd269a8dd2722c7af4fe5e600" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2272, + "startColumn": 20, + "charOffset": 79244, + "charLength": 26, + "snippet": { + "text": "getGiftOfLifeTotalCooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2270, + "startColumn": 1, + "charOffset": 79205, + "charLength": 108, + "snippet": { + "text": "\r\n\t// Set cooldown\r\n\tsetGiftOfCooldown(getGiftOfLifeTotalCooldown(), false);\r\n\tsendGiftOfLifeCooldown();\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a0568b6168b24572", + "equalIndicator/v1": "da6962216051706146829df8eb527fb9518e1835d9f4c06f27038736e17df239" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1583, + "startColumn": 2, + "charOffset": 46868, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1581, + "startColumn": 1, + "charOffset": 46805, + "charLength": 166, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseOpenChannel(NetworkMessage &msg) {\r\n\tuint16_t channelId = msg.get();\r\n\tg_game().playerOpenChannel(player->getID(), channelId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "84f919059d6ac2ec", + "equalIndicator/v1": "da7b77dba1c44ffab66c354c9a9f475e409e8508eeaaf5f362584a8995b707d8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 229, + "startColumn": 9, + "charOffset": 7130, + "charLength": 13, + "snippet": { + "text": "getFirstIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 227, + "startColumn": 1, + "charOffset": 7044, + "charLength": 259, + "snippet": { + "text": "\r\n\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r\n\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a33288df1153e768", + "equalIndicator/v1": "da85036eb2d54925d71b943a556a7ca92b62f712b60b7a7aa22a5f49d5c29693" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 48, + "startColumn": 68, + "charOffset": 1670, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 46, + "startColumn": 1, + "charOffset": 1598, + "charLength": 215, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Container::create(std::shared_ptr tile) {\r\n\tauto container = std::make_shared(ITEM_BROWSEFIELD, 30, false, true);\r\n\tTileItemVector* itemVector = tile->getItemList();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c301bb550100a68d", + "equalIndicator/v1": "da91051234d9d57445b0cfe5d0bd05e341ab0471008ede444769d58aa3d385cb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::any_of()'", + "markdown": "Replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1824, + "startColumn": 2, + "charOffset": 49216, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1822, + "startColumn": 1, + "charOffset": 49129, + "charLength": 210, + "snippet": { + "text": "\r\n\tstd::ranges::shuffle(directions.begin(), directions.end(), getRandomGenerator());\r\n\tfor (Direction dir : directions) {\r\n\t\tif (canWalkTo(creature, pos, dir)) {\r\n\t\t\tthis->fleeIndx = static_cast(dir);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d82849ac568da6f2", + "equalIndicator/v1": "daa295bcf3d27456dd372386c3b73858603d25cebfb83c55e736e219930d4158" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 334, + "startColumn": 54, + "charOffset": 11211, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 332, + "startColumn": 1, + "charOffset": 11153, + "charLength": 109, + "snippet": { + "text": "}\r\n\r\nuint32_t Weapon::getManaCost(std::shared_ptr player) const {\r\n\tif (mana != 0) {\r\n\t\treturn mana;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ee655d74588d1c8a", + "equalIndicator/v1": "dabd20eb9aaeae25c1a3959c5ff3fcb0b62f123a7e89b7659d0169ceb085ca38" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 151, + "startColumn": 7, + "charOffset": 4784, + "charLength": 12, + "snippet": { + "text": "replaceThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 149, + "startColumn": 1, + "charOffset": 4678, + "charLength": 264, + "snippet": { + "text": "\r\n\tvoid updateThing(std::shared_ptr thing, uint16_t itemId, uint32_t count) override final;\r\n\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override final;\r\n\r\n\tvoid removeThing(std::shared_ptr thing, uint32_t count) override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8113ab9b05f3f34a", + "equalIndicator/v1": "dadfec16f572456de55be8bef65bf982215fed38d1ed75f2ae5c55c50604d81e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 696, + "startColumn": 15, + "charOffset": 22711, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 694, + "startColumn": 1, + "charOffset": 22671, + "charLength": 128, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.55f);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c46797479c1c2125", + "equalIndicator/v1": "db09e8b8b09d08c4549ca3985081034875c146fa2641316d120f9bf8966b64dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 243, + "startColumn": 34, + "charOffset": 6449, + "charLength": 9, + "snippet": { + "text": "condition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 241, + "startColumn": 1, + "charOffset": 6245, + "charLength": 316, + "snippet": { + "text": "\t\tif (condition->getTicks() != -1) {\r\n\t\t\tregen = std::min((condition->getTicks() / 1000), sleptTime) / 30; // RATE_HEALTH_REGEN_SPEED and RATE_MANA_REGEN_SPEED?\r\n\t\t\tconst int32_t newRegenTicks = condition->getTicks() - (regen * 30000);\r\n\t\t\tif (newRegenTicks <= 0) {\r\n\t\t\t\tplayer->removeCondition(condition);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9f5f892e92d19d8a", + "equalIndicator/v1": "db1df8f79282b371e7d9ab742fef68fe63b864fa966176f1a670f987e8446852" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when declaring iterators", + "markdown": "Use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4628, + "startColumn": 8, + "charOffset": 145976, + "charLength": 25, + "snippet": { + "text": "ItemDeque::const_iterator" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4626, + "startColumn": 1, + "charOffset": 145948, + "charLength": 186, + "snippet": { + "text": "\r\n\t\tuint32_t i = 0;\r\n\t\tfor (ItemDeque::const_iterator it = itemList.begin() + firstIndex, end = itemList.end(); i < maxItemsToSend && it != end; ++it, ++i) {\r\n\t\t\tAddItem(msg, *it);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "92a13542b342545a", + "equalIndicator/v1": "db2121309bc1a5e80c993044f53d47dbcf414a7b14aa1fb4ee06e22a84ea67bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Tree, std::allocator>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Tree, std::allocator\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 869, + "startColumn": 21, + "charOffset": 24192, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 867, + "startColumn": 1, + "charOffset": 24166, + "charLength": 136, + "snippet": { + "text": "\t}\r\n\r\n\tlua_createtable(L, creature->damageMap.size(), 0);\r\n\tfor (auto damageEntry : creature->damageMap) {\r\n\t\tlua_createtable(L, 0, 2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "00aebadd91b5b7b8", + "equalIndicator/v1": "db2bcc21b4a214046e039dda85f808aac88b3ac7abae637ac173e26348cc67e4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7542, + "startColumn": 27, + "charOffset": 262595, + "charLength": 13, + "snippet": { + "text": "targetMonster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7540, + "startColumn": 1, + "charOffset": 262539, + "charLength": 225, + "snippet": { + "text": "\r\nvoid Game::applyCharmRune(\r\n\tstd::shared_ptr targetMonster, std::shared_ptr attackerPlayer, std::shared_ptr target, const int32_t &realDamage\r\n) const {\r\n\tif (!targetMonster || !attackerPlayer) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "63a848f1da10cee5", + "equalIndicator/v1": "db32ab8741bdb430f4cf28fba3d231f150297bad0206a59d60aded1bbb8d03c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 582, + "startColumn": 24, + "charOffset": 17849, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 580, + "startColumn": 1, + "charOffset": 17821, + "charLength": 220, + "snippet": { + "text": "}\r\n\r\nReturnValue Container::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor /*= nullptr */) {\r\n\tint32_t index = getThingIndex(thing);\r\n\tif (index == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "18572333494fcb0e", + "equalIndicator/v1": "db4a7395deadf3108ffb0544a96849422a633e3eec087283ad6e77042278e540" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 565, + "startColumn": 8, + "charOffset": 13920, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 563, + "startColumn": 1, + "charOffset": 13820, + "charLength": 213, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetBaseSpeed(lua_State* L) {\r\n\t// itemType:getBaseSpeed()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->speed);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71995b38240f29a7", + "equalIndicator/v1": "db5e5f39360dd4e540d5e0e88eff73595e773a214b4547e0a24efd9d4a431e40" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4895, + "startColumn": 14, + "charOffset": 146158, + "charLength": 12, + "snippet": { + "text": "changeHealth" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4893, + "startColumn": 1, + "charOffset": 146140, + "charLength": 163, + "snippet": { + "text": "}\r\n\r\nvoid Player::changeHealth(int32_t healthChange, bool sendHealthChange /* = true*/) {\r\n\tCreature::changeHealth(healthChange, sendHealthChange);\r\n\tsendStats();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d27052b92133f051", + "equalIndicator/v1": "db61e285a055967c1efa18472fd9762465e6b176013fc693b8006741e4562314" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 2, + "charOffset": 872, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 865, + "charLength": 88, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface\r\n\t\t->getScriptEnv()\r\n\t\t->setScriptId(scriptId, scriptInterface);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2e98a48ca173804c", + "equalIndicator/v1": "dbbc64eab6da6bbe35c9a45b21314bdf5511f399eeb2508c8f923460191acc14" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'mtype' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'mtype' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 526, + "startColumn": 82, + "charOffset": 14496, + "charLength": 5, + "snippet": { + "text": "mtype" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 524, + "startColumn": 1, + "charOffset": 14410, + "charLength": 169, + "snippet": { + "text": "}\r\n\r\nvoid Player::removeMonsterFromCyclopediaTrackerList(std::shared_ptr mtype, bool isBoss, bool reloadClient /* = false */) {\r\n\tif (!client) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cf50d49c01b73465", + "equalIndicator/v1": "dbccb7ee7d73f60f1b0ce43695815cafd7da2b2a26fd932195d5bf259b16a89e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 70, + "startColumn": 20, + "charOffset": 2241, + "charLength": 23, + "snippet": { + "text": "OTSYS_TIME() - lastStep" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 68, + "startColumn": 1, + "charOffset": 2170, + "charLength": 139, + "snippet": { + "text": "\r\nint64_t Creature::getTimeSinceLastMove() const {\r\n\treturn lastStep ? OTSYS_TIME() - lastStep : std::numeric_limits::max();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "283ed81767fa7a13", + "equalIndicator/v1": "dc3c222d90cd688f42f2806044f3f0fe221f4a7022e75fc7ca5f8692790e2a36" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Vector_iterator>>::value_type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Vector_iterator\\>\\>::value_type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 67, + "startColumn": 32, + "charOffset": 2120, + "charLength": 6, + "snippet": { + "text": "itemId" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 65, + "startColumn": 1, + "charOffset": 2028, + "charLength": 155, + "snippet": { + "text": "\t\t\tit.vocationString = moveEvent->getVocationString();\r\n\t\t}\r\n\t\tif (registerEvent(moveEvent, itemId, itemIdMap)) {\r\n\t\t\ttmpVector.emplace_back(itemId);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "95d691f60fdbeb7e", + "equalIndicator/v1": "dc5d80eda3e84d2eda07db8759fb409e0b45c02a92c0b1770a69fe05936e2449" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_First', which is a reserved identifier", + "markdown": "Declaration uses identifier '_First', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorset.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 70, + "charOffset": 2116, + "charLength": 6, + "snippet": { + "text": "_First" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2003, + "charLength": 211, + "snippet": { + "text": "\r\n\t\ttemplate \r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, _Iter _First, _Iter _Last) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, _First, _Last);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab28227d2beed1ae", + "equalIndicator/v1": "dc60c72735e9da8b84c499bd4f6d9cd48f95f6243d596fde06f68f8f2ec465c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1074, + "startColumn": 29, + "charOffset": 29172, + "charLength": 6, + "snippet": { + "text": "skills" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1072, + "startColumn": 1, + "charOffset": 29033, + "charLength": 195, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player && skillType <= SKILL_LAST) {\r\n\t\tlua_pushnumber(L, player->skills[skillType].level);\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f0ec4e71076ca522", + "equalIndicator/v1": "dc63625451f43eea95686f853227cd3cf964db3385ca1337340195d4234a08a1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 600, + "startColumn": 2, + "charOffset": 14071, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 598, + "startColumn": 1, + "charOffset": 14064, + "charLength": 138, + "snippet": { + "text": "\t}\r\n\r\n\tuint32_t flags = getNumber(L, 4, 0);\r\n\r\n\tReturnValue ret = g_game().internalAddItem(tile, item, INDEX_WHEREEVER, flags);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "46ce24373ceb28f9", + "equalIndicator/v1": "dc66df5f8afefd10a295505d6b3e63487045e3efe0b3e1019c54062a26449ad5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 84, + "startColumn": 12, + "charOffset": 2716, + "charLength": 6, + "snippet": { + "text": "health" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 82, + "startColumn": 1, + "charOffset": 2618, + "charLength": 283, + "snippet": { + "text": "\t\tmonster->currentOutfit = mType->info.outfit;\r\n\t\tmonster->skull = mType->info.skull;\r\n\t\tmonster->health = mType->info.health * mType->getHealthMultiplier();\r\n\t\tmonster->healthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\t\tmonster->baseSpeed = mType->getBaseSpeed();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "940ced98c6b70e5e", + "equalIndicator/v1": "dc8149b6893d88ec707fea0ee62360ebed0e04c1e09bd534cd0e0503d6684cd9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 36, + "startColumn": 2, + "charOffset": 1444, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 34, + "startColumn": 1, + "charOffset": 1394, + "charLength": 192, + "snippet": { + "text": "\r\n\tuint16_t itemId = getNumber(L, 2);\r\n\tint32_t count = getNumber(L, 3, 1);\r\n\tbool canDropOnMap = getBoolean(L, 4, true);\r\n\tuint16_t subType = getNumber(L, 5, 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e948f993c3da7c7b", + "equalIndicator/v1": "dc9908e4ec71d001949f301f582a00b28f8f8c7b4a3c01a6d5c9a4733ad5458f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 453, + "startColumn": 19, + "charOffset": 24032, + "charLength": 31, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 451, + "startColumn": 1, + "charOffset": 23830, + "charLength": 379, + "snippet": { + "text": "\tvoid internalCreatureChangeOutfit(std::shared_ptr creature, const Outfit_t &oufit);\r\n\tvoid internalCreatureChangeVisible(std::shared_ptr creature, bool visible);\r\n\tvoid changeLight(const std::shared_ptr creature);\r\n\tvoid updateCreatureIcon(const std::shared_ptr creature);\r\n\tvoid reloadCreature(const std::shared_ptr creature);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c2bf3b292a091245", + "equalIndicator/v1": "dcd4d9bc0dfc1ee7697c8a75f65bf07e39ceee0db86ce4df752b635e8502dd6c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Local copy 'castItem' of the variable 'item' is never modified; consider avoiding the copy", + "markdown": "Local copy 'castItem' of the variable 'item' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1415, + "startColumn": 16, + "charOffset": 40141, + "charLength": 8, + "snippet": { + "text": "castItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1413, + "startColumn": 1, + "charOffset": 40052, + "charLength": 144, + "snippet": { + "text": "\t\t\t\tslotName = fmt::format(\"Imbuement Slot {}\", i + 1);\r\n\t\t\t\tss.str(\"\");\r\n\t\t\t\tconst auto castItem = item;\r\n\t\t\t\tif (!castItem) {\r\n\t\t\t\t\tcontinue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "65cccc289cf3638b", + "equalIndicator/v1": "dce3eab3e59ea6df7764b0f6e40e60ba2baa2f0d2fde8ae1ab92b0ac68659f1c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2390, + "startColumn": 60, + "charOffset": 70704, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2388, + "startColumn": 1, + "charOffset": 70561, + "charLength": 162, + "snippet": { + "text": "\t} else {\r\n\t\tg_metrics().addCounter(\"player_experience_bonus_raw\", rawExp, attrs);\r\n\t\tg_metrics().addCounter(\"player_experience_bonus_actual\", exp, attrs);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bafab6fb1e91dd81", + "equalIndicator/v1": "dd03608f91e9a8b3452604442c1200afad67ae7448ba4a72391b0439b4f0b35e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 801, + "startColumn": 29, + "charOffset": 24270, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 799, + "startColumn": 1, + "charOffset": 24149, + "charLength": 182, + "snippet": { + "text": "int32_t Container::getThingIndex(std::shared_ptr thing) const {\r\n\tint32_t index = 0;\r\n\tfor (std::shared_ptr item : itemlist) {\r\n\t\tif (item == thing) {\r\n\t\t\treturn index;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "46f564d4375eec7c", + "equalIndicator/v1": "dd8408799d0a50c1b4aa52898501d666ee7cd278055e8fe499cfe47fac29855b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2240, + "startColumn": 67, + "charOffset": 78256, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2238, + "startColumn": 1, + "charOffset": 78185, + "charLength": 151, + "snippet": { + "text": "}\r\n\r\nint32_t PlayerWheel::checkDivineGrenade(std::shared_ptr target) const {\r\n\tif (!target || target == m_player.getPlayer()) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4b94c2c9ff3fc10e", + "equalIndicator/v1": "dd94dc115f0646342f77ac00218a82bcc7c2f705c8e39863e96dbc3ad1bb47af" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 223, + "startColumn": 28, + "charOffset": 6728, + "charLength": 6, + "snippet": { + "text": "g_game" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 221, + "startColumn": 1, + "charOffset": 6671, + "charLength": 211, + "snippet": { + "text": "\t\t\treturn false;\r\n\t\tdefault:\r\n\t\t\tstd::string skillName = g_game().getSkillNameById(skill);\r\n\t\t\tquery = fmt::format(\r\n\t\t\t\t\"SELECT * FROM `players` WHERE `group_id` < {} AND `{}` > 10 ORDER BY `{}` DESC LIMIT 1\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3fe0c820777f214d", + "equalIndicator/v1": "ddb209b3dc679862b392dae8dae0695304938a90b3bd177f2807d01372911982" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 10, + "charOffset": 2102, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2015, + "charLength": 175, + "snippet": { + "text": "\tfloat getMitigation() const override;\r\n\tint32_t getArmor() const override {\r\n\t\treturn mType->info.armor * getDefenseMultiplier();\r\n\t}\r\n\tint32_t getDefense() const override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d732cdb3edbd9727", + "equalIndicator/v1": "ddca8b34a53409ac3a078e8a220bd90ab92c03dd1668bae7bc2cfafb1a69ec15" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 929, + "startColumn": 14, + "charOffset": 30278, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 927, + "startColumn": 1, + "charOffset": 30195, + "charLength": 162, + "snippet": { + "text": "\t\tint32_t value = getAbsorbPercent(combatType);\r\n\t\tif (value != 0) {\r\n\t\t\tdamage -= std::round(damage * value / 100.f);\r\n\t\t}\r\n\t\tvalue = getAbsorbFlat(combatType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7fd24b1a5fd39b14", + "equalIndicator/v1": "ddd5a7cc4610e6b976a3afffea77fea7db8ffe1a0fa024cf1f1f538eee85e117" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 152, + "startColumn": 3, + "charOffset": 4029, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 150, + "startColumn": 1, + "charOffset": 3972, + "charLength": 195, + "snippet": { + "text": "\r\n\tif (const TileItemVector* items = getItemList()) {\r\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\r\n\t\t\tif ((*it)->getTeleport()) {\r\n\t\t\t\treturn (*it)->getTeleport();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a6d9b8600fe82ad2", + "equalIndicator/v1": "ddf32f78177d968ff3d516f8936fd71a1dea852a9fc8dddf3fc46db6e1bbcf45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 913, + "startColumn": 43, + "charOffset": 29509, + "charLength": 3, + "snippet": { + "text": "min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 911, + "startColumn": 1, + "charOffset": 29361, + "charLength": 164, + "snippet": { + "text": "\r\n\t// Returns the calculated maximum damage or a random value between the calculated minimum and maximum\r\n\treturn maxDamage ? -max : -normal_random(min, max);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e73cfe68939bf75", + "equalIndicator/v1": "de15eeb76c8761954578d533b68856d805dbca5fac143d7999b579da887747d4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 155, + "startColumn": 10, + "charOffset": 4954, + "charLength": 13, + "snippet": { + "text": "getThingIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 153, + "startColumn": 1, + "charOffset": 4862, + "charLength": 251, + "snippet": { + "text": "\tvoid removeThing(std::shared_ptr thing, uint32_t count) override final;\r\n\r\n\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r\n\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "df5fcab1dd2e86f7", + "equalIndicator/v1": "de1c8f4fe48beb6b41a3df70caae378a62fbc44a9ddbdf2a68bad8026f22595a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 195, + "startColumn": 15, + "charOffset": 7930, + "charLength": 12, + "snippet": { + "text": "replaceThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 193, + "startColumn": 1, + "charOffset": 7762, + "charLength": 304, + "snippet": { + "text": "\tvirtual void addThing(int32_t, std::shared_ptr) override { }\r\n\tvirtual void updateThing(std::shared_ptr, uint16_t, uint32_t) override { }\r\n\tvirtual void replaceThing(uint32_t, std::shared_ptr) override { }\r\n\tvirtual void removeThing(std::shared_ptr, uint32_t) override { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5d9fd9fd7664e2e", + "equalIndicator/v1": "de300035a89da36bf943669982ad984ee039274e71287fce4082ff013c4a459a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 423, + "startColumn": 194, + "charOffset": 13920, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 421, + "startColumn": 1, + "charOffset": 13722, + "charLength": 328, + "snippet": { + "text": "}\r\n\r\nbool Actions::useItemEx(std::shared_ptr player, const Position &fromPos, const Position &toPos, uint8_t toStackPos, std::shared_ptr item, bool isHotkey, std::shared_ptr creature /* = nullptr*/) {\r\n\tconst ItemType &it = Item::items[item->getID()];\r\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "081618dc86e2c064", + "equalIndicator/v1": "de33a367014e20cfb72d92acb9ebbdc69086852cd770fec92e6c5668f2babf05" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 325, + "startColumn": 65, + "charOffset": 12050, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 323, + "startColumn": 1, + "charOffset": 11973, + "charLength": 231, + "snippet": { + "text": "\r\n// Player\r\nbool EventCallback::playerOnBrowseField(std::shared_ptr player, const Position &position) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnBrowseField - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "73da8225ff3dfbc2", + "equalIndicator/v1": "de6a828b364e86bd9aee66e76720e5857115690f788cdd8717dec2939c2be7ce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int'", + "markdown": "Narrowing conversion from 'float' to 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4910, + "startColumn": 29, + "charOffset": 146620, + "charLength": 10, + "snippet": { + "text": "soulChange" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4908, + "startColumn": 1, + "charOffset": 146521, + "charLength": 265, + "snippet": { + "text": "void Player::changeSoul(int32_t soulChange) {\r\n\tif (soulChange > 0) {\r\n\t\tsoul += std::min(soulChange * g_configManager().getFloat(RATE_SOUL_REGEN, __FUNCTION__), vocation->getSoulMax() - soul);\r\n\t} else {\r\n\t\tsoul = std::max(0, soul + soulChange);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62231767ac5348d7", + "equalIndicator/v1": "de83f43925dc967c252e2ff2b69bf209c326a8bbc170246883c166db7472456c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2483, + "startColumn": 95, + "charOffset": 94675, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2481, + "startColumn": 1, + "charOffset": 94576, + "charLength": 258, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalPlayerAddItem(std::shared_ptr player, std::shared_ptr item, bool dropOnMap /*= true*/, Slots_t slot /*= CONST_SLOT_WHEREEVER*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tuint32_t remainderCount = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b74be174858f16fe", + "equalIndicator/v1": "de842552529750cfe1f801241fccd0b7498a02836b31146b702b46f044ee56bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2281, + "startColumn": 108, + "charOffset": 67197, + "charLength": 8, + "snippet": { + "text": "muteTime" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2279, + "startColumn": 1, + "charOffset": 66999, + "charLength": 250, + "snippet": { + "text": "\t\t\tuint32_t muteTime = 5 * muteCount * muteCount;\r\n\t\t\tmuteCountMap[guid] = muteCount + 1;\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_MUTED, muteTime * 1000, 0);\r\n\t\t\taddCondition(condition);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d9fdacd4f3de672", + "equalIndicator/v1": "deb6107c839745d20c31033c9bf9fdc9f6af955c8f75b3c3a588a98508ac0b12" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1124, + "startColumn": 41, + "charOffset": 42732, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1122, + "startColumn": 1, + "charOffset": 42686, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f953ddbc714a9add", + "equalIndicator/v1": "dee799f85dccef76df64529cef302ec3a39716fecfd3c7604334d774f644830a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 99, + "startColumn": 8, + "charOffset": 2557, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 97, + "startColumn": 1, + "charOffset": 2459, + "charLength": 212, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsStackable(lua_State* L) {\r\n\t// itemType:isStackable()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->stackable);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b3064fd06d5b0c82", + "equalIndicator/v1": "deeb944841cc02cc0f8bc532f25672eb21b11bc6caae5b586488c445d515a76e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/achievement/player_achievement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 36, + "startColumn": 53, + "charOffset": 1118, + "charLength": 21, + "snippet": { + "text": "(OTSYS_TIME() / 1000)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 34, + "startColumn": 1, + "charOffset": 1031, + "charLength": 241, + "snippet": { + "text": "\r\n\taddPoints(achievement.points);\r\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\r\n\tgetUnlockedKV()->set(achievement.name, toSaveTimeStamp);\r\n\tm_achievementsUnlocked.emplace_back(achievement.id, toSaveTimeStamp);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0cf0875934c0cece", + "equalIndicator/v1": "defe494e427b1af553a9f7f528b8648e65d6da104341c5d9fcc500d5ca4e3d6b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 189, + "startColumn": 17, + "charOffset": 5301, + "charLength": 9, + "snippet": { + "text": "m_account" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 187, + "startColumn": 1, + "charOffset": 5132, + "charLength": 253, + "snippet": { + "text": "void Account::addPremiumDays(const int32_t &days) {\r\n\tauto timeLeft = std::max(0, static_cast((m_account.premiumLastDay - getTimeNow()) % 86400));\r\n\tsetPremiumDays(m_account.premiumRemainingDays + days);\r\n\tm_account.premiumDaysPurchased += days;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bb0d7bfcdd11f9d5", + "equalIndicator/v1": "df4ce53ff28c43d14ea348e64a2a7b5882758ef1e9fa8c6b45f79039954de7f7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 120, + "startColumn": 74, + "charOffset": 5224, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 118, + "startColumn": 1, + "charOffset": 5055, + "charLength": 260, + "snippet": { + "text": "\t * @param player Pointer to the player for whom the imbuement damage should be handled.\r\n\t */\r\n\tvoid handleImbuementDamage(NetworkMessage &msg, std::shared_ptr player) {\r\n\t\tbool imbueDmg = false;\r\n\t\tstd::shared_ptr weapon = player->getWeapon();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c8034dc5b52e7f9", + "equalIndicator/v1": "df5f3cea64c23b2df489832f3effb528d15d4371b52b469b1a77b05d19063fa5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8463, + "startColumn": 4, + "charOffset": 267942, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8461, + "startColumn": 1, + "charOffset": 267856, + "charLength": 238, + "snippet": { + "text": "\t\tcase SUPPLY_STASH_ACTION_WITHDRAW: {\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint32_t count = msg.get();\r\n\t\t\tuint8_t stackpos = msg.getByte();\r\n\t\t\tg_game().playerStashWithdraw(player->getID(), itemId, count, stackpos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2875b0cf0b8ee485", + "equalIndicator/v1": "df5fd52fe2ae230ad596eac6dc657fbbb5b9d24f608bf76812aeb89d5b528aaf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1135, + "startColumn": 26, + "charOffset": 34168, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1133, + "startColumn": 1, + "charOffset": 34087, + "charLength": 191, + "snippet": { + "text": "\t\tuint32_t moveCount = 0;\r\n\t\tuint32_t removeCount = 0;\r\n\t\tint32_t downItemSize = tile->getDownItemCount();\r\n\t\tfor (int32_t i = downItemSize; --i >= 0;) {\r\n\t\t\tconst auto &item = items->at(i);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "887b2f783f504967", + "equalIndicator/v1": "df660a6ab3db2080b0ad21af4260e256ba0bedb379f1b0bf53d5c28c01613f3c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 830, + "startColumn": 21, + "charOffset": 26921, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 828, + "startColumn": 1, + "charOffset": 26854, + "charLength": 182, + "snippet": { + "text": "\r\n\tint32_t minValue = player->getLevel() / 5;\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\r\n\tif (maxDamage) {\r\n\t\treturn -maxValue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f02f18f8a3b9e60f", + "equalIndicator/v1": "df6659994e6e9674c520b7983a58a1d361dce624b9197d5ce93f48bbde524bb1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'setFollowCreature' is within a recursive call chain", + "markdown": "Function 'setFollowCreature' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4330, + "startColumn": 14, + "charOffset": 130454, + "charLength": 17, + "snippet": { + "text": "setFollowCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4328, + "startColumn": 1, + "charOffset": 130436, + "charLength": 153, + "snippet": { + "text": "}\r\n\r\nbool Player::setFollowCreature(std::shared_ptr creature) {\r\n\tif (!Creature::setFollowCreature(creature)) {\r\n\t\tsetFollowCreature(nullptr);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb87b1e277590c43", + "equalIndicator/v1": "df68a34b796c984c77ddcae51907a1617221fea12903f896bb0cca63833c769d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 359, + "startColumn": 84, + "charOffset": 17378, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 357, + "startColumn": 1, + "charOffset": 17005, + "charLength": 554, + "snippet": { + "text": "\tvoid playerConfigureShowOffSocket(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t podiumVisible, uint8_t direction);\r\n\tvoid playerWrapableItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerWriteItem(uint32_t playerId, uint32_t windowTextId, const std::string &text);\r\n\tvoid playerBrowseField(uint32_t playerId, const Position &pos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4a2044982ac64ebd", + "equalIndicator/v1": "df690514d559144459cf8bcbbce2163db288add89170937aa85a28cf1650bce0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'unsigned int'", + "markdown": "Narrowing conversion from 'double' to 'unsigned int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 65, + "startColumn": 16, + "charOffset": 2101, + "charLength": 53, + "snippet": { + "text": "(value * std::pow(static_cast(10), precision))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 63, + "startColumn": 1, + "charOffset": 1988, + "charLength": 212, + "snippet": { + "text": "void NetworkMessage::addDouble(double value, uint8_t precision /* = 2*/) {\r\n\taddByte(precision);\r\n\tadd((value * std::pow(static_cast(10), precision)) + std::numeric_limits::max());\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3115fb7b019f0d58", + "equalIndicator/v1": "df74a49724e7b1b99fad3aff627d790eafb0fdcbf0b5096a8289990386d42c79" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5678, + "startColumn": 48, + "charOffset": 167880, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5676, + "startColumn": 1, + "charOffset": 167828, + "charLength": 138, + "snippet": { + "text": "}\r\n\r\nbool Player::isPartner(std::shared_ptr player) const {\r\n\tif (!player || !m_party || player.get() == this) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "90610bc1b44379b6", + "equalIndicator/v1": "df8136683b8f1a75e83f12bcab17f1dbccff5c91eb44ba4c2742af3b908bea9f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 818, + "startColumn": 27, + "charOffset": 29471, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 816, + "startColumn": 1, + "charOffset": 29439, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnChangeZone, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "557cb4bc50a1d79f", + "equalIndicator/v1": "df965d56a4c4e390fc10b29fc6986ae17d3b582c77846da227ac240965b7b34d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7826, + "startColumn": 56, + "charOffset": 273543, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7824, + "startColumn": 1, + "charOffset": 273483, + "charLength": 194, + "snippet": { + "text": "}\r\n\r\nvoid Game::addCreatureHealth(std::shared_ptr target) {\r\n\tauto spectators = Spectators().find(target->getPosition(), true);\r\n\taddCreatureHealth(spectators.data(), target);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "77e133fcedcc8d6f", + "equalIndicator/v1": "dfafbfdaed00a620886fd9b16ca7f0648f0bd7405025bde4d40cf6769f5c84eb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 874, + "startColumn": 22, + "charOffset": 24426, + "charLength": 11, + "snippet": { + "text": "damageEntry" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 872, + "startColumn": 1, + "charOffset": 24303, + "charLength": 159, + "snippet": { + "text": "\t\tsetField(L, \"total\", damageEntry.second.total);\r\n\t\tsetField(L, \"ticks\", damageEntry.second.ticks);\r\n\t\tlua_rawseti(L, -2, damageEntry.first);\r\n\t}\r\n\treturn 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "be030f983f8ddb24", + "equalIndicator/v1": "dff2fdd346c0722a8b75c8e19b61ff4813040fa67f22b8e9b6736cbe1a392269" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1807, + "startColumn": 3, + "charOffset": 54418, + "charLength": 16, + "snippet": { + "text": "ObjectCategory_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1805, + "startColumn": 1, + "charOffset": 54361, + "charLength": 197, + "snippet": { + "text": "\tuint8_t action = msg.getByte();\r\n\tif (action == 0) {\r\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tPosition pos = msg.getPosition();\r\n\t\tuint16_t itemId = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "60221a0174ca8e5c", + "equalIndicator/v1": "e0040f367f4631b2b49aef25b738240d3eaf1a7bdac28918b07a4130898b78a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 238, + "startColumn": 30, + "charOffset": 7304, + "charLength": 7, + "snippet": { + "text": "getItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 236, + "startColumn": 1, + "charOffset": 7235, + "charLength": 142, + "snippet": { + "text": "\t\treturn static_self_cast();\r\n\t}\r\n\tstd::shared_ptr getItem() const override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "523c561293b70b9f", + "equalIndicator/v1": "e0168f7bccd1be9c76a84b3a565c9991f52d495417008f7dc7317b87cee2000b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5167, + "startColumn": 50, + "charOffset": 152544, + "charLength": 8, + "snippet": { + "text": "attacked" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5165, + "startColumn": 1, + "charOffset": 152490, + "charLength": 150, + "snippet": { + "text": "}\r\n\r\nbool Player::hasAttacked(std::shared_ptr attacked) const {\r\n\tif (hasFlag(PlayerFlags_t::NotGainInFight) || !attacked) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e0e90e812cd4889a", + "equalIndicator/v1": "e03d898450160b7d5e1842d5bd9b944bb5484d51f3abe2663b2bead1b46f80c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 913, + "startColumn": 28, + "charOffset": 29494, + "charLength": 24, + "snippet": { + "text": "-normal_random(min, max)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 911, + "startColumn": 1, + "charOffset": 29361, + "charLength": 164, + "snippet": { + "text": "\r\n\t// Returns the calculated maximum damage or a random value between the calculated minimum and maximum\r\n\treturn maxDamage ? -max : -normal_random(min, max);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "be189bfe5c3e6860", + "equalIndicator/v1": "e054894de001dbc656e53118d057ee6a640eea57bea120ff2f82ebf4b3ced3db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 600, + "startColumn": 13, + "charOffset": 29341, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 598, + "startColumn": 1, + "charOffset": 29143, + "charLength": 367, + "snippet": { + "text": "\t} else if (stringValue == \"absorbpercentphysical\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercenthealing\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HEALING)] += pugi::cast(valueAttribute.value());\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82e7a1040fd0e9d8", + "equalIndicator/v1": "e05c738438cc1e39737b28acd18166d4e7c4144c852af632874d5f4101912392" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 438, + "startColumn": 107, + "charOffset": 11859, + "charLength": 7, + "snippet": { + "text": "newItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 436, + "startColumn": 1, + "charOffset": 11748, + "charLength": 396, + "snippet": { + "text": "}\r\n\r\nvoid Tile::onUpdateTileItem(std::shared_ptr oldItem, const ItemType &oldType, std::shared_ptr newItem, const ItemType &newType) {\r\n\tif ((newItem->hasProperty(CONST_PROP_MOVABLE) || newItem->getContainer()) || (newItem->isWrapable() && newItem->hasProperty(CONST_PROP_MOVABLE) && !oldItem->hasProperty(CONST_PROP_BLOCKPATH))) {\r\n\t\tauto it = g_game().browseFields.find(getTile());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62b0c41e8d17a4aa", + "equalIndicator/v1": "e08270b54180eadec70e46e168bb4141cdc7940d3ec457bf752cb7312688c032" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 617, + "startColumn": 56, + "charOffset": 18065, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 615, + "startColumn": 1, + "charOffset": 18005, + "charLength": 116, + "snippet": { + "text": "}\r\n\r\nvoid Party::updatePlayerStatus(std::shared_ptr player) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a454e50588c84941", + "equalIndicator/v1": "e09cd03b0454912ccb9b4daf5a09a481d2c3709573c99bf9e794e3fa55af44c9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 127, + "startColumn": 7, + "charOffset": 3173, + "charLength": 10, + "snippet": { + "text": "isPushable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 125, + "startColumn": 1, + "charOffset": 3150, + "charLength": 74, + "snippet": { + "text": "\t\treturn 0;\r\n\t}\r\n\tbool isPushable() override final {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c7dd50b66432735d", + "equalIndicator/v1": "e0c7708b6aa30e0cfef1e9fb521bd974969ae958ec4e9f5167dd1979ebe0afb0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3095, + "startColumn": 3, + "charOffset": 94766, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3093, + "startColumn": 1, + "charOffset": 94676, + "charLength": 221, + "snippet": { + "text": "\t\tg_game().playerBrowseMarketOwnHistory(player->getID());\r\n\t} else if (!oldProtocol) {\r\n\t\tuint16_t itemId = msg.get();\r\n\t\tuint8_t tier = msg.get();\r\n\t\tplayer->sendMarketEnter(player->getLastDepotId());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1da6567d68fa1f0f", + "equalIndicator/v1": "e0c8e3d253de104c6dae76bc6cbb8ba61cbc29897a6eda26402885daeb74594d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1766, + "startColumn": 67, + "charOffset": 61582, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1764, + "startColumn": 1, + "charOffset": 61511, + "charLength": 206, + "snippet": { + "text": "}\r\n\r\nbool ChainPickerCallback::onChainCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\t// onChainCombat(creature, target)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "051065488f0fb0c5", + "equalIndicator/v1": "e0d85dbbd12d7167eafbd3f9fe90f59dca7d34257ae554ea02782d4002ac7300" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3096, + "startColumn": 3, + "charOffset": 94808, + "charLength": 7, + "snippet": { + "text": "uint8_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3094, + "startColumn": 1, + "charOffset": 94735, + "charLength": 225, + "snippet": { + "text": "\t} else if (!oldProtocol) {\r\n\t\tuint16_t itemId = msg.get();\r\n\t\tuint8_t tier = msg.get();\r\n\t\tplayer->sendMarketEnter(player->getLastDepotId());\r\n\t\tg_game().playerBrowseMarket(player->getID(), itemId, tier);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef7de789c8ae999b", + "equalIndicator/v1": "e0f295919f98977c31b3d1a6974317e4baa339a24f9e3ace8192606a630ea486" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1627, + "startColumn": 65, + "charOffset": 48518, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1625, + "startColumn": 1, + "charOffset": 48449, + "charLength": 156, + "snippet": { + "text": "}\r\n\r\nvoid Player::sendUpdateContainerItem(std::shared_ptr container, uint16_t slot, std::shared_ptr newItem) {\r\n\tif (!client) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "58410848146135af", + "equalIndicator/v1": "e0f627132a8ef43be0dd021b5c15592ddc88b581865cb0f7c42e51c85709fa0f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1612, + "startColumn": 22, + "charOffset": 56618, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1610, + "startColumn": 1, + "charOffset": 56424, + "charLength": 315, + "snippet": { + "text": "\t\t\tdouble factor = (double)elementAttack / (double)attackValue; // attack value here is phys dmg + element dmg\r\n\t\t\tint32_t elementDamage = std::round(defaultDmg * factor);\r\n\t\t\tint32_t physDmg = std::round(defaultDmg * (1.0 - factor));\r\n\t\t\tdamage.primary.value = physDmg;\r\n\t\t\tdamage.secondary.value = elementDamage;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "98903326b81028fe", + "equalIndicator/v1": "e10627227bc49c81139e7b100dbc98266492de5af797f870c219206040ae5c67" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 68, + "startColumn": 10, + "charOffset": 1693, + "charLength": 15, + "snippet": { + "text": "gainHealthTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 66, + "startColumn": 1, + "charOffset": 1642, + "charLength": 142, + "snippet": { + "text": "\r\n\tuint32_t getHealthGainTicks() const {\r\n\t\treturn gainHealthTicks / g_configManager().getFloat(RATE_HEALTH_REGEN_SPEED, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c601fed17e1b9925", + "equalIndicator/v1": "e10fdfb492c1dc47c155f54476b10f0bf16496205c2f34cedb9f015660a90596" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 160, + "startColumn": 2, + "charOffset": 4409, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 158, + "startColumn": 1, + "charOffset": 4402, + "charLength": 117, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t index = getNumber(L, 4, INDEX_WHEREEVER);\r\n\tuint32_t flags = getNumber(L, 5, 0);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2433f91ef6a705db", + "equalIndicator/v1": "e117575b4eea790f164b121736a1011832c9538efa05e3dea69d08d420528aa1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1775, + "startColumn": 27, + "charOffset": 61967, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1773, + "startColumn": 1, + "charOffset": 61935, + "charLength": 159, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "937417e4ae84ec3e", + "equalIndicator/v1": "e11f5f524d92f2f4861b3fd2a3c9d9552285c4e063a70e3128c654c3909342f0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 297, + "startColumn": 23, + "charOffset": 10442, + "charLength": 9, + "snippet": { + "text": "totalCost" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 295, + "startColumn": 1, + "charOffset": 10349, + "charLength": 111, + "snippet": { + "text": "\t\tcallback.pushBoolean(ignore);\r\n\t\tcallback.pushBoolean(inBackpacks);\r\n\t\tcallback.pushNumber(totalCost);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1bb92ffa5c129d02", + "equalIndicator/v1": "e12af17179c60386f794ae6257b5f579713fb580397403aa39c54794d72501bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_WIN32_WINNT', which is a reserved identifier", + "markdown": "Declaration uses identifier '_WIN32_WINNT', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 52, + "startColumn": 2, + "charOffset": 1694, + "charLength": 7, + "snippet": { + "text": "#ifndef" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 50, + "startColumn": 1, + "charOffset": 1659, + "charLength": 111, + "snippet": { + "text": "\t#define strncasecmp _strnicmp\r\n\r\n\t#ifndef _WIN32_WINNT\r\n\t\t// 0x0602: Windows 7\r\n\t\t#define _WIN32_WINNT 0x0602\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1622cfcd200858a8", + "equalIndicator/v1": "e14a6ec59e233f33df53b9c1013c3832c4836cdc900c9321df9457c235608d0c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2536, + "startColumn": 36, + "charOffset": 75853, + "charLength": 8, + "snippet": { + "text": "capacity" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2534, + "startColumn": 1, + "charOffset": 75674, + "charLength": 269, + "snippet": { + "text": "\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r\n\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\r\n\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\r\n\t\t}\r\n\t\tcurrLevelExp = Player::getExpForLevel(level);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "899e8243466226b1", + "equalIndicator/v1": "e17b128affcf018f3483268e8c67c1620612b2bfd9721587e9edf40f285915e6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::list::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5164, + "startColumn": 93, + "charOffset": 162566, + "charLength": 3, + "snippet": { + "text": "810" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5162, + "startColumn": 1, + "charOffset": 162413, + "charLength": 303, + "snippet": { + "text": "\tuint32_t i = 0;\r\n\tstd::map counterMap;\r\n\tuint32_t buyOffersToSend = std::min(buyOffers.size(), 810 + std::max(0, 810 - sellOffers.size()));\r\n\tuint32_t sellOffersToSend = std::min(sellOffers.size(), 810 + std::max(0, 810 - buyOffers.size()));\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71f215890b023059", + "equalIndicator/v1": "e1a71dfeb13bc90f2302d3d50cd29f30753db60dbf570dcccebdad9becf8143a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Result of integer division used in a floating point context; possible loss of precision", + "markdown": "Result of integer division used in a floating point context; possible loss of precision" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2187, + "startColumn": 28, + "charOffset": 74114, + "charLength": 14, + "snippet": { + "text": "uniform_random" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2185, + "startColumn": 1, + "charOffset": 73963, + "charLength": 266, + "snippet": { + "text": "\t\t playerWeapon != nullptr && playerWeapon->getTier() > 0) {\r\n\t\t\tdouble_t fatalChance = playerWeapon->getFatalChance();\r\n\t\t\tdouble_t randomChance = uniform_random(0, 10000) / 100;\r\n\t\t\tif (fatalChance > 0 && randomChance < fatalChance) {\r\n\t\t\t\tdamage.fatal = true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2af6ee8d99a76827", + "equalIndicator/v1": "e1cf2bd8f29aafaed0565bea610999cdc4990c63ef9827a23b10783774febd75" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10422, + "startColumn": 88, + "charOffset": 362192, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10420, + "startColumn": 1, + "charOffset": 362100, + "charLength": 258, + "snippet": { + "text": "}\r\n\r\nbool Game::tryRetrieveStashItems(std::shared_ptr player, std::shared_ptr item) {\r\n\tObjectCategory_t category = getObjectCategory(item);\r\n\treturn internalCollectManagedItems(std::move(player), item, category, false) == RETURNVALUE_NOERROR;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "37d6d72e2e05d912", + "equalIndicator/v1": "e1d59d2ef8b489603a34c73182132ab150f7d324ee26c8ada5e85bc3f838172c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1370, + "startColumn": 2, + "charOffset": 40938, + "charLength": 7, + "snippet": { + "text": "uint8_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1368, + "startColumn": 1, + "charOffset": 40894, + "charLength": 188, + "snippet": { + "text": "\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t tier = msg.get();\r\n\tg_game().playerEquipItem(player->getID(), itemId, Item::items[itemId].upgradeClassification > 0, tier);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "06367183e490a3b2", + "equalIndicator/v1": "e1d8e05c31634284728176bf177203155fc5fa6312b698f2bdb0e61dd100de1b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1805, + "startColumn": 19, + "charOffset": 53966, + "charLength": 17, + "snippet": { + "text": "getReflectPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1803, + "startColumn": 1, + "charOffset": 53943, + "charLength": 171, + "snippet": { + "text": "}\r\n\r\nint32_t Creature::getReflectPercent(CombatType_t combatType, bool useCharges /*= false*/) const {\r\n\ttry {\r\n\t\treturn reflectPercent.at(combatTypeToIndex(combatType));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3a7b906cd85e8d43", + "equalIndicator/v1": "e1eea4e776f500c73b4cebf1313a54adcdffa9c40d7c09ba6f448a3ef188b6ed" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_SECURE_SCL', which is a reserved identifier", + "markdown": "Declaration uses identifier '_SECURE_SCL', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 35, + "startColumn": 12, + "charOffset": 857, + "charLength": 11, + "snippet": { + "text": "_SECURE_SCL" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 33, + "startColumn": 1, + "charOffset": 811, + "charLength": 107, + "snippet": { + "text": "\t#ifdef _MSC_VER\r\n\t\t#ifdef NDEBUG\r\n\t\t\t#define _SECURE_SCL 0\r\n\t\t\t#define HAS_ITERATOR_DEBUGGING 0\r\n\t\t#endif\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c9f91aed9cf278db", + "equalIndicator/v1": "e20da032e950b6cee85c8ec9d821c1bf79822aab633b7e12635fdadbd6d662a2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 107, + "startColumn": 7, + "charOffset": 2725, + "charLength": 12, + "snippet": { + "text": "uint_fast8_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 105, + "startColumn": 1, + "charOffset": 2655, + "charLength": 248, + "snippet": { + "text": "\r\nvoid Dispatcher::executeEvents(const TaskGroup startGroup) {\r\n\tfor (uint_fast8_t groupId = static_cast(startGroup); groupId < static_cast(TaskGroup::Last); ++groupId) {\r\n\t\tauto &tasks = m_tasks[groupId];\r\n\t\tif (tasks.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8ba5383c3c4f6556", + "equalIndicator/v1": "e2695e90c9fa6de341bf6287efcaaf712e44a2fba79ceeb70a1b8f86baed9d85" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 244, + "startColumn": 45, + "charOffset": 9013, + "charLength": 5, + "snippet": { + "text": "party" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 242, + "startColumn": 1, + "charOffset": 8914, + "charLength": 161, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, party);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b7289bb1e4c119d9", + "equalIndicator/v1": "e26fa325e877eb39ace9852b05c3422046baa8bb0dd001cb15d46fff34b419e8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1147, + "startColumn": 53, + "charOffset": 46929, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1145, + "startColumn": 1, + "charOffset": 46872, + "charLength": 192, + "snippet": { + "text": "}\r\n\r\nbool Game::removeCreature(std::shared_ptr creature, bool isLogout /* = true*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!creature || creature->isRemoved()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f04c8ccf06d29181", + "equalIndicator/v1": "e299d0718b582e3aa0941f59ed8072ebaf80b02ed70bd994039159f8dfd44f03" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 88, + "startColumn": 10, + "charOffset": 2227, + "charLength": 11, + "snippet": { + "text": "attackSpeed" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 86, + "startColumn": 1, + "charOffset": 2180, + "charLength": 128, + "snippet": { + "text": "\r\n\tuint32_t getAttackSpeed() const {\r\n\t\treturn attackSpeed / g_configManager().getFloat(RATE_ATTACK_SPEED, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bc53ff9fbd662b97", + "equalIndicator/v1": "e2a0de878dc7ce1a94bed7fad679d17eaf312cede657001a6276cfa5cc39e7ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 463, + "startColumn": 65, + "charOffset": 17455, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 461, + "startColumn": 1, + "charOffset": 17386, + "charLength": 218, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnMove - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "835d7b50afdde077", + "equalIndicator/v1": "e2a1a3a655cd745a631b9ee1a696702a3697daab072e2b4e213cafe992ed839b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 39, + "startColumn": 7, + "charOffset": 1339, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 37, + "startColumn": 1, + "charOffset": 1178, + "charLength": 348, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\n\tbool canRemove() const override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6d01b7d1d46d4201", + "equalIndicator/v1": "e2d55d3f325661b0843e7210f59be7b5b6e6e8fdf409c305afef5acbaaeac771" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 144, + "startColumn": 59, + "charOffset": 3712, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 142, + "startColumn": 1, + "charOffset": 3649, + "charLength": 107, + "snippet": { + "text": "}\r\n\r\nvoid ScriptEnvironment::addTempItem(std::shared_ptr item) {\r\n\ttempItems.emplace(this, item);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c5e4c833785813c", + "equalIndicator/v1": "e2dc0a90e02f761b863d952276e509ca47e931226f101472d5d8c21078a69cab" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 354, + "startColumn": 20, + "charOffset": 8862, + "charLength": 9, + "snippet": { + "text": "stackSize" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 352, + "startColumn": 1, + "charOffset": 8774, + "charLength": 115, + "snippet": { + "text": "\r\n\tuint64_t stackSize = static_cast(itemType->stackSize);\r\n\tlua_pushnumber(L, stackSize);\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c3cd2d7db8963c4c", + "equalIndicator/v1": "e2fd85ac86541ae97bf2a500b3a2aa2a6abcbee4023e6db98d098fcfb3396ff5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1055, + "startColumn": 12, + "charOffset": 30303, + "charLength": 7, + "snippet": { + "text": "tolower" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1053, + "startColumn": 1, + "charOffset": 30286, + "charLength": 88, + "snippet": { + "text": "\t}\r\n\r\n\tchar ch = tolower(str.front());\r\n\treturn ch != 'f' && ch != 'n' && ch != '0';\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0e3393ccd19a354a", + "equalIndicator/v1": "e314fc671b8566cedb157f0293b81a586a5fff03a6bc1bcabfeb5bb6ffe2ca85" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'hwnd' declared with a const-qualified typedef; results in the type being 'HWND__ *const' instead of 'const HWND__ *'", + "markdown": "'hwnd' declared with a const-qualified typedef; results in the type being 'HWND__ \\*const' instead of 'const HWND__ \\*'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 228, + "startColumn": 13, + "charOffset": 7806, + "charLength": 4, + "snippet": { + "text": "hwnd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 226, + "startColumn": 1, + "charOffset": 7728, + "charLength": 201, + "snippet": { + "text": "void CanaryServer::toggleForceCloseButton() {\r\n#ifdef OS_WINDOWS\r\n\tconst HWND hwnd = GetConsoleWindow();\r\n\tconst HMENU hmenu = GetSystemMenu(hwnd, FALSE);\r\n\tEnableMenuItem(hmenu, SC_CLOSE, MF_GRAYED);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "92620f7d7ad17802", + "equalIndicator/v1": "e32c96e1298c759c9b52355cef044486a5ebe378046bb707f4b8fee420cd90d8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'fromProto' is within a recursive call chain", + "markdown": "Function 'fromProto' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper_proto.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 33, + "charOffset": 2681, + "charLength": 9, + "snippet": { + "text": "fromProto" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2644, + "charLength": 181, + "snippet": { + "text": "}\r\n\r\nValueWrapper ProtoSerializable::fromProto(const Canary::protobuf::kv::ValueWrapper &protoValue, uint64_t timestamp) {\r\n\tValueVariant data;\r\n\tswitch (protoValue.value_case()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b0eccdf4f7bf4094", + "equalIndicator/v1": "e34012941ea5bec08309a00f01688bf255d500100bdc56f4eb51833f1f657879" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 993, + "startColumn": 7, + "charOffset": 35834, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 991, + "startColumn": 1, + "charOffset": 35822, + "charLength": 153, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnTradeAccept - \"\r\n\t\t \"Player {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "09c1014765ced971", + "equalIndicator/v1": "e34ee90e452e5dcda165a4ed63369dac5768eb679fabf306f5bd4e98125283ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 946, + "startColumn": 2, + "charOffset": 28802, + "charLength": 59, + "snippet": { + "text": "lua_createtable(L, monsterType->info.voiceVector.size(), 0)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 944, + "startColumn": 1, + "charOffset": 28782, + "charLength": 175, + "snippet": { + "text": "\r\n\tint index = 0;\r\n\tlua_createtable(L, monsterType->info.voiceVector.size(), 0);\r\n\tfor (const auto &voiceBlock : monsterType->info.voiceVector) {\r\n\t\tlua_createtable(L, 0, 2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62a80c7a8b6526c8", + "equalIndicator/v1": "e359a14b6d18b0768a2134ea25960ed1544f197df1c2b929c4fd61e56f5c199c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 322, + "startColumn": 7, + "charOffset": 10172, + "charLength": 10, + "snippet": { + "text": "isPushable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 320, + "startColumn": 1, + "charOffset": 10094, + "charLength": 135, + "snippet": { + "text": "\tvirtual void serializeAttr(PropWriteStream &propWriteStream) const;\r\n\r\n\tbool isPushable() override final {\r\n\t\treturn isMovable();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "123b21db7669c97b", + "equalIndicator/v1": "e36b2c910b9cc1de1c8afd60407666b9ba55d0b554401f35919497ff24a2b21f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9782, + "startColumn": 49, + "charOffset": 342468, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9780, + "startColumn": 1, + "charOffset": 342415, + "charLength": 182, + "snippet": { + "text": "}\r\n\r\nvoid Game::removePlayer(std::shared_ptr player) {\r\n\tconst std::string &lowercase_name = asLowerCaseString(player->getName());\r\n\tmappedPlayerNames.erase(lowercase_name);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1cffaf8a50352c7d", + "equalIndicator/v1": "e36e1cea3e530d99c45f15693aa4ab0d51b55535e93b1c13a0c78faf34b96bb1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1302, + "startColumn": 22, + "charOffset": 36596, + "charLength": 7, + "snippet": { + "text": "toupper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1300, + "startColumn": 1, + "charOffset": 36421, + "charLength": 278, + "snippet": { + "text": "\t\t\t\t\tss << std::showpos << it.abilities->specializedMagicLevel[i] << std::noshowpos;\r\n\t\t\t\t\tstd::string combatName = getCombatName(indexToCombatType(i));\r\n\t\t\t\t\tcombatName[0] = toupper(combatName[0]);\r\n\t\t\t\t\tdescriptions.emplace_back(combatName + \" Magic Level\", ss.str());\r\n\t\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5938b5245335c311", + "equalIndicator/v1": "e37724ade5c94afb7bd5ca713441aab0aa57342cd704bfabb93bab7d9b9b05f8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The variable 'item' is copy-constructed from a const reference but is only used as const reference; consider making it a const reference", + "markdown": "The variable 'item' is copy-constructed from a const reference but is only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 323, + "startColumn": 7, + "charOffset": 9581, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 321, + "startColumn": 1, + "charOffset": 9569, + "charLength": 106, + "snippet": { + "text": "\t}\r\n\r\n\tauto item = filteredItems[index];\r\n\r\n\tauto it = std::find(itemlist.begin(), itemlist.end(), item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0b62891b22958842", + "equalIndicator/v1": "e3afb1940246b798ef9628a8f627147ea2bcd15e0e2b218547ed0aacc4dd112f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 437, + "startColumn": 91, + "charOffset": 13119, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 435, + "startColumn": 1, + "charOffset": 13024, + "charLength": 221, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::StepInField(std::shared_ptr creature, std::shared_ptr item, const Position &) {\r\n\tif (creature == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::StepInField] - Creature is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fd3c7b3ddce02440", + "equalIndicator/v1": "e3b3ac28d4e0e38ec42698ecb6eeeef0f78f6ab44589a1011b425340a4c06a71" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 167, + "startColumn": 27, + "charOffset": 6261, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 165, + "startColumn": 1, + "charOffset": 6229, + "charLength": 125, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.monsterOnSpawn, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a337aea61fab8c6f", + "equalIndicator/v1": "e401d2c4c1fed85b6166188c179a40556ce8b38e0361912863e0f7aec1f70272" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'operator int' must be marked explicit to avoid unintentional implicit conversions", + "markdown": "'operator int' must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 108, + "startColumn": 27, + "charOffset": 3219, + "charLength": 3, + "snippet": { + "text": "int" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 106, + "startColumn": 1, + "charOffset": 3187, + "charLength": 76, + "snippet": { + "text": "\t}\r\n\r\n\texplicit(false) operator int() const {\r\n\t\treturn get();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7a4edd0d5bd8c7be", + "equalIndicator/v1": "e404897ce6014414b8c4bb257bb7b586ccef4077b601787fa23b5d9b1f7c404c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1051, + "startColumn": 114, + "charOffset": 30499, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1049, + "startColumn": 1, + "charOffset": 30381, + "charLength": 352, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Player::refreshManagedContainer(ObjectCategory_t category, std::shared_ptr container, bool isLootContainer, bool loading /* = false*/) {\r\n\tstd::shared_ptr previousContainer = nullptr;\r\n\tauto toSetAttribute = isLootContainer ? ItemAttribute_t::QUICKLOOTCONTAINER : ItemAttribute_t::OBTAINCONTAINER;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "990b7b0c9d845e20", + "equalIndicator/v1": "e404bae48fae92613a9784afa2f85fbaeb848c1b1910ae20388d7728a20f73ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when declaring iterators", + "markdown": "Use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 71, + "startColumn": 2, + "charOffset": 1957, + "charLength": 21, + "snippet": { + "text": "ModulesList::iterator" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 69, + "startColumn": 1, + "charOffset": 1885, + "charLength": 204, + "snippet": { + "text": "\r\nModule* Modules::getEventByRecvbyte(uint8_t recvbyte, bool force) {\r\n\tModulesList::iterator it = recvbyteList.find(recvbyte);\r\n\tif (it != recvbyteList.end()) {\r\n\t\tif (!force || it->second.isLoaded()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d24728e765a97d0f", + "equalIndicator/v1": "e404d89ce20f5acb6e56d7a0212174cd863314b48539f7799112ffc34708eda6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 770, + "startColumn": 26, + "charOffset": 35482, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 768, + "startColumn": 1, + "charOffset": 35267, + "charLength": 378, + "snippet": { + "text": "// SLOT_BLUE_MIDDLE_100 = 26\r\nvoid IOWheel::slotBlueMiddle100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\tif (isKnight(vocationCipId)) {\r\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_BLUE_MIDDLE_100, points, \"Chivalrous Challenge\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5f7c3441927807d4", + "equalIndicator/v1": "e4213df1cb6d8018bcb85d411e17a58241842cc2224119ddd78a98963814ef5e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 110, + "startColumn": 28, + "charOffset": 3197, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 108, + "startColumn": 1, + "charOffset": 3071, + "charLength": 321, + "snippet": { + "text": "\tstd::shared_ptr getEvent(const std::shared_ptr &item, MoveEvent_t eventType);\r\n\r\n\tbool registerLuaItemEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaActionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr moveEvent);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "61cf037f48722fa0", + "equalIndicator/v1": "e44029dfc0c569b4560a7f044ad353967c84400e5b017b75dfa05050c15df1a2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1080, + "startColumn": 27, + "charOffset": 38822, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1078, + "startColumn": 1, + "charOffset": 38790, + "charLength": 133, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnLoseExperience, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1d1a5defa1a3d73", + "equalIndicator/v1": "e44be812b943453d8bebe2778fa5b71f6f7f139fe06c958cd2c6487c6a353acf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Pass by value and use std::move", + "markdown": "Pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 88, + "startColumn": 29, + "charOffset": 2415, + "charLength": 22, + "snippet": { + "text": "std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 86, + "startColumn": 1, + "charOffset": 2286, + "charLength": 198, + "snippet": { + "text": "\tstatic std::shared_ptr createHouseTransferItem(std::shared_ptr house);\r\n\r\n\texplicit HouseTransferItem(std::shared_ptr newHouse) :\r\n\t\tItem(0), house(newHouse) { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d1aaa68693c301e0", + "equalIndicator/v1": "e4594ffced5c8ab0d262ba5eaeaf64a45c33e9883029b8b6e8c4eab01974ae47" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 701, + "startColumn": 100, + "charOffset": 21245, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 699, + "startColumn": 1, + "charOffset": 21141, + "charLength": 211, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::fireStepEvent(const std::shared_ptr &creature, std::shared_ptr item, const Position &pos) const {\r\n\tif (isLoadedCallback()) {\r\n\t\treturn executeStep(creature, item, pos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "022e5d26dc184835", + "equalIndicator/v1": "e46c6823fdebd5b064123fb9548bb0d74f68675b9db699ea9adae869b8d72f64" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 780, + "startColumn": 20, + "charOffset": 23761, + "charLength": 10, + "snippet": { + "text": "-oldWeight" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 778, + "startColumn": 1, + "charOffset": 23661, + "charLength": 163, + "snippet": { + "text": "\t\tconst int32_t oldWeight = item->getWeight();\r\n\t\titem->setItemCount(newCount);\r\n\t\tupdateItemWeight(-oldWeight + item->getWeight());\r\n\r\n\t\t// send change to client\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5cd27242d1efff9f", + "equalIndicator/v1": "e4735d534314f91d77575206e84e639b9374a4a7137bcee4ce10d6a0c14d28dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 31, + "startColumn": 19, + "charOffset": 1012, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 29, + "startColumn": 1, + "charOffset": 989, + "charLength": 204, + "snippet": { + "text": "}\r\n\r\nvoid DepotLocker::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tauto parentLocked = m_parent.lock();\r\n\tif (parentLocked) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "99294fbd93c6d491", + "equalIndicator/v1": "e479a761b1a0d0b1fa05c64501754d0803267bfd2546805922e0ceaa2deb9808" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'wheelSpell' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'wheelSpell' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 94, + "charOffset": 1037, + "charLength": 10, + "snippet": { + "text": "wheelSpell" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 895, + "charLength": 220, + "snippet": { + "text": "#include \"lua/callbacks/events_callbacks.hpp\"\r\n\r\nint32_t Combat::getLevelFormula(std::shared_ptr player, const std::shared_ptr wheelSpell, const CombatDamage &damage) const {\r\n\tif (!player) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3c0bc71555e31c0b", + "equalIndicator/v1": "e480f7e1b08bf99a7ef0f96838991baa5d68b89a57b7f54cb3dab2849e15869b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 97, + "startColumn": 20, + "charOffset": 3507, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 95, + "startColumn": 1, + "charOffset": 3402, + "charLength": 170, + "snippet": { + "text": "\tstd::ostringstream query;\r\n\tquery << \"SELECT * FROM `players` WHERE `id` = \" << id;\r\n\treturn loadPlayer(player, db.storeQuery(query.str()), disableIrrelevantInfo);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bcbb668dab7bc4c0", + "equalIndicator/v1": "e4a82558c3ae8fb83edbb5589e2e8ebf5b50fa66d22b9a6ae31a2849aa18737c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 81, + "startColumn": 41, + "charOffset": 2789, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 79, + "startColumn": 1, + "charOffset": 2743, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "831accab21375d01", + "equalIndicator/v1": "e4d1c2d299d600631c3acf4ec1a92dde9dc2f3b13b4c973ed11e4841b55dd50e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2640, + "startColumn": 21, + "charOffset": 78212, + "charLength": 8, + "snippet": { + "text": "blockHit" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2638, + "startColumn": 1, + "charOffset": 78187, + "charLength": 328, + "snippet": { + "text": "}\r\n\r\nBlockType_t Player::blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense /* = false*/, bool checkArmor /* = false*/, bool field /* = false*/) {\r\n\tBlockType_t blockType = Creature::blockHit(attacker, combatType, damage, checkDefense, checkArmor, field);\r\n\tif (attacker) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "46107df59e96d8a4", + "equalIndicator/v1": "e50347e87e9ec6f47ce02e1455558de9ea0f70e945eaa47b0b54de1a3d5e581d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getUnlockedRunesBit' can be made const", + "markdown": "Method 'getUnlockedRunesBit' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1958, + "startColumn": 10, + "charOffset": 57704, + "charLength": 19, + "snippet": { + "text": "getUnlockedRunesBit" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1956, + "startColumn": 1, + "charOffset": 57664, + "charLength": 96, + "snippet": { + "text": "\t\tUnlockedRunesBit = bit;\r\n\t}\r\n\tint32_t getUnlockedRunesBit() {\r\n\t\treturn UnlockedRunesBit;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f5ef080c5e579feb", + "equalIndicator/v1": "e512b77a2068cb6a4194e932e9a8f65857ae1ca223f76975ed144a2cebce2b2c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1362, + "startColumn": 28, + "charOffset": 40933, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1360, + "startColumn": 1, + "charOffset": 40803, + "charLength": 160, + "snippet": { + "text": "\tvoid sendChangeSpeed(std::shared_ptr creature, uint16_t newSpeed) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendChangeSpeed(creature, newSpeed);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "47e722ecc620e026", + "equalIndicator/v1": "e5259af6ef785317f40b46903f13701bb2667cfd6aac0f7eb1fc22d8aee0db91" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2530, + "startColumn": 37, + "charOffset": 75470, + "charLength": 9, + "snippet": { + "text": "healthMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2528, + "startColumn": 1, + "charOffset": 75302, + "charLength": 359, + "snippet": { + "text": "\t\tif (vocation->getId() != VOCATION_NONE && level <= 8) {\r\n\t\t\tconst auto &noneVocation = g_vocations().getVocation(VOCATION_NONE);\r\n\t\t\thealthMax = std::max(0, healthMax - noneVocation->getHPGain());\r\n\t\t\tmanaMax = std::max(0, manaMax - noneVocation->getManaGain());\r\n\t\t\tcapacity = std::max(0, capacity - noneVocation->getCapGain());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4ac7d80b1211f0f4", + "equalIndicator/v1": "e549b35447f338624848941b07a7232ae68ee4eb5fef96af059a8b750b4458d9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 606, + "startColumn": 109, + "charOffset": 17716, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 604, + "startColumn": 1, + "charOffset": 17312, + "charLength": 503, + "snippet": { + "text": "\t\tmember->sendPartyCreatureHealth(player, std::ceil((static_cast(player->getHealth()) / std::max(player->getMaxHealth(), 1)) * 100));\r\n\t\tplayer->sendPartyPlayerMana(member, std::ceil((static_cast(member->getMana()) / std::max(member->getMaxMana(), 1)) * 100));\r\n\t\tmember->sendPartyPlayerMana(player, std::ceil((static_cast(player->getMana()) / std::max(player->getMaxMana(), 1)) * 100));\r\n\t} else {\r\n\t\tfor (const auto &summon : player->getSummons()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "98cdb8ded16d5ba8", + "equalIndicator/v1": "e58bc7d7db464fcda82c62782e84b4c3b73797f50d7d3d6a6a62c4966d155d37" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 40, + "startColumn": 18, + "charOffset": 1353, + "charLength": 12, + "snippet": { + "text": "ValueWrapper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 38, + "startColumn": 1, + "charOffset": 1201, + "charLength": 462, + "snippet": { + "text": "\texplicit(false) ValueWrapper(bool value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(int value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(double value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const phmap::flat_hash_map &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const std::initializer_list> &init_list, uint64_t timestamp = 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4546bd76d05fbb98", + "equalIndicator/v1": "e5927ecda707d957591f42ab1dd04a8f973a21736f71750d819cd772eab08ccc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1130, + "startColumn": 43, + "charOffset": 42995, + "charLength": 3, + "snippet": { + "text": "npc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1128, + "startColumn": 1, + "charOffset": 42898, + "charLength": 202, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, npc);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Npc\");\r\n\tLuaScriptInterface::pushPosition(L, position);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "631029885e313dbb", + "equalIndicator/v1": "e59e46f496a2afafda22982f206f7682e35f9880821e6b3ec418c8fe19bad8dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 840, + "startColumn": 2, + "charOffset": 23371, + "charLength": 12, + "snippet": { + "text": "SpeakClasses" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 838, + "startColumn": 1, + "charOffset": 23328, + "charLength": 235, + "snippet": { + "text": "\tbool ghost = getBoolean(L, 4, false);\r\n\r\n\tSpeakClasses type = getNumber(L, 3, TALKTYPE_MONSTER_SAY);\r\n\tconst std::string &text = getString(L, 2);\r\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1c52ff89ee9d7805", + "equalIndicator/v1": "e5ad9b8fe8872e3ecfb8659f4191c4e96b2e78d469780ccd67ffd5e65bee49e0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 579, + "startColumn": 13, + "charOffset": 27421, + "charLength": 13, + "snippet": { + "text": "absorbPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 577, + "startColumn": 1, + "charOffset": 27260, + "charLength": 406, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentenergy\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b7babbdd57eab56f", + "equalIndicator/v1": "e5bcc3b8f59aa00d8d103663dd5ee4f7a00bb53f803232c60d23c650514247f7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1167, + "startColumn": 59, + "charOffset": 34389, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1165, + "startColumn": 1, + "charOffset": 34322, + "charLength": 136, + "snippet": { + "text": "\t\t}\r\n\t}\r\n\tvoid sendCreatureChangeVisible(std::shared_ptr creature, bool visible) {\r\n\t\tif (!client || !creature) {\r\n\t\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0fd7a82aed2ed982", + "equalIndicator/v1": "e5c84840f8e52c9595b78798108b4d2a9f2023174e2a5f8c2f196c67d7ef79b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 753, + "startColumn": 22, + "charOffset": 20498, + "charLength": 24, + "snippet": { + "text": "luaPlayerGetStashCounter" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 751, + "startColumn": 1, + "charOffset": 20472, + "charLength": 163, + "snippet": { + "text": "}\r\n\r\nint PlayerFunctions::luaPlayerGetStashCounter(lua_State* L) {\r\n\t// player:getStashCount()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4734564b8868009f", + "equalIndicator/v1": "e5d16336ec9619d1354ca6858202a5118bb4c56d68e78f280aab9f6599c36dee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 249, + "startColumn": 55, + "charOffset": 7059, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 247, + "startColumn": 1, + "charOffset": 6968, + "charLength": 151, + "snippet": { + "text": "\r\n// Prey/Task hunting global class\r\nvoid IOPrey::checkPlayerPreys(std::shared_ptr player, uint8_t amount) const {\r\n\tif (!player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2bdae2a2b4ee083d", + "equalIndicator/v1": "e5dd9a5dbb5ecab954b8931a24b2376a2fc17b68a4827b643c81c4508510708f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2236, + "startColumn": 25, + "charOffset": 65770, + "charLength": 8, + "snippet": { + "text": "interval" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2234, + "startColumn": 1, + "charOffset": 65740, + "charLength": 128, + "snippet": { + "text": "\t}\r\n\r\n\taddOfflineTrainingTime(interval);\r\n\tif (lastStatsTrainingTime != getOfflineTrainingTime() / 60 / 1000) {\r\n\t\tsendStats();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d3571f9c0ddaf0d4", + "equalIndicator/v1": "e5e1ffc17df65fc3d662fbe72be541a056b997b7480f64b98e89c5f07b90489d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 725, + "startColumn": 37, + "charOffset": 23592, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 723, + "startColumn": 1, + "charOffset": 23530, + "charLength": 133, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 1.10f) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "087494f2cbe97d5f", + "equalIndicator/v1": "e60e81809f3fd506031ac77482c2fe5f13e0cc6909dcac0b6ec2d7792023de29" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 160, + "startColumn": 25, + "charOffset": 5341, + "charLength": 8, + "snippet": { + "text": "getThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 158, + "startColumn": 1, + "charOffset": 5114, + "charLength": 321, + "snippet": { + "text": "\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::map &getAllItemTypeCount(std::map &countMap) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r\n\tItemVector getItems(bool recursive = false);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "705d4b268343892d", + "equalIndicator/v1": "e650c9d45f96dc1db2222527fab3e901d3ecdc80198fdc66bc8d474e777f3f8b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2675, + "startColumn": 17, + "charOffset": 79528, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2673, + "startColumn": 1, + "charOffset": 79368, + "charLength": 303, + "snippet": { + "text": "\t\t\t\t\tconst int16_t &fieldAbsorbPercent = it.abilities->fieldAbsorbPercent[combatTypeToIndex(combatType)];\r\n\t\t\t\t\tif (fieldAbsorbPercent != 0) {\r\n\t\t\t\t\t\tdamage -= std::round(damage * (fieldAbsorbPercent / 100.));\r\n\t\t\t\t\t\tif (charges != 0) {\r\n\t\t\t\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "61e3c68f72489b0e", + "equalIndicator/v1": "e658c9f020e14e7d779d60ea28f954729c6da50ed9a738f1acc702c7753777f2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use emplace_back instead of push_back", + "markdown": "Use emplace_back instead of push_back" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6464, + "startColumn": 12, + "charOffset": 189168, + "charLength": 9, + "snippet": { + "text": "push_back" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6462, + "startColumn": 1, + "charOffset": 188987, + "charLength": 278, + "snippet": { + "text": "void sendStowItems(const std::shared_ptr &item, const std::shared_ptr &stowItem, StashContainerList &itemDict) {\r\n\tif (stowItem->getID() == item->getID()) {\r\n\t\titemDict.push_back(std::pair, uint32_t>(stowItem, stowItem->getItemCount()));\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7f2d2b32d994a4bc", + "equalIndicator/v1": "e65d8ad4d4ba28d171b45b704f3a033fcd36d510ed5221c90c76b31c4d6926da" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 722, + "startColumn": 15, + "charOffset": 23463, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 720, + "startColumn": 1, + "charOffset": 23423, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 87) * 1.20f) - 4;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7adc5c11bc8c9178", + "equalIndicator/v1": "e6778dae0b3b9c22ce25e9b2bcf14ce49cd90f1ffb55f65dd7eacc722f4d3d6a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6181, + "startColumn": 62, + "charOffset": 196442, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6179, + "startColumn": 1, + "charOffset": 196376, + "charLength": 137, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendChangeSpeed(std::shared_ptr creature, uint16_t speed) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0x8F);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "88d76933cd3d6ce4", + "equalIndicator/v1": "e68fa702bc1e5d637c644ca487e9a073e8aa1c9a12190c22c591000801c09be6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2246, + "startColumn": 19, + "charOffset": 85869, + "charLength": 1, + "snippet": { + "text": "m" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2244, + "startColumn": 1, + "charOffset": 85768, + "charLength": 169, + "snippet": { + "text": "\t\ttoCylinder->updateThing(toItem, toItem->getID(), toItem->getItemCount() + n);\r\n\r\n\t\tint32_t count = m - n;\r\n\t\tif (count > 0) {\r\n\t\t\tif (item->getItemCount() != count) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "985312d2ba4f37e5", + "equalIndicator/v1": "e6be114f6e262a58c3757d196102017215853786d30dbb2b8ed1a2d218f92ad9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'member' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'member' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 591, + "startColumn": 86, + "charOffset": 16450, + "charLength": 6, + "snippet": { + "text": "member" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 589, + "startColumn": 1, + "charOffset": 16360, + "charLength": 235, + "snippet": { + "text": "}\r\n\r\nvoid Party::showPlayerStatus(std::shared_ptr player, std::shared_ptr member, bool showStatus) {\r\n\tplayer->sendPartyCreatureShowStatus(member, showStatus);\r\n\tmember->sendPartyCreatureShowStatus(player, showStatus);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75d51c1f0a57d2e4", + "equalIndicator/v1": "e6d0fddcc9e924580a77c1add2446a726f3af458f7e3830e0913c64d587fae92" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 929, + "startColumn": 25, + "charOffset": 30289, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 927, + "startColumn": 1, + "charOffset": 30195, + "charLength": 162, + "snippet": { + "text": "\t\tint32_t value = getAbsorbPercent(combatType);\r\n\t\tif (value != 0) {\r\n\t\t\tdamage -= std::round(damage * value / 100.f);\r\n\t\t}\r\n\t\tvalue = getAbsorbFlat(combatType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "587f071a61e10ee6", + "equalIndicator/v1": "e6f62cb753ba69d907586486eb7ce962fa27a5589cd926ec8d7ea184052f9b60" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'registerWheelSpellTable' is within a recursive call chain", + "markdown": "Function 'registerWheelSpellTable' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 53, + "startColumn": 7, + "charOffset": 2151, + "charLength": 23, + "snippet": { + "text": "registerWheelSpellTable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 51, + "startColumn": 1, + "charOffset": 2115, + "charLength": 239, + "snippet": { + "text": "\t */\r\n\ttemplate \r\n\tvoid registerWheelSpellTable(const T &spellData, const std::string &name, WheelSpellGrade_t gradeType) {\r\n\t\tif (name == \"Any_Focus_Mage_Spell\") {\r\n\t\t\tfor (const std::string &focusSpellName : m_focusSpells) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59f58a383226b809", + "equalIndicator/v1": "e73ecdb50f6532e2d2b769df5c838ed1136960435344fb5fe7c7b6b746703298" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 171, + "startColumn": 3, + "charOffset": 4468, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 169, + "startColumn": 1, + "charOffset": 4411, + "charLength": 199, + "snippet": { + "text": "\r\n\tif (const TileItemVector* items = getItemList()) {\r\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\r\n\t\t\tif ((*it)->getMagicField()) {\r\n\t\t\t\treturn (*it)->getMagicField();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fddde8ed3284647b", + "equalIndicator/v1": "e74007ccac1695b8fb378d7e82f456f0204e66176df2bf3ccfc2aaec451db456" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 844, + "startColumn": 27, + "charOffset": 27188, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 842, + "startColumn": 1, + "charOffset": 27156, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7df1f1d5a6c9f04f", + "equalIndicator/v1": "e74904d766bb504a85a2a135bcc7a76660feb921bc967648e680ef7721f6d619" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10184, + "startColumn": 7, + "charOffset": 354405, + "charLength": 25, + "snippet": { + "text": "auto [monsterId, monster]" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10182, + "startColumn": 1, + "charOffset": 354330, + "charLength": 180, + "snippet": { + "text": "void Game::updateForgeableMonsters() {\r\n\tforgeableMonsters.clear();\r\n\tfor (auto [monsterId, monster] : monsters) {\r\n\t\tauto monsterTile = monster->getTile();\r\n\t\tif (!monsterTile) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "81bdae38b5526989", + "equalIndicator/v1": "e7592ee1cae62ea2f1111636ae3495f0c298d37ee353682fea21c842409663b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Initializer-list constructor should not be declared explicit", + "markdown": "Initializer-list constructor should not be declared explicit" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/arraylist.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 30, + "startColumn": 12, + "charOffset": 850, + "charLength": 9, + "snippet": { + "text": "arraylist" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 28, + "startColumn": 1, + "charOffset": 832, + "charLength": 102, + "snippet": { + "text": "\t\t}\r\n\r\n\t\texplicit arraylist(std::initializer_list _Ilist) {\r\n\t\t\tbackContainer.assign(_Ilist);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bb06eaf1874f6fbf", + "equalIndicator/v1": "e787685f6f4014b0897a1aa1429f516024e26a7067548aff1a8c86ca5adac934" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1610, + "startColumn": 19, + "charOffset": 47933, + "charLength": 3, + "snippet": { + "text": "str" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1608, + "startColumn": 1, + "charOffset": 47909, + "charLength": 98, + "snippet": { + "text": "\t}\r\n\r\n\tfor (std::string str : toks) {\r\n\t\tif (str.length() < 2) {\r\n\t\t\treturn INVALID_TOKEN_LENGTH;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ccd24c604704ff28", + "equalIndicator/v1": "e79319300de51772fdf2fb362ebf683944f5a1af0e53ec977c04ac165b357ce9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 177, + "startColumn": 105, + "charOffset": 6338, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 175, + "startColumn": 1, + "charOffset": 6229, + "charLength": 403, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::creatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnDrainHealth - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0805ceaf739a5254", + "equalIndicator/v1": "e7954e7b9e024b39400bffb705f1298ca029da0fa52b55f87762ec165b6dea3a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1200, + "startColumn": 30, + "charOffset": 35328, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1198, + "startColumn": 1, + "charOffset": 35219, + "charLength": 129, + "snippet": { + "text": "\tvoid sendCreatureLight(std::shared_ptr creature) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureLight(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fb573f8211bb8fbb", + "equalIndicator/v1": "e7ae4493ae6ab9d1d79f01be2034d1987fe6d3c35f8ea54d0baa1103f6a98397" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 794, + "startColumn": 6, + "charOffset": 30458, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 792, + "startColumn": 1, + "charOffset": 30425, + "charLength": 176, + "snippet": { + "text": "\tlua_pushnumber(L, exp);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5f5a7b101b81252b", + "equalIndicator/v1": "e7b6624599358d4b19426d7efd43bcccf7222bcb3c7ba640ba54b6fe1089be94" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint8_t' (aka 'unsigned char') to signed type 'int8_t' (aka 'signed char') is implementation-defined", + "markdown": "Narrowing conversion from 'uint8_t' (aka 'unsigned char') to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3025, + "startColumn": 11, + "charOffset": 92324, + "charLength": 3, + "snippet": { + "text": "msg" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3023, + "startColumn": 1, + "charOffset": 92222, + "charLength": 210, + "snippet": { + "text": "\tuint16_t raceId = 0;\r\n\tif (action == static_cast(PreyAction_MonsterSelection)) {\r\n\t\tindex = msg.getByte();\r\n\t} else if (action == static_cast(PreyAction_Option)) {\r\n\t\toption = msg.getByte();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e2d9ae2151453f6c", + "equalIndicator/v1": "e7bada78a4eee82534c8678776b28c50ce55d99feb3c29dd8a207d9fbd90311a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 829, + "startColumn": 29, + "charOffset": 24898, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 827, + "startColumn": 1, + "charOffset": 24758, + "charLength": 215, + "snippet": { + "text": "\r\nstd::map &Container::getAllItemTypeCount(std::map &countMap) const {\r\n\tfor (std::shared_ptr item : itemlist) {\r\n\t\tcountMap[item->getID()] += item->getItemCount();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c56dcd084ce50fd2", + "equalIndicator/v1": "e7fb45d61016a812d48ecdc64866ab2d3fd864a14203d7b4b94fd7a2e5f53c6b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 676, + "startColumn": 35, + "charOffset": 18478, + "charLength": 10, + "snippet": { + "text": "actualBuff" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 674, + "startColumn": 1, + "charOffset": 18396, + "charLength": 138, + "snippet": { + "text": "\r\n\t\tint32_t actualBuff = creature->getBuff(i);\r\n\t\tbuffs[i] = static_cast(actualBuff * ((buffsPercent[i] - 100) / 100.f));\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d699e038b9161ce4", + "equalIndicator/v1": "e849924e9bd14bd4d8532c1c75b3d1a64d6d91551527c14570a04fed91c4065c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 121, + "startColumn": 8, + "charOffset": 3105, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 119, + "startColumn": 1, + "charOffset": 3009, + "charLength": 212, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsReadable(lua_State* L) {\r\n\t// itemType:isReadable()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->canReadText);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b61ca221b50939c7", + "equalIndicator/v1": "e84d880ea8947e6f07902d825dbe23fdaf0a4652763c804ba0f9568f8d1960ce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 65, + "startColumn": 12, + "charOffset": 1813, + "charLength": 3, + "snippet": { + "text": "npc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 63, + "startColumn": 1, + "charOffset": 1758, + "charLength": 104, + "snippet": { + "text": "\r\n\tvoid setNpc(std::shared_ptr npc) {\r\n\t\tcurNpc = npc;\r\n\t}\r\n\tstd::shared_ptr getNpc() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f09f687787dc908e", + "equalIndicator/v1": "e859e297d96aee967dce70c52de188019669b868dfaf1b77409ced376feacf01" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 199, + "startColumn": 97, + "charOffset": 6101, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 197, + "startColumn": 1, + "charOffset": 6000, + "charLength": 186, + "snippet": { + "text": "}\r\n\r\nReturnValue Combat::canTargetCreature(std::shared_ptr player, std::shared_ptr target) {\r\n\tif (player == target) {\r\n\t\treturn RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "84952e39927f50ec", + "equalIndicator/v1": "e88ba4881271c3cce217f618f2809b70307ddd639b8e7bfaec9dade648d9e271" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6833, + "startColumn": 107, + "charOffset": 236228, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6831, + "startColumn": 1, + "charOffset": 236083, + "charLength": 329, + "snippet": { + "text": "\r\n// Custom PvP System combat helpers\r\nvoid Game::applyPvPDamage(CombatDamage &damage, std::shared_ptr attacker, std::shared_ptr target) {\r\n\tfloat targetDamageReceivedMultiplier = target->vocation->pvpDamageReceivedMultiplier;\r\n\tfloat attackerDamageDealtMultiplier = attacker->vocation->pvpDamageDealtMultiplier;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f761bb1681bebea", + "equalIndicator/v1": "e8a467cf76b6c8e5bd18c419170ee54b33807ed1337a872a99ed8042ddfc4c0f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1312, + "startColumn": 27, + "charOffset": 40395, + "charLength": 7, + "snippet": { + "text": "gainExp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1310, + "startColumn": 1, + "charOffset": 40289, + "charLength": 163, + "snippet": { + "text": "\t\tmessage.position = position;\r\n\t\tmessage.primary.color = TEXTCOLOR_WHITE_EXP;\r\n\t\tmessage.primary.value = gainExp;\r\n\r\n\t\tfor (const auto &spectator : spectators) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "da9467c9f563d3c0", + "equalIndicator/v1": "e8aa13e7fe1ed3651f8d42d1334d2f634a51bcfdb8a3e3ba03fa89cd317d99b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 26, + "startColumn": 7, + "charOffset": 986, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 24, + "startColumn": 1, + "charOffset": 828, + "charLength": 339, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\r\n\tbool canRemove() const final {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8bb3f4d0e156949b", + "equalIndicator/v1": "e8ae86585802f47587535d8b9f2fcb86c337d5b4b8cf4079481abda5760b6fc2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 235, + "startColumn": 7, + "charOffset": 7541, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 233, + "startColumn": 1, + "charOffset": 7374, + "charLength": 388, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\r\n\tvoid internalAddThing(std::shared_ptr thing) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "697eef31aa7df9db", + "equalIndicator/v1": "e8ced94548a8af43e9c679205b7ef4e6d6fca34d14f5dfc7277eebb312b3fb02" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2162, + "startColumn": 58, + "charOffset": 63513, + "charLength": 4, + "snippet": { + "text": "task" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2160, + "startColumn": 1, + "charOffset": 63451, + "charLength": 154, + "snippet": { + "text": "}\r\n\r\nvoid Player::setNextActionPushTask(std::shared_ptr task) {\r\n\tif (actionTaskEventPush != 0) {\r\n\t\tg_dispatcher().stopEvent(actionTaskEventPush);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0c6afde2e1ec2358", + "equalIndicator/v1": "e8d395bcf0fe0747bdabb7ea49537a1a25919a1f85c3f79d049a554cce843f25" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 254, + "startColumn": 7, + "charOffset": 9157, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 252, + "startColumn": 1, + "charOffset": 9145, + "charLength": 166, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventCreatureOnAreaCombat - \"\r\n\t\t \"Creature {} on tile position {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "31370b4af68088f5", + "equalIndicator/v1": "e8f92a0fdfb254834c441d991d68d13f579b393cad0788c2ce66663abf8edbb3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7685, + "startColumn": 39, + "charOffset": 240520, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7683, + "startColumn": 1, + "charOffset": 240363, + "charLength": 327, + "snippet": { + "text": "\tif (!oldProtocol) {\r\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r\n\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\t} else {\r\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8111618cabb0a616", + "equalIndicator/v1": "e9058446e04b0ce3b3cac2e665a54d3a3f47a960d5a90e2f6b1e28fea3f28467" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 540, + "startColumn": 63, + "charOffset": 19144, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 538, + "startColumn": 1, + "charOffset": 19069, + "charLength": 227, + "snippet": { + "text": "\r\n// Player\r\nbool Events::eventPlayerOnBrowseField(std::shared_ptr player, const Position &position) {\r\n\t// Player:onBrowseField(position) or Player.onBrowseField(self, position)\r\n\tif (info.playerOnBrowseField == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0349298568cf7400", + "equalIndicator/v1": "e90ec8c71a32cd8a178e42b8f4a57d9229221d14c6c878515b80e351c378d078" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4406, + "startColumn": 35, + "charOffset": 132398, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4404, + "startColumn": 1, + "charOffset": 132345, + "charLength": 190, + "snippet": { + "text": "\r\n\t\tif (weapon) {\r\n\t\t\tif (!weapon->interruptSwing()) {\r\n\t\t\t\tresult = weapon->useWeapon(static_self_cast(), tool, attackedCreature);\r\n\t\t\t} else if (!classicSpeed && !canDoAction()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cae82827d730b556", + "equalIndicator/v1": "e96d085f35e21f371c0ab579c754d91e56902d649fd137d44e0ce40fdf14dbd1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 241, + "startColumn": 2, + "charOffset": 6310, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 239, + "startColumn": 1, + "charOffset": 6192, + "charLength": 183, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\r\n\tstd::shared_ptr creature = getCreature(L, 2);\r\n\tuint16_t topicId = getNumber(L, 3, 0);\r\n\r\n\tif (!npc) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6a069b0e28cb99d9", + "equalIndicator/v1": "e9d66fb3cdff3ce9ef85167603ab24bff5b1cc1250eefc05906b20529637c76e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float_t' (aka 'float')", + "markdown": "Narrowing conversion from 'unsigned int' to 'float_t' (aka 'float')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 193, + "startColumn": 16, + "charOffset": 4670, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 191, + "startColumn": 1, + "charOffset": 4603, + "charLength": 145, + "snippet": { + "text": "\tuint16_t size = 0;\r\n\tfor (auto item : itemList) {\r\n\t\tsize += ceil(item.second / (float_t)Item::items[item.first].stackSize);\r\n\t}\r\n\treturn size;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4d1fc7159247346c", + "equalIndicator/v1": "e9d9ed784283a7a3dc76d0c1af07478eab6fc5be6f1a5a223ca06a344d22d88b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1251, + "startColumn": 4, + "charOffset": 56499, + "charLength": 8, + "snippet": { + "text": "itemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1249, + "startColumn": 1, + "charOffset": 56388, + "charLength": 217, + "snippet": { + "text": "\t\t\titemType.wieldInfo = weapon->getWieldInfo();\r\n\t\t\titemType.vocationString = weapon->getVocationString();\r\n\t\t\titemType.minReqLevel = weapon->getReqLevel();\r\n\t\t\titemType.minReqMagicLevel = weapon->getReqMagLv();\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d32b67d9f745704", + "equalIndicator/v1": "e9ef52f454c78daefb5cd83c8bcc657058f2a5cbae047643a6b9800b7788f5ae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 86, + "startColumn": 56, + "charOffset": 2521, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 84, + "startColumn": 1, + "charOffset": 2461, + "charLength": 153, + "snippet": { + "text": "}\r\n\r\nbool SaveManager::doSavePlayer(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tlogger.debug(\"Failed to save player because player is null.\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ac060da41f850f21", + "equalIndicator/v1": "ea0e70fca7a775cbb0386445e7e93b4ab298b02013e7b2e13686c47d286c7d97" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 516, + "startColumn": 38, + "charOffset": 19540, + "charLength": 12, + "snippet": { + "text": "fromCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 514, + "startColumn": 1, + "charOffset": 19455, + "charLength": 153, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, toPos);\r\n\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "70b4c043e91f9cd4", + "equalIndicator/v1": "ea526a15149ab987e09f8a5ccf12ee8400228cbd98cb2379a88a77c900ff2636" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'nick' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'nick' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 299, + "startColumn": 15, + "charOffset": 7799, + "charLength": 4, + "snippet": { + "text": "nick" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 297, + "startColumn": 1, + "charOffset": 7741, + "charLength": 70, + "snippet": { + "text": "\t}\r\n\tvoid setGuildNick(std::string nick) {\r\n\t\tguildNick = nick;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "324b26ed7d4636a3", + "equalIndicator/v1": "ea87a466a1e4fa4a3daa9eef6034fe835ff0ba4a7f7a84696cfd2e98c9292f08" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 21, + "charOffset": 692, + "charLength": 10, + "snippet": { + "text": "shopVector" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 562, + "charLength": 172, + "snippet": { + "text": "\r\nvoid NpcTypeFunctions::createNpcTypeShopLuaTable(lua_State* L, const std::vector &shopVector) {\r\n\tlua_createtable(L, shopVector.size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "61d32b6a8fbc4a3c", + "equalIndicator/v1": "eab0867192389838c1bc688e78716405cb2d9cf13d217604de0d258235f87b2b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 540, + "startColumn": 28, + "charOffset": 16398, + "charLength": 9, + "snippet": { + "text": "getParent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 538, + "startColumn": 1, + "charOffset": 16312, + "charLength": 140, + "snippet": { + "text": "\tbool unregisterCreatureEvent(const std::string &name);\r\n\r\n\tstd::shared_ptr getParent() override final {\r\n\t\treturn getTile();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79063744f923f86e", + "equalIndicator/v1": "eab2587d7321ceb0795952b9475f602a2ee9970ba2a5abaa5621e49eb6fe4ff4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3079, + "startColumn": 2, + "charOffset": 94003, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3077, + "startColumn": 1, + "charOffset": 93942, + "charLength": 162, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseQuestLine(NetworkMessage &msg) {\r\n\tuint16_t questId = msg.get();\r\n\tg_game().playerShowQuestLine(player->getID(), questId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "24c02f61526b791c", + "equalIndicator/v1": "eab3fc214b1f22945d7ba1690ac5d83d21ff95d2135c46a5b82e830109f77a3f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'sscanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", + "markdown": "'sscanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 3, + "charOffset": 1530, + "charLength": 6, + "snippet": { + "text": "sscanf" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1488, + "charLength": 318, + "snippet": { + "text": "\t\tint16_t endMonth;\r\n\t\tint16_t endDay;\r\n\t\tsscanf(eventNode.attribute(\"startdate\").as_string(), \"%hd/%hd/%hd\", &startMonth, &startDay, &startYear);\r\n\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);\r\n\t\tint startDays = ((startYear * 365) + (startMonth * 30) + startDay);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b908b7240d797549", + "equalIndicator/v1": "eac7d1e8d91ba20c2c5152a581c2d00c4fbb9807929c319ca7fa06c8fbedbce1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1707, + "startColumn": 2, + "charOffset": 59600, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1705, + "startColumn": 1, + "charOffset": 59593, + "charLength": 47, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ffd9c3db2cf5a4f", + "equalIndicator/v1": "eacb409dccd8db01257c8eb1662cf50e06e972ca0ee9697005329680451eb13e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use emplace_back instead of push_back", + "markdown": "Use emplace_back instead of push_back" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 589, + "startColumn": 13, + "charOffset": 18417, + "charLength": 9, + "snippet": { + "text": "push_back" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 587, + "startColumn": 1, + "charOffset": 18291, + "charLength": 185, + "snippet": { + "text": "\t\t\tLuaData_t type = getNumber(L, -1);\r\n\t\t\tif (type != LuaData_t::Unknown && type <= LuaData_t::Npc) {\r\n\t\t\t\tindexes.push_back({ i, type });\r\n\t\t\t}\r\n\t\t\tlua_pop(globalState, 2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9f7c4b1423c33a25", + "equalIndicator/v1": "ead804fcb54aaaa4e645b49f073c6d3d3918f213782cf5d398613acbf57aeb21" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 301, + "startColumn": 17, + "charOffset": 7757, + "charLength": 14, + "snippet": { + "text": "startCondition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 299, + "startColumn": 1, + "charOffset": 7736, + "charLength": 119, + "snippet": { + "text": "}\r\n\r\nbool Condition::startCondition(std::shared_ptr) {\r\n\tif (ticks > 0) {\r\n\t\tendTime = ticks + OTSYS_TIME();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "56206bce903f040c", + "equalIndicator/v1": "eade5552d4fa9df46b2b4c44f52830abdbf899f9e01c5924696affd922155696" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 193, + "startColumn": 2, + "charOffset": 5372, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 191, + "startColumn": 1, + "charOffset": 5365, + "charLength": 192, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t index = getNumber(L, 3, INDEX_WHEREEVER);\r\n\tuint32_t flags = getNumber(L, 4, 0);\r\n\tReturnValue ret = g_game().internalAddItem(container, item, index, flags);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "27569699b2234573", + "equalIndicator/v1": "eae63c416f0c33ed646e41879fd3ebd58dcf1930da315bd53779e34af80cfdcd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 974, + "startColumn": 31, + "charOffset": 29127, + "charLength": 8, + "snippet": { + "text": "interval" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 972, + "startColumn": 1, + "charOffset": 29057, + "charLength": 122, + "snippet": { + "text": "\r\n\t\t\tif (m_targetChangeCooldown > 0) {\r\n\t\t\t\tm_targetChangeCooldown -= interval;\r\n\r\n\t\t\t\tif (m_targetChangeCooldown <= 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c3b844240615f728", + "equalIndicator/v1": "eb03549e794d30ab612f75f7a5068fddb55ebc50b7d761b75c145bca4280de63" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7560, + "startColumn": 26, + "charOffset": 263531, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7558, + "startColumn": 1, + "charOffset": 263463, + "charLength": 282, + "snippet": { + "text": "// Mana leech\r\nvoid Game::applyManaLeech(\r\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\r\n) const {\r\n\t// Wheel of destiny bonus - mana leech chance and amount\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6b54e1fc1fa8acc2", + "equalIndicator/v1": "eb08632965d769a4344b4f89464db67cdb3ca419ed28c6e7a0226254b0038c19" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 80, + "startColumn": 48, + "charOffset": 2413, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 78, + "startColumn": 1, + "charOffset": 2361, + "charLength": 96, + "snippet": { + "text": "}\r\n\r\nbool Party::leaveParty(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f0d2570db5bb8522", + "equalIndicator/v1": "eb0cf57b4a2ec706820b7d7c426c938039da1f7383a4f749072f917cd7b17d1b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 716, + "startColumn": 15, + "charOffset": 23249, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 714, + "startColumn": 1, + "charOffset": 23209, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 48) * 2.05f) + 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82ecc6eed30070fc", + "equalIndicator/v1": "eb16cca0935b6b21c7e90ce2d2433d5275049c25053e99872dde27d521717071" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 837, + "startColumn": 7, + "charOffset": 30224, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 835, + "startColumn": 1, + "charOffset": 30212, + "charLength": 156, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnMoveCreature - \"\r\n\t\t \"Player {} creature {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9a65781743f725ba", + "equalIndicator/v1": "eb2c33c1d66054b295a9119a71897797de5406392f9489b8437e29248580bb3b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 482, + "startColumn": 57, + "charOffset": 17183, + "charLength": 5, + "snippet": { + "text": "party" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 480, + "startColumn": 1, + "charOffset": 17122, + "charLength": 153, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPartyOnDisband(std::shared_ptr party) {\r\n\t// Party:onDisband() or Party.onDisband(self)\r\n\tif (info.partyOnDisband == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c9cc8a5f285bdd31", + "equalIndicator/v1": "eb5090b1411693450090981cfe1d0436019e5c99f623db1631f540a05aa13663" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1412, + "startColumn": 16, + "charOffset": 41563, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1410, + "startColumn": 1, + "charOffset": 41487, + "charLength": 87, + "snippet": { + "text": "\r\nvoid Player::setImbuingItem(std::shared_ptr item) {\r\n\timbuingItem = item;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c2c0e5f672bc96f4", + "equalIndicator/v1": "eba16c7b04e76d38a35f75acf176bbcfbb8bfa7314ed36938b2e575d2317f90c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'rewardId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'rewardId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 798, + "startColumn": 36, + "charOffset": 21579, + "charLength": 14, + "snippet": { + "text": "const uint64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 796, + "startColumn": 1, + "charOffset": 21504, + "charLength": 224, + "snippet": { + "text": "\tvoid removeConditionSuppressions();\r\n\r\n\tstd::shared_ptr getReward(const uint64_t rewardId, const bool autoCreate);\r\n\tvoid removeReward(uint64_t rewardId);\r\n\tvoid getRewardList(std::vector &rewards) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "49f2e966947566be", + "equalIndicator/v1": "ebafdfea646b9e9a4c4b5739c097b197c4a5a6e1bad0308676ea7d617e203e55" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 461, + "startColumn": 83, + "charOffset": 13749, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 459, + "startColumn": 1, + "charOffset": 13662, + "charLength": 202, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::AddItemField(std::shared_ptr item, std::shared_ptr, const Position &) {\r\n\tif (item == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::AddItemField] - Item is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b3b664717cade792", + "equalIndicator/v1": "ebb50ce8c743d140b11f533c8e53a41a3ee76293c5fd71688b2745de2ce31001" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 119, + "startColumn": 49, + "charOffset": 4052, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 117, + "startColumn": 1, + "charOffset": 3999, + "charLength": 168, + "snippet": { + "text": "}\r\n\r\nbool Mailbox::getReceiver(std::shared_ptr item, std::string &name) const {\r\n\tstd::shared_ptr container = item->getContainer();\r\n\tif (container) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "70e59878ecd936c6", + "equalIndicator/v1": "ebd42f3ee77a4718ab701feb6dac800d0e9fcd0e720abc6b73be678574188a0c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 600, + "startColumn": 52, + "charOffset": 17451, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 598, + "startColumn": 1, + "charOffset": 17394, + "charLength": 172, + "snippet": { + "text": "\t}\r\n\r\n\tstatic uint32_t countByType(std::shared_ptr item, int32_t subType) {\r\n\t\tif (subType == -1 || subType == item->getSubType()) {\r\n\t\t\treturn item->getItemCount();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "74599e21ad898141", + "equalIndicator/v1": "ebe667ab41d77bd45e13f5a00074f98a036631516cbf9d85b9721cc4283943cb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6311, + "startColumn": 49, + "charOffset": 185016, + "charLength": 8, + "snippet": { + "text": "vocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6309, + "startColumn": 1, + "charOffset": 184798, + "charLength": 335, + "snippet": { + "text": "\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, vocation->getHealthGainAmount());\r\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, vocation->getManaGainTicks());\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "395796f78db9caab", + "equalIndicator/v1": "ebf3473cc768d0de31f18a99947eb8c8543c2cedd141e70c3274583572e1fada" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1741, + "startColumn": 7, + "charOffset": 51925, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1739, + "startColumn": 1, + "charOffset": 51873, + "charLength": 356, + "snippet": { + "text": "\tvoid onThink(uint32_t interval) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ebf2f2597e594acd", + "equalIndicator/v1": "ec09ac782114f763c4893e98ee1a890ccf65e5659ae6d05a890b5094c252b0b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 581, + "startColumn": 52, + "charOffset": 17534, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 579, + "startColumn": 1, + "charOffset": 17436, + "charLength": 137, + "snippet": { + "text": "\r\n\t\t\tif (it.abilities->getManaTicks() != 0) {\r\n\t\t\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, it.abilities->getManaTicks());\r\n\t\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "51112c13fd75f8c0", + "equalIndicator/v1": "ec1c10919d1de58f728982d18962e28e064ccafeced3470b960eb56c763c24f5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 448, + "startColumn": 8, + "charOffset": 11142, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 446, + "startColumn": 1, + "charOffset": 11044, + "charLength": 214, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetAmmoType(lua_State* L) {\r\n\t// itemType:getAmmoType()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->ammoType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1cc2d052ca5332db", + "equalIndicator/v1": "ec32e983379b526ecbcfa3d159c07cbdf4e04b0c7e23b187247f2795ce157284" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 710, + "startColumn": 15, + "charOffset": 23035, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 708, + "startColumn": 1, + "charOffset": 22995, + "charLength": 132, + "snippet": { + "text": "\t\t\t\tcase 1:\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 73) * 1.35f) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aaf6264be038a212", + "equalIndicator/v1": "ec6366c0637a57777aba95d3c8be63454ac04d416e5f2feb9a6cd220f413ba54" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 581, + "startColumn": 27, + "charOffset": 27564, + "charLength": 13, + "snippet": { + "text": "absorbPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 579, + "startColumn": 1, + "charOffset": 27409, + "charLength": 435, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentenergy\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentfire\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "01de480c2c4b154f", + "equalIndicator/v1": "ec65b2e13b8eb4c667c7ddaf4e3ad1322de4ee670097ca005d13d7c5df3a0653" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 693, + "startColumn": 15, + "charOffset": 22635, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 691, + "startColumn": 1, + "charOffset": 22595, + "charLength": 101, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tchance = std::min(skill, 45) * 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e78dcccb0189324b", + "equalIndicator/v1": "ec6c3c3e6609b07c78edfbddc93895da563807dd1259df176bc58864e50fba15" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'newGroup' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'newGroup' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 535, + "startColumn": 11, + "charOffset": 14605, + "charLength": 8, + "snippet": { + "text": "newGroup" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 533, + "startColumn": 1, + "charOffset": 14542, + "charLength": 121, + "snippet": { + "text": "\r\n\tvoid setGroup(std::shared_ptr newGroup) {\r\n\t\tgroup = newGroup;\r\n\t}\r\n\tstd::shared_ptr getGroup() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ffd1621a2943d7b5", + "equalIndicator/v1": "ec7c9cba6f6008373ce095f401b580f3de99d9ccee54994c5d0053ff3ab94384" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 359, + "startColumn": 53, + "charOffset": 10361, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 357, + "startColumn": 1, + "charOffset": 10304, + "charLength": 159, + "snippet": { + "text": "}\r\n\r\nbool Container::isHoldingItem(std::shared_ptr item) {\r\n\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\r\n\t\tif (*it == item) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3a53aae330e890e2", + "equalIndicator/v1": "ec883ca982af98156587974bb8d3b665948f0a38c01a61e745e21049b5a269a6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 830, + "startColumn": 57, + "charOffset": 26957, + "charLength": 11, + "snippet": { + "text": "attackSkill" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 828, + "startColumn": 1, + "charOffset": 26854, + "charLength": 182, + "snippet": { + "text": "\r\n\tint32_t minValue = player->getLevel() / 5;\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\r\n\tif (maxDamage) {\r\n\t\treturn -maxValue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "57149693a593a67b", + "equalIndicator/v1": "eca9dc8bbf21abbf2d899cb9013f2bc62722d28d350b4d67f30e44fd3f0a5b82" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6461, + "startColumn": 63, + "charOffset": 203711, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6459, + "startColumn": 1, + "charOffset": 203644, + "charLength": 131, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPlayerVocation(std::shared_ptr target) {\r\n\tif (!player || !target || oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29291ba7c4978e80", + "equalIndicator/v1": "ecc808091c90c787b894d4130c4925e15c41f2689051078c8d624a973b4928f3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 212, + "startColumn": 20, + "charOffset": 6697, + "charLength": 21, + "snippet": { + "text": "luaGameGetPlayerCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 210, + "startColumn": 1, + "charOffset": 6673, + "charLength": 139, + "snippet": { + "text": "}\r\n\r\nint GameFunctions::luaGameGetPlayerCount(lua_State* L) {\r\n\t// Game.getPlayerCount()\r\n\tlua_pushnumber(L, g_game().getPlayersOnline());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "88339eeea3b8cfd2", + "equalIndicator/v1": "eccb77372d1415a68422fe4a2b9ef49c9b956942d88ed6047cc371c7d9575480" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 320, + "startColumn": 54, + "charOffset": 9394, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 318, + "startColumn": 1, + "charOffset": 9336, + "charLength": 124, + "snippet": { + "text": "}\r\n\r\nint32_t Player::getWeaponSkill(std::shared_ptr item) const {\r\n\tif (!item) {\r\n\t\treturn getSkillLevel(SKILL_FIST);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "650a174783e0e6e8", + "equalIndicator/v1": "ecf6d3f5232963177e932db81a47363dab56377102e29c5b39ad7b1cf11cad83" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 122, + "startColumn": 21, + "charOffset": 3860, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 120, + "startColumn": 1, + "charOffset": 3707, + "charLength": 377, + "snippet": { + "text": "\r\n\tbool registerEvent(const std::shared_ptr moveEvent, int32_t id, std::map &moveListMap) const;\r\n\tbool registerEvent(const std::shared_ptr moveEvent, const Position &position, std::map &moveListMap) const;\r\n\tstd::shared_ptr getEvent(const std::shared_ptr &tile, MoveEvent_t eventType);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6a6587e657833927", + "equalIndicator/v1": "ed0761012445034b4ab7b4e8b6cc864699a435c5104506a7361e766adbfe3b55" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4449, + "startColumn": 124, + "charOffset": 160219, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4447, + "startColumn": 1, + "charOffset": 160091, + "charLength": 248, + "snippet": { + "text": "}\r\n\r\nvoid Game::unwrapItem(std::shared_ptr item, uint16_t unWrapId, std::shared_ptr house, std::shared_ptr player) {\r\n\tif (item->hasOwner() && !item->isOwner(player)) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_ITEMISNOTYOURS);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2f93a8439a4aca5e", + "equalIndicator/v1": "ed0a60e3bea0fe0b4c33633a4105748a7e42765a6d5f4b38ef195c8bdbecb4f3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 349, + "startColumn": 7, + "charOffset": 13037, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 347, + "startColumn": 1, + "charOffset": 12859, + "charLength": 310, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLook - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f4db5e5883498e6b", + "equalIndicator/v1": "ed1a53159f9ea05b64afdef7c44383eff7a5f0210b1b5df1c96c8501e61bd942" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Iter', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Iter', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorset.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 77, + "startColumn": 35, + "charOffset": 2039, + "charLength": 5, + "snippet": { + "text": "_Iter" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 75, + "startColumn": 1, + "charOffset": 1998, + "charLength": 164, + "snippet": { + "text": "\t\t}\r\n\r\n\t\ttemplate \r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, _Iter _First, _Iter _Last) {\r\n\t\t\tneedUpdate = true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5e9a76d70d9d50ec", + "equalIndicator/v1": "ed25b49314ca36d4a4308bedd58aaf401aa8dbc70db821af811e68ac8019fed3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8119, + "startColumn": 82, + "charOffset": 255741, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8117, + "startColumn": 1, + "charOffset": 255655, + "charLength": 185, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::MoveUpCreature(NetworkMessage &msg, std::shared_ptr creature, const Position &newPos, const Position &oldPos) {\r\n\tif (creature != player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "47df83ef147ad791", + "equalIndicator/v1": "ed3058b7df75663459e49587e7e2519ab60d3be3ee800c548eb96a17ea0ccb08" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'message' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'message' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1586, + "startColumn": 45, + "charOffset": 47252, + "charLength": 7, + "snippet": { + "text": "message" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1584, + "startColumn": 1, + "charOffset": 47085, + "charLength": 237, + "snippet": { + "text": "\tvoid onClearImbuement(std::shared_ptr item, uint8_t slot);\r\n\tvoid openImbuementWindow(std::shared_ptr item);\r\n\tvoid sendImbuementResult(const std::string message) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendImbuementResult(message);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "99083de4f492d607", + "equalIndicator/v1": "ed53aa3140a065d63c1f95426d3cd51f79f2b69d37e4f8ba162afdf42b3baba9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 755, + "startColumn": 19, + "charOffset": 22984, + "charLength": 48, + "snippet": { + "text": "-static_cast(replacedItem->getWeight())" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 753, + "startColumn": 1, + "charOffset": 22905, + "charLength": 179, + "snippet": { + "text": "\titemlist[index] = item;\r\n\titem->setParent(getContainer());\r\n\tupdateItemWeight(-static_cast(replacedItem->getWeight()) + item->getWeight());\r\n\r\n\t// send change to client\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b74d1642e688b356", + "equalIndicator/v1": "ed83a4a018e06f89fa74f4efa9eaf2d1bf29e845452c164fe6caf6aa71779043" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3064, + "startColumn": 2, + "charOffset": 93443, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3062, + "startColumn": 1, + "charOffset": 93374, + "charLength": 180, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseRevokePartyInvite(NetworkMessage &msg) {\r\n\tuint32_t targetId = msg.get();\r\n\tg_game().playerRevokePartyInvitation(player->getID(), targetId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "785849dc6622cbdb", + "equalIndicator/v1": "ed8506c863afd8a3f5d2acb832485046a3d5a922667ea11ad21cd15d013c28d1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 11, + "charOffset": 1336, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1259, + "charLength": 272, + "snippet": { + "text": "\tcurrentOutfit = mType->info.outfit;\r\n\tskull = mType->info.skull;\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c80fa09f90f8ae34", + "equalIndicator/v1": "edfd23abf47f8e76aa7ba7fc3aa8d79617af7f6606d295bf5260643fa83ac4f7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 326, + "startColumn": 7, + "charOffset": 12099, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 324, + "startColumn": 1, + "charOffset": 11975, + "charLength": 263, + "snippet": { + "text": "// Player\r\nbool EventCallback::playerOnBrowseField(std::shared_ptr player, const Position &position) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnBrowseField - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a323ec5ee9f279e8", + "equalIndicator/v1": "edfed2ab7f78587543029da491c974652f9cc2f2da30e1e287ee6c8c0e75a255" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7542, + "startColumn": 66, + "charOffset": 262634, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7540, + "startColumn": 1, + "charOffset": 262539, + "charLength": 225, + "snippet": { + "text": "\r\nvoid Game::applyCharmRune(\r\n\tstd::shared_ptr targetMonster, std::shared_ptr attackerPlayer, std::shared_ptr target, const int32_t &realDamage\r\n) const {\r\n\tif (!targetMonster || !attackerPlayer) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6493cf596980ff30", + "equalIndicator/v1": "ee08b67dd0490aecbf97b87ccd4db42c5d080bec786706f242d3fa5a1eb42e02" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2242, + "startColumn": 39, + "charOffset": 64358, + "charLength": 34, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2240, + "startColumn": 1, + "charOffset": 64263, + "charLength": 219, + "snippet": { + "text": "\t// Task hunting system\r\n\tvoid initializeTaskHunting();\r\n\tbool isCreatureUnlockedOnTaskHunting(const std::shared_ptr mtype) const;\r\n\r\n\tbool setTaskHuntingSlotClass(std::unique_ptr &slot) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5b796ad0453aa1b", + "equalIndicator/v1": "ee1c7be6c281f4984074602bcf700db74837a7c3a012de554d82af299aba9fd6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", + "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 703, + "startColumn": 15, + "charOffset": 22900, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 701, + "startColumn": 1, + "charOffset": 22859, + "charLength": 74, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tchance = it.hitChance;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6828352bf2e97cf0", + "equalIndicator/v1": "ee29fcc6106e3c396e8eef04b6fc447c4fe01f1c865a098df7a5ae02f00cc88f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 34, + "startColumn": 21, + "charOffset": 1034, + "charLength": 11, + "snippet": { + "text": "currentTime" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 1008, + "charLength": 134, + "snippet": { + "text": "\t}\r\n\r\n\tint64_t timeDiff = currentTime - connectBlock.lastAttempt;\r\n\tconnectBlock.lastAttempt = currentTime;\r\n\tif (timeDiff <= 5000) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "20ab6e96065def51", + "equalIndicator/v1": "ee2c00dcff5feae2af27ea5db91a8a7d894c079d863badbf94f28e341f003ee2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6618, + "startColumn": 30, + "charOffset": 229430, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6616, + "startColumn": 1, + "charOffset": 229360, + "charLength": 193, + "snippet": { + "text": "\t\t\t\tdamageIncreaseMessage = true;\r\n\t\t\t}\r\n\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t}\r\n\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59d4dd1abb589d99", + "equalIndicator/v1": "ee4a7710e5f92816b671b9415eb5cb567dcb3a9929bc2c46d389498ac3e7cc93" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 613, + "startColumn": 7, + "charOffset": 21817, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 611, + "startColumn": 1, + "charOffset": 21805, + "charLength": 148, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnLookInBattleList - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f58d0c4bcaaa43e", + "equalIndicator/v1": "ee4ef6f4d087f10efc6b04c11ad11e68ec6d8130e18164f4b5265f7ab858e09c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?", + "markdown": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2233, + "startColumn": 7, + "charOffset": 61445, + "charLength": 25, + "snippet": { + "text": "Condition::startCondition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2231, + "startColumn": 1, + "charOffset": 61358, + "charLength": 147, + "snippet": { + "text": "\r\nbool ConditionInvisible::startCondition(std::shared_ptr creature) {\r\n\tif (!Condition::startCondition(creature)) {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9f202d907bab44dd", + "equalIndicator/v1": "ee68b41a252821e18820e5f2704a23fdc5a1107889fb11d74282a12df979e41c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 138, + "startColumn": 6, + "charOffset": 4784, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 136, + "startColumn": 1, + "charOffset": 4750, + "charLength": 208, + "snippet": { + "text": "\r\n\tReturnValue returnValue;\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dd25bce6fb2d8121", + "equalIndicator/v1": "ee86c94051fe3b4223f3588e56e4bd51c92637e983d15ab1a56b0e82edf73984" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 700, + "startColumn": 121, + "charOffset": 23006, + "charLength": 18, + "snippet": { + "text": "spellGroupCooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 698, + "startColumn": 1, + "charOffset": 22848, + "charLength": 253, + "snippet": { + "text": "\t\t}\r\n\t\tif (spellGroupCooldown > 0) {\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellGroupCooldown / rateCooldown, 0, false, group);\r\n\t\t\tplayer->addCondition(condition);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db98d9708b78c328", + "equalIndicator/v1": "ee88a6628a17b37f802bc68bd9274b1d2a0084014d4e255afda4c49cbe390d07" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use emplace_back instead of push_back", + "markdown": "Use emplace_back instead of push_back" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 138, + "startColumn": 18, + "charOffset": 4288, + "charLength": 9, + "snippet": { + "text": "push_back" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 136, + "startColumn": 1, + "charOffset": 4165, + "charLength": 293, + "snippet": { + "text": "\t\t\tfor (auto subContItem : subContainer) {\r\n\t\t\t\tstd::shared_ptr containerItem = subContItem.first;\r\n\t\t\t\ttoReturnList.push_back(std::pair, uint32_t>(containerItem, static_cast(containerItem->getItemCount())));\r\n\t\t\t}\r\n\t\t} else if (item->isItemStorable()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f7540cd2f07e198c", + "equalIndicator/v1": "ee94b484986d4d9e7403b7f5ef62254beb531187364aa58cf6937302573bf4b6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 363, + "startColumn": 14, + "charOffset": 8969, + "charLength": 12, + "snippet": { + "text": "std::toupper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 361, + "startColumn": 1, + "charOffset": 8930, + "charLength": 101, + "snippet": { + "text": "\t\t\t\tresult += ' ';\r\n\t\t\t}\r\n\t\t\tresult += std::toupper(ch);\r\n\t\t} else {\r\n\t\t\tresult += std::tolower(ch);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c7c4bee5bb823759", + "equalIndicator/v1": "eed27725f30837d856ceb1dde81d5155ccc4a7c2c5bd1d6d93e4dfd29fb9dd74" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 333, + "startColumn": 10, + "charOffset": 10959, + "charLength": 16, + "snippet": { + "text": "(fee * 75) / 100" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 331, + "startColumn": 1, + "charOffset": 10869, + "charLength": 115, + "snippet": { + "text": "\t\tint32_t fee = player->getLevel() * 100;\r\n\t\tif (player->hasCharmExpansion()) {\r\n\t\t\tfee = (fee * 75) / 100;\r\n\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8cc8b244afd1aeac", + "equalIndicator/v1": "eed55b8322f7a4796d5a9e03f21605740f83f40b3a365ad8b41d00eca4b643fa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 275, + "startColumn": 30, + "charOffset": 7816, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 273, + "startColumn": 1, + "charOffset": 7719, + "charLength": 213, + "snippet": { + "text": "\tItemDeque storeInboxFilteredList;\r\n\tif (isStoreInboxFiltered()) {\r\n\t\tfor (std::shared_ptr item : getItemList()) {\r\n\t\t\tauto itemId = item->getID();\r\n\t\t\tauto attribute = item->getCustomAttribute(\"unWrapId\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8de587fe8961a0bd", + "equalIndicator/v1": "eef49e896e43114f9016dd32d21f27523fe7792d3873e6e41c2b7b5f4a505ed1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 160, + "startColumn": 33, + "charOffset": 4686, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 158, + "startColumn": 1, + "charOffset": 4516, + "charLength": 227, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1)->dynamic_self_cast();\r\n\tif (condition) {\r\n\t\tcondition->setFormulaVars(mina, minb, maxa, maxb);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f996c0d2ae93ab81", + "equalIndicator/v1": "ef2e45a6c80e817e53677e904cc8e7afc31329e0fd0090ec470f1bdb76d21363" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2196, + "startColumn": 14, + "charOffset": 65818, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2194, + "startColumn": 1, + "charOffset": 65741, + "charLength": 156, + "snippet": { + "text": "\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\r\n\tremoveIcon(\"forge\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67ade26b2aa4b6a4", + "equalIndicator/v1": "ef408170792058d481482ab8352d36c4c765c7b3c0725ad90ff0b7469b49ef95" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'instant' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'instant' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 61, + "startColumn": 84, + "charOffset": 1975, + "charLength": 7, + "snippet": { + "text": "instant" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 59, + "startColumn": 1, + "charOffset": 1821, + "charLength": 209, + "snippet": { + "text": "\t[[nodiscard]] bool hasInstantSpell(const std::string &word) const;\r\n\r\n\tvoid setInstantSpell(const std::string &word, const std::shared_ptr instant) {\r\n\t\tinstants.try_emplace(word, instant);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5289e10489c7d7f4", + "equalIndicator/v1": "ef50b36e95a73dee987f3afda0acb86894369f67bbaf1d133762200b0aa76573" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 426, + "startColumn": 36, + "charOffset": 12509, + "charLength": 4, + "snippet": { + "text": "info" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 424, + "startColumn": 1, + "charOffset": 12424, + "charLength": 137, + "snippet": { + "text": "\tif (monsterType) {\r\n\t\tif (lua_gettop(L) == 1) {\r\n\t\t\tlua_createtable(L, monsterType->info.enemyFactions.size(), 0);\r\n\t\t\tint index = 0;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7624c119a5710d7a", + "equalIndicator/v1": "ef52564861f6d1905da70c665227c9364103574525ef0e2cd5880c0f34ffd013" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 786, + "startColumn": 84, + "charOffset": 25572, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 784, + "startColumn": 1, + "charOffset": 25484, + "charLength": 210, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatDispelFunc(std::shared_ptr, std::shared_ptr target, const CombatParams ¶ms, CombatDamage*) {\r\n\tif (target) {\r\n\t\ttarget->removeCombatCondition(params.dispelType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9bf9f21492a54484", + "equalIndicator/v1": "ef8a9f6aab28f9434b61bf25abb22bf63c9255b53271481a9e22413cd641079d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 664, + "startColumn": 15, + "charOffset": 21716, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 662, + "startColumn": 1, + "charOffset": 21676, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 2.40f) + 8;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "acd68f015a76a060", + "equalIndicator/v1": "efc57ee074aa4a8e5b7d32ed69f82b28dc073267786a9e5a148e308bb35d95a8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 158, + "startColumn": 11, + "charOffset": 5124, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 156, + "startColumn": 1, + "charOffset": 5021, + "charLength": 365, + "snippet": { + "text": "\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::map &getAllItemTypeCount(std::map &countMap) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "24cc1db14c66aae3", + "equalIndicator/v1": "efd1f012d1dd57e4fba285ed93373c31f1bb94555e43f368c7048fe7dc4073bd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 225, + "startColumn": 28, + "charOffset": 7252, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 223, + "startColumn": 1, + "charOffset": 7218, + "charLength": 138, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\t\tenv->setScriptId(mType->info.creatureMoveEvent, scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "42e91edc9cbede7c", + "equalIndicator/v1": "f00887c58037fb71b2099a195ab46521e6ba6e9d80af7a892b32af9307feb364" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 140, + "startColumn": 3, + "charOffset": 3775, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 138, + "startColumn": 1, + "charOffset": 3766, + "charLength": 120, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tuint32_t guid = getNumber(L, 2, 0);\r\n\t\thouse->setNewOwnerGuid(guid, false);\r\n\t\tpushBoolean(L, true);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a8a06fd74583b0ef", + "equalIndicator/v1": "f02834b5acdb5648b922beca1df71f62d55c00b8dd62cbba6bb39a02c8c024f2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6844, + "startColumn": 72, + "charOffset": 236889, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6842, + "startColumn": 1, + "charOffset": 236813, + "charLength": 238, + "snippet": { + "text": "}\r\n\r\nfloat Game::pvpLevelDifferenceDamageMultiplier(std::shared_ptr attacker, std::shared_ptr target) {\r\n\tint32_t levelDifference = target->getLevel() - attacker->getLevel();\r\n\tlevelDifference = std::abs(levelDifference);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1a06c90490aa67f4", + "equalIndicator/v1": "f02acac470f5463d0994a3e866b5d9b5362c14ac3053100ec760b3e488891a2f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1633, + "startColumn": 59, + "charOffset": 57186, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1631, + "startColumn": 1, + "charOffset": 57062, + "charLength": 249, + "snippet": { + "text": "//**********************************************************//\r\n\r\nvoid TileCallback::onTileCombat(std::shared_ptr creature, std::shared_ptr tile) const {\r\n\t// onTileCombat(creature, pos)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6011d80201b150ec", + "equalIndicator/v1": "f0405ef2ac7e2906b2d699b56ea4777840fb87a4e1ffbf38e3279641e751b8d8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 818, + "startColumn": 15, + "charOffset": 24834, + "charLength": 8, + "snippet": { + "text": "dropLoot" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 816, + "startColumn": 1, + "charOffset": 24803, + "charLength": 155, + "snippet": { + "text": "\t\treturn 0;\r\n\t}\r\n\tvirtual void dropLoot(std::shared_ptr, std::shared_ptr) { }\r\n\tvirtual uint16_t getLookCorpse() const {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "420d0b755a3a9a82", + "equalIndicator/v1": "f0469f6b50eb05d1149e1c57d3efbf8b5531d31a4f56094d4deb8a8bbb750cc1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 127, + "startColumn": 32, + "charOffset": 4085, + "charLength": 16, + "snippet": { + "text": "m_appearancesPtr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 125, + "startColumn": 1, + "charOffset": 3891, + "charLength": 314, + "snippet": { + "text": "\tbool supportAnimation = g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__);\r\n\tfor (uint32_t it = 0; it < g_game().m_appearancesPtr->object_size(); ++it) {\r\n\t\tAppearance object = g_game().m_appearancesPtr->object(it);\r\n\r\n\t\t// This scenario should never happen but on custom assets this can break the loader.\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5fcf700ea14b8938", + "equalIndicator/v1": "f04b1961a588a4267a3ea17294fbe99d91cec274bc65c0632d514dc0819f8bd8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1809, + "startColumn": 3, + "charOffset": 54519, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1807, + "startColumn": 1, + "charOffset": 54416, + "charLength": 274, + "snippet": { + "text": "\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tPosition pos = msg.getPosition();\r\n\t\tuint16_t itemId = msg.get();\r\n\t\tuint8_t stackpos = msg.getByte();\r\n\t\tg_game().playerSetManagedContainer(player->getID(), category, pos, itemId, stackpos, true);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f217a8c72447b590", + "equalIndicator/v1": "f06b73f82ef9c31663ec98d69dc2016cdef5e0b73b2cf29375b5604adbcaebf4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 563, + "startColumn": 63, + "charOffset": 15144, + "charLength": 23, + "snippet": { + "text": "(statsPercent[i] - 100)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 561, + "startColumn": 1, + "charOffset": 15038, + "charLength": 155, + "snippet": { + "text": "\t\tswitch (i) {\r\n\t\t\tcase STAT_MAXHITPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));\r\n\t\t\t\tbreak;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6bf92b9fab714b5f", + "equalIndicator/v1": "f07a28f4f3b8a70b9af89ae8d621106aca58f0fdac4ccb7b00d3a6b53404c192" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 811, + "startColumn": 53, + "charOffset": 24731, + "charLength": 4, + "snippet": { + "text": "size" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 809, + "startColumn": 1, + "charOffset": 24673, + "charLength": 89, + "snippet": { + "text": "\t}\r\n\r\n\tlua_createtable(L, monsterType->info.defenseSpells.size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ae7f85d631d0cb9", + "equalIndicator/v1": "f0820593b4cdfac8c2af90232722e836c1ac6478a97a04ba92bce83c4c2078f3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 548, + "startColumn": 38, + "charOffset": 20932, + "charLength": 10, + "snippet": { + "text": "toCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 546, + "startColumn": 1, + "charOffset": 20840, + "charLength": 152, + "snippet": { + "text": "\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r\n\tgetScriptInterface()->callVoidFunction(7);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75e7750937f18639", + "equalIndicator/v1": "f088164b8c00a017d336df424201a8d4a4d4eadec0afb0b33a0eb8c8531c08c4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 20, + "charOffset": 624, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 600, + "charLength": 160, + "snippet": { + "text": "}\r\n\r\nReturnValue Inbox::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t flags, std::shared_ptr) {\r\n\tint32_t addCount = 0;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4cf1808c3c9c713e", + "equalIndicator/v1": "f09b7575dfdff18fad7588c23a6884960ad8948dec9dce798bf86971ef50680a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 380, + "startColumn": 75, + "charOffset": 11229, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 378, + "startColumn": 1, + "charOffset": 11150, + "charLength": 227, + "snippet": { + "text": "}\r\n\r\nvoid House::handleContainer(ItemList &moveItemList, std::shared_ptr item) const {\r\n\tif (const auto container = item->getContainer()) {\r\n\t\tfor (const std::shared_ptr &containerItem : container->getItemList()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "65f9bf505589631a", + "equalIndicator/v1": "f0abf57a25d35daef24e8408494bc628cfd5448c0c9825f6f0dea281f12ad6db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 254, + "startColumn": 7, + "charOffset": 9349, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 252, + "startColumn": 1, + "charOffset": 9237, + "charLength": 244, + "snippet": { + "text": "\r\nbool EventCallback::partyOnLeave(std::shared_ptr party, std::shared_ptr player) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::partyOnLeave - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d31039a2cf7285bc", + "equalIndicator/v1": "f0b09c35af1c3bfbbaa430eaae9a08259b68b15e6575a44e7b0eb91e1223247d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'remParty' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'remParty' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5707, + "startColumn": 59, + "charOffset": 168637, + "charLength": 8, + "snippet": { + "text": "remParty" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5705, + "startColumn": 1, + "charOffset": 168574, + "charLength": 119, + "snippet": { + "text": "}\r\n\r\nvoid Player::removePartyInvitation(std::shared_ptr remParty) {\r\n\tstd::erase(invitePartyList, remParty);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "244ce201da13adcd", + "equalIndicator/v1": "f0be8d29d7b3fe65a20f0fa79d789d37b620f39554167a372641660e218a7d90" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2289, + "startColumn": 60, + "charOffset": 87212, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2287, + "startColumn": 1, + "charOffset": 87148, + "charLength": 244, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalRemoveItem(std::shared_ptr item, int32_t count /*= -1*/, bool test /*= false*/, uint32_t flags /*= 0*/, bool force /*= false*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (item == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "979e01d1b771cdd7", + "equalIndicator/v1": "f0c6e31457bd45c8bb34a85a8697914caa6031a28bd202deaccf663f36753071" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1253, + "startColumn": 55, + "charOffset": 41193, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1251, + "startColumn": 1, + "charOffset": 41134, + "charLength": 262, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatHealth(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tdoCombatHealth(caster, std::move(target), caster ? caster->getPosition() : Position(), damage, params);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8390b9c73a57d475", + "equalIndicator/v1": "f0d03bce090d48fe3a536034bdde0fb9d09641b321e13b4106904cd8fa5976b2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_USE_MATH_DEFINES', which is a reserved identifier", + "markdown": "Declaration uses identifier '_USE_MATH_DEFINES', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 1, + "charOffset": 536, + "charLength": 7, + "snippet": { + "text": "#ifndef" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 526, + "charLength": 72, + "snippet": { + "text": "#endif\r\n\r\n#ifndef _USE_MATH_DEFINES\r\n\t#define _USE_MATH_DEFINES\r\n#endif\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ddd5394a7e2768d1", + "equalIndicator/v1": "f0fd42892d702d66cde8fb1eff5fa57b3ae40899c45d30cf79c1be8f78e7e892" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 155, + "startColumn": 53, + "charOffset": 4756, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 153, + "startColumn": 1, + "charOffset": 4699, + "charLength": 195, + "snippet": { + "text": "}\r\n\r\nvoid Npc::onPlayerDisappear(std::shared_ptr player) {\r\n\tremovePlayerInteraction(player);\r\n\tif (!player->hasFlag(PlayerFlags_t::IgnoredByNpcs) && playerSpectators.contains(player)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "930816ad954da373", + "equalIndicator/v1": "f12ac0fe7598a44716f9660998cdb151a53363ad9d820090707a66c35f1b76ee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned char' to signed type 'int8_t' (aka 'signed char') is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned char' to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 856, + "startColumn": 11, + "charOffset": 24727, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 854, + "startColumn": 1, + "charOffset": 24632, + "charLength": 114, + "snippet": { + "text": "\tfor (const auto &it : openContainers) {\r\n\t\tif (it.second.container == container) {\r\n\t\t\treturn it.first;\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b164a4771e8add04", + "equalIndicator/v1": "f12faea87150d1d181d975683d3485578cd6e96b7fd430b2670865f6614bf79a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'lastHitCreature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'lastHitCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 758, + "startColumn": 53, + "charOffset": 24141, + "charLength": 15, + "snippet": { + "text": "lastHitCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 756, + "startColumn": 1, + "charOffset": 24084, + "charLength": 262, + "snippet": { + "text": "}\r\n\r\nbool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared_ptr mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!lootDrop && getMonster()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8a1fce36f7ac620a", + "equalIndicator/v1": "f13bcac6b3ea8f177b269bbd96260471075be7bf3526da416f6bba618605038d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'init' is within a recursive call chain", + "markdown": "Function 'init' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 25, + "startColumn": 18, + "charOffset": 819, + "charLength": 4, + "snippet": { + "text": "init" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 23, + "startColumn": 1, + "charOffset": 762, + "charLength": 146, + "snippet": { + "text": "GameReload::~GameReload() = default;\r\n\r\nbool GameReload::init(Reload_t reloadTypes) {\r\n\tswitch (reloadTypes) {\r\n\t\tcase Reload_t::RELOAD_TYPE_ALL:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "43e31015226c323c", + "equalIndicator/v1": "f1459ce47df02ce79a96980a4a4f60ebe2455c4b219b785dcbd99fd5e2600f1e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8917, + "startColumn": 46, + "charOffset": 311367, + "charLength": 10, + "snippet": { + "text": "totalPrice" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8915, + "startColumn": 1, + "charOffset": 311266, + "charLength": 188, + "snippet": { + "text": "\r\n\t\tg_game().removeMoney(player, totalPrice, 0, true);\r\n\t\tg_metrics().addCounter(\"balance_decrease\", totalPrice, { { \"player\", player->getName() }, { \"context\", \"market_offer\" } });\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "923d6cf84a0abba8", + "equalIndicator/v1": "f14e51754bb1cb087aa08aa51a071c56db6242ee97694dbe9fb3ffc00d0901dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1254, + "startColumn": 54, + "charOffset": 50270, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1252, + "startColumn": 1, + "charOffset": 50212, + "charLength": 243, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerInspectItem(std::shared_ptr player, uint16_t itemId, uint8_t itemCount, bool cyclopedia) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tplayer->sendItemInspection(itemId, itemCount, nullptr, cyclopedia);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cdd5795d29992405", + "equalIndicator/v1": "f15de941dc7e62e50519aa171b0d7db5e4ccc2d4b262d21f4c14a9e890a5b045" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1840, + "startColumn": 42, + "charOffset": 51629, + "charLength": 4, + "snippet": { + "text": "zone" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1838, + "startColumn": 1, + "charOffset": 51583, + "charLength": 114, + "snippet": { + "text": "}\r\n\r\nvoid Tile::addZone(std::shared_ptr zone) {\r\n\tzones.emplace(zone);\r\n\tconst auto &items = getItemList();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b83fc4e009d9ddf3", + "equalIndicator/v1": "f171b5b4aa8b65f20bcb93a69cb914f1e3a39ca9ec0cf1980380ba3561654ad9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 224, + "startColumn": 7, + "charOffset": 6899, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 222, + "startColumn": 1, + "charOffset": 6864, + "charLength": 164, + "snippet": { + "text": "\r\n\t// Constructor for items\r\n\tItem(const uint16_t type, uint16_t count = 0);\r\n\tItem(const std::shared_ptr &i);\r\n\tvirtual std::shared_ptr clone() const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "08e51e6fb4e3d701", + "equalIndicator/v1": "f17b02139346f92b899cb1d52c0875868c1525e4809a812e7db19ac7cc4af527" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Pass by value and use std::move", + "markdown": "Pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 283, + "startColumn": 29, + "charOffset": 8260, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 281, + "startColumn": 1, + "charOffset": 8172, + "charLength": 144, + "snippet": { + "text": "class DatabaseException : public std::exception {\r\npublic:\r\n\texplicit DatabaseException(const std::string &message) :\r\n\t\tmessage(message) { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "724b60ed3f78ba40", + "equalIndicator/v1": "f17d0780c578fc091da190939026a88104e3ede6d03815d3597bf8b7dae49fb5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 127, + "startColumn": 6, + "charOffset": 3928, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 125, + "startColumn": 1, + "charOffset": 3823, + "charLength": 312, + "snippet": { + "text": "\t\t\t\tpugi::xml_attribute skillIdAttribute = childNode.attribute(\"id\");\r\n\t\t\t\tif (skillIdAttribute) {\r\n\t\t\t\t\tuint16_t skill_id = pugi::cast(skillIdAttribute.value());\r\n\t\t\t\t\tif (skill_id <= SKILL_LAST) {\r\n\t\t\t\t\t\tvoc->skillMultipliers[skill_id] = pugi::cast(childNode.attribute(\"multiplier\").value());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "45c9e7d74b79dff3", + "equalIndicator/v1": "f1976c7fa4c3ff06f927180030dea5974ba009ae31688b05d2dcfc25855bf66b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 198, + "startColumn": 68, + "charOffset": 5460, + "charLength": 6, + "snippet": { + "text": "action" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 196, + "startColumn": 1, + "charOffset": 5387, + "charLength": 135, + "snippet": { + "text": "\t}\r\n\r\n\tvoid setUniqueId(uint16_t uniqueId, const std::shared_ptr action) {\r\n\t\tuniqueItemMap.try_emplace(uniqueId, action);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1dff7dca5b213b41", + "equalIndicator/v1": "f1c890f049b8c97cc9008a7eba4419f60308eadcd6e34c48bd1b83c77048068d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 745, + "startColumn": 41, + "charOffset": 28830, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 743, + "startColumn": 1, + "charOffset": 28784, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "201384ab0031809a", + "equalIndicator/v1": "f1cdf2b5cc73762ec3b54145b32ecee03c80588b2dcdd17a449bdc7948d89eff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6888, + "startColumn": 135, + "charOffset": 238858, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6886, + "startColumn": 1, + "charOffset": 238719, + "charLength": 311, + "snippet": { + "text": "}\r\n\r\nvoid Game::applyWheelOfDestinyEffectsToDamage(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) const {\r\n\t// If damage is 0, it means the target is immune to the damage type, or that we missed.\r\n\tif (damage.primary.value == 0 && damage.secondary.value == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0df9487155fa4a42", + "equalIndicator/v1": "f1f006c1b8ae37f0634f337ddff32dd4249983c298ef682b3c843d4634d312e4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1402, + "startColumn": 36, + "charOffset": 42206, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1400, + "startColumn": 1, + "charOffset": 42083, + "charLength": 141, + "snippet": { + "text": "\tvoid sendPartyPlayerVocation(std::shared_ptr player) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyPlayerVocation(player);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3129d5be1a660bcd", + "equalIndicator/v1": "f1fb1e93ee91f5e354f214861007465d1e77bade4c1ed7ff35f3f57519396789" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2202, + "startColumn": 95, + "charOffset": 84256, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2200, + "startColumn": 1, + "charOffset": 84157, + "charLength": 258, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalAddItem(std::shared_ptr toCylinder, std::shared_ptr item, int32_t index, uint32_t flags, bool test, uint32_t &remainderCount) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (toCylinder == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "946bf3c9c7da257e", + "equalIndicator/v1": "f1fd7c630528a4fe712bdd90c4bd697e05113eeb8994dd0763ccf9e73c74f7db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1442, + "startColumn": 16, + "charOffset": 41382, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1440, + "startColumn": 1, + "charOffset": 41362, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nuint32_t Tile::getItemTypeCount(uint16_t itemId, int32_t subType /*= -1*/) const {\r\n\tuint32_t count = 0;\r\n\tif (ground && ground->getID() == itemId) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b19379d699107a41", + "equalIndicator/v1": "f200f381aa91a2a936ff8f43c27889496c819d0283d5d560157cb7bfbb6ca84f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9153, + "startColumn": 15, + "charOffset": 320016, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9151, + "startColumn": 1, + "charOffset": 319954, + "charLength": 106, + "snippet": { + "text": "\t\t\tint32_t subType;\r\n\t\t\tif (it.charges != 0) {\r\n\t\t\t\tsubType = it.charges;\r\n\t\t\t} else {\r\n\t\t\t\tsubType = -1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "777bd726d8699cdf", + "equalIndicator/v1": "f26dbc3089ae0aed8aedd0016c41139b61afd0229ef11bcc3f373be54bd259bd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 346, + "startColumn": 55, + "charOffset": 11426, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 344, + "startColumn": 1, + "charOffset": 11367, + "charLength": 114, + "snippet": { + "text": "}\r\n\r\nint32_t Weapon::getHealthCost(std::shared_ptr player) const {\r\n\tif (health != 0) {\r\n\t\treturn health;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f2c931c77aaa675", + "equalIndicator/v1": "f27293daf371e562628e97524b81202f4b9ed6b7c69ea1e3be6bcc3b036cb227" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 199, + "startColumn": 19, + "charOffset": 6403, + "charLength": 31, + "snippet": { + "text": "\"Level must be greater than 0.\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 197, + "startColumn": 1, + "charOffset": 6313, + "charLength": 188, + "snippet": { + "text": "\tconst uint32_t level = getNumber(L, 1);\r\n\tif (level == 0) {\r\n\t\treportErrorFunc(\"Level must be greater than 0.\");\r\n\t} else {\r\n\t\tlua_pushnumber(L, Player::getExpForLevel(level));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e4d9da58fea31d47", + "equalIndicator/v1": "f28f41ce6b48e55bad73c63288a0b22fe2fb86f9794a38fddef144563e43b7f6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1191, + "startColumn": 66, + "charOffset": 45354, + "charLength": 4, + "snippet": { + "text": "zone" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1189, + "startColumn": 1, + "charOffset": 45284, + "charLength": 235, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::zoneAfterCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureEnter - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "68847b58b0846063", + "equalIndicator/v1": "f2a781d4189ab77712ea0af2c09feb99a925d37eb60dd5374d2ce73f84b91898" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8042, + "startColumn": 58, + "charOffset": 280010, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8040, + "startColumn": 1, + "charOffset": 279948, + "charLength": 127, + "snippet": { + "text": "}\r\n\r\nvoid Game::updateCreatureSkull(std::shared_ptr creature) {\r\n\tif (getWorldType() != WORLD_TYPE_PVP) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7fd801487d9710a7", + "equalIndicator/v1": "f2aabce89bc455227b31210b6b6d250e749ac1927476ede0c4227831e94154ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 746, + "startColumn": 27, + "charOffset": 26794, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 744, + "startColumn": 1, + "charOffset": 26762, + "charLength": 127, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnMoveItem, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6d899e01c14b78b9", + "equalIndicator/v1": "f2b65759c545d01a25407c53270c0010f1789472064f2838fd417bfea607668b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: id, playerId, timestamp, price, amount, counter, itemId, type, tier", + "markdown": "Constructor does not initialize these fields: id, playerId, timestamp, price, amount, counter, itemId, type, tier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1486, + "startColumn": 8, + "charOffset": 38766, + "charLength": 13, + "snippet": { + "text": "MarketOfferEx" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1484, + "startColumn": 1, + "charOffset": 38753, + "charLength": 99, + "snippet": { + "text": "};\r\n\r\nstruct MarketOfferEx {\r\n\tMarketOfferEx() = default;\r\n\tMarketOfferEx(MarketOfferEx &&other) :\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "536eb6e322b30f22", + "equalIndicator/v1": "f2baa722464c60ac6e47542391365d859e64e5dd355b455968b0a971a463af2e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 970, + "startColumn": 55, + "charOffset": 27776, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 968, + "startColumn": 1, + "charOffset": 27717, + "charLength": 139, + "snippet": { + "text": "}\r\n\r\nbool Player::canWalkthrough(std::shared_ptr creature) {\r\n\tif (group->access || creature->isInGhostMode()) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "61fb06bab718e83c", + "equalIndicator/v1": "f2c47f346113b4751285eb51d34632b19dbd51b1b1ddcad0c66e852514afcf45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 576, + "startColumn": 8, + "charOffset": 14185, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 574, + "startColumn": 1, + "charOffset": 14085, + "charLength": 217, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetDecayTime(lua_State* L) {\r\n\t// itemType:getDecayTime()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->decayTime);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "81dbc6f47dc761ad", + "equalIndicator/v1": "f2e6639f9c3cc2e63f5a1114e491dfba52a072ad359aa7e8cd430accd7702add" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 546, + "startColumn": 7, + "charOffset": 19325, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 544, + "startColumn": 1, + "charOffset": 19313, + "charLength": 143, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnBrowseField - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2a66791caaa22780", + "equalIndicator/v1": "f302408fdee23a1ae23c7fd62b7a42dba776f555e0cd2290df4a3b3eb13dbffb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8052, + "startColumn": 55, + "charOffset": 280292, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8050, + "startColumn": 1, + "charOffset": 280233, + "charLength": 213, + "snippet": { + "text": "}\r\n\r\nvoid Game::updatePlayerShield(std::shared_ptr player) {\r\n\tfor (const auto &spectator : Spectators().find(player->getPosition(), true)) {\r\n\t\tspectator->getPlayer()->sendCreatureShield(player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9ef1ba599b8accef", + "equalIndicator/v1": "f309ea07b13443db1385596d7685bc9562c93ad91e8bff348d7acd82d359bcaf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 637, + "startColumn": 74, + "charOffset": 24587, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 635, + "startColumn": 1, + "charOffset": 24509, + "charLength": 189, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerTaskHuntingClass(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "65545ecc19e10d66", + "equalIndicator/v1": "f313b88dfa672c1b3628e8549792cca8dd81a2dcca8720cd77270cc33643c522" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 151, + "startColumn": 53, + "charOffset": 4400, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 149, + "startColumn": 1, + "charOffset": 4343, + "charLength": 265, + "snippet": { + "text": "}\r\n\r\nvoid Decay::internalDecayItem(std::shared_ptr item) {\r\n\tconst ItemType &it = Item::items[item->getID()];\r\n\t// Remove the item and halt the decay process if a player triggers a bug where the item's decay ID matches its equip or de-equip transformation ID\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "edd6d3607f7b1ff9", + "equalIndicator/v1": "f31d8c3383a7c073e28245e0a5e4e43e1025b6b7e602058afaddbc2c86a8ac6b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9915, + "startColumn": 3, + "charOffset": 345863, + "charLength": 11, + "snippet": { + "text": "ShootType_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9913, + "startColumn": 1, + "charOffset": 345746, + "charLength": 213, + "snippet": { + "text": "bool Game::hasDistanceEffect(uint16_t effectId) {\r\n\tfor (uint16_t i = CONST_ANI_NONE; i <= CONST_ANI_LAST; i++) {\r\n\t\tShootType_t effect = static_cast(i);\r\n\t\tif (effect == effectId) {\r\n\t\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "490f5f1213b636d4", + "equalIndicator/v1": "f32b4a24d0e9bd12741ff4195ce34c57f9bcfe90c8cd9b801c51eba03a654c29" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", + "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1194, + "startColumn": 23, + "charOffset": 33591, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1192, + "startColumn": 1, + "charOffset": 33562, + "charLength": 147, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tint32_t hitChance = item->getHitChance();\r\n\t\tif (hitChance != 0) {\r\n\t\t\tdescriptions.emplace_back(\"HitChance\", std::to_string(hitChance));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2ee32cf20a2f74e9", + "equalIndicator/v1": "f32e945e22bacba3bd777d107682a1bd1228630a191a3b45874633abec11a4fc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8313, + "startColumn": 61, + "charOffset": 287884, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8311, + "startColumn": 1, + "charOffset": 287819, + "charLength": 174, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerFriendSystemAction(std::shared_ptr player, uint8_t type, uint8_t titleId) {\r\n\tif (type == 0x0E) {\r\n\t\tplayer->title()->setCurrentTitle(titleId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4845aafddea175c9", + "equalIndicator/v1": "f34664aa2a39142fa2f00aa6c33c7f4aa985414776a39231c9d3e3e59a3f5949" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 297, + "startColumn": 67, + "charOffset": 11037, + "charLength": 5, + "snippet": { + "text": "party" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 295, + "startColumn": 1, + "charOffset": 10966, + "charLength": 318, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::partyOnShareExperience(std::shared_ptr party, uint64_t &exp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"Party leader {}. Call stack overflow. Too many lua script calls being nested.\", party->getLeader() ? party->getLeader()->getName() : \"unknown\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b9753c3bae1841d", + "equalIndicator/v1": "f38e0b0d0727aeac5b5596757379a14fd3274fc4cf1074d9d1d1341c3261bbac" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 668, + "startColumn": 56, + "charOffset": 20386, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 666, + "startColumn": 1, + "charOffset": 20326, + "charLength": 173, + "snippet": { + "text": "}\r\n\r\nvoid Party::updatePlayerHealth(std::shared_ptr player, std::shared_ptr target, uint8_t healthPercent) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6070edce5204c405", + "equalIndicator/v1": "f3aebdad8aaf72d6cd22a7bf76f2d7ef8bb849cd6dd2df5d138cb425e1290ab5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'bed' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'bed' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 418, + "startColumn": 45, + "charOffset": 12187, + "charLength": 3, + "snippet": { + "text": "bed" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 416, + "startColumn": 1, + "charOffset": 12138, + "charLength": 127, + "snippet": { + "text": "}\r\n\r\nvoid House::addBed(std::shared_ptr bed) {\r\n\tbedsList.push_back(bed);\r\n\tbed->setHouse(static_self_cast());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4579701cdeb6a7b7", + "equalIndicator/v1": "f3b4b331bd6789e0065e0a3512040093fa4956f9d10ecab3ed72c0a550ce50e5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1220, + "startColumn": 68, + "charOffset": 43553, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1218, + "startColumn": 1, + "charOffset": 43481, + "charLength": 179, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnRequestQuestLine(std::shared_ptr player, uint16_t questId) {\r\n\t// Player::onRequestQuestLine()\r\n\tif (info.playerOnRequestQuestLine == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "47eff2ea31a10787", + "equalIndicator/v1": "f3b7e9312700b92bf3dda1ce995f4a1722c28cdf4623f8e3bb8f9dde3d9167bc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 339, + "startColumn": 105, + "charOffset": 11794, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 337, + "startColumn": 1, + "charOffset": 11685, + "charLength": 157, + "snippet": { + "text": "}\r\n\r\nstd::vector Imbuements::getImbuements(std::shared_ptr player, std::shared_ptr item) {\r\n\tstd::vector imbuements;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ca5a23bedc59ecca", + "equalIndicator/v1": "f3c272e1a53cb0f7b8e0bdf4f09583854a2bc1218c0ef742ecf348e1c70c93e9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 760, + "startColumn": 39, + "charOffset": 23092, + "charLength": 12, + "snippet": { + "text": "attackSpells" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 758, + "startColumn": 1, + "charOffset": 23048, + "charLength": 88, + "snippet": { + "text": "\t}\r\n\r\n\tlua_createtable(L, monsterType->info.attackSpells.size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2ec9649287ba9c4e", + "equalIndicator/v1": "f3cff170b98fd09e0eb87f5e0a040f447b2a723ac10998260e3dfad7277caa66" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1087, + "startColumn": 7, + "charOffset": 41411, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1085, + "startColumn": 1, + "charOffset": 41299, + "charLength": 218, + "snippet": { + "text": "\r\nvoid EventCallback::monsterOnSpawn(std::shared_ptr monster, const Position &position) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"{} - \"\r\n\t\t \"Position {}\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef2d24dacb368f44", + "equalIndicator/v1": "f3f40aac36e98fc77fe931b7cbd76a93fa96918ae180d837d75007ead88b3093" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 107, + "startColumn": 21, + "charOffset": 3108, + "charLength": 8, + "snippet": { + "text": "vocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 105, + "startColumn": 1, + "charOffset": 3018, + "charLength": 155, + "snippet": { + "text": "\tif (vocation) {\r\n\t\tuint32_t magicLevel = getNumber(L, 2);\r\n\t\tlua_pushnumber(L, vocation->getReqMana(magicLevel));\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fbdffb09b0f05c57", + "equalIndicator/v1": "f40083326310e9d0a95fde2936312186d0b20094133dde3af31339b43b5fc23b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5524, + "startColumn": 2, + "charOffset": 175272, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5522, + "startColumn": 1, + "charOffset": 175195, + "charLength": 192, + "snippet": { + "text": "\tuint16_t firstItem = msg.get();\r\n\tuint8_t tier = msg.getByte();\r\n\tuint16_t secondItem = msg.get();\r\n\tbool usedCore = msg.getByte();\r\n\tbool reduceTierLoss = msg.getByte();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f3b7d34660303085", + "equalIndicator/v1": "f4105c25a21d6180d4fc682a0a8831d070bd89d852c04ce9d5fc6560ec633412" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7483, + "startColumn": 90, + "charOffset": 260661, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7481, + "startColumn": 1, + "charOffset": 260536, + "charLength": 260, + "snippet": { + "text": "\r\nvoid Game::buildMessageAsTarget(\r\n\tstd::shared_ptr attacker, const CombatDamage &damage, std::shared_ptr attackerPlayer,\r\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\r\n\tconst std::string &damageString\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "60191d6a45d46637", + "equalIndicator/v1": "f4340a13aee6f4d600dae7739c351a75c3ae536484b89715519474fe6b547bf9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The 'empty' method should be used to check for emptiness instead of comparing to an empty object", + "markdown": "The 'empty' method should be used to check for emptiness instead of comparing to an empty object" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 103, + "startColumn": 62, + "charOffset": 3639, + "charLength": 6, + "snippet": { + "text": "writer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 101, + "startColumn": 1, + "charOffset": 3344, + "charLength": 429, + "snippet": { + "text": "\t\tif (g_game().internalMoveItem(item->getParent(), player->getInbox(), INDEX_WHEREEVER, item, item->getItemCount(), nullptr, FLAG_NOLIMIT) == RETURNVALUE_NOERROR) {\r\n\t\t\tauto newItem = g_game().transformItem(item, item->getID() + 1);\r\n\t\t\tif (newItem && newItem->getID() == ITEM_LETTER_STAMPED && writer != \"\") {\r\n\t\t\t\tnewItem->setAttribute(ItemAttribute_t::WRITER, writer);\r\n\t\t\t\tnewItem->setAttribute(ItemAttribute_t::DATE, date);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "90040e2a70419239", + "equalIndicator/v1": "f43ba1a39ed5f3efde1a900786fb68d428402d008e9cfeb55d026a5add1371c8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/achievement/player_achievement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 36, + "startColumn": 41, + "charOffset": 1106, + "charLength": 9, + "snippet": { + "text": "timestamp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 34, + "startColumn": 1, + "charOffset": 1031, + "charLength": 241, + "snippet": { + "text": "\r\n\taddPoints(achievement.points);\r\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\r\n\tgetUnlockedKV()->set(achievement.name, toSaveTimeStamp);\r\n\tm_achievementsUnlocked.emplace_back(achievement.id, toSaveTimeStamp);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ca0abdff34ea7cef", + "equalIndicator/v1": "f44867ec4ecab683db937e97a613252b6a7eaffcf364b11fa53a829ccb9bb3dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list, unsigned char>>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'std::list, unsigned char\\>\\>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/modal_window_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 102, + "startColumn": 21, + "charOffset": 2845, + "charLength": 6, + "snippet": { + "text": "window" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 100, + "startColumn": 1, + "charOffset": 2748, + "charLength": 152, + "snippet": { + "text": "\tconst auto &window = getUserdataShared(L, 1);\r\n\tif (window) {\r\n\t\tlua_pushnumber(L, window->choices.size());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3f59fe5db515fe22", + "equalIndicator/v1": "f44d19591c353821e43533617007cfeea235c0070be5128a40521086a7beeb20" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 216, + "startColumn": 14, + "charOffset": 6252, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 214, + "startColumn": 1, + "charOffset": 6179, + "charLength": 117, + "snippet": { + "text": "\tMonsterSpell &operator=(const MonsterSpell &) = delete;\r\n\r\n\tstd::string name = \"\";\r\n\tstd::string scriptName = \"\";\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4dc7ea26595785f9", + "equalIndicator/v1": "f485f947679f22ee3906d1d508134b6adaa4da7e9e705e87e6329393e39c6aa7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 1, + "charOffset": 1059, + "charLength": 4, + "snippet": { + "text": "void" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1054, + "charLength": 225, + "snippet": { + "text": "}\r\n\r\nvoid Reward::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr localParent = getParent();\r\n\tif (localParent != nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9d93d33f662db925", + "equalIndicator/v1": "f4a956f1e68cce80578b5b138f73ece105b244f2801a33f9a2d7892d936a6a51" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'mostDamageCreature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'mostDamageCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 758, + "startColumn": 96, + "charOffset": 24184, + "charLength": 18, + "snippet": { + "text": "mostDamageCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 756, + "startColumn": 1, + "charOffset": 24084, + "charLength": 262, + "snippet": { + "text": "}\r\n\r\nbool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared_ptr mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!lootDrop && getMonster()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "95740ab037b7890f", + "equalIndicator/v1": "f4b14b7e7b90a07ac8a76c127c7f95ef603233ed434f39c904a29873cc44b7b3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 472, + "startColumn": 41, + "charOffset": 17845, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 470, + "startColumn": 1, + "charOffset": 17799, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3feb1ddf5de9b417", + "equalIndicator/v1": "f4ce2dc6c8a1cd91b5461ccdc8218b21b457d697210a70892ef4787100c75559" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 906, + "startColumn": 41, + "charOffset": 34576, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 904, + "startColumn": 1, + "charOffset": 34530, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "740c014e321f4171", + "equalIndicator/v1": "f4cee5247232bdd99e4790a06adf0bd441cd736ad7b5990fdc3f5ad1420fb6d5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 14, + "charOffset": 1339, + "charLength": 7, + "snippet": { + "text": "npcType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1200, + "charLength": 255, + "snippet": { + "text": "\tfloat multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__);\r\n\thealth = npcType->info.health * multiplier;\r\n\thealthMax = npcType->info.healthMax * multiplier;\r\n\tbaseSpeed = npcType->info.baseSpeed;\r\n\tinternalLight = npcType->info.light;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8cbf6660ee1c096e", + "equalIndicator/v1": "f4f5154c22ae7caaf9251ddae15bfe2ca34dac0d83de1d6736d5724a9b1e1dcf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1291, + "startColumn": 27, + "charOffset": 45938, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1289, + "startColumn": 1, + "charOffset": 45906, + "charLength": 132, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnStorageUpdate, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ff0811de6a9b3fd4", + "equalIndicator/v1": "f51d3ad18429dae8021db28c28be69c197526b4c228d497bc7503522d951856d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8907, + "startColumn": 46, + "charOffset": 310964, + "charLength": 3, + "snippet": { + "text": "fee" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8905, + "startColumn": 1, + "charOffset": 310870, + "charLength": 218, + "snippet": { + "text": "\r\n\t\tg_game().removeMoney(player, fee, 0, true);\r\n\t\tg_metrics().addCounter(\"balance_decrease\", fee, { { \"player\", player->getName() }, { \"context\", \"market_fee\" } });\r\n\t} else {\r\n\t\tuint64_t totalPrice = price * amount;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "42e089830249f727", + "equalIndicator/v1": "f5454abddfe3cd8ef6ae126b50169ea8670859be916253414258e7e492a13b0b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1178, + "startColumn": 28, + "charOffset": 32415, + "charLength": 10, + "snippet": { + "text": "healthGain" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1176, + "startColumn": 1, + "charOffset": 32228, + "charLength": 292, + "snippet": { + "text": "\t\t\tint32_t realHealthGain = creature->getHealth();\r\n\t\t\tif (creature->getZoneType() == ZONE_PROTECTION && dailyStreak >= DAILY_REWARD_DOUBLE_HP_REGENERATION) {\r\n\t\t\t\tcreature->changeHealth(healthGain * 2); // Double regen from daily reward\r\n\t\t\t} else {\r\n\t\t\t\tcreature->changeHealth(healthGain);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f31a89eb09f2393", + "equalIndicator/v1": "f5482c5d4f8f5a2fbe25e14b913ace1f7e7bb6747dc9a9706a5fc5366d5138d9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6052, + "startColumn": 63, + "charOffset": 192687, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6050, + "startColumn": 1, + "charOffset": 192620, + "charLength": 136, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureTurn(std::shared_ptr creature, uint32_t stackPos) {\r\n\tif (!canSee(creature)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bded1c26c17c6471", + "equalIndicator/v1": "f5507ba4add50f816319a90d5ec8d2b6039954d8d27830a26786e8e4887bcf17" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 431, + "startColumn": 58, + "charOffset": 12083, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 429, + "startColumn": 1, + "charOffset": 11944, + "charLength": 207, + "snippet": { + "text": "\tvirtual void drainMana(std::shared_ptr attacker, int32_t manaLoss);\r\n\r\n\tvirtual bool challengeCreature(std::shared_ptr, [[maybe_unused]] int targetChangeCooldown) {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5f476a2eb63b093b", + "equalIndicator/v1": "f5729e0f6efa94051079e25c6ea1db5fea1956d3a0c5b1985e456d7b1df22c8b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3522, + "startColumn": 3, + "charOffset": 108396, + "charLength": 8, + "snippet": { + "text": "skills_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3520, + "startColumn": 1, + "charOffset": 108375, + "charLength": 198, + "snippet": { + "text": "\t\t\tcontinue;\r\n\t\t}\r\n\t\tskills_t skill = static_cast(i);\r\n\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\r\n\t\tmsg.add(0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7798bf5d6ad4cf1e", + "equalIndicator/v1": "f580c5989a4141824612dd3748f076d4290dbed4db05388322079230187269a5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 171, + "startColumn": 13, + "charOffset": 4965, + "charLength": 8, + "snippet": { + "text": "findItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 169, + "startColumn": 1, + "charOffset": 4881, + "charLength": 196, + "snippet": { + "text": "\t\t\tfor (auto &findItem : *items) {\r\n\t\t\t\tif (findItem->getID() == id) {\r\n\t\t\t\t\titem = findItem;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else if (iType.m_transformOnUse && findItem->getID() == iType.m_transformOnUse) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "415125fe4730093c", + "equalIndicator/v1": "f5966fac55aee20777c2fdb8f1448a2a964c07146f3d0a52c54108a6c5b715dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 218, + "startColumn": 42, + "charOffset": 6586, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 216, + "startColumn": 1, + "charOffset": 6473, + "charLength": 368, + "snippet": { + "text": "public:\r\n\t// Factory member to create item of right type based on type\r\n\tstatic std::shared_ptr CreateItem(const uint16_t type, uint16_t count = 0, Position* itemPosition = nullptr);\r\n\tstatic std::shared_ptr CreateItemAsContainer(const uint16_t type, uint16_t size);\r\n\tstatic std::shared_ptr CreateItem(uint16_t itemId, Position &itemPosition);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e3557ec330cf23ed", + "equalIndicator/v1": "f59c74572efbbd67ca69e5f493825dac5b0831447d85da65c4b41c1b63755757" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 514, + "startColumn": 79, + "charOffset": 16934, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 512, + "startColumn": 1, + "charOffset": 16851, + "charLength": 315, + "snippet": { + "text": "}\r\n\r\nbool Action::executeUse(std::shared_ptr player, std::shared_ptr item, const Position &fromPosition, std::shared_ptr target, const Position &toPosition, bool isHotkey) {\r\n\t// onUse(player, item, fromPosition, target, toPosition, isHotkey)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "61ea2480a3b18b30", + "equalIndicator/v1": "f5a21cac8c59ce933247677673e91b14d4834ebc860464e7d388489c4f34bc56" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'addThing' is within a recursive call chain", + "markdown": "Function 'addThing' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 986, + "startColumn": 12, + "charOffset": 30072, + "charLength": 8, + "snippet": { + "text": "addThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 984, + "startColumn": 1, + "charOffset": 30056, + "charLength": 82, + "snippet": { + "text": "}\r\n\r\nvoid Tile::addThing(std::shared_ptr thing) {\r\n\taddThing(0, thing);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "74b8347852972220", + "equalIndicator/v1": "f5a72fe48493e6a1cd435feb88c34e864b33a932fcd0f9977baf1c4f67b7226d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 415, + "startColumn": 77, + "charOffset": 12185, + "charLength": 7, + "snippet": { + "text": "oldItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 413, + "startColumn": 1, + "charOffset": 12104, + "charLength": 206, + "snippet": { + "text": "}\r\n\r\nvoid Container::onUpdateContainerItem(uint32_t index, std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tauto spectators = Spectators().find(getPosition(), false, 2, 2, 2, 2);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2bfcd9bdbaa7e8c0", + "equalIndicator/v1": "f5b58b79d3b2de20be21556b91f36229cc9da9673410f461ca87585131857322" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 669, + "startColumn": 2, + "charOffset": 18146, + "charLength": 13, + "snippet": { + "text": "ConditionId_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 667, + "startColumn": 1, + "charOffset": 18075, + "charLength": 202, + "snippet": { + "text": "\r\n\tConditionType_t conditionType = getNumber(L, 2);\r\n\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\r\n\tuint32_t subId = getNumber(L, 4, 0);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7249219986ed6cca", + "equalIndicator/v1": "f5bd21b20204444b6c20d1c6b070844382c0f7f04db6c6a084518eaf4c61070a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/shop_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 87, + "startColumn": 33, + "charOffset": 2552, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 85, + "startColumn": 1, + "charOffset": 2436, + "charLength": 179, + "snippet": { + "text": "\t// shop:setCount(count)\r\n\tif (const auto &shop = getUserdataShared(L, 1)) {\r\n\t\tshop->shopBlock.itemSubType = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9c425d922ec49bd6", + "equalIndicator/v1": "f5ded62bc6bfdaa539e921b407953c061babd75ac378b11414bc8d478b8c899c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 253, + "startColumn": 24, + "charOffset": 6692, + "charLength": 5, + "snippet": { + "text": "regen" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 251, + "startColumn": 1, + "charOffset": 6662, + "charLength": 201, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tplayer->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false);\r\n\t\tplayer->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__));\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "886591dc0bec17cd", + "equalIndicator/v1": "f5ff62aec2c721c62d5f7c5866c243beda61abf909640b5cc900ba5e342b2885" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 220, + "startColumn": 8, + "charOffset": 5507, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 218, + "startColumn": 1, + "charOffset": 5417, + "charLength": 202, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetType(lua_State* L) {\r\n\t// itemType:getType()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->type);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a6c9bf0ef1e56d97", + "equalIndicator/v1": "f604458f363a760ac670c207865ff06110b60b9395bb55fc73f92d0449c9bb83" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9905, + "startColumn": 3, + "charOffset": 345605, + "charLength": 18, + "snippet": { + "text": "MagicEffectClasses" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9903, + "startColumn": 1, + "charOffset": 345499, + "charLength": 216, + "snippet": { + "text": "bool Game::hasEffect(uint16_t effectId) {\r\n\tfor (uint16_t i = CONST_ME_NONE; i < CONST_ME_LAST; i++) {\r\n\t\tMagicEffectClasses effect = static_cast(i);\r\n\t\tif (effect == effectId) {\r\n\t\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e304252b2e409ff2", + "equalIndicator/v1": "f607fda45b7ae048ae1e38d585490e2e75fa897500535165b7f23956b1bb1c38" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1329, + "startColumn": 47, + "charOffset": 47191, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1327, + "startColumn": 1, + "charOffset": 47087, + "charLength": 170, + "snippet": { + "text": "\tscriptInterface.pushFunction(info.monsterOnDropLoot);\r\n\r\n\tLuaScriptInterface::pushUserdata(L, monster);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "53817cd306a8960a", + "equalIndicator/v1": "f60cd8373208072b24e88faf453a423c7ab70ada8889f1b71799e0641d87a6d3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 24, + "startColumn": 4, + "charOffset": 778, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 725, + "charLength": 198, + "snippet": { + "text": "\t\t\tMoveEventList &moveEventList = pair.second;\r\n\r\n\t\t\tfor (int moveEventType = 0; moveEventType < MOVE_EVENT_LAST; ++moveEventType) {\r\n\t\t\t\tauto &eventList = moveEventList.moveEvent[moveEventType];\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "163811abdf7878f8", + "equalIndicator/v1": "f60d1c38823c30f03c88c1c6e8d7731281204ba202172619bf4ebc9bb4ea0c1c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 421, + "startColumn": 10, + "charOffset": 11297, + "charLength": 14, + "snippet": { + "text": "getReflectFlat" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 419, + "startColumn": 1, + "charOffset": 11196, + "charLength": 245, + "snippet": { + "text": "\tint32_t getReflectPercent(CombatType_t combat, bool useCharges = false) const override;\r\n\r\n\tint32_t getReflectFlat(CombatType_t combat, bool useCharges = false) const override;\r\n\r\n\tPartyShields_t getPartyShield(std::shared_ptr player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2e9ab2fa797e801b", + "equalIndicator/v1": "f61639b2f989966d35a5d78a088336cea8228a044f77f3b519bc8b53ddcfbac4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 17, + "startColumn": 7, + "charOffset": 546, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 15, + "startColumn": 1, + "charOffset": 534, + "charLength": 122, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tauto targetCreature = m_targetCreature.lock();\r\n\t\tg_logger().error(\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "074c5352083cee12", + "equalIndicator/v1": "f61c4b26db3cf925f48f28b7d037f58afcd0222b47ff02bd449f3a52cc4db595" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3490, + "startColumn": 21, + "charOffset": 107464, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3488, + "startColumn": 1, + "charOffset": 107339, + "charLength": 170, + "snippet": { + "text": "\t\tmsg.add(player->getBaseSkill(skill));\r\n\t\tmsg.add(player->getLoyaltySkill(skill));\r\n\t\tmsg.add(player->getSkillPercent(skill) * 100);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3104c6c4c658f648", + "equalIndicator/v1": "f634628a25dffefe37064671a3369a23314f21df6b7e4527a5aa8b1a2f97408e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6907, + "startColumn": 29, + "charOffset": 239690, + "charLength": 36, + "snippet": { + "text": "(damage.primary.value * damageBonus)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6905, + "startColumn": 1, + "charOffset": 239551, + "charLength": 268, + "snippet": { + "text": "\t\t\tint32_t damageBonus = attackerPlayer->wheel()->checkTwinBurstByTarget(target);\r\n\t\t\tif (damageBonus != 0) {\r\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\r\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b75fa52c95401c3", + "equalIndicator/v1": "f64abb795c7f78062fa5e20618b3aa1eede64c36ea8ba785b1112493dd5dedee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1106, + "startColumn": 52, + "charOffset": 32483, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1104, + "startColumn": 1, + "charOffset": 32423, + "charLength": 139, + "snippet": { + "text": "\t\t}\r\n\t}\r\n\tvoid sendCreatureAppear(std::shared_ptr creature, const Position &pos, bool isLogin) {\r\n\t\tif (!creature) {\r\n\t\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f17e32c6e6ed6df9", + "equalIndicator/v1": "f64ac47058e1e00c751b7ec195861e92b5421c93ecff559a0c9361afedd6157c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 89, + "startColumn": 3, + "charOffset": 2697, + "charLength": 14, + "snippet": { + "text": "lua_pushnumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 87, + "startColumn": 1, + "charOffset": 2599, + "charLength": 172, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1);\r\n\tif (condition) {\r\n\t\tlua_pushnumber(L, condition->getEndTime());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f6ead4a14a75b0b", + "equalIndicator/v1": "f667fe2ba01a92160a3287605683482b451b9e68850cb53bb047f01c8ea16667" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Result of integer division used in a floating point context; possible loss of precision", + "markdown": "Result of integer division used in a floating point context; possible loss of precision" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 76, + "startColumn": 95, + "charOffset": 2223, + "charLength": 5, + "snippet": { + "text": "level" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 74, + "startColumn": 1, + "charOffset": 2008, + "charLength": 236, + "snippet": { + "text": "\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\r\n\t} else {\r\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "66b30b8d9c58778e", + "equalIndicator/v1": "f6734e7a1cc49e0874710014b3ed90ed8e0b41d9eabd1fe8cf78e498b850e4ae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list, unsigned char>>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'std::list, unsigned char\\>\\>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/modal_window_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 91, + "startColumn": 21, + "charOffset": 2565, + "charLength": 6, + "snippet": { + "text": "window" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 89, + "startColumn": 1, + "charOffset": 2468, + "charLength": 152, + "snippet": { + "text": "\tconst auto &window = getUserdataShared(L, 1);\r\n\tif (window) {\r\n\t\tlua_pushnumber(L, window->buttons.size());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29055e996be48b63", + "equalIndicator/v1": "f67fa33b6bc2d49157f9ac48f5722732d08840d67af1c409458157dbbf7bb4ec" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2131, + "startColumn": 52, + "charOffset": 72072, + "charLength": 7, + "snippet": { + "text": "ownerId" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2129, + "startColumn": 1, + "charOffset": 71917, + "charLength": 176, + "snippet": { + "text": "\r\n\t\t\tif (!harmfulField || (OTSYS_TIME() - createTime <= 5000) || creature->hasBeenAttacked(ownerId)) {\r\n\t\t\t\tconditionCopy->setParam(CONDITION_PARAM_OWNER, ownerId);\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f23d59c5dfaf007e", + "equalIndicator/v1": "f68c1f6a01df5e81e6a578abfb4bef6749228663152ab4e239a7da7d515517ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1881, + "startColumn": 21, + "charOffset": 65063, + "charLength": 5, + "snippet": { + "text": "input" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1879, + "startColumn": 1, + "charOffset": 64969, + "charLength": 173, + "snippet": { + "text": "\t\tfor (uint32_t x = 0; x < input->getCols(); ++x) {\r\n\t\t\tuint32_t ry = 0;\r\n\t\t\tfor (int32_t y = input->getRows(); --y >= 0;) {\r\n\t\t\t\t(*output)[ry++][x] = (*input)[y][x];\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "111cfb3dabd90a79", + "equalIndicator/v1": "f690c96e8d7dbfd35e3674534d8e82addd720b874f93349a2dece90e66833c85" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4163, + "startColumn": 14, + "charOffset": 125251, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4161, + "startColumn": 1, + "charOffset": 125233, + "charLength": 219, + "snippet": { + "text": "}\r\n\r\nvoid Player::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link /*= LINK_OWNER*/) {\r\n\tif (link == LINK_OWNER) {\r\n\t\t// calling movement scripts\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "80fcebe24b92df8e", + "equalIndicator/v1": "f6b8cc9c4a23f89a30605f5a3259a4991dda30446e476d5e4ef5ddc2293e96d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 423, + "startColumn": 49, + "charOffset": 13775, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 421, + "startColumn": 1, + "charOffset": 13722, + "charLength": 328, + "snippet": { + "text": "}\r\n\r\nbool Actions::useItemEx(std::shared_ptr player, const Position &fromPos, const Position &toPos, uint8_t toStackPos, std::shared_ptr item, bool isHotkey, std::shared_ptr creature /* = nullptr*/) {\r\n\tconst ItemType &it = Item::items[item->getID()];\r\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "429978fddb95a719", + "equalIndicator/v1": "f6bd764d973805431460e0ac4c91c85c5d0cd8fa47ef1086f228acd43bd722be" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7317, + "startColumn": 47, + "charOffset": 219631, + "charLength": 4, + "snippet": { + "text": "cost" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7315, + "startColumn": 1, + "charOffset": 219566, + "charLength": 157, + "snippet": { + "text": "\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_fuse\" } });\r\n\r\n\t\t\thistory.cost = cost;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "65534a57a203f4bc", + "equalIndicator/v1": "f6be9fd9d7a7eaf7002816c1c6ed4486ec9b9bc0e34dc2b65445d699fa3b6794" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2063, + "startColumn": 97, + "charOffset": 63327, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2061, + "startColumn": 1, + "charOffset": 63226, + "charLength": 158, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendItemInspection(uint16_t itemId, uint8_t itemCount, std::shared_ptr item, bool cyclopedia) {\r\n\tif (oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a19bdae768966884", + "equalIndicator/v1": "f6c8e4b308cea5191d5dbf7ccf801682b8381e50e3e4004a3c759d3ec2d51773" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 285, + "startColumn": 14, + "charOffset": 8151, + "charLength": 8, + "snippet": { + "text": "blockHit" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 283, + "startColumn": 1, + "charOffset": 8110, + "charLength": 245, + "snippet": { + "text": "\tvoid clearFriendList();\r\n\r\n\tBlockType_t blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense = false, bool checkArmor = false, bool field = false) override;\r\n\r\n\tstatic uint32_t monsterAutoID;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "989ec2abb37c6189", + "equalIndicator/v1": "f6d46477db46eba7a64f7bf897ac16de16aa49e2cc177215898e775852cfc89d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Switch has 2 consecutive identical branches", + "markdown": "Switch has 2 consecutive identical branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 699, + "startColumn": 3, + "charOffset": 18491, + "charLength": 4, + "snippet": { + "text": "case" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 697, + "startColumn": 1, + "charOffset": 18471, + "charLength": 105, + "snippet": { + "text": "\r\n\t\t// Bed class\r\n\t\tcase ATTR_SLEEPERGUID: {\r\n\t\t\tif (!propStream.skip(4)) {\r\n\t\t\t\treturn ATTR_READ_ERROR;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8746ae38830d2110", + "equalIndicator/v1": "f6db9bb7100ae87f7074fc95a9f41e7716346de9ecfbbd71e94665f88a9815b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 329, + "startColumn": 2, + "charOffset": 8616, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 327, + "startColumn": 1, + "charOffset": 8508, + "charLength": 171, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\r\n\tconst Position &position = getPosition(L, 2);\r\n\tuint32_t range = getNumber(L, 3, 4);\r\n\r\n\tif (!npc) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fe9b06ce06b8d186", + "equalIndicator/v1": "f6ed7f8cda02bb52126daf6aee73e7456def3f7bf6d5ce06d2a96f428efe6149" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 289, + "startColumn": 50, + "charOffset": 8961, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 287, + "startColumn": 1, + "charOffset": 8907, + "charLength": 276, + "snippet": { + "text": "}\r\n\r\nbool Combat::isProtected(std::shared_ptr attacker, std::shared_ptr target) {\r\n\tuint32_t protectionLevel = g_configManager().getNumber(PROTECTION_LEVEL, __FUNCTION__);\r\n\tif (target->getLevel() < protectionLevel || attacker->getLevel() < protectionLevel) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c172b90f5f1c2fb9", + "equalIndicator/v1": "f6f011a5d2737dadc15ca9661a5c377a14cf45f8afe71151aaa27e9d886cd212" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7450, + "startColumn": 28, + "charOffset": 259510, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7448, + "startColumn": 1, + "charOffset": 259444, + "charLength": 288, + "snippet": { + "text": "\r\nvoid Game::buildMessageAsSpectator(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\r\n\tconst std::string &damageString, std::string &spectatorMessage\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d98b88a4cbdcf33", + "equalIndicator/v1": "f701bf361355453cbc6bd5a52bc3c296b7f6b569600770e62297fa9c1b92e637" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 778, + "startColumn": 29, + "charOffset": 23689, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 776, + "startColumn": 1, + "charOffset": 23503, + "charLength": 291, + "snippet": { + "text": "\tif (item->isStackable() && count != item->getItemCount()) {\r\n\t\tuint8_t newCount = static_cast(std::max(0, item->getItemCount() - count));\r\n\t\tconst int32_t oldWeight = item->getWeight();\r\n\t\titem->setItemCount(newCount);\r\n\t\tupdateItemWeight(-oldWeight + item->getWeight());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a0854365e336b7b6", + "equalIndicator/v1": "f714f921f44081d26fefc4faf9397b0804138cbfa57bfa93490bb9191fff4e48" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1958, + "startColumn": 2, + "charOffset": 59924, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1956, + "startColumn": 1, + "charOffset": 59846, + "charLength": 203, + "snippet": { + "text": "\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tuint32_t playerId = msg.get();\r\n\tg_game().playerRequestTrade(player->getID(), pos, stackpos, playerId, itemId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "267a46e6c3ef8c63", + "equalIndicator/v1": "f7160a12be770d196732dd4733d27f39adecd8e5be5a2f81f3dcb5de3889f197" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 156, + "startColumn": 32, + "charOffset": 4340, + "charLength": 29, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 154, + "startColumn": 1, + "charOffset": 4171, + "charLength": 301, + "snippet": { + "text": "\tbool registerLuaUniqueEvent(const std::shared_ptr action);\r\n\tbool registerLuaActionEvent(const std::shared_ptr action);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr action);\r\n\tbool registerLuaEvent(const std::shared_ptr action);\r\n\t// Clear maps for reloading\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "51130631ddf68101", + "equalIndicator/v1": "f71ccde461f32d760f403269586870c3ae39e572d393cc5be524483eef8f53bd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 40, + "startColumn": 42, + "charOffset": 1334, + "charLength": 4, + "snippet": { + "text": "keys" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 38, + "startColumn": 1, + "charOffset": 1223, + "charLength": 194, + "snippet": { + "text": "\tvirtual std::shared_ptr scoped(const std::string &scope) = 0;\r\n\r\n\tvirtual std::unordered_set keys(const std::string &prefix = \"\") = 0;\r\n\r\n\tvoid remove(const std::string &key);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f5ff5866a02c1589", + "equalIndicator/v1": "f723ba63b3afce84ff85def5565160dc412395dfbadefd991c9f830644694816" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 252, + "startColumn": 30, + "charOffset": 8282, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 250, + "startColumn": 1, + "charOffset": 8090, + "charLength": 364, + "snippet": { + "text": "\r\n\tstatic uint32_t EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool boolean);\r\n\tstatic uint32_t DeEquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool boolean);\r\n\r\n\tvoid setFromXML(bool newFromXML) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "079599d3461d5aa6", + "equalIndicator/v1": "f7566a953ba63e3bafec6093bf3d710e58936cdc870db41648048ede414b7427" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1116, + "startColumn": 7, + "charOffset": 42426, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1114, + "startColumn": 1, + "charOffset": 42320, + "charLength": 212, + "snippet": { + "text": "// Npc\r\nvoid EventCallback::npcOnSpawn(std::shared_ptr npc, const Position &position) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"{} - \"\r\n\t\t \"Position {}\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c877c58a599bcb70", + "equalIndicator/v1": "f7a32f19d1f2cc5357a395136110c5e11bccb7d864c57f87d05d916fac8012de" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'destination' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'destination' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 141, + "startColumn": 48, + "charOffset": 3772, + "charLength": 11, + "snippet": { + "text": "destination" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 139, + "startColumn": 1, + "charOffset": 3720, + "charLength": 119, + "snippet": { + "text": "}\r\n\r\nbool Bank::deposit(const std::shared_ptr destination) {\r\n\tauto bankable = getBankable();\r\n\tif (!bankable) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e978aaab3bfe5d1d", + "equalIndicator/v1": "f7aa950171aaa7b18d9cd69f524bf1d1299e2ff2705a291c1128f9759ffd85e5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Either cast from 'uint32_t' (aka 'unsigned int') to 'uint64_t' (aka 'unsigned long long') is ineffective, or there is loss of precision before the conversion", + "markdown": "Either cast from 'uint32_t' (aka 'unsigned int') to 'uint64_t' (aka 'unsigned long long') is ineffective, or there is loss of precision before the conversion" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 408, + "startColumn": 19, + "charOffset": 13871, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 406, + "startColumn": 1, + "charOffset": 13810, + "charLength": 329, + "snippet": { + "text": "\r\n\tauto totalRemoved = amount - toRemove;\r\n\tauto totalCost = static_cast(sellPrice * totalRemoved);\r\n\tg_logger().debug(\"[Npc::onPlayerSellItem] - Removing items from player {} amount {} of items with id {} on shop for npc {}\", player->getName(), toRemove, itemId, getName());\r\n\tif (totalRemoved > 0 && totalCost > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82210e66cf401e95", + "equalIndicator/v1": "f7cb503d77a4947509a4c969f6958aa82d124f9dbade64352a879ff2618175cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 312, + "startColumn": 20, + "charOffset": 11689, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 310, + "startColumn": 1, + "charOffset": 11616, + "charLength": 140, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\r\n\r\n\tlua_pushnumber(L, exp);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "121a22d03ea39955", + "equalIndicator/v1": "f806b4cf3b9258eee22bdcc97e1a821521b6f26802e7515fd84f6b31f93b4c7a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 377, + "startColumn": 5, + "charOffset": 12499, + "charLength": 10, + "snippet": { + "text": "defaultMap" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 375, + "startColumn": 1, + "charOffset": 12458, + "charLength": 126, + "snippet": { + "text": "\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_HEALING:\r\n\t\t\t\tdefaultMap[7] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "11218b6ae94021d7", + "equalIndicator/v1": "f80e1d1b3bada975bb95793b658b7551a186083e18ec44cee1fceb0bf605d552" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 404, + "startColumn": 72, + "charOffset": 15783, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 402, + "startColumn": 1, + "charOffset": 15707, + "charLength": 187, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerBestiarySystem(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ce79a3f40ffd38a9", + "equalIndicator/v1": "f82eac19d72af237dc713805b2fe21e1346499656f7a3a8b48d9444375375159" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'connection' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'connection' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 95, + "startColumn": 43, + "charOffset": 2467, + "charLength": 10, + "snippet": { + "text": "connection" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 93, + "startColumn": 1, + "charOffset": 2420, + "charLength": 134, + "snippet": { + "text": "}\r\n\r\nvoid ServicePort::onAccept(Connection_ptr connection, const std::error_code &error) {\r\n\tif (!error) {\r\n\t\tif (services.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "77f7fd7d50c6421c", + "equalIndicator/v1": "f82f9cf20d00f2f4bb320a7b7d5741608644c833b163047bccced983c9f7f6b2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Tree, std::allocator>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Tree, std::allocator\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 904, + "startColumn": 57, + "charOffset": 26548, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 902, + "startColumn": 1, + "charOffset": 26487, + "charLength": 175, + "snippet": { + "text": "}\r\n\r\nint GameFunctions::luaGameGetAchievements(lua_State* L) {\r\n\t// Game.getAchievements()\r\n\tconst std::map &achievements = g_game().getAchievements();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7668e2423d3f8a48", + "equalIndicator/v1": "f836cc29cbcf5d8252c1600e147d14b7581a3c34d341be9bc74726a2b62bb7bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1353, + "startColumn": 56, + "charOffset": 41454, + "charLength": 9, + "snippet": { + "text": "condition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1351, + "startColumn": 1, + "charOffset": 41394, + "charLength": 189, + "snippet": { + "text": "}\r\n\r\nbool Creature::addCondition(std::shared_ptr condition, bool attackerPlayer /* = false*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (condition == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fd9e77d469124781", + "equalIndicator/v1": "f845ed7c7668c35f50e814b30026b049b2ebe5e12cc411939a42c2d8279d6f9f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3153, + "startColumn": 231, + "charOffset": 95021, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3151, + "startColumn": 1, + "charOffset": 94750, + "charLength": 359, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\r\n\t} else {\r\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\r\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\r\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fa705348a9b4c20b", + "equalIndicator/v1": "f870f7207342126e974574cd9622625f597c0275e3a549c5d5d5affd9e15f45e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 673, + "startColumn": 26, + "charOffset": 21832, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 671, + "startColumn": 1, + "charOffset": 21675, + "charLength": 276, + "snippet": { + "text": "\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\r\n\t\tdamage.secondary.value = damage.primary.value * (damagePercent);\r\n\t\tdamage.primary.value = damage.primary.value * (1 - damagePercent);\r\n\r\n\t\tif (imbuementInfo.imbuement->soundEffect != SoundEffect_t::SILENCE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e106233adea1337b", + "equalIndicator/v1": "f87311de167ac4fba7ca0f8fdc490add710111e3bc6815b62e7f6d527109f9a8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 686, + "startColumn": 89, + "charOffset": 22283, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 684, + "startColumn": 1, + "charOffset": 22190, + "charLength": 234, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatManaFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\r\n\tif (!data) {\r\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "83b76a0d3119aba7", + "equalIndicator/v1": "f8825a847015e55637d56619b8c00de157232b6455b0034baa6b16903390f384" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2312, + "startColumn": 26, + "charOffset": 80373, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2310, + "startColumn": 1, + "charOffset": 80267, + "charLength": 263, + "snippet": { + "text": "\tint32_t damageBonus = 0;\r\n\tuint8_t stage = getStage(WheelStage_t::TWIN_BURST);\r\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\r\n\tif (healthPercent > 60) {\r\n\t\tif (stage >= 3) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "39541f2a17d206e9", + "equalIndicator/v1": "f8829ad454c9d5206a63f43b1f86a528acc9484fed3739f549287ea07c04a604" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'bed' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'bed' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 423, + "startColumn": 48, + "charOffset": 12318, + "charLength": 3, + "snippet": { + "text": "bed" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 421, + "startColumn": 1, + "charOffset": 12266, + "charLength": 109, + "snippet": { + "text": "}\r\n\r\nvoid House::removeBed(std::shared_ptr bed) {\r\n\tbed->setHouse(nullptr);\r\n\tbedsList.remove(bed);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a10eff04ab860be5", + "equalIndicator/v1": "f8ac0c6eec729dca276239bfec16459c1cf5a6334600790685105bbda1e2a06d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3334, + "startColumn": 64, + "charOffset": 101727, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3332, + "startColumn": 1, + "charOffset": 101659, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureSkull(std::shared_ptr creature) {\r\n\tif (g_game().getWorldType() != WORLD_TYPE_PVP) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9f04fd5c5c1f2074", + "equalIndicator/v1": "f8bd669d5379675d00a0efe42343f6a709bc47a285af59f8ae4772023cff4abf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 365, + "startColumn": 78, + "charOffset": 10507, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 363, + "startColumn": 1, + "charOffset": 10425, + "charLength": 284, + "snippet": { + "text": "}\r\n\r\nvoid House::handleWrapableItem(ItemList &moveItemList, std::shared_ptr item, std::shared_ptr player, std::shared_ptr houseTile) const {\r\n\tif (item->isWrapContainer()) {\r\n\t\tg_logger().debug(\"[{}] found wrapable item '{}'\", __FUNCTION__, item->getName());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "58f1103db3ef5fda", + "equalIndicator/v1": "f8c4ed2b6977b461faf10f9a23ac66d60dc7151441e03ad8fd840046b44201f6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1312, + "startColumn": 9, + "charOffset": 38727, + "charLength": 9, + "snippet": { + "text": "creatures" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1310, + "startColumn": 1, + "charOffset": 38701, + "charLength": 54, + "snippet": { + "text": "\t\t\t}\r\n\t\t} else {\r\n\t\t\tn += creatures->size();\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "91a9dacffe85202a", + "equalIndicator/v1": "f8cb34adc57375caa4782c2938e21c7c0ebd860be0eeb66fb8e3173a7d842352" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 14, + "charOffset": 1138, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1093, + "charLength": 486, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "615ac66cc2c2c17a", + "equalIndicator/v1": "f8d27c0ff4abd829895b93c273f91f80ca94dd90724c5ba1b06796a16ecf829f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1072, + "startColumn": 7, + "charOffset": 38520, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1070, + "startColumn": 1, + "charOffset": 38508, + "charLength": 146, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnLoseExperience - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b630deeff2ae07ae", + "equalIndicator/v1": "f8d8b0aaad7e81c7e343ad2ca7c32454de774995a0306bec1f5c52a7c3828857" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 193, + "startColumn": 46, + "charOffset": 5186, + "charLength": 9, + "snippet": { + "text": "lua_State" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 191, + "startColumn": 1, + "charOffset": 5136, + "charLength": 163, + "snippet": { + "text": "}\r\n\r\nint PlayerFunctions::luaPlayeraddCharmPoints(lua_State* L) {\r\n\t// player:addCharmPoints()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "806cf2be93c9fcf1", + "equalIndicator/v1": "f8f82bbd0f4ab744a0dbce7b3492059fa37952eb0f440c2be091014318ba0320" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 820, + "startColumn": 29, + "charOffset": 24635, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 818, + "startColumn": 1, + "charOffset": 24495, + "charLength": 234, + "snippet": { + "text": "uint32_t Container::getItemTypeCount(uint16_t itemId, int32_t subType /* = -1*/) const {\r\n\tuint32_t count = 0;\r\n\tfor (std::shared_ptr item : itemlist) {\r\n\t\tif (item->getID() == itemId) {\r\n\t\t\tcount += countByType(item, subType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9f416abf71ddf75d", + "equalIndicator/v1": "f912cb459254cf9f048f184e18ae5d6081d0571d974cdfbf9665cbf95eb04d33" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 326, + "startColumn": 15, + "charOffset": 10266, + "charLength": 11, + "snippet": { + "text": "newDuration" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 324, + "startColumn": 1, + "charOffset": 10127, + "charLength": 160, + "snippet": { + "text": "\tif (newDuration > 0 && (!prevIt.stopTime || !hasAttribute(ItemAttribute_t::DURATION))) {\r\n\t\tsetDecaying(DECAYING_PENDING);\r\n\t\tsetDuration(newDuration);\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3baa8f8d795c8755", + "equalIndicator/v1": "f91bd30f51923902852f8093b9b0bb3b0cc9f0a0d860cd98905c47193e6c4ac1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 26, + "charOffset": 606, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 576, + "charLength": 200, + "snippet": { + "text": "}\r\n\r\nReturnValue RewardChest::queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr actor /* = nullptr*/) {\r\n\tif (actor) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "46747c0e53836096", + "equalIndicator/v1": "f9448637a9e36efa51ff5bd64e085174f022d224a4575b5071b8aa3877f7e374" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 715, + "startColumn": 19, + "charOffset": 21505, + "charLength": 18, + "snippet": { + "text": "CONDITION_BLEEDING" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 713, + "startColumn": 1, + "charOffset": 21405, + "charLength": 194, + "snippet": { + "text": "\tConditionType_t conditionType = CONDITION_NONE;\r\n\tif (immunity == \"physical\") {\r\n\t\tconditionType = CONDITION_BLEEDING;\r\n\t} else if (immunity == \"energy\") {\r\n\t\tconditionType = CONDITION_ENERGY;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1ea6b0c5a138c88d", + "equalIndicator/v1": "f950cc463fc00e42de40c0962bef5e6f0f7d737fa04c1cf8244bf97dab53e41b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 67, + "startColumn": 10, + "charOffset": 2004, + "charLength": 8, + "snippet": { + "text": "Position" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 65, + "startColumn": 1, + "charOffset": 1846, + "charLength": 215, + "snippet": { + "text": "Position Zone::getRemoveDestination(const std::shared_ptr &creature /* = nullptr */) const {\r\n\tif (!creature || !creature->getPlayer()) {\r\n\t\treturn Position();\r\n\t}\r\n\tif (removeDestination != Position()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cbefed57fb0ede36", + "equalIndicator/v1": "f9875bfa6bcf8f36b194b03f893cd5af9fad5daf51e4283e870c0b115a0323f6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 771, + "startColumn": 7, + "charOffset": 24353, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 769, + "startColumn": 1, + "charOffset": 24261, + "charLength": 289, + "snippet": { + "text": "\t// onEquip(player, item, slot, isCheck)\r\n\t// onDeEquip(player, item, slot, isCheck)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[MoveEvent::executeEquip - Player {} item {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0c0f495d7d9b5bf3", + "equalIndicator/v1": "f9ab86c266543c57e58d84c631d76e9f2e88a5fc0bf7419d69201839a7477b0a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 556, + "startColumn": 19, + "charOffset": 17128, + "charLength": 9, + "snippet": { + "text": "slotIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 554, + "startColumn": 1, + "charOffset": 16888, + "charLength": 334, + "snippet": { + "text": "\t\t\t\tif (containerItem != item && containerItem->equals(item) && containerItem->getItemCount() < containerItem->getStackSize()) {\r\n\t\t\t\t\tuint32_t remainder = (containerItem->getStackSize() - containerItem->getItemCount());\r\n\t\t\t\t\tif (queryAdd(slotIndex++, item, remainder, flags) == RETURNVALUE_NOERROR) {\r\n\t\t\t\t\t\tn += remainder;\r\n\t\t\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "78350605d26183aa", + "equalIndicator/v1": "f9b9d9e0ca7772dcc41beb260bf19612142411a7ba19ca5f74e1bbb0e252bbe2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4910, + "startColumn": 29, + "charOffset": 146620, + "charLength": 10, + "snippet": { + "text": "soulChange" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4908, + "startColumn": 1, + "charOffset": 146521, + "charLength": 265, + "snippet": { + "text": "void Player::changeSoul(int32_t soulChange) {\r\n\tif (soulChange > 0) {\r\n\t\tsoul += std::min(soulChange * g_configManager().getFloat(RATE_SOUL_REGEN, __FUNCTION__), vocation->getSoulMax() - soul);\r\n\t} else {\r\n\t\tsoul = std::max(0, soul + soulChange);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62231767ac5348d7", + "equalIndicator/v1": "f9fbe356a8ef25a69a844b84cdd03f3b679c8e17674d99e7cf25d1da5e2333ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 581, + "startColumn": 104, + "charOffset": 27641, + "charLength": 14, + "snippet": { + "text": "valueAttribute" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 579, + "startColumn": 1, + "charOffset": 27409, + "charLength": 435, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentenergy\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentfire\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1ffe3ae11ba0388", + "equalIndicator/v1": "fa0433b6494a084c7b0c8f2a51f423e7f5cc1daa57271247fc1c948e168f34a8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3174, + "startColumn": 64, + "charOffset": 118278, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3172, + "startColumn": 1, + "charOffset": 118210, + "charLength": 145, + "snippet": { + "text": "}\r\n\r\nObjectCategory_t Game::getObjectCategory(std::shared_ptr item) {\r\n\tObjectCategory_t category = OBJECTCATEGORY_DEFAULT;\r\n\tif (!item) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1cf3a0f37473ee1a", + "equalIndicator/v1": "fa0b34eaa96ae6f3fb6ce2f4b06c0d1227773da34ce76dd102f6da867ea245c5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #4 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #4 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 351, + "startColumn": 16, + "charOffset": 9513, + "charLength": 16, + "snippet": { + "text": "onRemoveTileItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 349, + "startColumn": 1, + "charOffset": 9493, + "charLength": 173, + "snippet": { + "text": "}\r\n\r\nvoid Creature::onRemoveTileItem(std::shared_ptr updateTile, const Position &pos, const ItemType &iType, std::shared_ptr) {\r\n\tif (!isMapLoaded) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "25996123a270dfbc", + "equalIndicator/v1": "fa0c9dfcd753696cf576fa616272d6ee3a9a6280d6ae2f342aa18d72ebc14272" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2132, + "startColumn": 52, + "charOffset": 62796, + "charLength": 4, + "snippet": { + "text": "task" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2130, + "startColumn": 1, + "charOffset": 62740, + "charLength": 136, + "snippet": { + "text": "}\r\n\r\nvoid Player::setNextWalkTask(std::shared_ptr task) {\r\n\tif (nextStepEvent != 0) {\r\n\t\tg_dispatcher().stopEvent(nextStepEvent);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c124241a66ac389e", + "equalIndicator/v1": "fa18b6d3d2e0e072cc58cd11704ac845beb2b88b5142e9804511f8fdc6dd0095" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #3 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #3 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 339, + "startColumn": 109, + "charOffset": 9183, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 337, + "startColumn": 1, + "charOffset": 9070, + "charLength": 223, + "snippet": { + "text": "}\r\n\r\nvoid Creature::onUpdateTileItem(std::shared_ptr updateTile, const Position &pos, std::shared_ptr, const ItemType &oldType, std::shared_ptr, const ItemType &newType) {\r\n\tif (!isMapLoaded) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1d584352e3b1f46f", + "equalIndicator/v1": "fa1a7790bbf5ed1bd261ea17a5e747d416e9be118accb68415df2d9e331ef722" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 167, + "startColumn": 80, + "charOffset": 5125, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 165, + "startColumn": 1, + "charOffset": 5041, + "charLength": 194, + "snippet": { + "text": "}\r\n\r\nbool Weapon::useFist(std::shared_ptr player, std::shared_ptr target) {\r\n\tif (!Position::areInRange<1, 1>(player->getPosition(), target->getPosition())) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b8b8ed2b29b82aac", + "equalIndicator/v1": "fa1e4c0f255772dd08f8bc3907b4a08a4c392ff5c9c313b4b89db0755cca4a19" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Std::move of the variable 'newTargetPos' of the trivially-copyable type 'Position' has no effect; remove std::move()", + "markdown": "Std::move of the variable 'newTargetPos' of the trivially-copyable type 'Position' has no effect; remove std::move()" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 43, + "startColumn": 13, + "charOffset": 1432, + "charLength": 9, + "snippet": { + "text": "std::move" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 41, + "startColumn": 1, + "charOffset": 1348, + "charLength": 242, + "snippet": { + "text": "public:\r\n\texplicit FrozenPathingConditionCall(Position newTargetPos) :\r\n\t\ttargetPos(std::move(newTargetPos)) { }\r\n\r\n\tbool operator()(const Position &startPos, const Position &testPos, const FindPathParams &fpp, int32_t &bestMatchDist) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b46ce5c0085f19c1", + "equalIndicator/v1": "fa2dc86c0aa412fe2560544493ce4b64c544c963d55d75c7d0f8e3aa91cd1cdd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'time_t' (aka 'long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'time_t' (aka 'long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1740, + "startColumn": 36, + "charOffset": 51827, + "charLength": 4, + "snippet": { + "text": "time" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1738, + "startColumn": 1, + "charOffset": 51656, + "charLength": 250, + "snippet": { + "text": "\t\tif (getLastLogout() != 0) {\r\n\t\t\t// Not counting more than 21 days to prevent overflow when multiplying with 1000 (for milliseconds).\r\n\t\t\tofflineTime = std::min(time(nullptr) - getLastLogout(), 86400 * 21);\r\n\t\t} else {\r\n\t\t\tofflineTime = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "37ace78b5bd56f9a", + "equalIndicator/v1": "fa5bccdb8798a8adb52624090521b962f3ed3e0e861d1d596e28e562ce49f466" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 179, + "startColumn": 22, + "charOffset": 7043, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 177, + "startColumn": 1, + "charOffset": 6961, + "charLength": 239, + "snippet": { + "text": "\tstatic std::shared_ptr virtualCylinder;\r\n\r\n\tvirtual ReturnValue queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr = nullptr) override {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "05ca809f11aa95c3", + "equalIndicator/v1": "fa6e8800c011bb9bacaca55729712e63fb6c25f378e62b06afe3996129e979f2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1091, + "startColumn": 60, + "charOffset": 45264, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1089, + "startColumn": 1, + "charOffset": 45200, + "charLength": 242, + "snippet": { + "text": "}\r\n\r\nbool Game::internalPlaceCreature(std::shared_ptr creature, const Position &pos, bool extendedPos /*=false*/, bool forced /*= false*/, bool creatureCheck /*= false*/) {\r\n\tif (creature->getParent() != nullptr) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2e70ee0e4ec949f", + "equalIndicator/v1": "fa7848e9828adbff2e6a5ea5bfd0d73933942b85ec3a904fd292272793c4d91a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1297, + "startColumn": 53, + "charOffset": 43232, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1295, + "startColumn": 1, + "charOffset": 43175, + "charLength": 247, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatMana(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tdoCombatMana(caster, target, caster ? caster->getPosition() : Position(), damage, params);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6bc0af5c5d3b3d9a", + "equalIndicator/v1": "fa7cf22e465d1d45821f1157d4c5e2db9181ad842c3cf1ad2ede4c65991799dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'party' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'party' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7908, + "startColumn": 76, + "charOffset": 248562, + "charLength": 5, + "snippet": { + "text": "party" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7906, + "startColumn": 1, + "charOffset": 248482, + "charLength": 165, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::updatePartyTrackerAnalyzer(const std::shared_ptr party) {\r\n\tif (oldProtocol || !player || !party || !party->getLeader()) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "171bd686e93db3ac", + "equalIndicator/v1": "fa7d13d811aee71cb50a03e246497881c17581529e042d06c2a72f29af34bd1d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 150, + "startColumn": 19, + "charOffset": 6030, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 148, + "startColumn": 1, + "charOffset": 5949, + "charLength": 152, + "snippet": { + "text": "\t * \\returns the amount of items of the asked item type\r\n\t */\r\n\tvirtual uint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const;\r\n\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d78af08df7f4f220", + "equalIndicator/v1": "fa8875fd16565f49b28cfea164394050e6a1beffe8cec959ed577964fb340d94" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not use 'compare' to test equality of strings; use the string equality operator instead", + "markdown": "Do not use 'compare' to test equality of strings; use the string equality operator instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2315, + "startColumn": 48, + "charOffset": 64378, + "charLength": 15, + "snippet": { + "text": "conditionOutfit" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2313, + "startColumn": 1, + "charOffset": 64217, + "charLength": 330, + "snippet": { + "text": "\r\n\t\tconst std::shared_ptr &conditionOutfit = addCondition->static_self_cast();\r\n\t\tif (!conditionOutfit->monsterName.empty() && conditionOutfit->monsterName.compare(monsterName) != 0) {\r\n\t\t\tconst auto monsterType = g_monsters().getMonsterType(conditionOutfit->monsterName);\r\n\t\t\tif (monsterType) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "802af88dbf594e3c", + "equalIndicator/v1": "faa32a73a27247902a99a6d409eb0ba8bf281dd8f0bd6ea5c8149ae36e358da8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 143, + "startColumn": 50, + "charOffset": 4411, + "charLength": 12, + "snippet": { + "text": "const double" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 141, + "startColumn": 1, + "charOffset": 4213, + "charLength": 290, + "snippet": { + "text": "\tvoid setCustomAttribute(const std::string &key, const int64_t value);\r\n\tvoid setCustomAttribute(const std::string &key, const std::string &value);\r\n\tvoid setCustomAttribute(const std::string &key, const double value);\r\n\tvoid setCustomAttribute(const std::string &key, const bool value);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0b1e91c84ac15b06", + "equalIndicator/v1": "fab45b19c9584886816991191311b0163247b1698714821aa0e5f31b08e50000" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2704, + "startColumn": 4, + "charOffset": 83425, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2702, + "startColumn": 1, + "charOffset": 83340, + "charLength": 213, + "snippet": { + "text": "\t\tuint16_t size = msg.get();\r\n\t\tfor (uint16_t i = 1; i <= size; i++) {\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint64_t price = msg.get();\r\n\t\t\tplayer->setItemCustomPrice(itemId, price);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f5ece12efcac857b", + "equalIndicator/v1": "fad39377d6b89a507e3eb87fe2891da5bb70371d020c1d0a3d846dd1493ddc64" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 479, + "startColumn": 102, + "charOffset": 13737, + "charLength": 5, + "snippet": { + "text": "house" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 477, + "startColumn": 1, + "charOffset": 13631, + "charLength": 252, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr HouseTransferItem::createHouseTransferItem(std::shared_ptr house) {\r\n\tstd::shared_ptr transferItem = std::make_shared(house);\r\n\ttransferItem->setID(ITEM_DOCUMENT_RO);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a216eb5e49bafb69", + "equalIndicator/v1": "fafbfbc78302e9946702e21f1140f88399336a5f79399e04b619c9ad9b042ce8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 935, + "startColumn": 51, + "charOffset": 28039, + "charLength": 5, + "snippet": { + "text": "thing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 933, + "startColumn": 1, + "charOffset": 27984, + "charLength": 139, + "snippet": { + "text": "}\r\n\r\nvoid Container::removeItem(std::shared_ptr thing, bool sendUpdateToClient /* = false*/) {\r\n\tif (thing == nullptr) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e8b63a247adc9178", + "equalIndicator/v1": "fb0326b71a595c7319638cb975eab4c042a21cfb8a4193c2a9e4904a7becd983" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3239, + "startColumn": 83, + "charOffset": 99273, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3237, + "startColumn": 1, + "charOffset": 99186, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::addCreatureIcon(NetworkMessage &msg, std::shared_ptr creature) {\r\n\tif (!creature || !player || oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "661bb71cb1195a8b", + "equalIndicator/v1": "fb0e3ebfd1759f2e598b87055ef306d3acdb6ad02117ebec8ff72bbe2cd2f5cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Ilist', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Ilist', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/arraylist.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 34, + "startColumn": 49, + "charOffset": 985, + "charLength": 6, + "snippet": { + "text": "_Ilist" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 930, + "charLength": 117, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tarraylist &operator=(std::initializer_list _Ilist) {\r\n\t\t\tbackContainer.assign(_Ilist);\r\n\t\t\treturn *this;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c14295f041c52e26", + "equalIndicator/v1": "fb1281d5c0891308d2d203e206c3fc593ba817c81196734d5e787350a9df7428" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 704, + "startColumn": 2, + "charOffset": 19401, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 702, + "startColumn": 1, + "charOffset": 19250, + "charLength": 323, + "snippet": { + "text": "\tConditionType_t conditionType = getNumber(L, 2);\r\n\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\r\n\tuint32_t subId = getNumber(L, 4, 0);\r\n\tconst std::shared_ptr condition = creature->getCondition(conditionType, conditionId, subId);\r\n\tif (condition) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7cbd9d2377eced67", + "equalIndicator/v1": "fb23e46f1b344f36bd378f578463a0f3f9249b3654329a907b78aa79c4154f19" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9255, + "startColumn": 46, + "charOffset": 323299, + "charLength": 10, + "snippet": { + "text": "totalPrice" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9253, + "startColumn": 1, + "charOffset": 323174, + "charLength": 313, + "snippet": { + "text": "\r\n\t\tsellerPlayer->setBankBalance(sellerPlayer->getBankBalance() + totalPrice);\r\n\t\tg_metrics().addCounter(\"balance_increase\", totalPrice, { { \"player\", sellerPlayer->getName() }, { \"context\", \"market_sale\" } });\r\n\t\tif (it.id == ITEM_STORE_COIN) {\r\n\t\t\tconst auto &tranferable = enumToValue(CoinType::Transferable);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d0e000cdf44c24b9", + "equalIndicator/v1": "fb3b1caddbff1327843ed81b48984db958bc92bd89080d2c9766ce4aed7a4a8e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2576, + "startColumn": 28, + "charOffset": 76948, + "charLength": 5, + "snippet": { + "text": "count" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2574, + "startColumn": 1, + "charOffset": 76915, + "charLength": 116, + "snippet": { + "text": "\t}\r\n\r\n\tdouble_t result = round(((count * 100.) / nextLevelCount) * 100.) / 100.;\r\n\tif (result > 100) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4c2b6f32ca004161", + "equalIndicator/v1": "fb8710e1397a54cb3f9f04fd174414a0aceb097cfc2556407da71b5e0b8b973e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'hasImbuementType' can be made const", + "markdown": "Method 'hasImbuementType' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 694, + "startColumn": 7, + "charOffset": 19972, + "charLength": 16, + "snippet": { + "text": "hasImbuementType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 692, + "startColumn": 1, + "charOffset": 19916, + "charLength": 237, + "snippet": { + "text": "\t\treturn setImbuement(slot, imbuementId, 0);\r\n\t}\r\n\tbool hasImbuementType(ImbuementTypes_t imbuementType, uint16_t imbuementTier) {\r\n\t\tauto it = items[id].imbuementTypes.find(imbuementType);\r\n\t\tif (it != items[id].imbuementTypes.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "703f55fe09c41955", + "equalIndicator/v1": "fb9036614ab1a2a60b17020e47567e5aa4aa75389a71d11a1eeba685ddb5bb27" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')", + "markdown": "Narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 201, + "startColumn": 34, + "charOffset": 8046, + "charLength": 50, + "snippet": { + "text": "(std::floor(100. - imbuementAbsorbPercent) / 100.)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 199, + "startColumn": 1, + "charOffset": 7816, + "charLength": 297, + "snippet": { + "text": "\t\t\t\t\t\tg_logger().debug(\"[cyclopedia damage reduction] imbued item {}, reduced {} percent, for element {}\", item->getName(), imbuementAbsorbPercent, combatTypeToName(indexToCombatType(combat)));\r\n\r\n\t\t\t\t\t\tdamageModifiers[combat] *= (std::floor(100. - imbuementAbsorbPercent) / 100.);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2acebe8fc7a6b7c7", + "equalIndicator/v1": "fb95cd9089e0713102ca8e6eb4e32f2d223c10182c7b901dc4fdacf615da25fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2365, + "startColumn": 54, + "charOffset": 69634, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2363, + "startColumn": 1, + "charOffset": 69576, + "charLength": 228, + "snippet": { + "text": "}\r\n\r\nvoid Player::addExperience(std::shared_ptr target, uint64_t exp, bool sendText /* = false*/) {\r\n\tuint64_t currLevelExp = Player::getExpForLevel(level);\r\n\tuint64_t nextLevelExp = Player::getExpForLevel(level + 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "556b260a6ccd9364", + "equalIndicator/v1": "fba4d0d3fa7775c272f1a64361b454f3b67e49d55184f86748065e2d78419e0b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", + "markdown": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10082, + "startColumn": 32, + "charOffset": 350963, + "charLength": 9, + "snippet": { + "text": "std::atoi" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10080, + "startColumn": 1, + "charOffset": 350791, + "charLength": 319, + "snippet": { + "text": "\t// Get interval time to fiendish\r\n\tstd::string saveIntervalType = g_configManager().getString(FORGE_FIENDISH_INTERVAL_TYPE, __FUNCTION__);\r\n\tauto saveIntervalConfigTime = std::atoi(g_configManager().getString(FORGE_FIENDISH_INTERVAL_TIME, __FUNCTION__).c_str());\r\n\tint intervalTime = 0;\r\n\ttime_t timeToChangeFiendish;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c92c2c24856a6bc7", + "equalIndicator/v1": "fbb732660ae23471da5da0999580e57e20b04704859a9edcf89dee15e3fc8091" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'callback' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'callback' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/events_callbacks.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 31, + "startColumn": 72, + "charOffset": 1014, + "charLength": 8, + "snippet": { + "text": "callback" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 29, + "startColumn": 1, + "charOffset": 938, + "charLength": 126, + "snippet": { + "text": "}\r\n\r\nvoid EventsCallbacks::addCallback(const std::shared_ptr callback) {\r\n\tm_callbacks.push_back(callback);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "72b7911f68ae2d21", + "equalIndicator/v1": "fbe3d1fa65988ebf65fdcf696776a08fe8655b088b67906e360c56473b62f9f0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 54, + "charOffset": 884, + "charLength": 6, + "snippet": { + "text": "params" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 802, + "charLength": 97, + "snippet": { + "text": "\r\n\tbool persistLuaState() {\r\n\t\treturn params > 0 && scriptInterface->callFunction(params);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62ea56e7b107ac6e", + "equalIndicator/v1": "fbe610fc5f8f50b225f3c28fd99b6365ef6254bf7786aa7414011ae776b94c6e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 796, + "startColumn": 29, + "charOffset": 23768, + "charLength": 8, + "snippet": { + "text": "interval" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 794, + "startColumn": 1, + "charOffset": 23701, + "charLength": 147, + "snippet": { + "text": "\r\n\tif (challengeMeleeDuration != 0) {\r\n\t\tchallengeMeleeDuration -= interval;\r\n\t\tif (challengeMeleeDuration <= 0) {\r\n\t\t\tchallengeMeleeDuration = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fe8aa7d004c7498a", + "equalIndicator/v1": "fbef7e0e0704cc74b3d46e2284d1155c59b9879c38da0c72dbaeb957ec0f672b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 987, + "startColumn": 63, + "charOffset": 35609, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 985, + "startColumn": 1, + "charOffset": 35542, + "charLength": 263, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) {\r\n\t// Player:onTradeAccept(target, item, targetItem)\r\n\tif (info.playerOnTradeAccept == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ec9728a0206466c7", + "equalIndicator/v1": "fc0a3b51ed9a35555647ef0ecf7b7cad83303a19a8c564154fb89c2d0ea97540" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creatureEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'creatureEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 43, + "startColumn": 17, + "charOffset": 1077, + "charLength": 36, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 41, + "startColumn": 1, + "charOffset": 1038, + "charLength": 109, + "snippet": { + "text": "\r\n\tvoid clearEvent();\r\n\tvoid copyEvent(const std::shared_ptr creatureEvent);\r\n\r\n\t// scripting\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "11cf9cc01962d0c0", + "equalIndicator/v1": "fc0bd8ee395ea2d1f9fd0a06946d0c5cf5d0745df716a08ac9350a60a2191fa4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1053, + "startColumn": 47, + "charOffset": 40101, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1051, + "startColumn": 1, + "charOffset": 40000, + "charLength": 167, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, monster);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "947caad6c801224e", + "equalIndicator/v1": "fc2282e09a6d82fd7dd2132e3c16b3756160dbe16d746fc4197e585e1489db61" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3151, + "startColumn": 58, + "charOffset": 111049, + "charLength": 25, + "snippet": { + "text": "wheelGemBasicSlot2Allowed" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3149, + "startColumn": 1, + "charOffset": 110910, + "charLength": 202, + "snippet": { + "text": "\tWheelGemBasicModifier_t modifier = modifier1;\r\n\twhile (modifier == modifier1) {\r\n\t\tmodifier = wheelGemBasicSlot2Allowed[uniform_random(0, wheelGemBasicSlot2Allowed.size() - 1)];\r\n\t}\r\n\treturn modifier;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ce9928d408514f17", + "equalIndicator/v1": "fc359bc154afcba151aec0b9d0cfa4b156b1cf410dcdbf31256840d75d8e5d93" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1824, + "startColumn": 3, + "charOffset": 55305, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1822, + "startColumn": 1, + "charOffset": 55202, + "charLength": 351, + "snippet": { + "text": "\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tPosition pos = msg.getPosition();\r\n\t\tuint16_t itemId = msg.get();\r\n\t\tuint8_t stackpos = msg.getByte();\r\n\t\tg_logger().debug(\"[{}] action {}, category {}, pos {}, itemId {}, stackPos {}\", __FUNCTION__, action, static_cast(category), pos.toString(), itemId, stackpos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a0be7b5be0329ae1", + "equalIndicator/v1": "fc3e8db31f7bcc67eecf2623fa1a66700fe06948d05185b6b428df3ed2876e59" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 672, + "startColumn": 62, + "charOffset": 23951, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 670, + "startColumn": 1, + "charOffset": 23885, + "charLength": 244, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnLookInShop(std::shared_ptr player, const ItemType* itemType, uint8_t count) {\r\n\t// Player:onLookInShop(itemType, count) or Player.onLookInShop(self, itemType, count)\r\n\tif (info.playerOnLookInShop == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "20e92fc51a412f30", + "equalIndicator/v1": "fc5f9917617062fce4263a08d216a152adf1ac1a39d596304641f69ef4782248" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2847, + "startColumn": 20, + "charOffset": 85194, + "charLength": 23, + "snippet": { + "text": "Player::getPercentLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2845, + "startColumn": 1, + "charOffset": 85073, + "charLength": 238, + "snippet": { + "text": "\t\t\tuint64_t nextLevelExp = Player::getExpForLevel(level + 1);\r\n\t\t\tif (nextLevelExp > currLevelExp) {\r\n\t\t\t\tlevelPercent = Player::getPercentLevel(experience - currLevelExp, nextLevelExp - currLevelExp);\r\n\t\t\t} else {\r\n\t\t\t\tlevelPercent = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b3e8a6a9f94c0eb8", + "equalIndicator/v1": "fc64c6315ecbbf2cff96f7ead645438e1ae1a57ffadeddb8b289e4bd5ba3bd0f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::basic_string::size_type'", + "markdown": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::basic_string::size_type'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 207, + "startColumn": 22, + "charOffset": 5084, + "charLength": 1, + "snippet": { + "text": "i" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 205, + "startColumn": 1, + "charOffset": 4982, + "charLength": 177, + "snippet": { + "text": "\t// hmac key pad generation\r\n\tstd::string iKeyPad(64, 0x36), oKeyPad(64, 0x5C);\r\n\tfor (uint8_t i = 0; i < key.length(); ++i) {\r\n\t\tiKeyPad[i] ^= key[i];\r\n\t\toKeyPad[i] ^= key[i];\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82fe6bceb042ed5a", + "equalIndicator/v1": "fc8008ac8b028b2fc823d3d095aefa5b7d9d8f840a7cbc87b81933200e7675b0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 109, + "startColumn": 15, + "charOffset": 4469, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 107, + "startColumn": 1, + "charOffset": 4382, + "charLength": 236, + "snippet": { + "text": "\t * \\param link holds the relation the object has to the cylinder\r\n\t */\r\n\tvirtual void postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) = 0;\r\n\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "861a6b09a3337af5", + "equalIndicator/v1": "fc8ea8160699819801e2f102fc5c8d9be11d88eccecc6c1c8bef6ad285eded45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 633, + "startColumn": 58, + "charOffset": 19661, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 631, + "startColumn": 1, + "charOffset": 19599, + "charLength": 210, + "snippet": { + "text": "}\r\n\r\nvoid Spell::getCombatDataAugment(std::shared_ptr player, CombatDamage &damage) {\r\n\tif (!(damage.instantSpellName).empty()) {\r\n\t\tconst auto equippedAugmentItems = player->getEquippedAugmentItems();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "17cc2e9585e3253f", + "equalIndicator/v1": "fc953feb3b1046cc6acd69cfc280639a935bc495038c7cbf1bc2e587553debe4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 680, + "startColumn": 65, + "charOffset": 18601, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 678, + "startColumn": 1, + "charOffset": 18532, + "charLength": 162, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updateBuffs(std::shared_ptr creature) {\r\n\tbool needUpdate = false;\r\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d2c960aa981d3ccf", + "equalIndicator/v1": "fce2a562ed6897565bd8f04304a77c804f378a7caaa7106b763a201a7c8a89db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'hasCharmExpansion' can be made const", + "markdown": "Method 'hasCharmExpansion' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1943, + "startColumn": 7, + "charOffset": 57376, + "charLength": 17, + "snippet": { + "text": "hasCharmExpansion" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1941, + "startColumn": 1, + "charOffset": 57341, + "charLength": 87, + "snippet": { + "text": "\t\tcharmPoints = points;\r\n\t}\r\n\tbool hasCharmExpansion() {\r\n\t\treturn charmExpansion;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6b148f9f78734ac2", + "equalIndicator/v1": "fcf38c3a9345b2005bdea4503d502b9c14489c28d15b4aeda83fe90968219e28" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 36, + "startColumn": 18, + "charOffset": 1053, + "charLength": 12, + "snippet": { + "text": "ValueWrapper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 34, + "startColumn": 1, + "charOffset": 978, + "charLength": 290, + "snippet": { + "text": "public:\r\n\texplicit ValueWrapper(uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const ValueVariant &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const std::string &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(bool value, uint64_t timestamp = 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9382eb905ad3f89d", + "equalIndicator/v1": "fd077f1a11ef56513a984fefc8a96685cd05a215fa10530640cf16051ad4865e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 584, + "startColumn": 41, + "charOffset": 22372, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 582, + "startColumn": 1, + "charOffset": 22326, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dffcd8168b9b4295", + "equalIndicator/v1": "fd12e632dd37d2019a7cfd5fa00f066513b46cd60e362d7f11e15e9d088d3f8b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 778, + "startColumn": 27, + "charOffset": 24657, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 776, + "startColumn": 1, + "charOffset": 24625, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "529714da03de7e7e", + "equalIndicator/v1": "fd19da8910a2e6b0dd7ee6298c202564b268978f6792632fffe20ce7eb6aa518" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6601, + "startColumn": 62, + "charOffset": 207050, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6599, + "startColumn": 1, + "charOffset": 206984, + "charLength": 164, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendAddCreature(std::shared_ptr creature, const Position &pos, int32_t stackpos, bool isLogin) {\r\n\tif (!canSee(pos)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "00220d92c46bd70b", + "equalIndicator/v1": "fd300cba6f2b62cbab287a1745092a3a6a038905382199c04a164ab841353a7d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7720, + "startColumn": 4, + "charOffset": 241990, + "charLength": 8, + "snippet": { + "text": "skills_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7718, + "startColumn": 1, + "charOffset": 241906, + "charLength": 289, + "snippet": { + "text": "\tif (oldProtocol) {\r\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; ++i) {\r\n\t\t\tskills_t skill = static_cast(i);\r\n\t\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\r\n\t\t\tmsg.add(player->getBaseSkill(skill));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ac47d1411270c5ca", + "equalIndicator/v1": "fd37b3fa4fa81aacf53140ed2e644c4b97e87f5a074ca443850b7aa972d8d316" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getDelay' can be made const", + "markdown": "Method 'getDelay' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 45, + "startColumn": 10, + "charOffset": 1142, + "charLength": 8, + "snippet": { + "text": "getDelay" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 43, + "startColumn": 1, + "charOffset": 1127, + "charLength": 49, + "snippet": { + "text": "\t}\r\n\r\n\tint16_t getDelay() {\r\n\t\treturn delay;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8660219ff38c66da", + "equalIndicator/v1": "fd43a0fb7ef158e563ea6e0c0b0684e0ba37e7f5ef77b2029e3f533a97b94f4b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 537, + "startColumn": 8, + "charOffset": 13292, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 535, + "startColumn": 1, + "charOffset": 13184, + "charLength": 227, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetRequiredLevel(lua_State* L) {\r\n\t// itemType:getRequiredLevel()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->minReqLevel);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "73a88f36eaa5749a", + "equalIndicator/v1": "fd5be17e15a348c689218470b94055aa2d767a12bdbaaadebdfff7dead8b0583" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 25, + "startColumn": 7, + "charOffset": 836, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 23, + "startColumn": 1, + "charOffset": 671, + "charLength": 463, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4dad444e688dfca5", + "equalIndicator/v1": "fda419b1bd949da687893d4a93b52a4bfb61d5a5ba622369e974ce750513d94c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Std::move of the variable 'pos' of the trivially-copyable type 'Position' has no effect; remove std::move()", + "markdown": "Std::move of the variable 'pos' of the trivially-copyable type 'Position' has no effect; remove std::move()" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 35, + "startColumn": 13, + "charOffset": 1012, + "charLength": 9, + "snippet": { + "text": "std::move" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 33, + "startColumn": 1, + "charOffset": 962, + "charLength": 72, + "snippet": { + "text": "\t}\r\n\tvoid setDestPos(Position pos) {\r\n\t\tdestPos = std::move(pos);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "46a790406cd33f10", + "equalIndicator/v1": "fdb5738557b13cad17ea980527df2e3526622aa9c31e8c51a54c131602e2b265" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 454, + "startColumn": 62, + "charOffset": 18228, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 452, + "startColumn": 1, + "charOffset": 18162, + "charLength": 177, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerItem(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3b24c185b123f9d5", + "equalIndicator/v1": "fdb74f39ca1bd439054ce03b5e5f8a4506e94a99571efc7648352baccf0ccf59" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 44, + "startColumn": 22, + "charOffset": 1712, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 42, + "startColumn": 1, + "charOffset": 1654, + "charLength": 161, + "snippet": { + "text": "\r\n\tauto parameters = lua_gettop(L);\r\n\tif (parameters > 4) {\r\n\t\t// subtype already supplied, count then is the amount\r\n\t\titemCount = std::max(1, count);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fb74a5e5ad2976b8", + "equalIndicator/v1": "fdc28a526325a933c9628527f843bd320034b831720b7ec3bdb2db8fe79c7daf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 100, + "startColumn": 6, + "charOffset": 3374, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 98, + "startColumn": 1, + "charOffset": 3340, + "charLength": 208, + "snippet": { + "text": "\r\n\tReturnValue returnValue;\r\n\tif (getScriptInterface()->protectedCall(L, 3, 1) != 0) {\r\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "741bb00463bcd403", + "equalIndicator/v1": "fe27a6a0a3c9ba1f110b2077ce11bdf1b50a2422b6d43870151cf47a80cd78fd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9797, + "startColumn": 48, + "charOffset": 342887, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9795, + "startColumn": 1, + "charOffset": 342835, + "charLength": 106, + "snippet": { + "text": "}\r\n\r\nvoid Game::addMonster(std::shared_ptr monster) {\r\n\tmonsters[monster->getID()] = monster;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6e248f82c476ac4a", + "equalIndicator/v1": "fe3bfa9c32de317f0db8012664f1d85e398f8a6396655a9787689f1c13e0bff6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 116, + "startColumn": 64, + "charOffset": 3753, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 114, + "startColumn": 1, + "charOffset": 3685, + "charLength": 182, + "snippet": { + "text": "}\r\n\r\nstd::size_t WaitingList::getClientSlot(std::shared_ptr player) {\r\n\tauto it = info->playerReferences.find(player->getGUID());\r\n\tif (it == info->playerReferences.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "241fd88ae86a17e8", + "equalIndicator/v1": "fe476c50f60c6bb98b001eb6ebda951125fe9bfb1d1a1651d42cc436cdd7c2a0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5175, + "startColumn": 50, + "charOffset": 152748, + "charLength": 8, + "snippet": { + "text": "attacked" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5173, + "startColumn": 1, + "charOffset": 152694, + "charLength": 165, + "snippet": { + "text": "}\r\n\r\nvoid Player::addAttacked(std::shared_ptr attacked) {\r\n\tif (hasFlag(PlayerFlags_t::NotGainInFight) || !attacked || attacked == getPlayer()) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "932d1293fdb2b7d9", + "equalIndicator/v1": "fe48d706fe3e97b83b6059bbbcb65629e7ab14162aebbe9bb4655e0a4c1ba3b3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 167, + "startColumn": 7, + "charOffset": 4554, + "charLength": 9, + "snippet": { + "text": "isRemoved" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 165, + "startColumn": 1, + "charOffset": 4513, + "charLength": 103, + "snippet": { + "text": "\t\treturn getWalkDelay() <= 0;\r\n\t}\r\n\tbool isRemoved() override final {\r\n\t\treturn isInternalRemoved;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1a6f61aef85803b6", + "equalIndicator/v1": "fe4d8938cc401c31ca18ebb268772a8d464641878596228f287657859636b543" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 234, + "startColumn": 7, + "charOffset": 7382, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 232, + "startColumn": 1, + "charOffset": 7304, + "charLength": 394, + "snippet": { + "text": "\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b32275e5108f38fd", + "equalIndicator/v1": "fe55bc9b756bf2f8e1dc27003a55689835287fa3a1cdb6e09e412bb5f1318247" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2397, + "startColumn": 11, + "charOffset": 70994, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2395, + "startColumn": 1, + "charOffset": 70856, + "charLength": 264, + "snippet": { + "text": "\tbool handleHazardExperience = monster && monster->getHazard() && getHazardSystemPoints() > 0;\r\n\tif (handleHazardExperience) {\r\n\t\texp += (exp * (1.75 * getHazardSystemPoints() * g_configManager().getFloat(HAZARD_EXP_BONUS_MULTIPLIER, __FUNCTION__))) / 100.;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef3f836cd3a8fb34", + "equalIndicator/v1": "fe5e812e5ce499ba35395abe67fdbfebc73f24d81ff95ad2d85fb7b24fd3f23b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'corpse' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'corpse' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1890, + "startColumn": 34, + "charOffset": 56096, + "charLength": 6, + "snippet": { + "text": "corpse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1888, + "startColumn": 1, + "charOffset": 55916, + "charLength": 239, + "snippet": { + "text": "\tbool updateKillTracker(std::shared_ptr corpse, const std::string &playerName, const Outfit_t creatureOutfit) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendKillTrackerUpdate(corpse, playerName, creatureOutfit);\r\n\t\t\treturn true;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "522d45789685e98b", + "equalIndicator/v1": "fe7060497841a72a203189e97d1b263512f8781e43b15772aed983aebe958a87" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 813, + "startColumn": 41, + "charOffset": 31210, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 811, + "startColumn": 1, + "charOffset": 31164, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7568f60ed8bd87a1", + "equalIndicator/v1": "fe91dcad3464def3b5a75d473661627bddbd1111b01df44ebcf549983cd290e5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 488, + "startColumn": 61, + "charOffset": 14532, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 486, + "startColumn": 1, + "charOffset": 14467, + "charLength": 147, + "snippet": { + "text": "}\r\n\r\nbool Spell::playerInstantSpellCheck(std::shared_ptr player, const Position &toPos) const {\r\n\tif (toPos.x == 0xFFFF) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "be410f4c19a92b7a", + "equalIndicator/v1": "fe98d3d92e5abc49399d5ab1f07814b22956aee110078f066c9c4502d8194616" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 713, + "startColumn": 37, + "charOffset": 23164, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 711, + "startColumn": 1, + "charOffset": 23102, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 30) * 3.20f) + 4;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c2bf1f80cc81659", + "equalIndicator/v1": "fea6d385988ca4b84d7b6b51dffd2453733667253756a87f948d9b00cd51b3d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'autoCreate' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'autoCreate' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 798, + "startColumn": 61, + "charOffset": 21604, + "charLength": 10, + "snippet": { + "text": "const bool" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 796, + "startColumn": 1, + "charOffset": 21504, + "charLength": 224, + "snippet": { + "text": "\tvoid removeConditionSuppressions();\r\n\r\n\tstd::shared_ptr getReward(const uint64_t rewardId, const bool autoCreate);\r\n\tvoid removeReward(uint64_t rewardId);\r\n\tvoid getRewardList(std::vector &rewards) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e8c6886d807d86f6", + "equalIndicator/v1": "feb09cf7314b855e5ebb6394571eb9898d2100162520341feec992e153b6bf5a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Return type 'const WeaponShared_ptr' (aka 'const shared_ptr') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness", + "markdown": "Return type 'const WeaponShared_ptr' (aka 'const shared_ptr') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 1, + "charOffset": 649, + "charLength": 22, + "snippet": { + "text": "const WeaponShared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 615, + "charLength": 146, + "snippet": { + "text": "Weapons::~Weapons() = default;\r\n\r\nconst WeaponShared_ptr Weapons::getWeapon(std::shared_ptr item) const {\r\n\tif (!item) {\r\n\t\treturn nullptr;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1004a1f3daa0b5a1", + "equalIndicator/v1": "fec0a8a88c9cb77bcb282c4bcdae1193e49c84e210080e25dd568057fd0c4ecc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1606, + "startColumn": 51, + "charOffset": 63139, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1604, + "startColumn": 1, + "charOffset": 63084, + "charLength": 314, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerMoveItem(std::shared_ptr player, const Position &fromPos, uint16_t itemId, uint8_t fromStackPos, const Position &toPos, uint8_t count, std::shared_ptr item, std::shared_ptr toCylinder) {\r\n\tif (!player->canDoAction()) {\r\n\t\tuint32_t delay = player->getNextActionTime();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab1cfe111026f07e", + "equalIndicator/v1": "fec598d40f8c19405d71273579612c081656291cee983e88515c5c905b66a32c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tradeItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tradeItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4899, + "startColumn": 123, + "charOffset": 175224, + "charLength": 9, + "snippet": { + "text": "tradeItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4897, + "startColumn": 1, + "charOffset": 175097, + "charLength": 332, + "snippet": { + "text": "}\r\n\r\nbool Game::internalStartTrade(std::shared_ptr player, std::shared_ptr tradePartner, std::shared_ptr tradeItem) {\r\n\tif (player->tradeState != TRADE_NONE && !(player->tradeState == TRADE_ACKNOWLEDGE && player->tradePartner == tradePartner)) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREALREADYTRADING);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c149dc01ba37f0f5", + "equalIndicator/v1": "fec9a9d1f9115a7ed968063d1d58b3ea83ba111884cddd7c01b29092dd83d99c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 89, + "startColumn": 44, + "charOffset": 3007, + "charLength": 10, + "snippet": { + "text": "itemInsede" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 87, + "startColumn": 1, + "charOffset": 2849, + "charLength": 195, + "snippet": { + "text": "\t\t\tif (auto itemInsede = createItem(BasicItemInside, position)) {\r\n\t\t\t\titem->getContainer()->addItem(itemInsede);\r\n\t\t\t\titem->getContainer()->updateItemWeight(itemInsede->getWeight());\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ccb34cbf0b62f40", + "equalIndicator/v1": "fece863dacce43aec9d18f05d8b03b5148d63ae4449055df84330397156dff8d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6794, + "startColumn": 116, + "charOffset": 234858, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6792, + "startColumn": 1, + "charOffset": 234715, + "charLength": 263, + "snippet": { + "text": "\r\n// Hazard combat helpers\r\nvoid Game::handleHazardSystemAttack(CombatDamage &damage, std::shared_ptr player, std::shared_ptr monster, bool isPlayerAttacker) {\r\n\tif (damage.primary.value != 0 && monster->getHazard()) {\r\n\t\tif (isPlayerAttacker) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1af761f9197748a5", + "equalIndicator/v1": "fed05e1afb1af7a0f9ad4ef7915b454b004e1a83941960cc8c34dd8cacd885df" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 633, + "startColumn": 15, + "charOffset": 18150, + "charLength": 12, + "snippet": { + "text": "onTradeEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 631, + "startColumn": 1, + "charOffset": 18104, + "charLength": 137, + "snippet": { + "text": "\t}\r\n\tvirtual void onRemoved();\r\n\tvirtual void onTradeEvent(TradeEvents_t, std::shared_ptr) { }\r\n\r\n\tvirtual void startDecaying();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75fcce6de7279f6e", + "equalIndicator/v1": "fefe60e79ba4e9525fe356f402a7b738d8e2ca3ab541c43d7059bb3690a4a7ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 243, + "startColumn": 18, + "charOffset": 8437, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 241, + "startColumn": 1, + "charOffset": 8336, + "charLength": 175, + "snippet": { + "text": "\t\t\t\t\t\t\tint32_t chance = 100;\r\n\t\t\t\t\t\t\tif ((attr = childNode.attribute(\"chance\"))) {\r\n\t\t\t\t\t\t\t\tchance = std::min(10000, pugi::cast(attr.value()));\r\n\t\t\t\t\t\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7d8ef3c9b42d3482", + "equalIndicator/v1": "ff040bcf69b318d773a3e26a40416549a2d5014984b3994dca6484e4806bd1c7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1053, + "startColumn": 20, + "charOffset": 38026, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1051, + "startColumn": 1, + "charOffset": 38001, + "charLength": 62, + "snippet": { + "text": "\t}\r\n\r\n\tlua_pushnumber(L, exp);\r\n\tlua_pushnumber(L, rawExp);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d45c94c9adf0b833", + "equalIndicator/v1": "ff06e0cdd891f8127babec48dce001da7c6b65e358307bd5e3952335722bfb8b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 457, + "startColumn": 82, + "charOffset": 13627, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 455, + "startColumn": 1, + "charOffset": 13541, + "charLength": 123, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::StepOutField(std::shared_ptr, std::shared_ptr, const Position &) {\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "286bce640bf055b5", + "equalIndicator/v1": "ff22f5307d2b5e1136eb2663b3bedd074d7fd633db5eed242eb38ceff67e1f19" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 415, + "startColumn": 108, + "charOffset": 12216, + "charLength": 7, + "snippet": { + "text": "newItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 413, + "startColumn": 1, + "charOffset": 12104, + "charLength": 206, + "snippet": { + "text": "}\r\n\r\nvoid Container::onUpdateContainerItem(uint32_t index, std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tauto spectators = Spectators().find(getPosition(), false, 2, 2, 2, 2);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2a55aa736a0d3cc5", + "equalIndicator/v1": "ff329532afb04900f6b765d6438748dc7429e07f7ed5229c48ca732f34a51d5c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 11, + "charOffset": 1336, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1259, + "charLength": 272, + "snippet": { + "text": "\tcurrentOutfit = mType->info.outfit;\r\n\tskull = mType->info.skull;\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c80fa09f90f8ae34", + "equalIndicator/v1": "ff5d494ae04ebaf0e608f9f445e121c12b6095b1992581215aabea6b7114fced" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 657, + "startColumn": 79, + "charOffset": 20911, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 655, + "startColumn": 1, + "charOffset": 20827, + "charLength": 225, + "snippet": { + "text": "};\r\n\r\nint32_t Spell::calculateAugmentSpellCooldownReduction(std::shared_ptr player) const {\r\n\tint32_t spellCooldown = 0;\r\n\tconst auto equippedAugmentItems = player->getEquippedAugmentItemsByType(Augment_t::Cooldown);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "20fe4806a352bb35", + "equalIndicator/v1": "ff6c27fe18f91684a88390c7e3538791a9412c18f921261b6670e557461e29da" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 70, + "startColumn": 35, + "charOffset": 2721, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 68, + "startColumn": 1, + "charOffset": 2590, + "charLength": 274, + "snippet": { + "text": "\tuint16_t getBestiaryRaceUnlocked(std::shared_ptr player, BestiaryType_t race) const;\r\n\r\n\tint32_t bitToggle(int32_t input, const std::shared_ptr charm, bool on) const;\r\n\r\n\tbool hasCharmUnlockedRuneBit(const std::shared_ptr charm, int32_t input) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "46c8362f05118d87", + "equalIndicator/v1": "ff78756d43f00c5e5d6b4a4a05f6f593b435c50f567b95313c2b7449450c96c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 72, + "startColumn": 10, + "charOffset": 1835, + "charLength": 16, + "snippet": { + "text": "gainHealthAmount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 70, + "startColumn": 1, + "charOffset": 1783, + "charLength": 138, + "snippet": { + "text": "\r\n\tuint32_t getHealthGainAmount() const {\r\n\t\treturn gainHealthAmount * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9deeba4c3fb7cac8", + "equalIndicator/v1": "ff7e77045d22c9781f5051e6825e1f6827c20bfdcbf493a8d68b460ddde41bc9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 261, + "startColumn": 56, + "charOffset": 8530, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 259, + "startColumn": 1, + "charOffset": 8470, + "charLength": 179, + "snippet": { + "text": "}\r\n\r\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr tile) const {\r\n\tif (isLoadedCallback()) {\r\n\t\tLuaVariant var;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0638a64f903bd842", + "equalIndicator/v1": "ffc4bcffea854c25a62945778882259f7253fe86dc566bac22dd3403e1b76637" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'addConditionSuppression' is not implemented", + "markdown": "Function 'addConditionSuppression' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3011, + "startColumn": 2, + "charOffset": 91040, + "charLength": 113, + "snippet": { + "text": "void addConditionSuppression(const std::array &addConditions);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3009, + "startColumn": 1, + "charOffset": 90951, + "charLength": 248, + "snippet": { + "text": "\r\n\tbool isSuppress(ConditionType_t conditionType, bool attackerPlayer) const override;\r\n\tvoid addConditionSuppression(const std::array &addConditions);\r\n\r\n\tuint16_t getLookCorpse() const override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f270df86e978570", + "equalIndicator/v1": "10f8f7e223f98cb78c4118e8e06f9f06faa6dfde20554d49cfd11b67ec654df7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'luaPlayerSendForgeError' is not implemented", + "markdown": "Function 'luaPlayerSendForgeError' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 667, + "startColumn": 2, + "charOffset": 36769, + "charLength": 49, + "snippet": { + "text": "static int luaPlayerSendForgeError(lua_State* L);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 665, + "startColumn": 1, + "charOffset": 36673, + "charLength": 199, + "snippet": { + "text": "\tstatic int luaPlayerOpenForge(lua_State* L);\r\n\tstatic int luaPlayerCloseForge(lua_State* L);\r\n\tstatic int luaPlayerSendForgeError(lua_State* L);\r\n\r\n\tstatic int luaPlayerAddForgeDusts(lua_State* L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d4fb45eb461032fa", + "equalIndicator/v1": "357f489d16c39045b8ca2bcebca5fb0f236f36b1a2d45f5fa6fdd8e088f07b52" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'playerMoveThingFromDepotSearch' is not implemented", + "markdown": "Function 'playerMoveThingFromDepotSearch' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 392, + "startColumn": 2, + "charOffset": 20304, + "charLength": 185, + "snippet": { + "text": "void playerMoveThingFromDepotSearch(std::shared_ptr player, uint16_t itemId, uint8_t tier, uint8_t count, const Position &fromPos, const Position &toPos, bool allItems = false);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 390, + "startColumn": 1, + "charOffset": 20108, + "charLength": 456, + "snippet": { + "text": "\tvoid playerRequestDepotSearchRetrieve(uint32_t playerId, uint16_t itemId, uint8_t tier, uint8_t type);\r\n\tvoid playerRequestOpenContainerFromDepotSearch(uint32_t playerId, const Position &pos);\r\n\tvoid playerMoveThingFromDepotSearch(std::shared_ptr player, uint16_t itemId, uint8_t tier, uint8_t count, const Position &fromPos, const Position &toPos, bool allItems = false);\r\n\r\n\tvoid playerRequestAddVip(uint32_t playerId, const std::string &name);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "48f0d3f3330da0db", + "equalIndicator/v1": "358f1745921c077cc1bb743de705a15026c999a89764a146d3c7e8f1e948de5d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'sendInventory' is not implemented", + "markdown": "Function 'sendInventory' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 508, + "startColumn": 2, + "charOffset": 21481, + "charLength": 21, + "snippet": { + "text": "void sendInventory();" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 506, + "startColumn": 1, + "charOffset": 21456, + "charLength": 119, + "snippet": { + "text": "\tbool isOTC = false;\r\n\r\n\tvoid sendInventory();\r\n\tvoid sendOpenStash();\r\n\tvoid parseStashWithdraw(NetworkMessage &msg);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "caa417ac6332b127", + "equalIndicator/v1": "3b7c355dc7ab8fba5e720bc3b86a93cb4d34e5818edec03d32e030cd02f19c29" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'addMagicEffect' is not implemented", + "markdown": "Function 'addMagicEffect' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 507, + "startColumn": 2, + "charOffset": 27409, + "charLength": 118, + "snippet": { + "text": "static void addMagicEffect(const std::vector> &players, const Position &pos, uint16_t effect);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 505, + "startColumn": 1, + "charOffset": 27283, + "charLength": 411, + "snippet": { + "text": "\tvoid addPlayerVocation(const std::shared_ptr target);\r\n\tvoid addMagicEffect(const Position &pos, uint16_t effect);\r\n\tstatic void addMagicEffect(const std::vector> &players, const Position &pos, uint16_t effect);\r\n\tstatic void addMagicEffect(const CreatureVector &spectators, const Position &pos, uint16_t effect);\r\n\tvoid removeMagicEffect(const Position &pos, uint16_t effect);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eec02da3543a8e48", + "equalIndicator/v1": "416603f82a0c34322e450928b424b11c1aa2197f735d3a685ea12e1ec31c5941" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'luaPlayerIsSupplyStashAvailable' is not implemented", + "markdown": "Function 'luaPlayerIsSupplyStashAvailable' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 521, + "startColumn": 2, + "charOffset": 30932, + "charLength": 57, + "snippet": { + "text": "static int luaPlayerIsSupplyStashAvailable(lua_State* L);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 519, + "startColumn": 1, + "charOffset": 30883, + "charLength": 207, + "snippet": { + "text": "\tstatic int luaPlayerSetGroup(lua_State* L);\r\n\r\n\tstatic int luaPlayerIsSupplyStashAvailable(lua_State* L);\r\n\tstatic int luaPlayerGetStashCounter(lua_State* L);\r\n\tstatic int luaPlayerOpenStash(lua_State* L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "02e4bae876dbac77", + "equalIndicator/v1": "4355dd44111d32cfb5d68969979fed72ffcc81fc3bc958ee3cc18b33f4ffe74f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'luaNpcTypeRespawnType' is not implemented", + "markdown": "Function 'luaNpcTypeRespawnType' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 80, + "startColumn": 2, + "charOffset": 4466, + "charLength": 47, + "snippet": { + "text": "static int luaNpcTypeRespawnType(lua_State* L);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 78, + "startColumn": 1, + "charOffset": 4413, + "charLength": 150, + "snippet": { + "text": "\tstatic int luaNpcTypeFloorChange(lua_State* L);\r\n\r\n\tstatic int luaNpcTypeRespawnType(lua_State* L);\r\n\tstatic int luaNpcTypeCanSpawn(lua_State* L);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d1036850887c3d0d", + "equalIndicator/v1": "44536b63bc47318cfcf7f6a0452c49370237668d105ab602b98848f18b072655" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'clearPosMap' is not implemented", + "markdown": "Function 'clearPosMap' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 119, + "startColumn": 2, + "charOffset": 3648, + "charLength": 57, + "snippet": { + "text": "void clearPosMap(std::map &map);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 117, + "startColumn": 1, + "charOffset": 3575, + "charLength": 264, + "snippet": { + "text": "private:\r\n\tvoid clearMap(std::map &map) const;\r\n\tvoid clearPosMap(std::map &map);\r\n\r\n\tbool registerEvent(const std::shared_ptr moveEvent, int32_t id, std::map &moveListMap) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d52f68ab778dc9a", + "equalIndicator/v1": "44de03239e685456188e66c85ee675188513687c4cea2a6cb4141da4def26605" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'sendForgeFusionItem' is not implemented", + "markdown": "Function 'sendForgeFusionItem' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 261, + "startColumn": 2, + "charOffset": 9646, + "charLength": 137, + "snippet": { + "text": "void sendForgeFusionItem(\r\n\t\tuint16_t itemId,\r\n\t\tuint8_t tier,\r\n\t\tbool success,\r\n\t\tuint8_t bonus,\r\n\t\tuint8_t coreCount,\r\n\t\tbool convergen" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 259, + "startColumn": 1, + "charOffset": 9547, + "charLength": 440, + "snippet": { + "text": "\tvoid parseForgeEnter(NetworkMessage &msg);\r\n\tvoid parseForgeBrowseHistory(NetworkMessage &msg);\r\n\tvoid sendForgeFusionItem(\r\n\t\tuint16_t itemId,\r\n\t\tuint8_t tier,\r\n\t\tbool success,\r\n\t\tuint8_t bonus,\r\n\t\tuint8_t coreCount,\r\n\t\tbool convergence\r\n\t);\r\n\tvoid sendForgeResult(ForgeAction_t actionType, uint16_t leftItemId, uint8_t leftTier, uint16_t rightItemId, uint8_t rightTier, bool success, uint8_t bonus, uint8_t coreCount, bool convergence);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d88c05a32b95fa39", + "equalIndicator/v1": "48878d7611ff7d7926ccdf826c1b9232eaf4c3973981a052260461624eddc25a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'luaMonsterTypeRespawnType' is not implemented", + "markdown": "Function 'luaMonsterTypeRespawnType' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 163, + "startColumn": 2, + "charOffset": 11274, + "charLength": 51, + "snippet": { + "text": "static int luaMonsterTypeRespawnType(lua_State* L);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 161, + "startColumn": 1, + "charOffset": 11167, + "charLength": 212, + "snippet": { + "text": "\tstatic int luaMonsterTypeFamiliar(lua_State* L);\r\n\tstatic int luaMonsterTypeIsRewardBoss(lua_State* L);\r\n\tstatic int luaMonsterTypeRespawnType(lua_State* L);\r\n\tstatic int luaMonsterTypeCanSpawn(lua_State* L);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "92ac68337533431c", + "equalIndicator/v1": "58dc31b5f6aa2202d0efc7829865016a5e019f6b1d398d113c2322ff6f2ca2b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'getNPCSkips' is not implemented", + "markdown": "Function 'getNPCSkips' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 969, + "startColumn": 2, + "charOffset": 26960, + "charLength": 46, + "snippet": { + "text": "std::unordered_set getNPCSkips();" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 967, + "startColumn": 1, + "charOffset": 26953, + "charLength": 128, + "snippet": { + "text": "\t}\r\n\r\n\tstd::unordered_set getNPCSkips();\r\n\r\n\tstd::shared_ptr getWeapon(Slots_t slot, bool ignoreAmmo) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "27552b78c1c9cfff", + "equalIndicator/v1": "657e4cbc0fb8704441faaa6181df8d30e0030ec6f0a967f25979539d818fbaf4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'luaDeleteLoot' is not implemented", + "markdown": "Function 'luaDeleteLoot' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 2, + "charOffset": 2075, + "charLength": 39, + "snippet": { + "text": "static int luaDeleteLoot(lua_State* L);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 2022, + "charLength": 183, + "snippet": { + "text": "private:\r\n\tstatic int luaCreateLoot(lua_State* L);\r\n\tstatic int luaDeleteLoot(lua_State* L);\r\n\tstatic int luaLootSetId(lua_State* L);\r\n\tstatic int luaLootSetIdFromName(lua_State* L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c30a4894e433ab6", + "equalIndicator/v1": "8e300459d85e9c651011963a2e128ff87f0c0faabf29df7462ea5710d09066c7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'parseObjectInfo' is not implemented", + "markdown": "Function 'parseObjectInfo' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 165, + "startColumn": 2, + "charOffset": 5800, + "charLength": 42, + "snippet": { + "text": "void parseObjectInfo(NetworkMessage &msg);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 163, + "startColumn": 1, + "charOffset": 5682, + "charLength": 206, + "snippet": { + "text": "\tvoid parseBestiarysendMonsterData(NetworkMessage &msg);\r\n\tvoid parseCyclopediaMonsterTracker(NetworkMessage &msg);\r\n\tvoid parseObjectInfo(NetworkMessage &msg);\r\n\r\n\tvoid parseTeleport(NetworkMessage &msg);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f0dd45fbec8894d8", + "equalIndicator/v1": "90a56cfecb506b2e4de288ad597df2b3f2448a42ed1cfef1744b9dd32051e02b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'getMitigationMultiplier' is not implemented", + "markdown": "Function 'getMitigationMultiplier' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 987, + "startColumn": 2, + "charOffset": 27803, + "charLength": 39, + "snippet": { + "text": "double getMitigationMultiplier() const;" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 985, + "startColumn": 1, + "charOffset": 27719, + "charLength": 171, + "snippet": { + "text": "\tfloat getDefenseFactor() const override;\r\n\tfloat getMitigation() const override;\r\n\tdouble getMitigationMultiplier() const;\r\n\r\n\tvoid addInFightTicks(bool pzlock = false);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c021cb3b99f7570", + "equalIndicator/v1": "acd87e6b0915b1f4d1a2bd8983e8779161717dbac4e638968e7b7849d7604fd2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'try_create' is not implemented", + "markdown": "Function 'try_create' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 5, + "charOffset": 1126, + "charLength": 183, + "snippet": { + "text": "template \r\n\t\t\t\tstatic auto try_create(const TProvider &provider)\r\n\t\t\t\t\t-> decltype(wrappers::shared { std::shared_ptr { provider.get() } }" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1029, + "charLength": 294, + "snippet": { + "text": "\t\t\t\tusing is_referable = typename wrappers::shared::template is_referable;\r\n\r\n\t\t\t\ttemplate \r\n\t\t\t\tstatic auto try_create(const TProvider &provider)\r\n\t\t\t\t\t-> decltype(wrappers::shared { std::shared_ptr { provider.get() } });\r\n\r\n\t\t\t\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "863c152667a4ea57", + "equalIndicator/v1": "cf0d8beff5544e3551db2be07291db8f3408d09cc327c4b9c4cde8e6ce66990f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'clearMap' is not implemented", + "markdown": "Function 'clearMap' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 118, + "startColumn": 2, + "charOffset": 3586, + "charLength": 59, + "snippet": { + "text": "void clearMap(std::map &map) const;" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 116, + "startColumn": 1, + "charOffset": 3573, + "charLength": 135, + "snippet": { + "text": "\r\nprivate:\r\n\tvoid clearMap(std::map &map) const;\r\n\tvoid clearPosMap(std::map &map);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "89fc0c03c0e88841", + "equalIndicator/v1": "d083d734640d5f69f399a26918046a629111e88158ab61f30e31a55d48ba3961" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 17, + "charOffset": 960, + "charLength": 15, + "snippet": { + "text": "getLevelFormula" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 895, + "charLength": 220, + "snippet": { + "text": "#include \"lua/callbacks/events_callbacks.hpp\"\r\n\r\nint32_t Combat::getLevelFormula(std::shared_ptr player, const std::shared_ptr wheelSpell, const CombatDamage &damage) const {\r\n\tif (!player) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab761d93c2e78b04", + "equalIndicator/v1": "0abbba1fb8aea2f8138832ce31a046712f1078d0da3ca63164669b8f6f05dd27" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Index may have a value of '5' which is out of bounds", + "markdown": "Index may have a value of '5' which is out of bounds" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 238, + "startColumn": 8, + "charOffset": 8217, + "charLength": 24, + "snippet": { + "text": "imbuement.stats[skillId]" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 236, + "startColumn": 1, + "charOffset": 8126, + "charLength": 209, + "snippet": { + "text": "\t\t\t\t\t\t\timbuement.skills[skillId] = bonus;\r\n\t\t\t\t\t\t} else if (usenormalskill == 2) {\r\n\t\t\t\t\t\t\timbuement.stats[skillId] = bonus;\r\n\t\t\t\t\t\t} else if (usenormalskill == 3) {\r\n\t\t\t\t\t\t\timbuement.skills[skillId] = bonus;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "22535eccbe923376", + "equalIndicator/v1": "14e003fc980e3e8e84a9d39bb0d4ed66ca49d24ac521c6fd187e0dfc951b7eb3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unreachable code", + "markdown": "Unreachable code" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 40, + "startColumn": 28, + "charOffset": 1246, + "charLength": 5, + "snippet": { + "text": "child" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 38, + "startColumn": 1, + "charOffset": 1198, + "charLength": 165, + "snippet": { + "text": "\tsetLoaded(true);\r\n\r\n\tfor (auto spawnNode : doc.child(\"npcs\").children()) {\r\n\t\tPosition centerPos(\r\n\t\t\tpugi::cast(spawnNode.attribute(\"centerx\").value()),\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "277e83c71b5c6b79", + "equalIndicator/v1": "1b9d6ec2818f4e7f49c4183c3d0ba09eb56dc7764a63aa5158ebd07bfaf180ae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Local variable 'measure' is only assigned but never accessed", + "markdown": "Local variable 'measure' is only assigned but never accessed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 136, + "startColumn": 25, + "charOffset": 4111, + "charLength": 7, + "snippet": { + "text": "measure" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 134, + "startColumn": 1, + "charOffset": 4063, + "charLength": 167, + "snippet": { + "text": "\tmeasureLock.stop();\r\n\r\n\tmetrics::query_latency measure(query.substr(0, 50));\r\n\tbool success = retryQuery(query, 10);\r\n\tmysql_free_result(mysql_store_result(handle));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ba9d5d56c569c73c", + "equalIndicator/v1": "1cba6483aad051220b82c1adda6cc42dee160af1fbcfcced1bc1df5752faa1d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unreachable code", + "markdown": "Unreachable code" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 172, + "startColumn": 13, + "charOffset": 5457, + "charLength": 4, + "snippet": { + "text": "auto" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 170, + "startColumn": 1, + "charOffset": 5426, + "charLength": 158, + "snippet": { + "text": "\r\n\tint index = 0;\r\n\tfor (const auto &playerEntry : g_game().getPlayers()) {\r\n\t\tpushUserdata(L, playerEntry.second);\r\n\t\tsetMetatable(L, -1, \"Player\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "78638c4c37fe593a", + "equalIndicator/v1": "2492c632200cc8e2b59ff8e32affd5b49b945fde162b3a8ce06c625fe1fba0f7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unreachable code", + "markdown": "Unreachable code" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 62, + "startColumn": 25, + "charOffset": 2022, + "charLength": 9, + "snippet": { + "text": "spawnNode" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 60, + "startColumn": 1, + "charOffset": 1896, + "charLength": 272, + "snippet": { + "text": "\t\tconst auto &spawnNpc = spawnNpcList.emplace_back(std::make_shared(centerPos, radius));\r\n\r\n\t\tfor (auto childNode : spawnNode.children()) {\r\n\t\t\tif (strcasecmp(childNode.name(), \"npc\") == 0) {\r\n\t\t\t\tpugi::xml_attribute nameAttribute = childNode.attribute(\"name\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4abe65d6fae1fde0", + "equalIndicator/v1": "2641b1dccb85062c785181760fb9135f2e643eb3c15ae34b53b1077732c1cc06" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 43, + "startColumn": 7, + "charOffset": 1634, + "charLength": 5, + "snippet": { + "text": "House" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 41, + "startColumn": 1, + "charOffset": 1577, + "charLength": 102, + "snippet": { + "text": "#include \"creatures/players/vip/player_vip.hpp\"\r\n\r\nclass House;\r\nclass NetworkMessage;\r\nclass Weapon;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "751895ef872011ef", + "equalIndicator/v1": "274f53d859bafa12f3e24c804c5bcb1cc120693e7f08b78f3464da47efb7218b" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 17, + "charOffset": 614, + "charLength": 9, + "snippet": { + "text": "initParse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 556, + "charLength": 297, + "snippet": { + "text": "#include \"creatures/combat/combat.hpp\"\r\n\r\nvoid ItemParse::initParse(const std::string &tmpStrValue, pugi::xml_node attributeNode, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\t// Parse all item attributes\r\n\tItemParse::parseType(tmpStrValue, attributeNode, valueAttribute, itemType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "30e522e0c10f11d9", + "equalIndicator/v1": "2d451231da035cd3b875bc29386b11f5a0f769b27cd940186483527ab4ac43b2" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unreachable code", + "markdown": "Unreachable code" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 281, + "startColumn": 30, + "charOffset": 8669, + "charLength": 5, + "snippet": { + "text": "child" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 279, + "startColumn": 1, + "charOffset": 8634, + "charLength": 222, + "snippet": { + "text": "\t}\r\n\r\n\tfor (auto channelNode : doc.child(\"channels\").children()) {\r\n\t\tuint16_t channelId = pugi::cast(channelNode.attribute(\"id\").value());\r\n\t\tstd::string channelName = channelNode.attribute(\"name\").as_string();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6078671ae825078", + "equalIndicator/v1": "30c58a02e50e29f55fad5e1a53ec7d6776bdf2a3c75bf01d49d580c612079fd8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 65, + "startColumn": 16, + "charOffset": 3721, + "charLength": 4, + "snippet": { + "text": "init" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 63, + "startColumn": 1, + "charOffset": 3694, + "charLength": 93, + "snippet": { + "text": "\tvoid(0)\r\n\r\nvoid LuaEnums::init(lua_State* L) {\r\n\tinitOthersEnums(L);\r\n\tinitAccountEnums(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "87c609a13bef03aa", + "equalIndicator/v1": "36e6bab31a1fd98d9da0dafd8aec27e30197972b55d0580e5435bb37c9621814" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 82, + "startColumn": 7, + "charOffset": 3960, + "charLength": 14, + "snippet": { + "text": "checkSpellArea" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 80, + "startColumn": 1, + "charOffset": 3909, + "charLength": 252, + "snippet": { + "text": "namespace {\r\n\ttemplate \r\n\tbool checkSpellArea(const std::array &spellsTable, const std::string &spellName, uint8_t stage) {\r\n\t\tfor (const auto &spellTable : spellsTable) {\r\n\t\t\tauto size = std::ssize(spellTable.grade);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c4cc770d4bac92c8", + "equalIndicator/v1": "3ef605dd0b4d4a710e51495f862aa5fb547368adac6fac223d6916211d70f4e7" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 30, + "startColumn": 29, + "charOffset": 978, + "charLength": 10, + "snippet": { + "text": "CreateItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 28, + "startColumn": 1, + "charOffset": 928, + "charLength": 327, + "snippet": { + "text": "Items Item::items;\r\n\r\nstd::shared_ptr Item::CreateItem(const uint16_t type, uint16_t count /*= 0*/, Position* itemPosition /*= nullptr*/) {\r\n\t// A map which contains items that, when on creating, should be transformed to the default type.\r\n\tstatic const phmap::flat_hash_map ItemTransformationMap = {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6cf0f2812c973015", + "equalIndicator/v1": "3f7a3e31ebd9dd1d8b0d7313dac567977fecf3fb71583d2eade29a0cdbcd6c88" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 60, + "startColumn": 7, + "charOffset": 2173, + "charLength": 15, + "snippet": { + "text": "sendBlockEffect" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 58, + "startColumn": 1, + "charOffset": 2139, + "charLength": 253, + "snippet": { + "text": "\r\nnamespace InternalGame {\r\n\tvoid sendBlockEffect(BlockType_t blockType, CombatType_t combatType, const Position &targetPos, std::shared_ptr source) {\r\n\t\tif (blockType == BLOCK_DEFENSE) {\r\n\t\t\tg_game().addMagicEffect(targetPos, CONST_ME_POFF);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b6665bfaf19f3236", + "equalIndicator/v1": "4337642edb3e13f026e4d6d54409f2ee9f7bbbe7811428fb15b7642a273978bb" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unreachable code", + "markdown": "Unreachable code" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 37, + "startColumn": 29, + "charOffset": 1066, + "charLength": 5, + "snippet": { + "text": "child" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 35, + "startColumn": 1, + "charOffset": 1032, + "charLength": 164, + "snippet": { + "text": "\t}\r\n\r\n\tfor (auto outfitNode : doc.child(\"outfits\").children()) {\r\n\t\tpugi::xml_attribute attr;\r\n\t\tif ((attr = outfitNode.attribute(\"enabled\")) && !attr.as_bool()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c420aed2bdd7037c", + "equalIndicator/v1": "4b5483c5d8013268dd675549a391b1b4ed98d939d09bdfe5dfd5d9a95152c948" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Condition is always true", + "markdown": "Condition is always true" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 214, + "startColumn": 43, + "charOffset": 5302, + "charLength": 25, + "snippet": { + "text": "weaponType != WEAPON_NONE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 212, + "startColumn": 1, + "charOffset": 5230, + "charLength": 130, + "snippet": { + "text": "\t}\r\n\tbool isRanged() const {\r\n\t\treturn weaponType == WEAPON_DISTANCE && weaponType != WEAPON_NONE;\r\n\t}\r\n\tbool isMissile() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ec98fee2a5d2a695", + "equalIndicator/v1": "4ff9bf773f7fad947f28bdf308733da82ccbef1d7a69459501d28d25d0caee98" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 28, + "charOffset": 722, + "charLength": 29, + "snippet": { + "text": "createMonsterTypeLootLuaTable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 657, + "charLength": 195, + "snippet": { + "text": "#include \"lua/scripts/scripts.hpp\"\r\n\r\nvoid MonsterTypeFunctions::createMonsterTypeLootLuaTable(lua_State* L, const std::vector &lootList) {\r\n\tlua_createtable(L, lootList.size(), 0);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5dc36c4bd579b824", + "equalIndicator/v1": "58a37db3fb1bca56ff8bd43145383a6088d5be0700acb1ca33c8eba7e8c8aef9" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Local variable 'measure' is only assigned but never accessed", + "markdown": "Local variable 'measure' is only assigned but never accessed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 268, + "startColumn": 23, + "charOffset": 7047, + "charLength": 7, + "snippet": { + "text": "measure" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 266, + "startColumn": 1, + "charOffset": 6970, + "charLength": 163, + "snippet": { + "text": "\r\nbool LuaScriptInterface::callFunction(int params) {\r\n\tmetrics::lua_latency measure(getMetricsScope());\r\n\tbool result = false;\r\n\tint size = lua_gettop(luaState);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e25f279e4b471b45", + "equalIndicator/v1": "5bd66c68e2f58cbd6e21c4a3313f6e178a50d2245c96d9b67f97da3085aec0ea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Local variable 'success' is only assigned but never accessed", + "markdown": "Local variable 'success' is only assigned but never accessed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasetasks.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 8, + "charOffset": 934, + "charLength": 7, + "snippet": { + "text": "success" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 753, + "charLength": 355, + "snippet": { + "text": "void DatabaseTasks::execute(const std::string &query, std::function callback /* nullptr */) {\r\n\tthreadPool.detach_task([this, query, callback]() {\r\n\t\tbool success = db.executeQuery(query);\r\n\t\tif (callback != nullptr) {\r\n\t\t\tg_dispatcher().addEvent([callback, success]() { callback(nullptr, success); }, \"DatabaseTasks::execute\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "121f3bf500b8fec3", + "equalIndicator/v1": "5eed351711de2c00c083377be60608ee9faa7f0968d2d949de262e04ace1ea24" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 26, + "startColumn": 35, + "charOffset": 881, + "charLength": 13, + "snippet": { + "text": "createMonster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 24, + "startColumn": 1, + "charOffset": 798, + "charLength": 196, + "snippet": { + "text": "uint32_t Monster::monsterAutoID = 0x50000001;\r\n\r\nstd::shared_ptr Monster::createMonster(const std::string &name) {\r\n\tconst auto mType = g_monsters().getMonsterType(name);\r\n\tif (!mType) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e6bf098d1beae520", + "equalIndicator/v1": "6001040e49b1ba6bb201336db6a57ffc1060d5e39462077e768b870691d99335" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Condition is always true", + "markdown": "Condition is always true" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 217, + "startColumn": 42, + "charOffset": 5402, + "charLength": 25, + "snippet": { + "text": "weaponType != WEAPON_NONE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 215, + "startColumn": 1, + "charOffset": 5330, + "charLength": 105, + "snippet": { + "text": "\t}\r\n\tbool isMissile() const {\r\n\t\treturn weaponType == WEAPON_MISSILE && weaponType != WEAPON_NONE;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bfe13f3e86c7b4f2", + "equalIndicator/v1": "6b64f3f2f4879ec077567cff0a78b5e99cd9ec30e14ab8e89dda785dc0481a88" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 56, + "startColumn": 11, + "charOffset": 2347, + "charLength": 25, + "snippet": { + "text": "getIterationIncreaseCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 54, + "startColumn": 1, + "charOffset": 2300, + "charLength": 182, + "snippet": { + "text": "namespace {\r\n\ttemplate \r\n\tuint16_t getIterationIncreaseCount(T &map) {\r\n\t\tuint16_t totalIterationCount = 0;\r\n\t\tfor ([[maybe_unused]] const auto &[first, second] : map) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e2215423f0cb7935", + "equalIndicator/v1": "6c3b81de00c889d4e6e06528c89b0e05d5799e3df440503d9838d136bb6e636a" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Local variable is only assigned but never accessed", + "markdown": "Local variable is only assigned but never accessed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 329, + "startColumn": 5, + "charOffset": 8930, + "charLength": 20, + "snippet": { + "text": "// if (!str.empty())" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 327, + "startColumn": 1, + "charOffset": 8862, + "charLength": 122, + "snippet": { + "text": "\t\t\tcase ATTR_DESC: {\r\n\t\t\t\tconst auto str = stream.getString();\r\n\t\t\t\t// if (!str.empty())\r\n\t\t\t\t//\ttext = str;\r\n\t\t\t} break;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "af6d3b16a52aff71", + "equalIndicator/v1": "75e740ffe92e5307dd4e95efb1618c9de5feecd91cfcecbd8f6944bae8914304" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 47, + "startColumn": 9, + "charOffset": 1786, + "charLength": 6, + "snippet": { + "text": "Player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 45, + "startColumn": 1, + "charOffset": 1740, + "charLength": 115, + "snippet": { + "text": "MuteCountMap Player::muteCountMap;\r\n\r\nPlayer::Player(ProtocolGame_ptr p) :\r\n\tCreature(),\r\n\tlastPing(OTSYS_TIME()),\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e10d02c0e55e9976", + "equalIndicator/v1": "769448563f42af1dbca688526ba6cd8dd7e32a044add200481922820ccaf3752" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 33, + "charOffset": 681, + "charLength": 9, + "snippet": { + "text": "getWeapon" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 615, + "charLength": 146, + "snippet": { + "text": "Weapons::~Weapons() = default;\r\n\r\nconst WeaponShared_ptr Weapons::getWeapon(std::shared_ptr item) const {\r\n\tif (!item) {\r\n\t\treturn nullptr;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "76daf66dde4f80c2", + "equalIndicator/v1": "797d0a5095f18b684878e2ea79ef62e3f223dc1785daa3ceb06ecd766b50c5a5" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 31, + "charOffset": 666, + "charLength": 11, + "snippet": { + "text": "getInstance" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 626, + "charLength": 93, + "snippet": { + "text": "#endif\r\n\r\nConfigManager &ConfigManager::getInstance() {\r\n\treturn inject();\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "65b7b8044261fc29", + "equalIndicator/v1": "8ccea17d2e28870a92153e5ec0123cf0f95c354e15414660a0965142c3dc501c" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 53, + "startColumn": 7, + "charOffset": 2151, + "charLength": 23, + "snippet": { + "text": "registerWheelSpellTable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 51, + "startColumn": 1, + "charOffset": 2115, + "charLength": 239, + "snippet": { + "text": "\t */\r\n\ttemplate \r\n\tvoid registerWheelSpellTable(const T &spellData, const std::string &name, WheelSpellGrade_t gradeType) {\r\n\t\tif (name == \"Any_Focus_Mage_Spell\") {\r\n\t\t\tfor (const std::string &focusSpellName : m_focusSpells) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "464987a0a65381a7", + "equalIndicator/v1": "9014067abe6006abe1722748acef0b1591bca6c4a2480703cdc444714feffa82" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 16, + "startColumn": 6, + "charOffset": 484, + "charLength": 13, + "snippet": { + "text": "printXMLError" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 449, + "charLength": 235, + "snippet": { + "text": "#include \"utils/tools.hpp\"\r\n\r\nvoid printXMLError(const std::string &where, const std::string &fileName, const pugi::xml_parse_result &result) {\r\n\tg_logger().error(\"[{}] Failed to load {}: {}\", where, fileName, result.description());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1ea7b986a4d7c520", + "equalIndicator/v1": "9506e05bc39d8ba502425a035bf44e597c8bbb57af8a5d8284bd176954fee2dd" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 34, + "startColumn": 22, + "charOffset": 1284, + "charLength": 22, + "snippet": { + "text": "luaPlayerSendInventory" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 1225, + "charLength": 194, + "snippet": { + "text": "#include \"enums/account_coins.hpp\"\r\n\r\nint PlayerFunctions::luaPlayerSendInventory(lua_State* L) {\r\n\t// player:sendInventory()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f4a64902032e3c2b", + "equalIndicator/v1": "97780d4c5b9c9c43b7e45d456ea5fffcf29da5afb43d47dddb76d6552f7591fe" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 17, + "charOffset": 619, + "charLength": 8, + "snippet": { + "text": "setParam" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 596, + "charLength": 125, + "snippet": { + "text": " */\r\n\r\nbool Condition::setParam(ConditionParam_t param, int32_t value) {\r\n\tswitch (param) {\r\n\t\tcase CONDITION_PARAM_TICKS: {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1815774cc2eb9d7c", + "equalIndicator/v1": "a23d30f799cf29bc073484a8981eadaf01fbf587d0c5a56e593ee8126112a2c1" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 8, + "charOffset": 637, + "charLength": 5, + "snippet": { + "text": "House" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 592, + "charLength": 91, + "snippet": { + "text": "#include \"lib/metrics/metrics.hpp\"\r\n\r\nHouse::House(uint32_t houseId) :\r\n\tid(houseId) { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79db7a1923a323c5", + "equalIndicator/v1": "b112e4c28cea6d39ac6b92cadbf22bb9df22e8ab82cd2b1e4b0b7a64a971b6ed" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 28, + "charOffset": 856, + "charLength": 14, + "snippet": { + "text": "playerSaySpell" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 797, + "charLength": 248, + "snippet": { + "text": "Spells::~Spells() = default;\r\n\r\nTalkActionResult_t Spells::playerSaySpell(std::shared_ptr player, std::string &words) {\r\n\tauto maxOnline = g_configManager().getNumber(MAX_PLAYERS_PER_ACCOUNT, __FUNCTION__);\r\n\tauto tile = player->getTile();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c4a73d4b8c53b57", + "equalIndicator/v1": "b878397f6916ab8db1bcaac04d4441bb5e4547a79fabe7dbaccfaf5e83154e25" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 29, + "startColumn": 12, + "charOffset": 1018, + "charLength": 11, + "snippet": { + "text": "hasProperty" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 27, + "startColumn": 1, + "charOffset": 935, + "charLength": 171, + "snippet": { + "text": "const std::shared_ptr &Tile::nullptr_tile = real_nullptr_tile;\r\n\r\nbool Tile::hasProperty(ItemProperty prop) const {\r\n\tswitch (prop) {\r\n\t\tcase CONST_PROP_BLOCKSOLID:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4aa05e2de6559114", + "equalIndicator/v1": "ba281f3c00b67bdc9839a0ea3ac2f28b5f7884a02b18d1d6dd87d40f4d1d79d3" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 7, + "charOffset": 670, + "charLength": 8, + "snippet": { + "text": "Creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 632, + "charLength": 81, + "snippet": { + "text": "#include \"io/fileloader.hpp\"\r\n\r\nclass Creature;\r\nclass Player;\r\nclass Container;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9ce9dc6427c00d28", + "equalIndicator/v1": "c4ee3a22da3ac3586f08e41b93caa44df4e61bde56e9068a2c98e658bb56caa9" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Local variable 'measure' is only assigned but never accessed", + "markdown": "Local variable 'measure' is only assigned but never accessed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 154, + "startColumn": 25, + "charOffset": 4603, + "charLength": 7, + "snippet": { + "text": "measure" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 152, + "startColumn": 1, + "charOffset": 4555, + "charLength": 134, + "snippet": { + "text": "\tmeasureLock.stop();\r\n\r\n\tmetrics::query_latency measure(query.substr(0, 50));\r\nretry:\r\n\tif (mysql_query(handle, query.data()) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "be4fd8ace12f2f8c", + "equalIndicator/v1": "cdc783d5e576fc6cc513df4cf5bd1aaf5b17b4649f0dfa9733ef2215a3186305" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "The address of the local variable 'it' may escape the function", + "markdown": "The address of the local variable 'it' may escape the function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 620, + "startColumn": 3, + "charOffset": 23198, + "charLength": 11, + "snippet": { + "text": "return *it;" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 618, + "startColumn": 1, + "charOffset": 23162, + "charLength": 54, + "snippet": { + "text": "\r\n\tif (it != taskOption.end()) {\r\n\t\treturn *it;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d87721e4362a2fdf", + "equalIndicator/v1": "d445e824245ff897e398d54274d84039c5705644a1d2dcdbdc9440cf7ca42267" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Local variable 'measure' is only assigned but never accessed", + "markdown": "Local variable 'measure' is only assigned but never accessed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 287, + "startColumn": 23, + "charOffset": 7620, + "charLength": 7, + "snippet": { + "text": "measure" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 285, + "startColumn": 1, + "charOffset": 7539, + "charLength": 193, + "snippet": { + "text": "\r\nvoid LuaScriptInterface::callVoidFunction(int params) {\r\n\tmetrics::lua_latency measure(getMetricsScope());\r\n\tint size = lua_gettop(luaState);\r\n\tif (protectedCall(luaState, params, 0) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ce00ededcaac50a4", + "equalIndicator/v1": "d528fd5e71b2753006d5e4aacd7078b4ee81878469f28d676ec006ffcc2c923f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unreachable code", + "markdown": "Unreachable code" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 209, + "startColumn": 14, + "charOffset": 5864, + "charLength": 10, + "snippet": { + "text": "clearZones" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 207, + "startColumn": 1, + "charOffset": 5842, + "charLength": 116, + "snippet": { + "text": "\t\t}\r\n\t}\r\n\tstatic void clearZones();\r\n\r\n\tstatic bool loadFromXML(const std::string &fileName, uint16_t shiftID = 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a096ad8ff05c1410", + "equalIndicator/v1": "e2fae79eec162188968f3f393881b783f0ec0980a42009be7669d68263ba9bee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 23, + "startColumn": 11, + "charOffset": 702, + "charLength": 4, + "snippet": { + "text": "load" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 21, + "startColumn": 1, + "charOffset": 659, + "charLength": 132, + "snippet": { + "text": "#include \"map/spectators.hpp\"\r\n\r\nvoid Map::load(const std::string &identifier, const Position &pos) {\r\n\ttry {\r\n\t\tpath = identifier;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7c9a678a600abc52", + "equalIndicator/v1": "e3aa1417e9b5720082c906581a4101cedf72ca58634e5b0df2c5cb301714a263" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unreachable code", + "markdown": "Unreachable code" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 166, + "startColumn": 2, + "charOffset": 5077, + "charLength": 140, + "snippet": { + "text": "g_logger().debug(\"[{}] missing or incorrect script: {}\", __FUNCTION__, action->getScriptInterface()->getLoadingScriptName());\r\n\treturn false" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 164, + "startColumn": 1, + "charOffset": 5055, + "charLength": 169, + "snippet": { + "text": "\t\treturn false;\r\n\t}\r\n\tg_logger().debug(\"[{}] missing or incorrect script: {}\", __FUNCTION__, action->getScriptInterface()->getLoadingScriptName());\r\n\treturn false;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f64b601cfc5fa081", + "equalIndicator/v1": "f07556ec12ee794ea1ac1e12e3c2f9fd4cac130d42b234b6414cab4c13d02f31" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unreachable code", + "markdown": "Unreachable code" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 3, + "charOffset": 1318, + "charLength": 10, + "snippet": { + "text": "return {};" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1304, + "charLength": 31, + "snippet": { + "text": "\t\t\t);\r\n\t\t}\r\n\t\treturn {};\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c43bf1dfc06febde", + "equalIndicator/v1": "f5e66ca4a7d1e7dc04b75eecea40ac2fe9793842ec71f94b419e348133ac3941" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 11, + "charOffset": 688, + "charLength": 8, + "snippet": { + "text": "Creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 640, + "charLength": 82, + "snippet": { + "text": "#include \"lib/metrics/metrics.hpp\"\r\n\r\nCreature::Creature() {\r\n\tonIdleStatus();\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8927424b7a19c8b5", + "equalIndicator/v1": "fa3423b22348d0ef0581b6769c29a2d831c931702e15d7f3a8556106e0ff2427" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Local variable 'measure' is only assigned but never accessed", + "markdown": "Local variable 'measure' is only assigned but never accessed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 241, + "startColumn": 26, + "charOffset": 6325, + "charLength": 7, + "snippet": { + "text": "measure" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 239, + "startColumn": 1, + "charOffset": 6245, + "charLength": 148, + "snippet": { + "text": "\r\nstd::string LuaScriptInterface::getMetricsScope() {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tint32_t scriptId;\r\n\tint32_t callbackId;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "761ce4891d7fcf1a", + "equalIndicator/v1": "ffbba6ed3d53658d7d0d4a0a1a154a4d29a3e2460d42ef182036c53b953f58d2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedIncludeDirective", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unused \"#include \"lua/scripts/scripts.hpp\"\"", + "markdown": "Unused \"#include \"lua/scripts/scripts.hpp\"\"" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/global_event_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 15, + "startColumn": 1, + "charOffset": 526, + "charLength": 34, + "snippet": { + "text": "#include \"lua/scripts/scripts.hpp\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 13, + "startColumn": 1, + "charOffset": 461, + "charLength": 130, + "snippet": { + "text": "#include \"game/game.hpp\"\r\n#include \"lua/global/globalevent.hpp\"\r\n#include \"lua/scripts/scripts.hpp\"\r\n#include \"utils/tools.hpp\"\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "da75861ef4afa179", + "equalIndicator/v1": "24be6c828aa95d9f567d39b5c277e340d454127b7e27d2a71cefa23271eb152f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedIncludeDirective", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unused \"#include \"utils/definitions.hpp\"\"", + "markdown": "Unused \"#include \"utils/definitions.hpp\"\"" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 16, + "startColumn": 1, + "charOffset": 518, + "charLength": 32, + "snippet": { + "text": "#include \"utils/definitions.hpp\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 435, + "charLength": 175, + "snippet": { + "text": "#include \"account/account_repository_db.hpp\"\r\n#include \"config/configmanager.hpp\"\r\n#include \"utils/definitions.hpp\"\r\n#include \"security/argon.hpp\"\r\n#include \"utils/tools.hpp\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7c79a1d71b9af08c", + "equalIndicator/v1": "2b088538da68694f59ae093b47427041b099cf1af4fdc42c49bf869d8fe81d25" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedIncludeDirective", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unused \"#include \"items/item.hpp\"\"", + "markdown": "Unused \"#include \"items/item.hpp\"\"" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/teleport_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 13, + "startColumn": 1, + "charOffset": 440, + "charLength": 25, + "snippet": { + "text": "#include \"items/item.hpp\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 11, + "startColumn": 1, + "charOffset": 399, + "charLength": 122, + "snippet": { + "text": "\r\n#include \"game/movement/teleport.hpp\"\r\n#include \"items/item.hpp\"\r\n#include \"lua/functions/map/teleport_functions.hpp\"\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "11af23bb01d66a4d", + "equalIndicator/v1": "6a712870aafd9b7285ba27d9817ed115e05c2796c248a19fc25908cac8ebe191" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedIncludeDirective", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unused \"#include \"config/configmanager.hpp\"\"", + "markdown": "Unused \"#include \"config/configmanager.hpp\"\"" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 17, + "startColumn": 1, + "charOffset": 594, + "charLength": 35, + "snippet": { + "text": "#include \"config/configmanager.hpp\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 15, + "startColumn": 1, + "charOffset": 504, + "charLength": 190, + "snippet": { + "text": "#include \"creatures/players/wheel/wheel_definitions.hpp\"\r\n#include \"io/io_bosstiary.hpp\"\r\n#include \"config/configmanager.hpp\"\r\n#include \"creatures/creature.hpp\"\r\n#include \"declarations.hpp\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2725270849793c78", + "equalIndicator/v1": "a1455cccd8f4c444a611ce72404f83815ce7297e6777d7f4ad1877c76da1ea1e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedIncludeDirective", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unused \"#include \"creatures/players/cyclopedia/player_title.hpp\"\"", + "markdown": "Unused \"#include \"creatures/players/cyclopedia/player_title.hpp\"\"" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 32, + "startColumn": 1, + "charOffset": 1259, + "charLength": 56, + "snippet": { + "text": "#include \"creatures/players/cyclopedia/player_title.hpp\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 30, + "startColumn": 1, + "charOffset": 1138, + "charLength": 284, + "snippet": { + "text": "#include \"creatures/players/cyclopedia/player_badge.hpp\"\r\n#include \"creatures/players/cyclopedia/player_cyclopedia.hpp\"\r\n#include \"creatures/players/cyclopedia/player_title.hpp\"\r\n#include \"creatures/players/grouping/familiars.hpp\"\r\n#include \"server/network/protocol/protocolgame.hpp\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8e0f044ad2fe46c1", + "equalIndicator/v1": "b566d92129891052ca756d355f6b3dac415d4c0430e5d668bc5aa7e6b017e62a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedIncludeDirective", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unused \"#include \"creatures/players/wheel/wheel_gems.hpp\"\"", + "markdown": "Unused \"#include \"creatures/players/wheel/wheel_gems.hpp\"\"" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 14, + "startColumn": 1, + "charOffset": 453, + "charLength": 49, + "snippet": { + "text": "#include \"creatures/players/wheel/wheel_gems.hpp\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 12, + "startColumn": 1, + "charOffset": 401, + "charLength": 192, + "snippet": { + "text": "#include \"lua/functions/core/game/lua_enums.hpp\"\r\n\r\n#include \"creatures/players/wheel/wheel_gems.hpp\"\r\n#include \"creatures/players/wheel/wheel_definitions.hpp\"\r\n#include \"io/io_bosstiary.hpp\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "30c587723d22f75d", + "equalIndicator/v1": "b58a32a360fd8831d026948c4671d10477fdc26f1d8b6e28e2629082ad4b790a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedIncludeDirective", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unused \"#include \"lua/scripts/scripts.hpp\"\"", + "markdown": "Unused \"#include \"lua/scripts/scripts.hpp\"\"" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 17, + "startColumn": 1, + "charOffset": 553, + "charLength": 34, + "snippet": { + "text": "#include \"lua/scripts/scripts.hpp\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 15, + "startColumn": 1, + "charOffset": 482, + "charLength": 136, + "snippet": { + "text": "#include \"items/item.hpp\"\r\n#include \"lua/scripts/lua_environment.hpp\"\r\n#include \"lua/scripts/scripts.hpp\"\r\n#include \"utils/tools.hpp\"\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fa1263d0ee3552be", + "equalIndicator/v1": "c7bb0459a57ff0f20f08917a64e929fd9d52962f9bc9654bd659ad444c267369" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedIncludeDirective", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unused \"#include \"utils/tools.hpp\"\"", + "markdown": "Unused \"#include \"utils/tools.hpp\"\"" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 1, + "charOffset": 567, + "charLength": 26, + "snippet": { + "text": "#include \"utils/tools.hpp\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 525, + "charLength": 105, + "snippet": { + "text": "#include \"creatures/combat/spells.hpp\"\r\n\r\n#include \"utils/tools.hpp\"\r\n\r\n#define MITIGATION_INCREASE 0.03\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4c81ed0ddee9fcc3", + "equalIndicator/v1": "dbd7fd96c420f47e1b5bb6c4a04186bd34d303a2d48040b6b1f798c0ff3e911b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedIncludeDirective", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unused \"#include \"config/configmanager.hpp\"\"", + "markdown": "Unused \"#include \"config/configmanager.hpp\"\"" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 15, + "startColumn": 1, + "charOffset": 481, + "charLength": 35, + "snippet": { + "text": "#include \"config/configmanager.hpp\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 13, + "startColumn": 1, + "charOffset": 433, + "charLength": 149, + "snippet": { + "text": "\r\n#include \"account/account_repository_db.hpp\"\r\n#include \"config/configmanager.hpp\"\r\n#include \"utils/definitions.hpp\"\r\n#include \"security/argon.hpp\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "02ca4c2ec7cafe96", + "equalIndicator/v1": "e3f992a58b4da2184f96f9b51afa7f78647548a068c584d878ce7274d4f116b2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedMacro", + "kind": "fail", + "level": "warning", + "message": { + "text": "Macro 'appendCommandListener' is never used", + "markdown": "Macro 'appendCommandListener' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/command.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 30, + "startColumn": 1, + "charOffset": 971, + "charLength": 98, + "snippet": { + "text": "#define appendCommandListener(type, block) dispatcher.appendListener(type, commandCallback(block))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 28, + "startColumn": 1, + "charOffset": 905, + "charLength": 166, + "snippet": { + "text": "}\r\n#define commandCallback(block) [this](const ICommand &) block\r\n#define appendCommandListener(type, block) dispatcher.appendListener(type, commandCallback(block))\r\n" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7a7a714d4b454c25", + "equalIndicator/v1": "21b83173a48b82a7d7a1837b5f6a7711032118205f16884cb93cb7c20defb127" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedMacro", + "kind": "fail", + "level": "warning", + "message": { + "text": "Macro '_SECURE_SCL' is never used", + "markdown": "Macro '_SECURE_SCL' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 35, + "startColumn": 4, + "charOffset": 849, + "charLength": 21, + "snippet": { + "text": "#define _SECURE_SCL 0" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 33, + "startColumn": 1, + "charOffset": 811, + "charLength": 107, + "snippet": { + "text": "\t#ifdef _MSC_VER\r\n\t\t#ifdef NDEBUG\r\n\t\t\t#define _SECURE_SCL 0\r\n\t\t\t#define HAS_ITERATOR_DEBUGGING 0\r\n\t\t#endif\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "611d7273d28e559c", + "equalIndicator/v1": "5345ca9a0f6f881d6bb1eaff3500b20420ccfff0b8a81ffd9b3d7964a29217ce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedMacro", + "kind": "fail", + "level": "warning", + "message": { + "text": "Macro 'MAGIC_ENUM_RANGE_MIN' is never used", + "markdown": "Macro 'MAGIC_ENUM_RANGE_MIN' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/pch.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 118, + "startColumn": 1, + "charOffset": 2736, + "charLength": 33, + "snippet": { + "text": "#define MAGIC_ENUM_RANGE_MIN -500" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 116, + "startColumn": 1, + "charOffset": 2668, + "charLength": 163, + "snippet": { + "text": " * @note Sets the upper limit of the enum value range to 500.\r\n */\r\n#define MAGIC_ENUM_RANGE_MIN -500\r\n#define MAGIC_ENUM_RANGE_MAX 500\r\n#include \r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cfff89558b3b19e7", + "equalIndicator/v1": "7e4f6b2282556ecff7d26da257ea6d717fd8da2ccbe94ed88883c0464bfe044a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedMacro", + "kind": "fail", + "level": "warning", + "message": { + "text": "Macro 'HAS_ITERATOR_DEBUGGING' is never used", + "markdown": "Macro 'HAS_ITERATOR_DEBUGGING' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 36, + "startColumn": 4, + "charOffset": 875, + "charLength": 32, + "snippet": { + "text": "#define HAS_ITERATOR_DEBUGGING 0" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 34, + "startColumn": 1, + "charOffset": 829, + "charLength": 91, + "snippet": { + "text": "\t\t#ifdef NDEBUG\r\n\t\t\t#define _SECURE_SCL 0\r\n\t\t\t#define HAS_ITERATOR_DEBUGGING 0\r\n\t\t#endif\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2f6fce06519d868e", + "equalIndicator/v1": "adaa110430c5f456ba74ceb59eb260e591724d9b76e2f19bdd8bac28705ab194" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedMacro", + "kind": "fail", + "level": "warning", + "message": { + "text": "Macro 'appendEventListener' is never used", + "markdown": "Macro 'appendEventListener' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/event.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 26, + "startColumn": 1, + "charOffset": 893, + "charLength": 94, + "snippet": { + "text": "#define appendEventListener(type, block) dispatcher.appendListener(type, eventCallback(block))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 24, + "startColumn": 1, + "charOffset": 831, + "charLength": 158, + "snippet": { + "text": "}\r\n#define eventCallback(block) [this](const IEvent &) block\r\n#define appendEventListener(type, block) dispatcher.appendListener(type, eventCallback(block))\r\n" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "06b76f470bd83308", + "equalIndicator/v1": "c5483970e45b12cd151f4b1d5bcc927f2fba5f24f51b411ef3f0879d06cc2a05" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedMacro", + "kind": "fail", + "level": "warning", + "message": { + "text": "Macro 'MAGIC_ENUM_RANGE_MAX' is never used", + "markdown": "Macro 'MAGIC_ENUM_RANGE_MAX' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/pch.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 119, + "startColumn": 1, + "charOffset": 2771, + "charLength": 32, + "snippet": { + "text": "#define MAGIC_ENUM_RANGE_MAX 500" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 117, + "startColumn": 1, + "charOffset": 2731, + "charLength": 102, + "snippet": { + "text": " */\r\n#define MAGIC_ENUM_RANGE_MIN -500\r\n#define MAGIC_ENUM_RANGE_MAX 500\r\n#include \r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd4b4e130baa774f", + "equalIndicator/v1": "ccae340d317b71e8fa776082f2905b4aa00c3e5ded6b7a026ea5a2617d7722a6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Struct 'scope_traits' is never used", + "markdown": "Struct 'scope_traits' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 96, + "startColumn": 10, + "charOffset": 2728, + "charLength": 12, + "snippet": { + "text": "scope_traits" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 94, + "startColumn": 1, + "charOffset": 2695, + "charLength": 92, + "snippet": { + "text": "\r\n\t\ttemplate \r\n\t\tstruct scope_traits {\r\n\t\t\tusing type = detail::shared;\r\n\t\t};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "61177577eed530a1", + "equalIndicator/v1": "0caf549c16b88527d984ac3cae1a7ab083b59713330156009d5c8508e42dba5f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Class 'CombatInfo' is never used", + "markdown": "Class 'CombatInfo' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 7, + "charOffset": 1292, + "charLength": 10, + "snippet": { + "text": "CombatInfo" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1258, + "charLength": 75, + "snippet": { + "text": "class Monster;\r\nclass Npc;\r\nclass CombatInfo;\r\nclass Charm;\r\nclass IOPrey;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "de706612a2bfcf77", + "equalIndicator/v1": "23df6d5536469b368bf15e1060ca4f1cea206d8fe0d0d29e269b495642443906" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Struct 'scope_traits>' is never used", + "markdown": "Struct 'scope_traits\\>' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 106, + "startColumn": 10, + "charOffset": 2929, + "charLength": 12, + "snippet": { + "text": "scope_traits" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 104, + "startColumn": 1, + "charOffset": 2896, + "charLength": 109, + "snippet": { + "text": "\r\n\t\ttemplate \r\n\t\tstruct scope_traits> {\r\n\t\t\tusing type = detail::shared;\r\n\t\t};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0e61e841259c5bcd", + "equalIndicator/v1": "4bb0bc88be44f05b13877f3a2bdc26f840abb450e4ebc1777adcec0dd2f31d86" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Struct 'scope_traits>' is never used", + "markdown": "Struct 'scope_traits\\>' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 101, + "startColumn": 10, + "charOffset": 2821, + "charLength": 12, + "snippet": { + "text": "scope_traits" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 99, + "startColumn": 1, + "charOffset": 2788, + "charLength": 107, + "snippet": { + "text": "\r\n\t\ttemplate \r\n\t\tstruct scope_traits> {\r\n\t\t\tusing type = detail::shared;\r\n\t\t};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "94c9e48f4f87b830", + "equalIndicator/v1": "5adda4aa18e429bd8d87430956c4d8c5bfb2cd91b7ea7c2aa0bd6cdc37897a0b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Class 'Houses' is never used", + "markdown": "Class 'Houses' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 277, + "startColumn": 7, + "charOffset": 7760, + "charLength": 6, + "snippet": { + "text": "Houses" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 275, + "startColumn": 1, + "charOffset": 7690, + "charLength": 110, + "snippet": { + "text": "using HouseMap = std::map>;\r\n\r\nclass Houses {\r\npublic:\r\n\tHouses() = default;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "26e52e927fe04760", + "equalIndicator/v1": "5b21f42288939d95605be46f37489a91ec75388c5a0c7d801a9bb22966e353a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Class 'Bed' is never used", + "markdown": "Class 'Bed' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 49, + "startColumn": 7, + "charOffset": 1734, + "charLength": 3, + "snippet": { + "text": "Bed" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 47, + "startColumn": 1, + "charOffset": 1701, + "charLength": 70, + "snippet": { + "text": "class Party;\r\nclass Task;\r\nclass Bed;\r\nclass Guild;\r\nclass Imbuement;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b5cf388f12ee889", + "equalIndicator/v1": "74080b19664227faff2e0a38fa434da1be2d89f6faf2cb523b8407d0f78e2e13" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Class 'PlayerLock' is never used", + "markdown": "Class 'PlayerLock' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2661, + "startColumn": 15, + "charOffset": 77896, + "charLength": 10, + "snippet": { + "text": "PlayerLock" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2659, + "startColumn": 1, + "charOffset": 77870, + "charLength": 60, + "snippet": { + "text": "\r\nprivate:\r\n\tfriend class PlayerLock;\r\n\tstd::mutex mutex;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5bbd8c1732b9798e", + "equalIndicator/v1": "7728f76ea477eec4df40b20ff0861b5e81da3224ce6ab4c3ae67dc5f263a1948" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Struct 'scope_traits>' is never used", + "markdown": "Struct 'scope_traits\\>' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 111, + "startColumn": 10, + "charOffset": 3039, + "charLength": 12, + "snippet": { + "text": "scope_traits" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 109, + "startColumn": 1, + "charOffset": 3006, + "charLength": 105, + "snippet": { + "text": "\r\n\t\ttemplate \r\n\t\tstruct scope_traits> {\r\n\t\t\tusing type = detail::shared;\r\n\t\t};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d75840260ed9197c", + "equalIndicator/v1": "8a3ce7ee13cf34ae506ad76b6be71f53b6b4cb3527efbddb9a43acd54d4ab32c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Class 'Quest' is never used", + "markdown": "Class 'Quest' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 7, + "charOffset": 881, + "charLength": 5, + "snippet": { + "text": "Quest" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 843, + "charLength": 83, + "snippet": { + "text": "class Tile;\r\nclass Connection;\r\nclass Quest;\r\nclass ProtocolGame;\r\nclass PreySlot;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bba88118484685b6", + "equalIndicator/v1": "8bf2fdac4a5c2d35944ca3ff59b7b3c0a13530ec8aea8a605f77d2f180d5f2c9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Class 'arraylist' is never used", + "markdown": "Class 'arraylist' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/arraylist.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 8, + "charOffset": 711, + "charLength": 9, + "snippet": { + "text": "arraylist" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 660, + "charLength": 99, + "snippet": { + "text": "namespace stdext {\r\n\ttemplate \r\n\tclass arraylist {\r\n\tpublic:\r\n\t\tarraylist() = default;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c444c58e732639c6", + "equalIndicator/v1": "abdadaa4d87f78ae998783506fe9f058b25d326fc34e7aabc6ddf8f3f5e607b3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Struct 'scope_traits' is never used", + "markdown": "Struct 'scope_traits' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 91, + "startColumn": 10, + "charOffset": 2612, + "charLength": 12, + "snippet": { + "text": "scope_traits" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 89, + "startColumn": 1, + "charOffset": 2571, + "charLength": 123, + "snippet": { + "text": "\tpublic:\r\n\t\ttemplate \r\n\t\tstruct scope_traits {\r\n\t\t\tusing type = typename di::config::scope_traits::type;\r\n\t\t};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "69ffbae48aded6d9", + "equalIndicator/v1": "b92639f88e78831592750f1f353610aab33e4ea6eab5554e7673ac7b1f8037ff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Class 'vector_sort' is never used", + "markdown": "Class 'vector_sort' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorsort.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 8, + "charOffset": 564, + "charLength": 11, + "snippet": { + "text": "vector_sort" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 513, + "charLength": 106, + "snippet": { + "text": "namespace stdext {\r\n\ttemplate \r\n\tclass vector_sort {\r\n\tpublic:\r\n\t\tbool contains(const T &v) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4fdd5249401d1cd6", + "equalIndicator/v1": "c3489ab16ac890bec249e021df3ccc706f51da688ee9f7e83b4b33315382ae6e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Struct 'is_creatable' is never used", + "markdown": "Struct 'is_creatable' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/runtime_provider.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 11, + "charOffset": 1083, + "charLength": 12, + "snippet": { + "text": "is_creatable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1047, + "charLength": 99, + "snippet": { + "text": "\r\n\t\t\ttemplate \r\n\t\t\tstruct is_creatable {\r\n\t\t\t\tstatic constexpr auto value = true;\r\n\t\t\t};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "64b1ff696522edf0", + "equalIndicator/v1": "c84535d5e7554aa968b1dc8cd5a40d8c4dbd3640e57e4f6c23852c8433abb9f7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Class 'scope' is never used", + "markdown": "Class 'scope' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 25, + "startColumn": 10, + "charOffset": 551, + "charLength": 5, + "snippet": { + "text": "scope" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 23, + "startColumn": 1, + "charOffset": 501, + "charLength": 103, + "snippet": { + "text": "\t\tpublic:\r\n\t\t\ttemplate \r\n\t\t\tclass scope {\r\n\t\t\tpublic:\r\n\t\t\t\tscope() noexcept = default;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0c3bd96613d297a5", + "equalIndicator/v1": "ca2750d5ec1b5678a0764bb7ccbbc21d3c8e98e0663228fea31ca58c6e27cfb8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Struct 'ProtocolFamiliars' is never used", + "markdown": "Struct 'ProtocolFamiliars' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1535, + "startColumn": 8, + "charOffset": 39869, + "charLength": 17, + "snippet": { + "text": "ProtocolFamiliars" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1533, + "startColumn": 1, + "charOffset": 39856, + "charLength": 153, + "snippet": { + "text": "*/\r\n\r\nstruct ProtocolFamiliars {\r\n\tProtocolFamiliars(const std::string &initName, uint16_t initLookType) :\r\n\t\tname(initName), lookType(initLookType) { }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cf9d5b50cabdb602", + "equalIndicator/v1": "e9eeeea261f64448b4b0fde5c2e465bfe5556b14f253f4a2701800662d6af7b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Struct 'formatter, char>>' is never used", + "markdown": "Struct 'formatter, char\\>\\>' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/pch.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 87, + "startColumn": 13, + "charOffset": 1852, + "charLength": 9, + "snippet": { + "text": "formatter" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 85, + "startColumn": 1, + "charOffset": 1782, + "charLength": 244, + "snippet": { + "text": "// FMT Custom Formatter for Enums\r\ntemplate \r\nstruct fmt::formatter, char>> : formatter> {\r\n\ttemplate \r\n\tauto format(E e, FormatContext &ctx) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f36a85dd204e79ad", + "equalIndicator/v1": "f94b8e56d9bd7b09ba1470a4ffe31644f1a69fe3374491dbcb3f393e9ef4b25e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Class 'Towns' is never used", + "markdown": "Class 'Towns' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/town.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 44, + "startColumn": 7, + "charOffset": 987, + "charLength": 5, + "snippet": { + "text": "Towns" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 42, + "startColumn": 1, + "charOffset": 919, + "charLength": 106, + "snippet": { + "text": "using TownMap = std::map>;\r\n\r\nclass Towns {\r\npublic:\r\n\tTowns() = default;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d9c313bdbb61a823", + "equalIndicator/v1": "fc0ddcb169b459328c65c39ff8fbd606dd1111d09ba8677505beba3565d6676e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTemplateParameter", + "kind": "fail", + "level": "warning", + "message": { + "text": "Type parameter 'TProvider' is never used", + "markdown": "Type parameter 'TProvider' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 35, + "charOffset": 1156, + "charLength": 9, + "snippet": { + "text": "TProvider" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1029, + "charLength": 283, + "snippet": { + "text": "\t\t\t\tusing is_referable = typename wrappers::shared::template is_referable;\r\n\r\n\t\t\t\ttemplate \r\n\t\t\t\tstatic auto try_create(const TProvider &provider)\r\n\t\t\t\t\t-> decltype(wrappers::shared { std::shared_ptr { provider.get() } });\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c03226c541cf0c7", + "equalIndicator/v1": "57642bf391d59b3bab14e1d61094c138299b06cc2f587222d4b9e1a66a287597" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'EventRemover' is never used", + "markdown": "Using 'EventRemover' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/event.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 7, + "charOffset": 721, + "charLength": 12, + "snippet": { + "text": "EventRemover" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 607, + "charLength": 197, + "snippet": { + "text": "using EventListeners = MessageListeners;\r\nusing EventDispatcher = MessageDispatcher;\r\nusing EventRemover = MessageRemover;\r\n\r\ninline IEvent event(EventType type) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0272a3125e6ec04d", + "equalIndicator/v1": "0fc924ccaca3e8aea20c2bb811c6e3b215b5c00b92aea9471e2493e1854e71dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'EventDispatcher' is never used", + "markdown": "Using 'EventDispatcher' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/event.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 19, + "startColumn": 7, + "charOffset": 666, + "charLength": 15, + "snippet": { + "text": "EventDispatcher" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 17, + "startColumn": 1, + "charOffset": 555, + "charLength": 210, + "snippet": { + "text": "using EventListener = IMessageListener;\r\nusing EventListeners = MessageListeners;\r\nusing EventDispatcher = MessageDispatcher;\r\nusing EventRemover = MessageRemover;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "17c23a1502fa25cc", + "equalIndicator/v1": "109d5714d62fc5e6416bec478dcfa9876d03a19c88843b3c973ce2782c3c58fa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'EventListener' is never used", + "markdown": "Using 'EventListener' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/event.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 17, + "startColumn": 7, + "charOffset": 561, + "charLength": 13, + "snippet": { + "text": "EventListener" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 15, + "startColumn": 1, + "charOffset": 459, + "charLength": 255, + "snippet": { + "text": "using EventHandler = MessageHandler;\r\nusing EventPolicy = MessagePolicy;\r\nusing EventListener = IMessageListener;\r\nusing EventListeners = MessageListeners;\r\nusing EventDispatcher = MessageDispatcher;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4fd5e869c89e14ad", + "equalIndicator/v1": "169e40a4de5066634f7e35d994fc2b25c015e5e2d6981d26a00c435735decbaf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'NameMap' is never used", + "markdown": "Using 'NameMap' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 387, + "startColumn": 8, + "charOffset": 9915, + "charLength": 7, + "snippet": { + "text": "NameMap" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 385, + "startColumn": 1, + "charOffset": 9884, + "charLength": 140, + "snippet": { + "text": "class Items {\r\npublic:\r\n\tusing NameMap = std::unordered_multimap;\r\n\tusing InventoryVector = std::vector;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ba486f9dafd02a70", + "equalIndicator/v1": "345ea36b6946287fbbb2e9e80436ed190744c129e474133785c564513b214147" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'EventPolicy' is never used", + "markdown": "Using 'EventPolicy' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/event.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 16, + "startColumn": 7, + "charOffset": 514, + "charLength": 11, + "snippet": { + "text": "EventPolicy" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 423, + "charLength": 236, + "snippet": { + "text": "using IEvent = Message;\r\nusing EventHandler = MessageHandler;\r\nusing EventPolicy = MessagePolicy;\r\nusing EventListener = IMessageListener;\r\nusing EventListeners = MessageListeners;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "384a7db9201797fa", + "equalIndicator/v1": "469af02a1ec0144162966ea1c932f250121b233dbfa508c591fb0ec07f57459e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'is_referable' is never used", + "markdown": "Using 'is_referable' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 39, + "startColumn": 11, + "charOffset": 1039, + "charLength": 12, + "snippet": { + "text": "is_referable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 37, + "startColumn": 1, + "charOffset": 995, + "charLength": 172, + "snippet": { + "text": "\r\n\t\t\t\ttemplate \r\n\t\t\t\tusing is_referable = typename wrappers::shared::template is_referable;\r\n\r\n\t\t\t\ttemplate \r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "05ca36c90a091ea8", + "equalIndicator/v1": "4bc03c675e90ffb884964cd18484ab513f3c29b21b949bc16f8ecaaf39341537" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'RuneSpellFunction' is never used", + "markdown": "Using 'RuneSpellFunction' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 7, + "charOffset": 2407, + "charLength": 17, + "snippet": { + "text": "RuneSpellFunction" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2351, + "charLength": 213, + "snippet": { + "text": "constexpr auto g_spells = Spells::getInstance;\r\n\r\nusing RuneSpellFunction = std::function spell, std::shared_ptr player, const Position &posTo)>;\r\n\r\nclass BaseSpell {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "51297eb8ecbc45e9", + "equalIndicator/v1": "616312916fb518c9d658219d1d0a93994c3d2273e936ecf6518330d659c05602" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'WeaponUnique_ptr' is never used", + "markdown": "Using 'WeaponUnique_ptr' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 26, + "startColumn": 7, + "charOffset": 752, + "charLength": 16, + "snippet": { + "text": "WeaponUnique_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 24, + "startColumn": 1, + "charOffset": 724, + "charLength": 125, + "snippet": { + "text": "struct LuaVariant;\r\n\r\nusing WeaponUnique_ptr = std::unique_ptr;\r\nusing WeaponShared_ptr = std::shared_ptr;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fb8dda5ab4eccf10", + "equalIndicator/v1": "61d2fee0a364ab6eacaf3ccd6e9d54aea6bba7af3e3d9bc588d97990967b5a1d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'CommandListener' is never used", + "markdown": "Using 'CommandListener' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/command.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 7, + "charOffset": 611, + "charLength": 15, + "snippet": { + "text": "CommandListener" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 501, + "charLength": 275, + "snippet": { + "text": "using CommandHandler = MessageHandler;\r\nusing CommandPolicy = MessagePolicy;\r\nusing CommandListener = IMessageListener;\r\nusing CommandListeners = MessageListeners;\r\nusing CommandDispatcher = MessageDispatcher;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "427eedea6c7eacf9", + "equalIndicator/v1": "84089ba1506cbc6e8190ed6d0bb1be1510010e5a626b809de4c3b4ffcbf1f95a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'StorageMap' is never used", + "markdown": "Using 'StorageMap' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 77, + "startColumn": 8, + "charOffset": 2112, + "charLength": 10, + "snippet": { + "text": "StorageMap" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 75, + "startColumn": 1, + "charOffset": 2093, + "charLength": 119, + "snippet": { + "text": "\r\nprivate:\r\n\tusing StorageMap = std::map;\r\n\tusing DBResultMap = std::map;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c13da41c2e472ecb", + "equalIndicator/v1": "8e5ce11f1915034338017cf4eb0948761e21e5b5059849168a364a4267f19eb9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'CommandListeners' is never used", + "markdown": "Using 'CommandListeners' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/command.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 7, + "charOffset": 667, + "charLength": 16, + "snippet": { + "text": "CommandListeners" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 554, + "charLength": 275, + "snippet": { + "text": "using CommandPolicy = MessagePolicy;\r\nusing CommandListener = IMessageListener;\r\nusing CommandListeners = MessageListeners;\r\nusing CommandDispatcher = MessageDispatcher;\r\nusing CommandRemover = MessageRemover;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fdef2abe14fb9b4e", + "equalIndicator/v1": "901ac8e56b5cab19d1abfb24b5a56f2cf6e887f0120603085c0a9adb35de8b7d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'CommandHandler' is never used", + "markdown": "Using 'CommandHandler' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/command.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 19, + "startColumn": 7, + "charOffset": 507, + "charLength": 14, + "snippet": { + "text": "CommandHandler" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 17, + "startColumn": 1, + "charOffset": 459, + "charLength": 201, + "snippet": { + "text": "\r\nusing ICommand = Message;\r\nusing CommandHandler = MessageHandler;\r\nusing CommandPolicy = MessagePolicy;\r\nusing CommandListener = IMessageListener;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "186366deb536037c", + "equalIndicator/v1": "9dde7576662b5d2770758cb5e7c38c0239948c200ada1dd1a9ed4a72027222dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'CommandRemover' is never used", + "markdown": "Using 'CommandRemover' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/command.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 24, + "startColumn": 7, + "charOffset": 783, + "charLength": 14, + "snippet": { + "text": "CommandRemover" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 661, + "charLength": 215, + "snippet": { + "text": "using CommandListeners = MessageListeners;\r\nusing CommandDispatcher = MessageDispatcher;\r\nusing CommandRemover = MessageRemover;\r\n\r\ninline ICommand command(CommandType type) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "672875cf37b0e339", + "equalIndicator/v1": "9fc6fb5458a05d66dac45bd1bb1373a74796f760b499db28d7d4003b19ea99b7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'VocEquipMap' is never used", + "markdown": "Using 'VocEquipMap' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 24, + "startColumn": 7, + "charOffset": 724, + "charLength": 11, + "snippet": { + "text": "VocEquipMap" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 712, + "charLength": 97, + "snippet": { + "text": "};\r\n\r\nusing VocEquipMap = std::map;\r\n\r\nclass MoveEvents final : public Scripts {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8491542fb0032e11", + "equalIndicator/v1": "ae2a5f6e28b74452001ebbd91253e082b128be8658e082d47c7434025e4591a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'ItemBlockList' is never used", + "markdown": "Using 'ItemBlockList' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 16, + "startColumn": 7, + "charOffset": 510, + "charLength": 13, + "snippet": { + "text": "ItemBlockList" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 468, + "charLength": 135, + "snippet": { + "text": "#include \"database/database.hpp\"\r\n\r\nusing ItemBlockList = std::list>>;\r\n\r\nclass IOLoginData {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "77cde0ef28f9cc43", + "equalIndicator/v1": "af9ed124bfd454f0ede2dbb764b4492048209edfd3f2f8465ca524fccb0e1b08" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'scope_traits' is never used", + "markdown": "Using 'scope_traits' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/runtime_provider.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 71, + "startColumn": 9, + "charOffset": 2034, + "charLength": 12, + "snippet": { + "text": "scope_traits" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 69, + "startColumn": 1, + "charOffset": 1994, + "charLength": 130, + "snippet": { + "text": "\tpublic:\r\n\t\ttemplate \r\n\t\tusing scope_traits = typename TScopeTraits::template scope_traits;\r\n\r\n\t\tauto provider(...) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "42961bb2c38e7787", + "equalIndicator/v1": "ba87516efaf76f3074659a053f7b40d14bc175ac0a6ed1789fbd38eb56d1725f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'CommandPolicy' is never used", + "markdown": "Using 'CommandPolicy' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/command.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 7, + "charOffset": 560, + "charLength": 13, + "snippet": { + "text": "CommandPolicy" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 461, + "charLength": 256, + "snippet": { + "text": "using ICommand = Message;\r\nusing CommandHandler = MessageHandler;\r\nusing CommandPolicy = MessagePolicy;\r\nusing CommandListener = IMessageListener;\r\nusing CommandListeners = MessageListeners;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a76ad8c286b22089", + "equalIndicator/v1": "c3a1efd9919c45ab8757c0e65bdac17b45e0c3ee78d409410308d0995eada011" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'EventListeners' is never used", + "markdown": "Using 'EventListeners' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/event.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 7, + "charOffset": 613, + "charLength": 14, + "snippet": { + "text": "EventListeners" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 508, + "charLength": 255, + "snippet": { + "text": "using EventPolicy = MessagePolicy;\r\nusing EventListener = IMessageListener;\r\nusing EventListeners = MessageListeners;\r\nusing EventDispatcher = MessageDispatcher;\r\nusing EventRemover = MessageRemover;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dbbc6a144211c4a2", + "equalIndicator/v1": "d88b96d3ffd0aa4c1bbcb1b0d92ed8955a4f9b898cf1ec446d842fa4a6092bf7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'EventHandler' is never used", + "markdown": "Using 'EventHandler' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/event.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 15, + "startColumn": 7, + "charOffset": 465, + "charLength": 12, + "snippet": { + "text": "EventHandler" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 13, + "startColumn": 1, + "charOffset": 421, + "charLength": 185, + "snippet": { + "text": "\r\nusing IEvent = Message;\r\nusing EventHandler = MessageHandler;\r\nusing EventPolicy = MessagePolicy;\r\nusing EventListener = IMessageListener;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "da960281f5977bdd", + "equalIndicator/v1": "e403a4acae22708c8b1e9124d54705aec4ac6d7c9b50f1c281ebce4a81106423" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'CommandDispatcher' is never used", + "markdown": "Using 'CommandDispatcher' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/command.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 23, + "startColumn": 7, + "charOffset": 724, + "charLength": 17, + "snippet": { + "text": "CommandDispatcher" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 21, + "startColumn": 1, + "charOffset": 605, + "charLength": 226, + "snippet": { + "text": "using CommandListener = IMessageListener;\r\nusing CommandListeners = MessageListeners;\r\nusing CommandDispatcher = MessageDispatcher;\r\nusing CommandRemover = MessageRemover;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67d81a6bff225b67", + "equalIndicator/v1": "ef4bf17bdb137916cec7ea41972ad639a08938634591b6ab1a3c6d13574ad7d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "VirtualCallInCtorOrDtor", + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from destructor", + "markdown": "Do not invoke virtual member functions from destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 66, + "startColumn": 22, + "charOffset": 2340, + "charLength": 9, + "snippet": { + "text": "getParent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 64, + "startColumn": 1, + "charOffset": 2255, + "charLength": 173, + "snippet": { + "text": "Container::~Container() {\r\n\tif (getID() == ITEM_BROWSEFIELD) {\r\n\t\tif (getParent() && getParent()->getTile()) {\r\n\t\t\tg_game().browseFields.erase(getParent()->getTile());\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "05e1b7c9bd62db1a", + "equalIndicator/v1": "119f1cdad6dc5e1e024a4637f5bd4bde2c64d37028fedc4f5f2992ec18968ea0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "VirtualCallInCtorOrDtor", + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from constructor", + "markdown": "Do not invoke virtual member functions from constructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 2, + "charOffset": 703, + "charLength": 12, + "snippet": { + "text": "onIdleStatus" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 676, + "charLength": 48, + "snippet": { + "text": "\r\nCreature::Creature() {\r\n\tonIdleStatus();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7450f53cc604b72c", + "equalIndicator/v1": "461aeab752528abaeae55ce5113567e4e501afb325f42d037a68e48894ee2e2c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "VirtualCallInCtorOrDtor", + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from destructor", + "markdown": "Do not invoke virtual member functions from destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 30, + "startColumn": 2, + "charOffset": 921, + "charLength": 10, + "snippet": { + "text": "closeState" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 28, + "startColumn": 1, + "charOffset": 879, + "charLength": 61, + "snippet": { + "text": "\r\n\tLuaEnvironment::shuttingDown = true;\r\n\tcloseState();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "724ed90fdf87c817", + "equalIndicator/v1": "7d4a0f856edcbe1ab60b0d383d5670e83af95291ff16b992d65eb2446c928e2e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "VirtualCallInCtorOrDtor", + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from destructor", + "markdown": "Do not invoke virtual member functions from destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 2, + "charOffset": 1000, + "charLength": 10, + "snippet": { + "text": "closeState" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 952, + "charLength": 67, + "snippet": { + "text": "\r\nLuaScriptInterface::~LuaScriptInterface() {\r\n\tcloseState();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8f8aa0b2ebcc949a", + "equalIndicator/v1": "8ce6c2a51e45e768d68e2a84348a7c90dce237197b8765ff641e0e698bf7c03d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "VirtualCallInCtorOrDtor", + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from destructor", + "markdown": "Do not invoke virtual member functions from destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 67, + "startColumn": 32, + "charOffset": 2398, + "charLength": 9, + "snippet": { + "text": "getParent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 65, + "startColumn": 1, + "charOffset": 2282, + "charLength": 148, + "snippet": { + "text": "\tif (getID() == ITEM_BROWSEFIELD) {\r\n\t\tif (getParent() && getParent()->getTile()) {\r\n\t\t\tg_game().browseFields.erase(getParent()->getTile());\r\n\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5bcbc336298ce3cf", + "equalIndicator/v1": "b72f751e1a834d2cda1e4e29aef74fcd3d86cf56266613bfdefe632b83a8c8d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "VirtualCallInCtorOrDtor", + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from destructor", + "markdown": "Do not invoke virtual member functions from destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 66, + "startColumn": 7, + "charOffset": 2325, + "charLength": 9, + "snippet": { + "text": "getParent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 64, + "startColumn": 1, + "charOffset": 2255, + "charLength": 173, + "snippet": { + "text": "Container::~Container() {\r\n\tif (getID() == ITEM_BROWSEFIELD) {\r\n\t\tif (getParent() && getParent()->getTile()) {\r\n\t\t\tg_game().browseFields.erase(getParent()->getTile());\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7a88e498355d72af", + "equalIndicator/v1": "b91584fc575ef933c62679406d356a292078d026e430c74710a782242aa00293" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "VirtualCallInCtorOrDtor", + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from destructor", + "markdown": "Do not invoke virtual member functions from destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 71, + "startColumn": 20, + "charOffset": 2499, + "charLength": 9, + "snippet": { + "text": "getParent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 69, + "startColumn": 1, + "charOffset": 2429, + "charLength": 93, + "snippet": { + "text": "\r\n\t\tfor (std::shared_ptr item : itemlist) {\r\n\t\t\titem->setParent(getParent());\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "11de239a7cacaabb", + "equalIndicator/v1": "d007daab3480f59d07a0936eb0c71e50d35c6bcdbdffc5b01c6acae765223adc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + } + ], + "automationDetails": { + "id": "canary/qodana/2024-08-04", + "guid": "7be05d40-d865-411d-aa6b-241c32279c4e", + "properties": { + "jobUrl": "" + } + }, + "newlineSequences": [ + "\r\n", + "\n" + ], + "properties": { + "configProfile": "recommended", + "deviceId": "131123170079767-8100-48ff-b489-333788c6b484", + "qodanaNewResultSummary": { + "high": 2881, + "moderate": 23, + "total": 2904 + } + } + } + ], + "properties": { + "runTimestamp": "1722822687214" + } +} \ No newline at end of file diff --git a/qodana.yml b/qodana.yml new file mode 100644 index 00000000000..f8ba4ca7b76 --- /dev/null +++ b/qodana.yml @@ -0,0 +1,657 @@ +version: "1.0" + +profile: + name: qodana.recommended + +inspections: + + +include: + # inspections + - name: ClangTidy + - name: Clazy + - name: Misra + - name: OCUnusedConcept + - name: OCUnusedGlobalDeclaration + - name: OCUnusedIncludeDirective + - name: OCUnusedMacro + - name: OCUnusedStruct + - name: OCUnusedTemplateParameter + - name: OCUnusedTypeAlias + - name: CMakeDeprecatedCommands + - name: CMakeMismatchedCommandArguments + - name: ArrayIndexOutOfBounds + - name: ConstantFunctionResult + - name: ConstantParameter + - name: ConstantConditionsOC + - name: OCDFA + - name: DanglingPointer + - name: EndlessLoop + - name: InfiniteRecursion + - name: OCGlobalDFAInspection + - name: LocalValueEscapesScope + - name: LoopDoesntUseConditionVariable + - name: MemoryLeak + - name: NotInitializedField + - name: NullDereference + - name: UnreachableCallsOfFunction + - name: UnreachableCode + - name: UnusedLocalVariable + - name: UnusedParameter + - name: UnusedValue + - name: HidingNonVirtualFunction + - name: NotImplementedFunctions + - name: ArgumentSelectionDefects + - name: ClangdErrorsAndWarnings + - name: EmptyDeclOrStmt + - name: OCInconsistentNaming + - name: PreprocessorComment + - name: Simplify + - name: UnconstrainedVariableType + - name: VirtualCallInCtorOrDtor + # - name: ComposeMissingKeys + # - name: ComposeUnknownKeys + # - name: ComposeUnknownValues + # - name: ComposeUnquotedPorts + # - name: DockerJsonFormStringLiterals + # - name: DockerFileAddOrCopyPaths + # - name: DockerFileAssignments + # - name: DockerFileRunCommandMissingContinuation + # - name: DockerFileArgumentCount + # - name: MarkdownIncorrectTableFormatting + # - name: MarkdownIncorrectlyNumberedListItem + # - name: MarkdownLinkDestinationWithSpaces + # - name: MarkdownOutdatedTableOfContents + # - name: MarkdownNoTableBorders + # - name: MarkdownUnresolvedFileReference + # - name: MarkdownUnresolvedHeaderReference + # - name: MarkdownUnresolvedLinkLabel + + # checks + - name: abseil-duration-addition + - name: abseil-duration-comparison + - name: abseil-duration-conversion-cast + - name: abseil-duration-division + - name: abseil-duration-factory-float + - name: abseil-duration-factory-scale + - name: abseil-duration-subtraction + - name: abseil-duration-unnecessary-conversion + - name: abseil-faster-strsplit-delimiter + - name: abseil-no-internal-dependencies + - name: abseil-no-namespace + - name: abseil-redundant-strcat-calls + - name: abseil-str-cat-append + - name: abseil-string-find-startswith + - name: abseil-string-find-str-contains + - name: abseil-time-comparison + - name: abseil-time-subtraction + - name: abseil-upgrade-duration-conversions + - name: altera-id-dependent-backward-branch + # - name: altera-kernel-name-restriction + # - name: altera-single-work-item-barrier + - name: altera-struct-pack-align + - name: altera-unroll-loops + - name: android-cloexec-accept + - name: android-cloexec-accept4 + - name: android-cloexec-creat + - name: android-cloexec-dup + - name: android-cloexec-epoll-create + - name: android-cloexec-epoll-create1 + - name: android-cloexec-fopen + - name: android-cloexec-inotify-init + - name: android-cloexec-inotify-init1 + - name: android-cloexec-memfd-create + - name: android-cloexec-open + - name: android-cloexec-pipe + - name: android-cloexec-pipe2 + - name: android-cloexec-socket + - name: android-comparison-in-temp-failure-retry + - name: boost-use-to-string + - name: bugprone-argument-comment + - name: bugprone-assert-side-effect + - name: bugprone-assignment-in-if-condition + - name: bugprone-bad-signal-to-kill-thread + - name: bugprone-bool-pointer-implicit-conversion + - name: bugprone-branch-clone + - name: bugprone-casting-through-void + - name: bugprone-chained-comparison + - name: bugprone-compare-pointer-to-member-virtual-function + - name: bugprone-copy-constructor-init + - name: bugprone-dangling-handle + - name: bugprone-dynamic-static-initializers + - name: bugprone-easily-swappable-parameters + - name: bugprone-empty-catch + - name: bugprone-exception-escape + - name: bugprone-fold-init-type + - name: bugprone-forward-declaration-namespace + - name: bugprone-forwarding-reference-overload + - name: bugprone-implicit-widening-of-multiplication-result + - name: bugprone-inaccurate-erase + - name: bugprone-inc-dec-in-conditions + - name: bugprone-incorrect-enable-if + - name: bugprone-incorrect-roundings + - name: bugprone-infinite-loop + - name: bugprone-integer-division + - name: bugprone-lambda-function-name + - name: bugprone-macro-parentheses + - name: bugprone-macro-repeated-side-effects + - name: bugprone-misplaced-operator-in-strlen-in-alloc + - name: bugprone-misplaced-pointer-arithmetic-in-alloc + - name: bugprone-misplaced-widening-cast + - name: bugprone-move-forwarding-reference + - name: bugprone-multi-level-implicit-pointer-conversion + - name: bugprone-multiple-new-in-one-expression + - name: bugprone-multiple-statement-macro + - name: bugprone-narrowing-conversions + - name: bugprone-no-escape + - name: bugprone-non-zero-enum-to-bool-conversion + - name: bugprone-not-null-terminated-result + - name: bugprone-optional-value-conversion + - name: bugprone-parent-virtual-call + - name: bugprone-posix-return + - name: bugprone-redundant-branch-condition + - name: bugprone-reserved-identifier + - name: bugprone-shared-ptr-array-mismatch + - name: bugprone-signal-handler + - name: bugprone-signed-char-misuse + - name: bugprone-sizeof-container + - name: bugprone-sizeof-expression + - name: bugprone-spuriously-wake-up-functions + - name: bugprone-standalone-empty + - name: bugprone-string-constructor + - name: bugprone-string-integer-assignment + - name: bugprone-string-literal-with-embedded-nul + - name: bugprone-stringview-nullptr + - name: bugprone-suspicious-enum-usage + - name: bugprone-suspicious-include + - name: bugprone-suspicious-memory-comparison + - name: bugprone-suspicious-memset-usage + - name: bugprone-suspicious-missing-comma + - name: bugprone-suspicious-realloc-usage + - name: bugprone-suspicious-semicolon + - name: bugprone-suspicious-string-compare + - name: bugprone-swapped-arguments + - name: bugprone-switch-missing-default-case + - name: bugprone-terminating-continue + - name: bugprone-throw-keyword-missing + - name: bugprone-too-small-loop-variable + - name: bugprone-unchecked-optional-access + - name: bugprone-undefined-memory-manipulation + - name: bugprone-undelegated-constructor + - name: bugprone-unhandled-exception-at-new + - name: bugprone-unhandled-self-assignment + - name: bugprone-unique-ptr-array-mismatch + - name: bugprone-unsafe-functions + - name: bugprone-unused-local-non-trivial-variable + - name: bugprone-unused-raii + - name: bugprone-unused-return-value + - name: bugprone-use-after-move + - name: bugprone-virtual-near-miss + - name: cert-con36-c + - name: cert-con54-cpp + - name: cert-dcl03-c + - name: cert-dcl16-c + - name: cert-dcl37-c + - name: cert-dcl50-cpp + - name: cert-dcl51-cpp + - name: cert-dcl54-cpp + - name: cert-dcl58-cpp + - name: cert-dcl59-cpp + - name: cert-env33-c + - name: cert-err09-cpp + - name: cert-err33-c + - name: cert-err34-c + - name: cert-err52-cpp + - name: cert-err58-cpp + - name: cert-err60-cpp + - name: cert-err61-cpp + - name: cert-exp42-c + - name: cert-fio38-c + - name: cert-flp30-c + - name: cert-flp37-c + - name: cert-mem57-cpp + - name: cert-msc24-c + - name: cert-msc30-c + - name: cert-msc32-c + - name: cert-msc33-c + - name: cert-msc50-cpp + - name: cert-msc51-cpp + - name: cert-msc54-cpp + - name: cert-oop11-cpp + - name: cert-oop54-cpp + - name: cert-oop57-cpp + - name: cert-oop58-cpp + - name: cert-pos44-c + - name: cert-pos47-c + - name: cert-sig30-c + - name: cert-str34-c + - name: clion-argument-selection-defects + - name: clion-empty-decl-or-stmt + - name: clion-misra-c2012-10-1 + - name: clion-misra-c2012-10-2 + - name: clion-misra-c2012-10-5 + - name: clion-misra-c2012-11-1 + - name: clion-misra-c2012-11-2 + - name: clion-misra-c2012-11-3 + - name: clion-misra-c2012-11-4 + - name: clion-misra-c2012-11-5 + - name: clion-misra-c2012-11-6 + - name: clion-misra-c2012-11-7 + - name: clion-misra-c2012-11-8 + - name: clion-misra-c2012-11-9 + - name: clion-misra-c2012-12-2 + - name: clion-misra-c2012-12-3 + - name: clion-misra-c2012-12-5 + - name: clion-misra-c2012-13-1 + - name: clion-misra-c2012-13-3 + - name: clion-misra-c2012-13-4 + - name: clion-misra-c2012-13-5 + - name: clion-misra-c2012-13-6 + - name: clion-misra-c2012-14-4 + - name: clion-misra-c2012-15-1 + - name: clion-misra-c2012-15-2 + - name: clion-misra-c2012-15-5 + - name: clion-misra-c2012-15-6 + - name: clion-misra-c2012-15-7 + - name: clion-misra-c2012-16-3 + - name: clion-misra-c2012-16-4 + - name: clion-misra-c2012-16-5 + - name: clion-misra-c2012-16-6 + - name: clion-misra-c2012-16-7 + - name: clion-misra-c2012-17-3 + - name: clion-misra-c2012-17-5 + - name: clion-misra-c2012-17-6 + - name: clion-misra-c2012-17-7 + - name: clion-misra-c2012-17-8 + - name: clion-misra-c2012-18-4 + - name: clion-misra-c2012-18-5 + - name: clion-misra-c2012-18-7 + - name: clion-misra-c2012-18-8 + - name: clion-misra-c2012-19-2 + - name: clion-misra-c2012-21-10 + - name: clion-misra-c2012-21-3 + - name: clion-misra-c2012-21-7 + - name: clion-misra-c2012-21-8 + - name: clion-misra-c2012-21-9 + - name: clion-misra-c2012-22-5 + - name: clion-misra-c2012-4-12 + - name: clion-misra-c2012-4-3 + - name: clion-misra-c2012-6-1 + - name: clion-misra-c2012-6-2 + - name: clion-misra-c2012-7-1 + - name: clion-misra-c2012-7-2 + - name: clion-misra-c2012-7-3 + - name: clion-misra-c2012-7-4 + - name: clion-misra-c2012-8-1 + - name: clion-misra-c2012-8-10 + - name: clion-misra-c2012-8-11 + - name: clion-misra-c2012-8-12 + - name: clion-misra-c2012-8-14 + - name: clion-misra-c2012-8-2 + - name: clion-misra-c2012-8-8 + - name: clion-misra-c2012-9-3 + - name: clion-misra-c2012-9-5 + - name: clion-misra-cpp2008-0-1-7 + - name: clion-misra-cpp2008-10-1-1 + - name: clion-misra-cpp2008-10-3-2 + - name: clion-misra-cpp2008-11-0-1 + - name: clion-misra-cpp2008-12-1-3 + - name: clion-misra-cpp2008-12-8-2 + - name: clion-misra-cpp2008-14-5-2 + - name: clion-misra-cpp2008-15-0-2 + - name: clion-misra-cpp2008-15-1-2 + - name: clion-misra-cpp2008-15-1-3 + - name: clion-misra-cpp2008-15-3-5 + - name: clion-misra-cpp2008-15-5-1 + - name: clion-misra-cpp2008-18-0-2 + - name: clion-misra-cpp2008-18-0-3 + - name: clion-misra-cpp2008-18-0-4 + - name: clion-misra-cpp2008-18-2-1 + - name: clion-misra-cpp2008-18-4-1 + - name: clion-misra-cpp2008-2-13-1 + - name: clion-misra-cpp2008-2-13-2 + - name: clion-misra-cpp2008-2-13-3 + - name: clion-misra-cpp2008-2-13-4 + - name: clion-misra-cpp2008-3-1-2 + - name: clion-misra-cpp2008-3-1-3 + - name: clion-misra-cpp2008-3-3-2 + - name: clion-misra-cpp2008-4-10-2 + - name: clion-misra-cpp2008-4-5-1 + - name: clion-misra-cpp2008-4-5-2 + - name: clion-misra-cpp2008-5-0-11 + - name: clion-misra-cpp2008-5-0-12 + - name: clion-misra-cpp2008-5-0-13 + - name: clion-misra-cpp2008-5-0-14 + - name: clion-misra-cpp2008-5-0-19 + - name: clion-misra-cpp2008-5-0-4 + - name: clion-misra-cpp2008-5-0-5 + - name: clion-misra-cpp2008-5-0-6 + - name: clion-misra-cpp2008-5-14-1 + - name: clion-misra-cpp2008-5-18-1 + - name: clion-misra-cpp2008-5-2-10 + - name: clion-misra-cpp2008-5-2-11 + - name: clion-misra-cpp2008-5-2-12 + - name: clion-misra-cpp2008-5-2-2 + - name: clion-misra-cpp2008-5-2-4 + - name: clion-misra-cpp2008-5-2-5 + - name: clion-misra-cpp2008-5-2-6 + - name: clion-misra-cpp2008-5-2-8 + - name: clion-misra-cpp2008-5-2-9 + - name: clion-misra-cpp2008-5-3-1 + - name: clion-misra-cpp2008-5-3-2 + - name: clion-misra-cpp2008-5-3-3 + - name: clion-misra-cpp2008-5-3-4 + - name: clion-misra-cpp2008-5-8-1 + - name: clion-misra-cpp2008-6-2-1 + - name: clion-misra-cpp2008-6-3-1 + - name: clion-misra-cpp2008-6-4-1 + - name: clion-misra-cpp2008-6-4-2 + - name: clion-misra-cpp2008-6-4-4 + - name: clion-misra-cpp2008-6-4-5 + - name: clion-misra-cpp2008-6-4-6 + - name: clion-misra-cpp2008-6-4-7 + - name: clion-misra-cpp2008-6-4-8 + - name: clion-misra-cpp2008-6-5-1 + - name: clion-misra-cpp2008-6-5-2 + - name: clion-misra-cpp2008-6-5-3 + - name: clion-misra-cpp2008-6-5-4 + - name: clion-misra-cpp2008-6-6-2 + - name: clion-misra-cpp2008-6-6-4 + # - name: clion-misra-cpp2008-6-6-5 + # - name: clion-misra-cpp2008-7-3-1 + - name: clion-misra-cpp2008-7-3-4 + - name: clion-misra-cpp2008-7-4-3 + - name: clion-misra-cpp2008-8-0-1 + - name: clion-misra-cpp2008-8-4-1 + - name: clion-misra-cpp2008-8-4-4 + - name: clion-misra-cpp2008-8-5-3 + - name: clion-misra-cpp2008-9-5-1 + - name: clion-misra-cpp2008-9-6-2 + - name: clion-misra-cpp2008-9-6-4 + - name: clion-preprocessor-comment-check + # - name: clion-replace-enable-if + - name: clion-simplify + - name: clion-unconstrained-variable-type + - name: clion-virtual-call-in-ctor-or-dtor + - name: concurrency-mt-unsafe + - name: concurrency-thread-canceltype-asynchronous + - name: cppcoreguidelines-avoid-c-arrays + - name: cppcoreguidelines-avoid-capturing-lambda-coroutines + - name: cppcoreguidelines-avoid-const-or-ref-data-members + - name: cppcoreguidelines-avoid-do-while + - name: cppcoreguidelines-avoid-goto + # - name: cppcoreguidelines-avoid-magic-numbers + - name: cppcoreguidelines-avoid-non-const-global-variables + - name: cppcoreguidelines-avoid-reference-coroutine-parameters + - name: cppcoreguidelines-c-copy-assignment-signature + - name: cppcoreguidelines-explicit-virtual-functions + - name: cppcoreguidelines-init-variables + - name: cppcoreguidelines-interfaces-global-init + - name: cppcoreguidelines-macro-to-enum + - name: cppcoreguidelines-macro-usage + - name: cppcoreguidelines-misleading-capture-default-by-value + - name: cppcoreguidelines-missing-std-forward + - name: cppcoreguidelines-narrowing-conversions + - name: cppcoreguidelines-no-malloc + - name: cppcoreguidelines-no-suspend-with-lock + - name: cppcoreguidelines-noexcept-destructor + - name: cppcoreguidelines-noexcept-move-operations + - name: cppcoreguidelines-noexcept-swap + - name: cppcoreguidelines-non-private-member-variables-in-classes + - name: cppcoreguidelines-owning-memory + - name: cppcoreguidelines-prefer-member-initializer + - name: cppcoreguidelines-pro-bounds-array-to-pointer-decay + - name: cppcoreguidelines-pro-bounds-constant-array-index + - name: cppcoreguidelines-pro-bounds-pointer-arithmetic + - name: cppcoreguidelines-pro-type-const-cast + - name: cppcoreguidelines-pro-type-cstyle-cast + - name: cppcoreguidelines-pro-type-member-init + - name: cppcoreguidelines-pro-type-reinterpret-cast + - name: cppcoreguidelines-pro-type-static-cast-downcast + - name: cppcoreguidelines-pro-type-union-access + - name: cppcoreguidelines-pro-type-vararg + - name: cppcoreguidelines-rvalue-reference-param-not-moved + - name: cppcoreguidelines-slicing + - name: cppcoreguidelines-special-member-functions + - name: cppcoreguidelines-use-default-member-init + - name: cppcoreguidelines-virtual-class-destructor + - name: darwin-avoid-spinlock + - name: darwin-dispatch-once-nonstatic + # - name: fuchsia-default-arguments-calls + - name: fuchsia-default-arguments-declarations + - name: fuchsia-header-anon-namespaces + - name: fuchsia-multiple-inheritance + - name: fuchsia-overloaded-operator + - name: fuchsia-statically-constructed-objects + - name: fuchsia-trailing-return + - name: fuchsia-virtual-inheritance + - name: google-build-explicit-make-pair + - name: google-build-namespaces + - name: google-build-using-namespace + - name: google-default-arguments + - name: google-explicit-constructor + - name: google-global-names-in-headers + - name: google-objc-avoid-nsobject-new + - name: google-objc-avoid-throwing-exception + - name: google-objc-function-naming + - name: google-objc-global-variable-declaration + - name: google-readability-avoid-underscore-in-googletest-name + - name: google-readability-braces-around-statements + - name: google-readability-casting + - name: google-readability-function-size + - name: google-readability-namespace-comments + - name: google-readability-todo + - name: google-runtime-int + - name: google-runtime-operator + - name: google-upgrade-googletest-case + - name: hicpp-avoid-c-arrays + - name: hicpp-avoid-goto + - name: hicpp-braces-around-statements + - name: hicpp-deprecated-headers + - name: hicpp-exception-baseclass + - name: hicpp-explicit-conversions + - name: hicpp-function-size + - name: hicpp-ignored-remove-result + - name: hicpp-invalid-access-moved + - name: hicpp-member-init + - name: hicpp-move-const-arg + - name: hicpp-multiway-paths-covered + - name: hicpp-named-parameter + - name: hicpp-new-delete-operators + - name: hicpp-no-array-decay + - name: hicpp-no-assembler + - name: hicpp-no-malloc + - name: hicpp-noexcept-move + - name: hicpp-signed-bitwise + - name: hicpp-special-member-functions + - name: hicpp-static-assert + - name: hicpp-undelegated-constructor + - name: hicpp-uppercase-literal-suffix + - name: hicpp-use-auto + - name: hicpp-use-emplace + - name: hicpp-use-equals-default + - name: hicpp-use-equals-delete + - name: hicpp-use-noexcept + - name: hicpp-use-nullptr + - name: hicpp-use-override + - name: hicpp-vararg + # - name: linuxkernel-must-check-errs + - name: llvm-else-after-return + - name: llvm-header-guard + # - name: llvm-include-order + - name: llvm-namespace-comment + - name: llvm-prefer-isa-or-dyn-cast-in-conditionals + - name: llvm-prefer-register-over-unsigned + - name: llvm-qualified-auto + - name: llvm-twine-local + # - name: llvmlibc-callee-namespace + # - name: llvmlibc-implementation-in-namespace + - name: llvmlibc-inline-function-decl + - name: llvmlibc-restrict-system-libc-headers + - name: misc-confusable-identifiers + - name: misc-const-correctness + - name: misc-coroutine-hostile-raii + - name: misc-definitions-in-headers + - name: misc-header-include-cycle + # - name: misc-include-cleaner + - name: misc-misleading-bidirectional + - name: misc-misleading-identifier + - name: misc-misplaced-const + - name: misc-new-delete-overloads + - name: misc-no-recursion + - name: misc-non-copyable-objects + - name: misc-non-private-member-variables-in-classes + - name: misc-redundant-expression + - name: misc-static-assert + - name: misc-throw-by-value-catch-by-reference + - name: misc-unconventional-assign-operator + - name: misc-uniqueptr-reset-release + - name: misc-unused-alias-decls + - name: misc-unused-parameters + - name: misc-unused-using-decls + - name: misc-use-anonymous-namespace + - name: modernize-avoid-bind + - name: modernize-avoid-c-arrays + - name: modernize-concat-nested-namespaces + - name: modernize-deprecated-headers + - name: modernize-deprecated-ios-base-aliases + - name: modernize-loop-convert + - name: modernize-macro-to-enum + - name: modernize-make-shared + - name: modernize-make-unique + - name: modernize-pass-by-value + - name: modernize-raw-string-literal + - name: modernize-redundant-void-arg + - name: modernize-replace-auto-ptr + - name: modernize-replace-disallow-copy-and-assign-macro + - name: modernize-replace-random-shuffle + - name: modernize-return-braced-init-list + - name: modernize-shrink-to-fit + - name: modernize-type-traits + - name: modernize-unary-static-assert + - name: modernize-use-auto + - name: modernize-use-bool-literals + - name: modernize-use-constraints + - name: modernize-use-default-member-init + - name: modernize-use-emplace + - name: modernize-use-equals-default + - name: modernize-use-equals-delete + - name: modernize-use-nodiscard + - name: modernize-use-noexcept + - name: modernize-use-nullptr + - name: modernize-use-override + - name: modernize-use-starts-ends-with + - name: modernize-use-std-numbers + - name: modernize-use-std-print + # - name: modernize-use-trailing-return-type + - name: modernize-use-transparent-functors + - name: modernize-use-uncaught-exceptions + - name: modernize-use-using + - name: mpi-buffer-deref + - name: mpi-type-mismatch + - name: objc-assert-equals + - name: objc-avoid-nserror-init + - name: objc-dealloc-in-category + - name: objc-forbidden-subclassing + - name: objc-missing-hash + - name: objc-nsdate-formatter + - name: objc-nsinvocation-argument-lifetime + - name: objc-property-declaration + - name: objc-super-self + - name: openmp-exception-escape + - name: openmp-use-default-none + - name: performance-avoid-endl + - name: performance-enum-size + - name: performance-faster-string-find + - name: performance-for-range-copy + - name: performance-implicit-conversion-in-loop + - name: performance-inefficient-algorithm + - name: performance-inefficient-string-concatenation + - name: performance-inefficient-vector-operation + - name: performance-move-const-arg + - name: performance-move-constructor-init + - name: performance-no-automatic-move + - name: performance-no-int-to-ptr + - name: performance-noexcept-destructor + - name: performance-noexcept-move-constructor + - name: performance-noexcept-swap + - name: performance-trivially-destructible + - name: performance-type-promotion-in-math-fn + - name: performance-unnecessary-copy-initialization + - name: performance-unnecessary-value-param + - name: portability-restrict-system-includes + - name: portability-simd-intrinsics + - name: portability-std-allocator-const + - name: readability-avoid-const-params-in-decls + - name: readability-avoid-nested-conditional-operator + - name: readability-avoid-return-with-void-value + - name: readability-avoid-unconditional-preprocessor-if + - name: readability-braces-around-statements + - name: readability-const-return-type + - name: readability-container-contains + - name: readability-container-data-pointer + - name: readability-container-size-empty + - name: readability-convert-member-functions-to-static + - name: readability-delete-null-pointer + - name: readability-duplicate-include + - name: readability-else-after-return + - name: readability-function-cognitive-complexity + - name: readability-function-size + # - name: readability-identifier-length + - name: readability-identifier-naming + - name: readability-implicit-bool-conversion + - name: readability-inconsistent-declaration-parameter-name + - name: readability-isolate-declaration + - name: readability-magic-numbers + - name: readability-make-member-function-const + - name: readability-misleading-indentation + - name: readability-misplaced-array-index + - name: readability-named-parameter + - name: readability-non-const-parameter + - name: readability-operators-representation + - name: readability-qualified-auto + - name: readability-redundant-access-specifiers + - name: readability-redundant-casting + - name: readability-redundant-control-flow + - name: readability-redundant-declaration + - name: readability-redundant-function-ptr-dereference + - name: readability-redundant-inline-specifier + - name: readability-redundant-member-init + - name: readability-redundant-preprocessor + - name: readability-redundant-smartptr-get + - name: readability-redundant-string-cstr + - name: readability-redundant-string-init + - name: readability-reference-to-constructed-temporary + - name: readability-simplify-boolean-expr + - name: readability-simplify-subscript-expr + - name: readability-static-accessed-through-instance + - name: readability-static-definition-in-anonymous-namespace + - name: readability-string-compare + - name: readability-suspicious-call-argument + - name: readability-uniqueptr-delete-release + - name: readability-uppercase-literal-suffix + - name: readability-use-anyofallof + - name: readability-use-std-min-max + - name: zircon-temporary-objects + +exclude: + - name: All + patterns: + - "**/build/**" + - "**/build" + - "**/vcpkg/**" + - "**/vcpkg" + - "**/vcpkg_installed/**" + - "**/vcpkg_installed" + + - name: clion-misra-cpp2008-5-0-4 + patterns: + - "**/lua_enums.cpp" + + - name: clion-misra-cpp2008-5-2-4 + patterns: + - "**/lua_enums.cpp" + + - name: misc-const-correctness + patterns: + - "**/lua_enums.cpp" diff --git a/src/core.hpp b/src/core.hpp index ad64df77646..6352118840f 100644 --- a/src/core.hpp +++ b/src/core.hpp @@ -15,7 +15,7 @@ static constexpr auto AUTHENTICATOR_PERIOD = 30U; // SERVER_MAJOR_VERSION is the actual full version of the server, including minor and patch numbers. // This is intended for internal use to identify the exact state of the server (release) software. static constexpr auto SERVER_RELEASE_VERSION = "3.1.2"; -static constexpr auto CLIENT_VERSION = 1332; +static constexpr auto CLIENT_VERSION = 1340; #define CLIENT_VERSION_UPPER (CLIENT_VERSION / 100) #define CLIENT_VERSION_LOWER (CLIENT_VERSION % 100) diff --git a/src/creatures/combat/combat.cpp b/src/creatures/combat/combat.cpp index 91ff712de4c..8e3de0da1bd 100644 --- a/src/creatures/combat/combat.cpp +++ b/src/creatures/combat/combat.cpp @@ -937,7 +937,8 @@ void Combat::addDistanceEffect(std::shared_ptr caster, const Position void Combat::doChainEffect(const Position &origin, const Position &dest, uint8_t effect) { if (effect > 0) { - stdext::arraylist dirList(128); + std::vector dirList; + FindPathParams fpp; fpp.minTargetDist = 0; fpp.maxTargetDist = 1; diff --git a/src/creatures/combat/condition.cpp b/src/creatures/combat/condition.cpp index b9603d010a2..34db29dcd4a 100644 --- a/src/creatures/combat/condition.cpp +++ b/src/creatures/combat/condition.cpp @@ -1926,7 +1926,7 @@ bool ConditionFeared::getFleeDirection(std::shared_ptr creature) { return false; } -bool ConditionFeared::getFleePath(std::shared_ptr creature, const Position &pos, stdext::arraylist &dirList) { +bool ConditionFeared::getFleePath(std::shared_ptr creature, const Position &pos, std::vector &dirList) { const std::vector walkSize { 15, 9, 3, 1 }; bool found = false; std::ptrdiff_t found_size = 0; @@ -2029,7 +2029,7 @@ bool ConditionFeared::startCondition(std::shared_ptr creature) { bool ConditionFeared::executeCondition(std::shared_ptr creature, int32_t interval) { Position currentPos = creature->getPosition(); - stdext::arraylist listDir(128); + std::vector listDir; g_logger().debug("[ConditionFeared::executeCondition] Executing condition, current position is {}", currentPos.toString()); @@ -2039,7 +2039,7 @@ bool ConditionFeared::executeCondition(std::shared_ptr creature, int32 } if (getFleePath(creature, currentPos, listDir)) { - g_dispatcher().addEvent([id = creature->getID(), listDir = listDir.data()] { + g_dispatcher().addEvent([id = creature->getID(), listDir] { g_game().forcePlayerAutoWalk(id, listDir); }, "ConditionFeared::executeCondition"); diff --git a/src/creatures/combat/condition.hpp b/src/creatures/combat/condition.hpp index 07b31b42d15..2b28029bcef 100644 --- a/src/creatures/combat/condition.hpp +++ b/src/creatures/combat/condition.hpp @@ -333,7 +333,7 @@ class ConditionFeared final : public Condition { private: bool canWalkTo(std::shared_ptr creature, Position pos, Direction moveDirection) const; bool getFleeDirection(std::shared_ptr creature); - bool getFleePath(std::shared_ptr creature, const Position &pos, stdext::arraylist &dirList); + bool getFleePath(std::shared_ptr creature, const Position &pos, std::vector &dirList); bool getRandomDirection(std::shared_ptr creature, Position pos); bool isStuck(std::shared_ptr creature, Position pos) const; diff --git a/src/creatures/combat/spells.cpp b/src/creatures/combat/spells.cpp index f8852c5e534..105bf734c23 100644 --- a/src/creatures/combat/spells.cpp +++ b/src/creatures/combat/spells.cpp @@ -552,7 +552,7 @@ bool Spell::playerRuneSpellCheck(std::shared_ptr player, const Position return false; } - if (range != -1 && !g_game().canThrowObjectTo(playerPos, toPos, true, range, range)) { + if (range != -1 && !g_game().canThrowObjectTo(playerPos, toPos, SightLine_CheckSightLineAndFloor, range, range)) { player->sendCancelMessage(RETURNVALUE_DESTINATIONOUTOFREACH); g_game().addMagicEffect(player->getPosition(), CONST_ME_POFF); return false; @@ -900,7 +900,7 @@ bool InstantSpell::playerCastInstant(std::shared_ptr player, std::string bool InstantSpell::canThrowSpell(std::shared_ptr creature, std::shared_ptr target) const { const Position &fromPos = creature->getPosition(); const Position &toPos = target->getPosition(); - if (fromPos.z != toPos.z || (range == -1 && !g_game().canThrowObjectTo(fromPos, toPos, checkLineOfSight)) || (range != -1 && !g_game().canThrowObjectTo(fromPos, toPos, checkLineOfSight, range, range))) { + if (fromPos.z != toPos.z || (range == -1 && !g_game().canThrowObjectTo(fromPos, toPos, checkLineOfSight ? SightLine_CheckSightLineAndFloor : SightLine_NoCheck)) || (range != -1 && !g_game().canThrowObjectTo(fromPos, toPos, checkLineOfSight ? SightLine_CheckSightLineAndFloor : SightLine_NoCheck, range, range))) { return false; } return true; diff --git a/src/creatures/creature.cpp b/src/creatures/creature.cpp index e3474ab2436..6c15f6cf1fe 100644 --- a/src/creatures/creature.cpp +++ b/src/creatures/creature.cpp @@ -213,8 +213,8 @@ bool Creature::getNextStep(Direction &dir, uint32_t &) { return false; } - dir = listWalkDir.front(); - listWalkDir.pop_front(); + dir = listWalkDir.back(); + listWalkDir.pop_back(); onWalk(dir); return true; } @@ -814,7 +814,6 @@ bool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared player->sendLootMessage(lootMessage.str()); } - stdext::arraylist dirList(128); FindPathParams fpp; fpp.minTargetDist = 0; fpp.maxTargetDist = 1; @@ -822,6 +821,7 @@ bool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared fpp.clearSight = true; fpp.maxSearchDist = 0; + std::vector dirList; auto isReachable = g_game().map.getPathMatching(player->getPosition(), dirList, FrozenPathingConditionCall(corpse->getPosition()), fpp); if (player->checkAutoLoot(monster->isRewardBoss()) && isReachable) { @@ -998,7 +998,9 @@ BlockType_t Creature::blockHit(std::shared_ptr attacker, CombatType_t attacker->onAttackedCreatureBlockHit(blockType); } - mitigateDamage(combatType, blockType, damage); + if (damage != 0) { + mitigateDamage(combatType, blockType, damage); + } if (damage != 0) { onTakeDamage(attacker, damage); @@ -1078,7 +1080,8 @@ void Creature::goToFollowCreature() { } bool executeOnFollow = true; - stdext::arraylist listDir(128); + std::vector listDir; + listDir.reserve(128); FindPathParams fpp; getPathSearchParams(followCreature, fpp); @@ -1101,7 +1104,7 @@ void Creature::goToFollowCreature() { hasFollowPath = getPathTo(followCreature->getPosition(), listDir, fpp); } - startAutoWalk(listDir.data()); + startAutoWalk(listDir); if (executeOnFollow) { onFollowCreatureComplete(followCreature); @@ -1737,12 +1740,15 @@ bool Creature::isInvisible() const { != conditions.end(); } -bool Creature::getPathTo(const Position &targetPos, stdext::arraylist &dirList, const FindPathParams &fpp) { +bool Creature::getPathTo(const Position &targetPos, std::vector &dirList, const FindPathParams &fpp) { metrics::method_latency measure(__METHOD_NAME__); - return g_game().map.getPathMatching(getCreature(), dirList, FrozenPathingConditionCall(targetPos), fpp); + if (fpp.maxSearchDist != 0 || fpp.keepDistance) { + return g_game().map.getPathMatchingCond(getCreature(), targetPos, dirList, FrozenPathingConditionCall(targetPos), fpp); + } + return g_game().map.getPathMatching(getCreature(), targetPos, dirList, FrozenPathingConditionCall(targetPos), fpp); } -bool Creature::getPathTo(const Position &targetPos, stdext::arraylist &dirList, int32_t minTargetDist, int32_t maxTargetDist, bool fullPathSearch /*= true*/, bool clearSight /*= true*/, int32_t maxSearchDist /*= 7*/) { +bool Creature::getPathTo(const Position &targetPos, std::vector &dirList, int32_t minTargetDist, int32_t maxTargetDist, bool fullPathSearch /*= true*/, bool clearSight /*= true*/, int32_t maxSearchDist /*= 7*/) { FindPathParams fpp; fpp.fullPathSearch = fullPathSearch; fpp.maxSearchDist = maxSearchDist; diff --git a/src/creatures/creature.hpp b/src/creatures/creature.hpp index edf2fa55b74..138e8b364c8 100644 --- a/src/creatures/creature.hpp +++ b/src/creatures/creature.hpp @@ -584,8 +584,8 @@ class Creature : virtual public Thing, public SharedObject { double getDamageRatio(std::shared_ptr attacker) const; - bool getPathTo(const Position &targetPos, stdext::arraylist &dirList, const FindPathParams &fpp); - bool getPathTo(const Position &targetPos, stdext::arraylist &dirList, int32_t minTargetDist, int32_t maxTargetDist, bool fullPathSearch = true, bool clearSight = true, int32_t maxSearchDist = 7); + bool getPathTo(const Position &targetPos, std::vector &dirList, const FindPathParams &fpp); + bool getPathTo(const Position &targetPos, std::vector &dirList, int32_t minTargetDist, int32_t maxTargetDist, bool fullPathSearch = true, bool clearSight = true, int32_t maxSearchDist = 7); struct CountBlock_t { int32_t total; @@ -720,7 +720,7 @@ class Creature : virtual public Thing, public SharedObject { CreatureEventList eventsList; ConditionList conditions; - std::deque listWalkDir; + std::vector listWalkDir; std::weak_ptr m_tile; std::weak_ptr m_attackedCreature; diff --git a/src/creatures/monsters/monster.cpp b/src/creatures/monsters/monster.cpp index 4b993cbab0e..3ae73f8dc7c 100644 --- a/src/creatures/monsters/monster.cpp +++ b/src/creatures/monsters/monster.cpp @@ -1129,27 +1129,23 @@ void Monster::pushItems(std::shared_ptr tile, const Direction &nextDirecti // We can not use iterators here since we can push the item to another tile // which will invalidate the iterator. // start from the end to minimize the amount of traffic - TileItemVector* items; - if (!(items = tile->getItemList())) { - return; - } - uint32_t moveCount = 0; - uint32_t removeCount = 0; - auto it = items->begin(); - while (it != items->end()) { - std::shared_ptr item = *it; - if (item && item->hasProperty(CONST_PROP_MOVABLE) && (item->hasProperty(CONST_PROP_BLOCKPATH) || item->hasProperty(CONST_PROP_BLOCKSOLID)) && item->canBeMoved()) { - if (moveCount < 20 && pushItem(item, nextDirection)) { - ++moveCount; - } else if (!item->isCorpse() && g_game().internalRemoveItem(item) == RETURNVALUE_NOERROR) { - ++removeCount; + if (const auto items = tile->getItemList()) { + uint32_t moveCount = 0; + uint32_t removeCount = 0; + int32_t downItemSize = tile->getDownItemCount(); + for (int32_t i = downItemSize; --i >= 0;) { + const auto &item = items->at(i); + if (item && item->hasProperty(CONST_PROP_MOVABLE) && (item->hasProperty(CONST_PROP_BLOCKPATH) || item->hasProperty(CONST_PROP_BLOCKSOLID)) && item->canBeMoved()) { + if (moveCount < 20 && pushItem(item, nextDirection)) { + ++moveCount; + } else if (!item->isCorpse() && g_game().internalRemoveItem(item) == RETURNVALUE_NOERROR) { + ++removeCount; + } } - } else { - it++; } - } - if (removeCount > 0) { - g_game().addMagicEffect(tile->getPosition(), CONST_ME_POFF); + if (removeCount > 0) { + g_game().addMagicEffect(tile->getPosition(), CONST_ME_POFF); + } } } @@ -1257,12 +1253,12 @@ void Monster::doWalkBack(uint32_t &flags, Direction &nextDirection, bool &result return; } - stdext::arraylist listDir(128); + std::vector listDir; if (!getPathTo(masterPos, listDir, 0, std::max(0, distance - 5), true, true, distance)) { isWalkingBack = false; return; } - startAutoWalk(listDir.data()); + startAutoWalk(listDir); } } diff --git a/src/creatures/npcs/npc.cpp b/src/creatures/npcs/npc.cpp index fdbf58853b4..18ca0dd0758 100644 --- a/src/creatures/npcs/npc.cpp +++ b/src/creatures/npcs/npc.cpp @@ -522,7 +522,7 @@ void Npc::onThinkWalk(uint32_t interval) { if (Direction newDirection; getRandomStep(newDirection)) { - listWalkDir.push_front(newDirection); + listWalkDir.emplace_back(newDirection); addEventWalk(); } diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index a6db39f587d..c2d8c7a8c70 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -7818,9 +7818,9 @@ SoundEffect_t Player::getAttackSoundEffect() const { bool Player::canAutoWalk(const Position &toPosition, const std::function &function, uint32_t delay /* = 500*/) { if (!Position::areInRange<1, 1>(getPosition(), toPosition)) { // Check if can walk to the toPosition and send event to use function - stdext::arraylist listDir(128); + std::vector listDir; if (getPathTo(toPosition, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([creatureId = getID(), dirs = listDir.data()] { g_game().playerAutoWalk(creatureId, dirs); }, __FUNCTION__); + g_dispatcher().addEvent([creatureId = getID(), listDir] { g_game().playerAutoWalk(creatureId, listDir); }, __FUNCTION__); std::shared_ptr task = createPlayerTask(delay, function, __FUNCTION__); setNextWalkActionTask(task); diff --git a/src/creatures/players/wheel/player_wheel.cpp b/src/creatures/players/wheel/player_wheel.cpp index 2a3e1366430..eff54689f94 100644 --- a/src/creatures/players/wheel/player_wheel.cpp +++ b/src/creatures/players/wheel/player_wheel.cpp @@ -889,7 +889,7 @@ void PlayerWheel::revealGem(WheelGemQuality_t quality) { sendOpenWheelWindow(m_player.getID()); } -PlayerWheelGem PlayerWheel::getGem(uint8_t index) const { +PlayerWheelGem PlayerWheel::getGem(uint16_t index) const { auto gems = getRevealedGems(); if (gems.size() <= index) { g_logger().error("[{}] Player {} trying to get gem with index {} but has only {} gems", __FUNCTION__, m_player.getName(), index, gems.size()); @@ -907,9 +907,9 @@ PlayerWheelGem PlayerWheel::getGem(const std::string &uuid) const { return gem; } -uint8_t PlayerWheel::getGemIndex(const std::string &uuid) const { +uint16_t PlayerWheel::getGemIndex(const std::string &uuid) const { auto gems = getRevealedGems(); - for (uint8_t i = 0; i < gems.size(); ++i) { + for (uint16_t i = 0; i < gems.size(); ++i) { if (gems[i].uuid == uuid) { return i; } @@ -918,7 +918,7 @@ uint8_t PlayerWheel::getGemIndex(const std::string &uuid) const { return 0xFF; } -void PlayerWheel::destroyGem(uint8_t index) { +void PlayerWheel::destroyGem(uint16_t index) { auto gem = getGem(index); if (gem.locked) { g_logger().error("[{}] Player {} trying to destroy locked gem with index {}", __FUNCTION__, m_player.getName(), index); @@ -928,7 +928,7 @@ void PlayerWheel::destroyGem(uint8_t index) { sendOpenWheelWindow(m_player.getID()); } -void PlayerWheel::switchGemDomain(uint8_t index) { +void PlayerWheel::switchGemDomain(uint16_t index) { auto gem = getGem(index); if (gem.locked) { g_logger().error("[{}] Player {} trying to destroy locked gem with index {}", __FUNCTION__, m_player.getName(), index); @@ -946,14 +946,14 @@ void PlayerWheel::switchGemDomain(uint8_t index) { sendOpenWheelWindow(m_player.getID()); } -void PlayerWheel::toggleGemLock(uint8_t index) { +void PlayerWheel::toggleGemLock(uint16_t index) { auto gem = getGem(index); gem.locked = !gem.locked; gem.save(gemsKV()); sendOpenWheelWindow(m_player.getID()); } -void PlayerWheel::setActiveGem(WheelGemAffinity_t affinity, uint8_t index) { +void PlayerWheel::setActiveGem(WheelGemAffinity_t affinity, uint16_t index) { auto gem = getGem(index); if (gem.uuid.empty()) { g_logger().error("[{}] Failed to load gem with index {}", __FUNCTION__, index); @@ -979,19 +979,15 @@ void PlayerWheel::addGems(NetworkMessage &msg) const { for (const auto &gem : activeGems) { auto index = getGemIndex(gem.uuid); g_logger().debug("[{}] Adding active gem: {} with index {}", __FUNCTION__, gem.toString(), index); - msg.addByte(getGemIndex(gem.uuid)); + msg.add(getGemIndex(gem.uuid)); } auto revealedGems = getRevealedGems(); - if (revealedGems.size() > 225) { - g_logger().error("[{}] Player {} has more than 225 gems unlocked", __FUNCTION__, m_player.getName()); - revealedGems.resize(225); - } - msg.addByte(revealedGems.size()); - int index = 0; + msg.add(revealedGems.size()); + uint16_t index = 0; for (const auto &gem : revealedGems) { g_logger().debug("[{}] Adding revealed gem: {}", __FUNCTION__, gem.toString()); - msg.addByte(index++); + msg.add(index++); msg.addByte(gem.locked); msg.addByte(static_cast(gem.affinity)); msg.addByte(static_cast(gem.quality)); @@ -1161,7 +1157,7 @@ void PlayerWheel::saveSlotPointsOnPressSaveButton(NetworkMessage &msg) { removeActiveGem(affinity); continue; } - uint8_t gemIndex = msg.getByte(); + uint16_t gemIndex = msg.get(); setActiveGem(affinity, gemIndex); } diff --git a/src/creatures/players/wheel/player_wheel.hpp b/src/creatures/players/wheel/player_wheel.hpp index 14f922e9597..e94f605930c 100644 --- a/src/creatures/players/wheel/player_wheel.hpp +++ b/src/creatures/players/wheel/player_wheel.hpp @@ -386,14 +386,14 @@ class PlayerWheel { * @return The calculated mitigation value. */ float calculateMitigation() const; - PlayerWheelGem getGem(uint8_t index) const; + PlayerWheelGem getGem(uint16_t index) const; PlayerWheelGem getGem(const std::string &uuid) const; - uint8_t getGemIndex(const std::string &uuid) const; + uint16_t getGemIndex(const std::string &uuid) const; void revealGem(WheelGemQuality_t quality); - void destroyGem(uint8_t index); - void switchGemDomain(uint8_t index); - void toggleGemLock(uint8_t index); - void setActiveGem(WheelGemAffinity_t affinity, uint8_t index); + void destroyGem(uint16_t index); + void switchGemDomain(uint16_t index); + void toggleGemLock(uint16_t index); + void setActiveGem(WheelGemAffinity_t affinity, uint16_t index); void removeActiveGem(WheelGemAffinity_t affinity); void addRevelationBonus(WheelGemAffinity_t affinity, uint16_t points) { m_bonusRevelationPoints[static_cast(affinity)] += points; diff --git a/src/game/game.cpp b/src/game/game.cpp index 949da71c0a3..6e7660ecbb5 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -1405,9 +1405,9 @@ void Game::playerMoveCreature(std::shared_ptr player, std::shared_ptr(movingCreatureOrigPos, player->getPosition())) { // need to walk to the creature first before moving it - stdext::arraylist listDir(128); + std::vector listDir; if (player->getPathTo(movingCreatureOrigPos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir = listDir.data()] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); const auto &task = createPlayerTask( 600, [this, player, movingCreature, toTile, movingCreatureOrigPos] { playerMoveCreatureByID(player->getID(), movingCreature->getID(), movingCreatureOrigPos, toTile->getPosition()); }, "Game::playerMoveCreatureByID" ); @@ -1543,10 +1543,6 @@ ReturnValue Game::internalMoveCreature(const std::shared_ptr &creature return ret; } - if (creature->hasCondition(CONDITION_ROOTED)) { - return RETURNVALUE_NOTPOSSIBLE; - } - if (creature->hasCondition(CONDITION_FEARED)) { std::shared_ptr field = toTile->getFieldItem(); if (field && !field->isBlocking() && field->getDamage() != 0) { @@ -1698,9 +1694,9 @@ void Game::playerMoveItem(std::shared_ptr player, const Position &fromPo if (!Position::areInRange<1, 1>(playerPos, mapFromPos)) { // need to walk to the item first before using it - stdext::arraylist listDir(128); + std::vector listDir; if (player->getPathTo(item->getPosition(), listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir = listDir.data()] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); std::shared_ptr task = createPlayerTask( 400, [this, playerId = player->getID(), fromPos, itemId, fromStackPos, toPos, count] { @@ -1760,9 +1756,9 @@ void Game::playerMoveItem(std::shared_ptr player, const Position &fromPo internalGetPosition(moveItem, itemPos, itemStackPos); } - stdext::arraylist listDir(128); + std::vector listDir; if (player->getPathTo(walkPos, listDir, 0, 0, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir = listDir.data()] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); std::shared_ptr task = createPlayerTask( 400, [this, playerId = player->getID(), itemPos, itemId, itemStackPos, toPos, count] { @@ -3685,9 +3681,9 @@ void Game::playerUseItemEx(uint32_t playerId, const Position &fromPos, uint8_t f internalGetPosition(moveItem, itemPos, itemStackPos); } - stdext::arraylist listDir(128); + std::vector listDir; if (player->getPathTo(walkToPos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir = listDir.data()] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); std::shared_ptr task = createPlayerTask( 400, [this, playerId, itemPos, itemStackPos, fromItemId, toPos, toStackPos, toItemId] { playerUseItemEx(playerId, itemPos, itemStackPos, fromItemId, toPos, toStackPos, toItemId); }, "Game::playerUseItemEx" @@ -3799,9 +3795,9 @@ void Game::playerUseItem(uint32_t playerId, const Position &pos, uint8_t stackPo ReturnValue ret = g_actions().canUse(player, pos); if (ret != RETURNVALUE_NOERROR) { if (ret == RETURNVALUE_TOOFARAWAY) { - stdext::arraylist listDir(128); + std::vector listDir; if (player->getPathTo(pos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir = listDir.data()] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); std::shared_ptr task = createPlayerTask( 400, [this, playerId, pos, stackPos, index, itemId] { playerUseItem(playerId, pos, stackPos, index, itemId); }, "Game::playerUseItem" @@ -3956,9 +3952,9 @@ void Game::playerUseWithCreature(uint32_t playerId, const Position &fromPos, uin internalGetPosition(moveItem, itemPos, itemStackPos); } - stdext::arraylist listDir(128); + std::vector listDir; if (player->getPathTo(walkToPos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir = listDir.data()] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); std::shared_ptr task = createPlayerTask( 400, [this, playerId, itemPos, itemStackPos, creatureId, itemId] { @@ -4117,9 +4113,9 @@ void Game::playerRotateItem(uint32_t playerId, const Position &pos, uint8_t stac } if (pos.x != 0xFFFF && !Position::areInRange<1, 1, 0>(pos, player->getPosition())) { - stdext::arraylist listDir(128); + std::vector listDir; if (player->getPathTo(pos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir = listDir.data()] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); std::shared_ptr task = createPlayerTask( 400, [this, playerId, pos, stackPos, itemId] { @@ -4173,9 +4169,9 @@ void Game::playerConfigureShowOffSocket(uint32_t playerId, const Position &pos, bool isPodiumOfRenown = itemId == ITEM_PODIUM_OF_RENOWN1 || itemId == ITEM_PODIUM_OF_RENOWN2; if (!Position::areInRange<1, 1, 0>(pos, player->getPosition())) { - stdext::arraylist listDir(128); + std::vector listDir; if (player->getPathTo(pos, listDir, 0, 1, true, false)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir = listDir.data()] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); std::shared_ptr task; if (isPodiumOfRenown) { task = createPlayerTask( @@ -4234,9 +4230,9 @@ void Game::playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Pos } if (!Position::areInRange<1, 1, 0>(pos, player->getPosition())) { - stdext::arraylist listDir(128); + std::vector listDir; if (player->getPathTo(pos, listDir, 0, 1, true, false)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir = listDir.data()] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); std::shared_ptr task = createPlayerTask( 400, [this, playerId, pos] { playerBrowseField(playerId, pos); }, "Game::playerBrowseField" ); @@ -4375,9 +4371,9 @@ void Game::playerWrapableItem(uint32_t playerId, const Position &pos, uint8_t st } if (pos.x != 0xFFFF && !Position::areInRange<1, 1, 0>(pos, player->getPosition())) { - stdext::arraylist listDir(128); + std::vector listDir; if (player->getPathTo(pos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir = listDir.data()] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); std::shared_ptr task = createPlayerTask( 400, [this, playerId, pos, stackPos, itemId] { playerWrapableItem(playerId, pos, stackPos, itemId); }, "Game::playerWrapableItem" @@ -4556,9 +4552,9 @@ void Game::playerBrowseField(uint32_t playerId, const Position &pos) { } if (!Position::areInRange<1, 1>(playerPos, pos)) { - stdext::arraylist listDir(128); + std::vector listDir; if (player->getPathTo(pos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir = listDir.data()] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); std::shared_ptr task = createPlayerTask( 400, [this, playerId, pos] { playerBrowseField(playerId, pos); }, "Game::playerBrowseField" ); @@ -4780,7 +4776,7 @@ void Game::playerRequestTrade(uint32_t playerId, const Position &pos, uint8_t st return; } - if (!canThrowObjectTo(tradePartner->getPosition(), player->getPosition())) { + if (!canThrowObjectTo(tradePartner->getPosition(), player->getPosition(), SightLine_CheckSightLineAndFloor)) { player->sendCancelMessage(RETURNVALUE_CREATUREISNOTREACHABLE); return; } @@ -4819,9 +4815,9 @@ void Game::playerRequestTrade(uint32_t playerId, const Position &pos, uint8_t st } if (!Position::areInRange<1, 1>(tradeItemPosition, playerPosition)) { - stdext::arraylist listDir(128); + std::vector listDir; if (player->getPathTo(pos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir = listDir.data()] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); std::shared_ptr task = createPlayerTask( 400, [this, playerId, pos, stackPos, tradePlayerId, itemId] { playerRequestTrade(playerId, pos, stackPos, tradePlayerId, itemId); }, "Game::playerRequestTrade" @@ -4950,7 +4946,7 @@ void Game::playerAcceptTrade(uint32_t playerId) { return; } - if (!canThrowObjectTo(tradePartner->getPosition(), player->getPosition())) { + if (!canThrowObjectTo(tradePartner->getPosition(), player->getPosition(), SightLine_CheckSightLineAndFloor)) { player->sendCancelMessage(RETURNVALUE_CREATUREISNOTREACHABLE); return; } @@ -5398,9 +5394,9 @@ void Game::playerQuickLoot(uint32_t playerId, const Position &pos, uint16_t item if (!autoLoot && pos.x != 0xffff) { if (!Position::areInRange<1, 1, 0>(pos, player->getPosition())) { // need to walk to the corpse first before looting it - stdext::arraylist listDir(128); + std::vector listDir; if (player->getPathTo(pos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir = listDir.data()] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); std::shared_ptr task = createPlayerTask( 0, [this, playerId = player->getID(), pos, itemId, stackPos, defaultItem, lootAllCorpses, autoLoot] { playerQuickLoot(playerId, pos, itemId, stackPos, defaultItem, lootAllCorpses, autoLoot); @@ -6227,8 +6223,8 @@ std::shared_ptr Game::createPlayerTask(uint32_t delay, std::function(pos, player->getPosition())) { - if (stdext::arraylist listDir(128); + if (std::vector listDir; player->getPathTo(pos, listDir, 0, 1, true, false)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir = listDir.data()] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); std::shared_ptr task = createPlayerTask( 400, [this, playerId, pos] { playerBrowseField(playerId, pos); }, "Game::playerBrowseField" ); @@ -9590,9 +9586,9 @@ void Game::playerRotatePodium(uint32_t playerId, const Position &pos, uint8_t st } if (pos.x != 0xFFFF && !Position::areInRange<1, 1, 0>(pos, player->getPosition())) { - if (stdext::arraylist listDir(128); + if (std::vector listDir; player->getPathTo(pos, listDir, 0, 1, true, true)) { - g_dispatcher().addEvent([this, playerId = player->getID(), listDir = listDir.data()] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); + g_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, "Game::playerAutoWalk"); std::shared_ptr task = createPlayerTask( 400, [this, playerId, pos, stackPos, itemId] { playerRotatePodium(playerId, pos, stackPos, itemId); diff --git a/src/game/game.hpp b/src/game/game.hpp index 0537ee030a7..181f6528f69 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -442,7 +442,7 @@ class Game { return boostedCreature; } - bool canThrowObjectTo(const Position &fromPos, const Position &toPos, bool checkLineOfSight = true, int32_t rangex = MAP_MAX_CLIENT_VIEW_PORT_X, int32_t rangey = MAP_MAX_CLIENT_VIEW_PORT_Y); + bool canThrowObjectTo(const Position &fromPos, const Position &toPos, SightLines_t lineOfSight = SightLine_CheckSightLine, int32_t rangex = MAP_MAX_CLIENT_VIEW_PORT_X, int32_t rangey = MAP_MAX_CLIENT_VIEW_PORT_Y); bool isSightClear(const Position &fromPos, const Position &toPos, bool sameFloor); void changeSpeed(std::shared_ptr creature, int32_t varSpeedDelta); diff --git a/src/game/scheduling/task.hpp b/src/game/scheduling/task.hpp index 7bdc7db8084..9c561b41381 100644 --- a/src/game/scheduling/task.hpp +++ b/src/game/scheduling/task.hpp @@ -69,32 +69,30 @@ class Task { } bool hasTraceableContext() const { - const static auto tasksContext = std::unordered_set({ - "Decay::checkDecay", - "Dispatcher::asyncEvent", - "Game::checkCreatureAttack", - "Game::checkCreatureWalk", - "Game::checkCreatures", - "Game::checkImbuements", - "Game::checkLight", - "Game::createFiendishMonsters", - "Game::createInfluencedMonsters", - "Game::updateCreatureWalk", - "Game::updateForgeableMonsters", - "GlobalEvents::think", - "LuaEnvironment::executeTimerEvent", - "Modules::executeOnRecvbyte", - "OutputMessagePool::sendAll", - "ProtocolGame::addGameTask", - "ProtocolGame::parsePacketFromDispatcher", - "Raids::checkRaids", - "SpawnMonster::checkSpawnMonster", - "SpawnMonster::scheduleSpawn", - "SpawnMonster::startup", - "SpawnNpc::checkSpawnNpc", - "Webhook::run", - "Protocol::sendRecvMessageCallback", - }); + const static auto tasksContext = std::unordered_set({ "Decay::checkDecay", + "Dispatcher::asyncEvent", + "Game::checkCreatureAttack", + "Game::checkCreatureWalk", + "Game::checkCreatures", + "Game::checkImbuements", + "Game::checkLight", + "Game::createFiendishMonsters", + "Game::createInfluencedMonsters", + "Game::updateCreatureWalk", + "Game::updateForgeableMonsters", + "GlobalEvents::think", + "LuaEnvironment::executeTimerEvent", + "Modules::executeOnRecvbyte", + "OutputMessagePool::sendAll", + "ProtocolGame::addGameTask", + "ProtocolGame::parsePacketFromDispatcher", + "Raids::checkRaids", + "SpawnMonster::checkSpawnMonster", + "SpawnMonster::scheduleSpawn", + "SpawnMonster::startup", + "SpawnNpc::checkSpawnNpc", + "Webhook::run", + "Protocol::sendRecvMessageCallback" }); return tasksContext.contains(context); } diff --git a/src/io/ioprey.cpp b/src/io/ioprey.cpp index 6b2816355ff..e55ad73ae89 100644 --- a/src/io/ioprey.cpp +++ b/src/io/ioprey.cpp @@ -276,6 +276,7 @@ void IOPrey::checkPlayerPreys(std::shared_ptr player, uint8_t amount) co player->sendTextMessage(MESSAGE_STATUS, "You don't have enought prey cards to lock monster and bonus when the slot expire."); } else { + slot->reloadMonsterGrid(player->getPreyBlackList(), player->getLevel()); player->sendTextMessage(MESSAGE_STATUS, "Your prey bonus has expired."); } diff --git a/src/lua/creature/actions.cpp b/src/lua/creature/actions.cpp index 485509cae06..9e16ee7b33e 100644 --- a/src/lua/creature/actions.cpp +++ b/src/lua/creature/actions.cpp @@ -203,7 +203,7 @@ ReturnValue Actions::canUseFar(std::shared_ptr creature, const Positio return RETURNVALUE_TOOFARAWAY; } - if (checkLineOfSight && !g_game().canThrowObjectTo(creaturePos, toPos)) { + if (checkLineOfSight && !g_game().canThrowObjectTo(creaturePos, toPos, checkFloor ? SightLine_CheckSightLineAndFloor : SightLine_CheckSightLine)) { return RETURNVALUE_CANNOTTHROW; } diff --git a/src/lua/creature/talkaction.hpp b/src/lua/creature/talkaction.hpp index ec68539850c..d4fd6165459 100644 --- a/src/lua/creature/talkaction.hpp +++ b/src/lua/creature/talkaction.hpp @@ -36,6 +36,14 @@ class TalkAction : public Script { } } + const std::string &getDescription() const { + return m_description; + } + + void setDescription(const std::string &stringDescription) { + m_description = stringDescription; + } + std::string getSeparator() const { return separator; } @@ -56,6 +64,7 @@ class TalkAction : public Script { } std::string m_word; + std::string m_description; std::string separator = "\""; uint8_t m_groupType = 0; }; diff --git a/src/lua/functions/creatures/creature_functions.cpp b/src/lua/functions/creatures/creature_functions.cpp index 4ae5da0e132..6b09945971a 100644 --- a/src/lua/functions/creatures/creature_functions.cpp +++ b/src/lua/functions/creatures/creature_functions.cpp @@ -938,7 +938,7 @@ int CreatureFunctions::luaCreatureGetPathTo(lua_State* L) { fpp.clearSight = getBoolean(L, 6, fpp.clearSight); fpp.maxSearchDist = getNumber(L, 7, fpp.maxSearchDist); - stdext::arraylist dirList(128); + std::vector dirList; if (creature->getPathTo(position, dirList, fpp)) { lua_newtable(L); diff --git a/src/lua/functions/events/talk_action_functions.cpp b/src/lua/functions/events/talk_action_functions.cpp index 8618cc3c4a3..559e251eb8e 100644 --- a/src/lua/functions/events/talk_action_functions.cpp +++ b/src/lua/functions/events/talk_action_functions.cpp @@ -144,6 +144,33 @@ int TalkActionFunctions::luaTalkActionGetName(lua_State* L) { return 1; } +int TalkActionFunctions::luaTalkActionGetDescription(lua_State* L) { + // local description = talkAction:getDescription() + const auto talkactionSharedPtr = getUserdataShared(L, 1); + if (!talkactionSharedPtr) { + reportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND)); + pushBoolean(L, false); + return 1; + } + + pushString(L, talkactionSharedPtr->getDescription()); + return 1; +} + +int TalkActionFunctions::luaTalkActionSetDescription(lua_State* L) { + // local description = talkAction:setDescription() + auto talkactionSharedPtr = getUserdataShared(L, 1); + if (!talkactionSharedPtr) { + reportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND)); + pushBoolean(L, false); + return 1; + } + + talkactionSharedPtr->setDescription(getString(L, 2)); + pushBoolean(L, true); + return 1; +} + int TalkActionFunctions::luaTalkActionGetGroupType(lua_State* L) { // local groupType = talkAction:getGroupType() const auto talkactionSharedPtr = getUserdataShared(L, 1); diff --git a/src/lua/functions/events/talk_action_functions.hpp b/src/lua/functions/events/talk_action_functions.hpp index 6b2bc9b7a20..384688b4722 100644 --- a/src/lua/functions/events/talk_action_functions.hpp +++ b/src/lua/functions/events/talk_action_functions.hpp @@ -20,6 +20,8 @@ class TalkActionFunctions final : LuaScriptInterface { registerMethod(L, "TalkAction", "register", TalkActionFunctions::luaTalkActionRegister); registerMethod(L, "TalkAction", "separator", TalkActionFunctions::luaTalkActionSeparator); registerMethod(L, "TalkAction", "getName", TalkActionFunctions::luaTalkActionGetName); + registerMethod(L, "TalkAction", "getDescription", TalkActionFunctions::luaTalkActionGetDescription); + registerMethod(L, "TalkAction", "setDescription", TalkActionFunctions::luaTalkActionSetDescription); registerMethod(L, "TalkAction", "getGroupType", TalkActionFunctions::luaTalkActionGetGroupType); } @@ -30,5 +32,7 @@ class TalkActionFunctions final : LuaScriptInterface { static int luaTalkActionRegister(lua_State* L); static int luaTalkActionSeparator(lua_State* L); static int luaTalkActionGetName(lua_State* L); + static int luaTalkActionGetDescription(lua_State* L); + static int luaTalkActionSetDescription(lua_State* L); static int luaTalkActionGetGroupType(lua_State* L); }; diff --git a/src/lua/functions/map/position_functions.cpp b/src/lua/functions/map/position_functions.cpp index 579304266c0..0e4397f3fce 100644 --- a/src/lua/functions/map/position_functions.cpp +++ b/src/lua/functions/map/position_functions.cpp @@ -97,7 +97,7 @@ int PositionFunctions::luaPositionGetPathTo(lua_State* L) { fpp.clearSight = getBoolean(L, 6, fpp.clearSight); fpp.maxSearchDist = getNumber(L, 7, fpp.maxSearchDist); - stdext::arraylist dirList(128); + std::vector dirList; if (g_game().map.getPathMatching(pos, dirList, FrozenPathingConditionCall(position), fpp)) { lua_newtable(L); diff --git a/src/map/map.cpp b/src/map/map.cpp index 7406ecffbdf..85e7de50484 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -429,7 +429,7 @@ void Map::moveCreature(const std::shared_ptr &creature, const std::sha g_game().afterCreatureZoneChange(creature, fromZones, toZones); } -bool Map::canThrowObjectTo(const Position &fromPos, const Position &toPos, bool checkLineOfSight /*= true*/, int32_t rangex /*= MAP_MAX_CLIENT_VIEW_PORT_X*/, int32_t rangey /*= MAP_MAX_CLIENT_VIEW_PORT_Y*/) { +bool Map::canThrowObjectTo(const Position &fromPos, const Position &toPos, const SightLines_t lineOfSight /*= SightLine_CheckSightLine*/, const int32_t rangex /*= Map::maxClientViewportX*/, const int32_t rangey /*= Map::maxClientViewportY*/) { // z checks // underground 8->15 // ground level and above 7->0 @@ -451,10 +451,11 @@ bool Map::canThrowObjectTo(const Position &fromPos, const Position &toPos, bool return false; } - if (!checkLineOfSight) { + if (!(lineOfSight & SightLine_CheckSightLine)) { return true; } - return isSightClear(fromPos, toPos, false); + + return isSightClear(fromPos, toPos, lineOfSight & SightLine_FloorCheck); } bool Map::checkSightLine(Position start, Position destination) { @@ -472,7 +473,7 @@ bool Map::checkSightLine(Position start, Position destination) { start.x += delta; const auto &tile = getTile(start.x, start.y, start.z); - if (tile && tile->hasFlag(TILESTATE_BLOCKPROJECTILE)) { + if (tile && tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) { return false; } } @@ -483,7 +484,7 @@ bool Map::checkSightLine(Position start, Position destination) { start.y += delta; const auto &tile = getTile(start.x, start.y, start.z); - if (tile && tile->hasFlag(TILESTATE_BLOCKPROJECTILE)) { + if (tile && tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) { return false; } } @@ -516,7 +517,7 @@ bool Map::checkSightLine(Position start, Position destination) { } const auto &tile = getTile(start.x + xIncrease, start.y + deltaY, start.z); - if (tile && tile->hasFlag(TILESTATE_BLOCKPROJECTILE)) { + if (tile && tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) { if (Position::areInRange<1, 1>(start, destination)) { return true; } @@ -547,7 +548,7 @@ bool Map::checkSightLine(Position start, Position destination) { } const auto &tile = getTile(start.x + deltaX, start.y + yIncrease, start.z); - if (tile && tile->hasFlag(TILESTATE_BLOCKPROJECTILE)) { + if (tile && tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) { if (Position::areInRange<1, 1>(start, destination)) { return true; } @@ -590,7 +591,7 @@ bool Map::isSightClear(const Position &fromPos, const Position &toPos, bool floo } else { // Check if we can throw above obstacle const auto &tile = getTile(fromPos.x, fromPos.y, fromPos.z - 1); - if ((tile && (tile->getGround() || tile->hasFlag(TILESTATE_BLOCKPROJECTILE))) || !checkSightLine(Position(fromPos.x, fromPos.y, fromPos.z - 1), Position(toPos.x, toPos.y, toPos.z - 1))) { + if ((tile && (tile->getGround() || tile->hasProperty(CONST_PROP_BLOCKPROJECTILE))) || !checkSightLine(Position(fromPos.x, fromPos.y, fromPos.z - 1), Position(toPos.x, toPos.y, toPos.z - 1))) { return false; } @@ -605,7 +606,7 @@ bool Map::isSightClear(const Position &fromPos, const Position &toPos, bool floo // now we need to perform a jump between floors to see if everything is clear (literally) for (; startZ != toPos.z; ++startZ) { const auto &tile = getTile(toPos.x, toPos.y, startZ); - if (tile && (tile->getGround() || tile->hasFlag(TILESTATE_BLOCKPROJECTILE))) { + if (tile && (tile->getGround() || tile->hasProperty(CONST_PROP_BLOCKPROJECTILE))) { return false; } } @@ -638,11 +639,7 @@ std::shared_ptr Map::canWalkTo(const std::shared_ptr &creature, return tile; } -bool Map::getPathMatching(const std::shared_ptr &creature, stdext::arraylist &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp) { - return getPathMatching(creature, creature->getPosition(), dirList, pathCondition, fpp); -} - -bool Map::getPathMatching(const std::shared_ptr &creature, const Position &startPos, stdext::arraylist &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp) { +bool Map::getPathMatching(const std::shared_ptr &creature, const Position &__targetPos, std::vector &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp) { static int_fast32_t allNeighbors[8][2] = { { -1, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, -1 }, { 1, -1 }, { 1, 1 }, { -1, 1 } }; @@ -658,15 +655,25 @@ bool Map::getPathMatching(const std::shared_ptr &creature, const Posit { { -1, 0 }, { 0, 1 }, { -1, -1 }, { 1, 1 }, { -1, 1 } } }; - Position pos = startPos; + const bool withoutCreature = creature == nullptr; + + Position pos = withoutCreature ? __targetPos : creature->getPosition(); Position endPos; - AStarNodes nodes(pos.x, pos.y); + AStarNodes nodes(pos.x, pos.y, AStarNodes::getTileWalkCost(creature, getTile(pos.x, pos.y, pos.z))); int32_t bestMatch = 0; + const auto &startPos = pos; + const auto &targetPos = withoutCreature ? pathCondition.getTargetPos() : __targetPos; + + const int_fast32_t sX = std::abs(targetPos.getX() - pos.getX()); + const int_fast32_t sY = std::abs(targetPos.getY() - pos.getY()); + + uint_fast16_t cntDirs = 0; + AStarNode* found = nullptr; - while (fpp.maxSearchDist != 0 || nodes.getClosedNodes() < 100) { + do { AStarNode* n = nodes.getBestNode(); if (!n) { if (found) { @@ -687,6 +694,8 @@ bool Map::getPathMatching(const std::shared_ptr &creature, const Posit } } + ++cntDirs; + uint_fast32_t dirCount; int_fast32_t* neighbors; if (n->parent) { @@ -698,7 +707,7 @@ bool Map::getPathMatching(const std::shared_ptr &creature, const Posit } else { neighbors = *dirNeighbors[DIRECTION_EAST]; } - } else if (!fpp.allowDiagonal || offset_x == 0) { + } else if (offset_x == 0) { if (offset_y == -1) { neighbors = *dirNeighbors[DIRECTION_NORTH]; } else { @@ -715,7 +724,7 @@ bool Map::getPathMatching(const std::shared_ptr &creature, const Posit } else { neighbors = *dirNeighbors[DIRECTION_SOUTHEAST]; } - dirCount = fpp.allowDiagonal ? 5 : 3; + dirCount = 5; } else { dirCount = 8; neighbors = *allNeighbors; @@ -726,6 +735,185 @@ bool Map::getPathMatching(const std::shared_ptr &creature, const Posit pos.x = x + *neighbors++; pos.y = y + *neighbors++; + int_fast32_t extraCost; + AStarNode* neighborNode = nodes.getNodeByPosition(pos.x, pos.y); + if (neighborNode) { + extraCost = neighborNode->c; + } else { + const auto &tile = withoutCreature ? getTile(pos.x, pos.y, pos.z) : canWalkTo(creature, pos); + if (!tile) { + continue; + } + extraCost = AStarNodes::getTileWalkCost(creature, tile); + } + + // The cost (g) for this neighbor + const int_fast32_t cost = AStarNodes::getMapWalkCost(n, pos); + const int_fast32_t newf = f + cost + extraCost; + if (neighborNode) { + if (neighborNode->f <= newf) { + // The node on the closed/open list is cheaper than this one + continue; + } + neighborNode->f = newf; + neighborNode->parent = n; + nodes.openNode(neighborNode); + } else { + // Does not exist in the open/closed list, create a new node + const int_fast32_t dX = std::abs(targetPos.getX() - pos.getX()); + const int_fast32_t dY = std::abs(targetPos.getY() - pos.getY()); + if (!nodes.createOpenNode(n, pos.x, pos.y, newf, ((dX - sX) << 3) + ((dY - sY) << 3) + (std::max(dX, dY) << 3), extraCost)) { + if (found) { + break; + } + return false; + } + } + } + nodes.closeNode(n); + } while (nodes.getClosedNodes() < 100); + if (!found) { + return false; + } + + int_fast32_t prevx = endPos.x; + int_fast32_t prevy = endPos.y; + + dirList.reserve(cntDirs); + + found = found->parent; + while (found) { + pos.x = found->x; + pos.y = found->y; + + int_fast32_t dx = pos.getX() - prevx; + int_fast32_t dy = pos.getY() - prevy; + + prevx = pos.x; + prevy = pos.y; + if (dx == 1) { + if (dy == 1) { + dirList.emplace_back(DIRECTION_NORTHWEST); + } else if (dy == -1) { + dirList.emplace_back(DIRECTION_SOUTHWEST); + } else { + dirList.emplace_back(DIRECTION_WEST); + } + } else if (dx == -1) { + if (dy == 1) { + dirList.emplace_back(DIRECTION_NORTHEAST); + } else if (dy == -1) { + dirList.emplace_back(DIRECTION_SOUTHEAST); + } else { + dirList.emplace_back(DIRECTION_EAST); + } + } else if (dy == 1) { + dirList.emplace_back(DIRECTION_NORTH); + } else if (dy == -1) { + dirList.emplace_back(DIRECTION_SOUTH); + } + found = found->parent; + } + + return true; +} + +bool Map::getPathMatching(const std::shared_ptr &creature, std::vector &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp) { + return getPathMatching(creature, creature->getPosition(), dirList, pathCondition, fpp); +} + +bool Map::getPathMatchingCond(const std::shared_ptr &creature, const Position &targetPos, std::vector &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp) { + Position pos = creature->getPosition(); + Position endPos; + + AStarNodes nodes(pos.x, pos.y, AStarNodes::getTileWalkCost(creature, getTile(pos.x, pos.y, pos.z))); + + int32_t bestMatch = 0; + + static int_fast32_t dirNeighbors[8][5][2] = { + { { -1, 0 }, { 0, 1 }, { 1, 0 }, { 1, 1 }, { -1, 1 } }, + { { -1, 0 }, { 0, 1 }, { 0, -1 }, { -1, -1 }, { -1, 1 } }, + { { -1, 0 }, { 1, 0 }, { 0, -1 }, { -1, -1 }, { 1, -1 } }, + { { 0, 1 }, { 1, 0 }, { 0, -1 }, { 1, -1 }, { 1, 1 } }, + { { 1, 0 }, { 0, -1 }, { -1, -1 }, { 1, -1 }, { 1, 1 } }, + { { -1, 0 }, { 0, -1 }, { -1, -1 }, { 1, -1 }, { -1, 1 } }, + { { 0, 1 }, { 1, 0 }, { 1, -1 }, { 1, 1 }, { -1, 1 } }, + { { -1, 0 }, { 0, 1 }, { -1, -1 }, { 1, 1 }, { -1, 1 } } + }; + + static int_fast32_t allNeighbors[8][2] = { + { -1, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, -1 }, { 1, -1 }, { 1, 1 }, { -1, 1 } + }; + + const Position startPos = pos; + + const int_fast32_t sX = std::abs(targetPos.getX() - pos.getX()); + const int_fast32_t sY = std::abs(targetPos.getY() - pos.getY()); + + uint_fast16_t cntDirs = 0; + + AStarNode* found = nullptr; + do { + AStarNode* n = nodes.getBestNode(); + if (!n) { + if (found) { + break; + } + return false; + } + + const int_fast32_t x = n->x; + const int_fast32_t y = n->y; + pos.x = x; + pos.y = y; + if (pathCondition(startPos, pos, fpp, bestMatch)) { + found = n; + endPos = pos; + if (bestMatch == 0) { + break; + } + } + + ++cntDirs; + + uint_fast32_t dirCount; + int_fast32_t* neighbors; + if (n->parent) { + const int_fast32_t offset_x = n->parent->x - x; + const int_fast32_t offset_y = n->parent->y - y; + if (offset_y == 0) { + if (offset_x == -1) { + neighbors = *dirNeighbors[DIRECTION_WEST]; + } else { + neighbors = *dirNeighbors[DIRECTION_EAST]; + } + } else if (offset_x == 0) { + if (offset_y == -1) { + neighbors = *dirNeighbors[DIRECTION_NORTH]; + } else { + neighbors = *dirNeighbors[DIRECTION_SOUTH]; + } + } else if (offset_y == -1) { + if (offset_x == -1) { + neighbors = *dirNeighbors[DIRECTION_NORTHWEST]; + } else { + neighbors = *dirNeighbors[DIRECTION_NORTHEAST]; + } + } else if (offset_x == -1) { + neighbors = *dirNeighbors[DIRECTION_SOUTHWEST]; + } else { + neighbors = *dirNeighbors[DIRECTION_SOUTHEAST]; + } + dirCount = 5; + } else { + dirCount = 8; + neighbors = *allNeighbors; + } + + const int_fast32_t f = n->f; + for (uint_fast32_t i = 0; i < dirCount; ++i) { + pos.x = x + *neighbors++; + pos.y = y + *neighbors++; if (fpp.maxSearchDist != 0 && (Position::getDistanceX(startPos, pos) > fpp.maxSearchDist || Position::getDistanceY(startPos, pos) > fpp.maxSearchDist)) { continue; } @@ -734,33 +922,34 @@ bool Map::getPathMatching(const std::shared_ptr &creature, const Posit continue; } + int_fast32_t extraCost; AStarNode* neighborNode = nodes.getNodeByPosition(pos.x, pos.y); - - const bool withoutCreature = creature == nullptr; - const auto &tile = neighborNode || withoutCreature ? getTile(pos.x, pos.y, pos.z) : canWalkTo(creature, pos); - - if (!tile || (!neighborNode && withoutCreature && tile->hasFlag(TILESTATE_BLOCKSOLID))) { - continue; + if (neighborNode) { + extraCost = neighborNode->c; + } else { + const auto &tile = Map::canWalkTo(creature, pos); + if (!tile) { + continue; + } + extraCost = AStarNodes::getTileWalkCost(creature, tile); } // The cost (g) for this neighbor - const int_fast32_t cost = AStarNodes::getMapWalkCost(n, pos, withoutCreature); - const int_fast32_t extraCost = AStarNodes::getTileWalkCost(creature, tile); + const int_fast32_t cost = AStarNodes::getMapWalkCost(n, pos); const int_fast32_t newf = f + cost + extraCost; - if (neighborNode) { if (neighborNode->f <= newf) { // The node on the closed/open list is cheaper than this one continue; } - neighborNode->f = newf; neighborNode->parent = n; nodes.openNode(neighborNode); } else { - // Does not exist in the open/closed list, create a std::make_shared - neighborNode = nodes.createOpenNode(n, pos.x, pos.y, newf); - if (!neighborNode) { + // Does not exist in the open/closed list, create a new node + const int_fast32_t dX = std::abs(targetPos.getX() - pos.getX()); + const int_fast32_t dY = std::abs(targetPos.getY() - pos.getY()); + if (!nodes.createOpenNode(n, pos.x, pos.y, newf, ((dX - sX) << 3) + ((dY - sY) << 3) + (std::max(dX, dY) << 3), extraCost)) { if (found) { break; } @@ -768,9 +957,8 @@ bool Map::getPathMatching(const std::shared_ptr &creature, const Posit } } } - nodes.closeNode(n); - } + } while (fpp.maxSearchDist != 0 || nodes.getClosedNodes() < 100); if (!found) { return false; @@ -779,37 +967,42 @@ bool Map::getPathMatching(const std::shared_ptr &creature, const Posit int_fast32_t prevx = endPos.x; int_fast32_t prevy = endPos.y; + dirList.reserve(cntDirs); + found = found->parent; while (found) { pos.x = found->x; pos.y = found->y; - const int_fast32_t dx = pos.getX() - prevx; - const int_fast32_t dy = pos.getY() - prevy; + int_fast32_t dx = pos.getX() - prevx; + int_fast32_t dy = pos.getY() - prevy; prevx = pos.x; prevy = pos.y; - - if (dx == 1 && dy == 1) { - dirList.push_front(DIRECTION_NORTHWEST); - } else if (dx == -1 && dy == 1) { - dirList.push_front(DIRECTION_NORTHEAST); - } else if (dx == 1 && dy == -1) { - dirList.push_front(DIRECTION_SOUTHWEST); - } else if (dx == -1 && dy == -1) { - dirList.push_front(DIRECTION_SOUTHEAST); - } else if (dx == 1) { - dirList.push_front(DIRECTION_WEST); + if (dx == 1) { + if (dy == 1) { + dirList.emplace_back(DIRECTION_NORTHWEST); + } else if (dy == -1) { + dirList.emplace_back(DIRECTION_SOUTHWEST); + } else { + dirList.emplace_back(DIRECTION_WEST); + } } else if (dx == -1) { - dirList.push_front(DIRECTION_EAST); + if (dy == 1) { + dirList.emplace_back(DIRECTION_NORTHEAST); + } else if (dy == -1) { + dirList.emplace_back(DIRECTION_SOUTHEAST); + } else { + dirList.emplace_back(DIRECTION_EAST); + } } else if (dy == 1) { - dirList.push_front(DIRECTION_NORTH); + dirList.emplace_back(DIRECTION_NORTH); } else if (dy == -1) { - dirList.push_front(DIRECTION_SOUTH); + dirList.emplace_back(DIRECTION_SOUTH); } - found = found->parent; } + return true; } diff --git a/src/map/map.hpp b/src/map/map.hpp index bae07445156..f6e38cb3eac 100644 --- a/src/map/map.hpp +++ b/src/map/map.hpp @@ -108,8 +108,7 @@ class Map : public MapCache { * \param checkLineOfSight checks if there is any blocking objects in the way * \returns The result if you can throw there or not */ - bool canThrowObjectTo(const Position &fromPos, const Position &toPos, bool checkLineOfSight = true, int32_t rangex = MAP_MAX_CLIENT_VIEW_PORT_X, int32_t rangey = MAP_MAX_CLIENT_VIEW_PORT_Y); - + bool canThrowObjectTo(const Position &fromPos, const Position &toPos, SightLines_t lineOfSight = SightLine_CheckSightLine, int32_t rangex = MAP_MAX_CLIENT_VIEW_PORT_X, int32_t rangey = MAP_MAX_CLIENT_VIEW_PORT_Y); /** * Checks if path is clear from fromPos to toPos * Notice: This only checks a straight line if the path is clear, for path finding use getPathTo. @@ -123,9 +122,11 @@ class Map : public MapCache { std::shared_ptr canWalkTo(const std::shared_ptr &creature, const Position &pos); - bool getPathMatching(const std::shared_ptr &creature, stdext::arraylist &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp); + bool getPathMatching(const std::shared_ptr &creature, std::vector &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp); + bool getPathMatching(const std::shared_ptr &creature, const Position &targetPos, std::vector &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp); + bool getPathMatchingCond(const std::shared_ptr &creature, const Position &targetPos, std::vector &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp); - bool getPathMatching(const Position &startPos, stdext::arraylist &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp) { + bool getPathMatching(const Position &startPos, std::vector &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp) { return getPathMatching(nullptr, startPos, dirList, pathCondition, fpp); } @@ -143,8 +144,6 @@ class Map : public MapCache { Houses housesCustomMaps[50]; private: - bool getPathMatching(const std::shared_ptr &creature, const Position &startPos, stdext::arraylist &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp); - /** * Set a single tile. */ diff --git a/src/map/map_definitions.hpp b/src/map/map_definitions.hpp index 67c9878b92d..da3447efc68 100644 --- a/src/map/map_definitions.hpp +++ b/src/map/map_definitions.hpp @@ -29,3 +29,10 @@ enum RentPeriod_t { RENTPERIOD_YEARLY, RENTPERIOD_NEVER, }; + +enum SightLines_t : uint8_t { + SightLine_NoCheck = 0, + SightLine_CheckSightLine = 1 << 0, + SightLine_FloorCheck = 1 << 1, + SightLine_CheckSightLineAndFloor = SightLine_CheckSightLine | SightLine_FloorCheck, +}; diff --git a/src/map/mapcache.cpp b/src/map/mapcache.cpp index cb3e95eb30e..e6e2f79b806 100644 --- a/src/map/mapcache.cpp +++ b/src/map/mapcache.cpp @@ -12,6 +12,7 @@ #include "mapcache.hpp" #include "game/movement/teleport.hpp" +#include "game/scheduling/dispatcher.hpp" #include "items/bed.hpp" #include "io/iologindata.hpp" #include "items/item.hpp" @@ -135,9 +136,13 @@ std::shared_ptr MapCache::getOrCreateTileFromCache(const std::unique_ptrsetFlag(static_cast(cachedTile->flags)); - for (const auto &zone : Zone::getZones(pos)) { - tile->addZone(zone); - } + + // add zone synchronously + g_dispatcher().context().tryAddEvent([tile, pos] { + for (const auto &zone : Zone::getZones(pos)) { + tile->addZone(zone); + } + }); floor->setTile(x, y, tile); diff --git a/src/map/utils/astarnodes.cpp b/src/map/utils/astarnodes.cpp index 9342fd8436b..21ebe5f982f 100644 --- a/src/map/utils/astarnodes.cpp +++ b/src/map/utils/astarnodes.cpp @@ -13,8 +13,28 @@ #include "creatures/monsters/monster.hpp" #include "creatures/combat/combat.hpp" -AStarNodes::AStarNodes(uint32_t x, uint32_t y) : - nodes(), openNodes() { +AStarNodes::AStarNodes(uint32_t x, uint32_t y, int_fast32_t extraCost) : + openNodes(), nodes() { +#if defined(__AVX2__) + __m256i defaultCost = _mm256_set1_epi32(std::numeric_limits::max()); + for (int32_t i = 0; i < MAX_NODES; i += 32) { + _mm256_stream_si256(reinterpret_cast<__m256i*>(&calculatedNodes[i + 0]), defaultCost); + _mm256_stream_si256(reinterpret_cast<__m256i*>(&calculatedNodes[i + 8]), defaultCost); + _mm256_stream_si256(reinterpret_cast<__m256i*>(&calculatedNodes[i + 16]), defaultCost); + _mm256_stream_si256(reinterpret_cast<__m256i*>(&calculatedNodes[i + 24]), defaultCost); + } + _mm_sfence(); +#elif defined(__SSE2__) + __m128i defaultCost = _mm_set1_epi32(std::numeric_limits::max()); + for (int32_t i = 0; i < MAX_NODES; i += 16) { + _mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 0]), defaultCost); + _mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 4]), defaultCost); + _mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 8]), defaultCost); + _mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 12]), defaultCost); + } + _mm_sfence(); +#endif + curNode = 1; closedNodes = 0; openNodes[0] = true; @@ -24,121 +44,239 @@ AStarNodes::AStarNodes(uint32_t x, uint32_t y) : startNode.x = x; startNode.y = y; startNode.f = 0; - nodeTable[(x << 16) | y] = nodes; + startNode.g = 0; + startNode.c = extraCost; + nodesTable[0] = (x << 16) | y; +#if defined(__SSE2__) + calculatedNodes[0] = 0; +#endif } -AStarNode* AStarNodes::createOpenNode(AStarNode* parent, uint32_t x, uint32_t y, int_fast32_t f) { +bool AStarNodes::createOpenNode(AStarNode* parent, uint32_t x, uint32_t y, int_fast32_t f, int_fast32_t heuristic, int_fast32_t extraCost) { if (curNode >= MAX_NODES) { - return nullptr; + return false; } - size_t retNode = curNode++; + int32_t retNode = curNode++; openNodes[retNode] = true; - AStarNode* node = nodes + retNode; - nodeTable[(x << 16) | y] = node; - node->parent = parent; - node->x = x; - node->y = y; - node->f = f; - return node; + AStarNode &node = nodes[retNode]; + node.parent = parent; + node.x = x; + node.y = y; + node.f = f; + node.g = heuristic; + node.c = extraCost; + nodesTable[retNode] = (x << 16) | y; +#if defined(__SSE2__) + calculatedNodes[retNode] = f + heuristic; +#endif + return true; } AStarNode* AStarNodes::getBestNode() { - if (curNode == 0) { - return nullptr; +// Branchless best node search +#if defined(__AVX512F__) + const __m512i increment = _mm512_set1_epi32(16); + __m512i indices = _mm512_setr_epi32(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); + __m512i minindices = indices; + __m512i minvalues = _mm512_load_si512(reinterpret_cast(calculatedNodes)); + for (int32_t pos = 16; pos < curNode; pos += 16) { + const __m512i values = _mm512_load_si512(reinterpret_cast(&calculatedNodes[pos])); + indices = _mm512_add_epi32(indices, increment); + minindices = _mm512_mask_blend_epi32(_mm512_cmplt_epi32_mask(values, minvalues), minindices, indices); + minvalues = _mm512_min_epi32(minvalues, values); + } + + alignas(64) int32_t values_array[16]; + alignas(64) int32_t indices_array[16]; + _mm512_store_si512(reinterpret_cast(values_array), minvalues); + _mm512_store_si512(reinterpret_cast(indices_array), minindices); + + int32_t best_node = indices_array[0]; + int32_t best_node_f = values_array[0]; + for (int32_t i = 1; i < 16; ++i) { + int32_t total_cost = values_array[i]; + best_node = (total_cost < best_node_f ? indices_array[i] : best_node); + best_node_f = (total_cost < best_node_f ? total_cost : best_node_f); + } + return (openNodes[best_node] ? &nodes[best_node] : NULL); +#elif defined(__AVX2__) + const __m256i increment = _mm256_set1_epi32(8); + __m256i indices = _mm256_setr_epi32(0, 1, 2, 3, 4, 5, 6, 7); + __m256i minindices = indices; + __m256i minvalues = _mm256_load_si256(reinterpret_cast(calculatedNodes)); + for (int32_t pos = 8; pos < curNode; pos += 8) { + const __m256i values = _mm256_load_si256(reinterpret_cast(&calculatedNodes[pos])); + indices = _mm256_add_epi32(indices, increment); + minindices = _mm256_blendv_epi8(minindices, indices, _mm256_cmpgt_epi32(minvalues, values)); + minvalues = _mm256_min_epi32(values, minvalues); + } + + __m256i res = _mm256_min_epi32(minvalues, _mm256_shuffle_epi32(minvalues, _MM_SHUFFLE(2, 3, 0, 1))); // Calculate horizontal minimum + res = _mm256_min_epi32(res, _mm256_shuffle_epi32(res, _MM_SHUFFLE(0, 1, 2, 3))); // Calculate horizontal minimum + res = _mm256_min_epi32(res, _mm256_permutevar8x32_epi32(res, _mm256_set_epi32(0, 1, 2, 3, 4, 5, 6, 7))); // Calculate horizontal minimum + + alignas(32) int32_t indices_array[8]; + _mm256_store_si256(reinterpret_cast<__m256i*>(indices_array), minindices); + + int32_t best_node = indices_array[(_mm_ctz(_mm256_movemask_epi8(_mm256_cmpeq_epi32(minvalues, res))) >> 2)]; + return (openNodes[best_node] ? &nodes[best_node] : NULL); +#elif defined(__SSE4_1__) + const __m128i increment = _mm_set1_epi32(4); + __m128i indices = _mm_setr_epi32(0, 1, 2, 3); + __m128i minindices = indices; + __m128i minvalues = _mm_load_si128(reinterpret_cast(calculatedNodes)); + for (int32_t pos = 4; pos < curNode; pos += 4) { + const __m128i values = _mm_load_si128(reinterpret_cast(&calculatedNodes[pos])); + indices = _mm_add_epi32(indices, increment); + minindices = _mm_blendv_epi8(minindices, indices, _mm_cmplt_epi32(values, minvalues)); + minvalues = _mm_min_epi32(values, minvalues); } + __m128i res = _mm_min_epi32(minvalues, _mm_shuffle_epi32(minvalues, _MM_SHUFFLE(2, 3, 0, 1))); // Calculate horizontal minimum + res = _mm_min_epi32(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 1, 2, 3))); // Calculate horizontal minimum + + alignas(16) int32_t indices_array[4]; + _mm_store_si128(reinterpret_cast<__m128i*>(indices_array), minindices); + + int32_t best_node = indices_array[(_mm_ctz(_mm_movemask_epi8(_mm_cmpeq_epi32(minvalues, res))) >> 2)]; + return (openNodes[best_node] ? &nodes[best_node] : NULL); +#elif defined(__SSE2__) + auto _mm_sse2_min_epi32 = [](const __m128i a, const __m128i b) { + __m128i mask = _mm_cmpgt_epi32(a, b); + return _mm_or_si128(_mm_and_si128(mask, b), _mm_andnot_si128(mask, a)); + }; + + auto _mm_sse2_blendv_epi8 = [](const __m128i a, const __m128i b, __m128i mask) { + mask = _mm_cmplt_epi8(mask, _mm_setzero_si128()); + return _mm_or_si128(_mm_andnot_si128(mask, a), _mm_and_si128(mask, b)); + }; + + const __m128i increment = _mm_set1_epi32(4); + __m128i indices = _mm_setr_epi32(0, 1, 2, 3); + __m128i minindices = indices; + __m128i minvalues = _mm_load_si128(reinterpret_cast(calculatedNodes)); + for (int32_t pos = 4; pos < curNode; pos += 4) { + const __m128i values = _mm_load_si128(reinterpret_cast(&calculatedNodes[pos])); + indices = _mm_add_epi32(indices, increment); + minindices = _mm_sse2_blendv_epi8(minindices, indices, _mm_cmplt_epi32(values, minvalues)); + minvalues = _mm_sse2_min_epi32(values, minvalues); + } + + __m128i res = _mm_sse2_min_epi32(minvalues, _mm_shuffle_epi32(minvalues, _MM_SHUFFLE(2, 3, 0, 1))); // Calculate horizontal minimum + res = _mm_sse2_min_epi32(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 1, 2, 3))); // Calculate horizontal minimum + + alignas(16) int32_t indices_array[4]; + _mm_store_si128(reinterpret_cast<__m128i*>(indices_array), minindices); + + int32_t best_node = indices_array[(_mm_ctz(_mm_movemask_epi8(_mm_cmpeq_epi32(minvalues, res))) >> 2)]; + return (openNodes[best_node] ? &nodes[best_node] : NULL); +#else int32_t best_node_f = std::numeric_limits::max(); int32_t best_node = -1; - for (size_t i = 0; i < curNode; i++) { - if (openNodes[i] && nodes[i].f < best_node_f) { - best_node_f = nodes[i].f; - best_node = i; + for (int32_t pos = 0; pos < curNode; ++pos) { + if (!openNodes[pos]) { + continue; } - } - if (best_node >= 0) { - return nodes + best_node; + int32_t total_cost = nodes[pos].f + nodes[pos].g; + best_node = (total_cost < best_node_f ? pos : best_node); + best_node_f = (total_cost < best_node_f ? total_cost : best_node_f); } - return nullptr; + return (best_node != -1 ? &nodes[best_node] : nullptr); +#endif } void AStarNodes::closeNode(const AStarNode* node) { - size_t index = node - nodes; - if (index >= MAX_NODES) { - g_logger().error("[{}]: node index out of bounds!", __FUNCTION__); - return; - } - + const size_t index = node - nodes; assert(index < MAX_NODES); +#if defined(__SSE2__) + calculatedNodes[index] = std::numeric_limits::max(); +#endif openNodes[index] = false; ++closedNodes; } void AStarNodes::openNode(const AStarNode* node) { - size_t index = node - nodes; - if (index >= MAX_NODES) { - g_logger().error("[{}]: node index out of bounds!", __FUNCTION__); - return; - } - + const size_t index = node - nodes; assert(index < MAX_NODES); - if (!openNodes[index]) { - openNodes[index] = true; - --closedNodes; - } +#if defined(__SSE2__) + calculatedNodes[index] = nodes[index].f + nodes[index].g; +#endif + closedNodes -= (openNodes[index] ? 0 : 1); + openNodes[index] = true; } -int_fast32_t AStarNodes::getClosedNodes() const { +int32_t AStarNodes::getClosedNodes() const { return closedNodes; } AStarNode* AStarNodes::getNodeByPosition(uint32_t x, uint32_t y) { - auto it = nodeTable.find((x << 16) | y); - if (it == nodeTable.end()) { - return nullptr; - } - return it->second; -} + uint32_t xy = (x << 16) | y; +#if defined(__SSE2__) + const __m128i key = _mm_set1_epi32(xy); -int_fast32_t AStarNodes::getMapWalkCost(AStarNode* node, const Position &neighborPos, bool preferDiagonal) { - if (std::abs(node->x - neighborPos.x) == std::abs(node->y - neighborPos.y)) { - // diagonal movement extra cost - if (preferDiagonal) { - return MAP_PREFERDIAGONALWALKCOST; - } else { - return MAP_DIAGONALWALKCOST; + int32_t pos = 0; + int32_t curRound = curNode - 16; + for (; pos <= curRound; pos += 16) { + __m128i v[4]; + v[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key); + v[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key); + v[2] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 8])), key); + v[3] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 12])), key); + const uint32_t mask = _mm_movemask_epi8(_mm_packs_epi16(_mm_packs_epi32(v[0], v[1]), _mm_packs_epi32(v[2], v[3]))); + if (mask != 0) { + return &nodes[pos + _mm_ctz(mask)]; + } + } + curRound = curNode - 8; + if (pos <= curRound) { + __m128i v[2]; + v[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key); + v[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key); + const uint32_t mask = _mm_movemask_epi8(_mm_packs_epi32(v[0], v[1])); + if (mask != 0) { + return &nodes[pos + (_mm_ctz(mask) >> 1)]; + } + pos += 8; + } + for (; pos < curNode; ++pos) { + if (nodesTable[pos] == xy) { + return &nodes[pos]; } } - return MAP_NORMALWALKCOST; + return nullptr; +#else + for (int32_t i = 1; i < curNode; ++i) { + if (nodesTable[i] == xy) { + return &nodes[i]; + } + } + return (nodesTable[0] == xy ? &nodes[0] : nullptr); // The first node is very unlikely to be the "neighbor" so leave it for end +#endif } -int_fast32_t AStarNodes::getTileWalkCost(const std::shared_ptr &creature, const std::shared_ptr &tile) { - if (!creature || !tile) { - return 0; - } +int_fast32_t AStarNodes::getMapWalkCost(AStarNode* node, const Position &neighborPos) { + // diagonal movement extra cost + return (((std::abs(node->x - neighborPos.x) + std::abs(node->y - neighborPos.y)) - 1) * MAP_DIAGONALWALKCOST) + MAP_NORMALWALKCOST; +} +int_fast32_t AStarNodes::getTileWalkCost(const std::shared_ptr &creature, const std::shared_ptr &tile) { int_fast32_t cost = 0; - if (tile->getTopVisibleCreature(creature) != nullptr) { - // destroy creature cost - cost += MAP_NORMALWALKCOST * 3; - } - if (const auto &field = tile->getFieldItem()) { - const CombatType_t combatType = field->getCombatType(); - const auto &monster = creature->getMonster(); - - if (!creature->isImmune(combatType) && !creature->hasCondition(Combat::DamageToConditionType(combatType)) && (monster && !monster->canWalkOnFieldType(combatType))) { - cost += MAP_NORMALWALKCOST * 18; + if (creature) { + if (tile->getTopVisibleCreature(creature) != nullptr) { + // destroy creature cost + cost += MAP_NORMALWALKCOST * 4; } - /** - * Make player try to avoid magic fields, when calculating pathing - */ - const auto &player = creature->getPlayer(); - if (player && !field->isBlocking() && field->getDamage() != 0) { - cost += MAP_NORMALWALKCOST * 18; + if (const auto &field = tile->getFieldItem()) { + CombatType_t combatType = field->getCombatType(); + if (!creature->isImmune(combatType) && !creature->hasCondition(Combat::DamageToConditionType(combatType)) && (creature->getMonster() && !creature->getMonster()->canWalkOnFieldType(combatType))) { + cost += MAP_NORMALWALKCOST * 18; + } } } + return cost; } diff --git a/src/map/utils/astarnodes.hpp b/src/map/utils/astarnodes.hpp index 546d490d858..d66171f0d53 100644 --- a/src/map/utils/astarnodes.hpp +++ b/src/map/utils/astarnodes.hpp @@ -15,22 +15,22 @@ class Tile; struct AStarNode { AStarNode* parent; - int_fast32_t f; + int_fast32_t f, g, c; uint16_t x, y; }; class AStarNodes { public: - AStarNodes(uint32_t x, uint32_t y); + AStarNodes(uint32_t x, uint32_t y, int_fast32_t extraCost); - AStarNode* createOpenNode(AStarNode* parent, uint32_t x, uint32_t y, int_fast32_t f); + bool createOpenNode(AStarNode* parent, uint32_t x, uint32_t y, int_fast32_t f, int_fast32_t heuristic, int_fast32_t extraCost); AStarNode* getBestNode(); void closeNode(const AStarNode* node); void openNode(const AStarNode* node); - int_fast32_t getClosedNodes() const; + int32_t getClosedNodes() const; AStarNode* getNodeByPosition(uint32_t x, uint32_t y); - static int_fast32_t getMapWalkCost(AStarNode* node, const Position &neighborPos, bool preferDiagonal = false); + static int_fast32_t getMapWalkCost(AStarNode* node, const Position &neighborPos); static int_fast32_t getTileWalkCost(const std::shared_ptr &creature, const std::shared_ptr &tile); private: @@ -39,9 +39,15 @@ class AStarNodes { static constexpr int32_t MAP_PREFERDIAGONALWALKCOST = 14; static constexpr int32_t MAP_DIAGONALWALKCOST = 25; +#if defined(__SSE2__) + alignas(16) uint32_t nodesTable[MAX_NODES]; + alignas(64) int32_t calculatedNodes[MAX_NODES]; AStarNode nodes[MAX_NODES]; +#else + AStarNode nodes[MAX_NODES]; + uint32_t nodesTable[MAX_NODES]; +#endif + int32_t closedNodes; + int32_t curNode; bool openNodes[MAX_NODES]; - phmap::flat_hash_map nodeTable; - size_t curNode; - int_fast32_t closedNodes; }; diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index c67cee710a8..6df5d758ad2 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -473,6 +473,7 @@ void ProtocolGame::login(const std::string &name, uint32_t accountId, OperatingS // Extended opcodes if (operatingSystem >= CLIENTOS_OTCLIENT_LINUX) { + isOTC = true; NetworkMessage opcodeMessage; opcodeMessage.addByte(0x32); opcodeMessage.addByte(0x00); @@ -707,6 +708,7 @@ void ProtocolGame::onRecvFirstMessage(NetworkMessage &msg) { OperatingSystem_t operatingSystem = static_cast(msg.get()); version = msg.get(); // Protocol version + g_logger().trace("Protocol version: {}", version); // Old protocol support oldProtocol = g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__) && version <= 1100; @@ -720,10 +722,21 @@ void ProtocolGame::onRecvFirstMessage(NetworkMessage &msg) { clientVersion = static_cast(msg.get()); if (!oldProtocol) { - msg.getString(); // Client version (String) + auto clientVersionString = msg.getString(); // Client version (String) + g_logger().trace("Client version: {}", clientVersionString); + if (version >= 1334) { + auto assetHashIdentifier = msg.getString(); // Assets hash identifier + g_logger().trace("Client asset hash identifier: {}", assetHashIdentifier); + } + } + + if (version < 1334) { + auto datRevision = msg.get(); // Dat revision + g_logger().trace("Dat revision: {}", datRevision); } - msg.skipBytes(3); // U16 dat revision, U8 game preview state + auto gamePreviewState = msg.getByte(); // U8 game preview state + g_logger().trace("Game preview state: {}", gamePreviewState); if (!Protocol::RSA_decrypt(msg)) { g_logger().warn("[ProtocolGame::onRecvFirstMessage] - RSA Decrypt Failed"); @@ -735,7 +748,8 @@ void ProtocolGame::onRecvFirstMessage(NetworkMessage &msg) { enableXTEAEncryption(); setXTEAKey(key.data()); - msg.skipBytes(1); // gamemaster flag + auto isGameMaster = static_cast(msg.getByte()); // gamemaster flag + g_logger().trace("Is Game Master: {}", isGameMaster); std::string authType = g_configManager().getString(AUTH_TYPE, __FUNCTION__); std::ostringstream ss; @@ -923,8 +937,8 @@ void ProtocolGame::parsePacket(NetworkMessage &msg) { void ProtocolGame::parsePacketDead(uint8_t recvbyte) { if (recvbyte == 0x14) { - // Remove player from game if click "ok" using otcv8 - if (player && otclientV8 > 0) { + // Remove player from game if click "ok" using otc + if (player && isOTC) { g_game().removePlayerUniqueLogin(player->getName()); } disconnect(); @@ -1599,35 +1613,34 @@ void ProtocolGame::parseAutoWalk(NetworkMessage &msg) { return; } - msg.skipBytes(numdirs); - - stdext::arraylist path; - for (uint8_t i = 0; i < numdirs; ++i) { - uint8_t rawdir = msg.getPreviousByte(); + std::vector path; + path.resize(numdirs, DIRECTION_NORTH); + for (size_t i = numdirs; --i < numdirs;) { + const uint8_t rawdir = msg.getByte(); switch (rawdir) { case 1: - path.push_front(DIRECTION_EAST); + path[i] = DIRECTION_EAST; break; case 2: - path.push_front(DIRECTION_NORTHEAST); + path[i] = DIRECTION_NORTHEAST; break; case 3: - path.push_front(DIRECTION_NORTH); + path[i] = DIRECTION_NORTH; break; case 4: - path.push_front(DIRECTION_NORTHWEST); + path[i] = DIRECTION_NORTHWEST; break; case 5: - path.push_front(DIRECTION_WEST); + path[i] = DIRECTION_WEST; break; case 6: - path.push_front(DIRECTION_SOUTHWEST); + path[i] = DIRECTION_SOUTHWEST; break; case 7: - path.push_front(DIRECTION_SOUTH); + path[i] = DIRECTION_SOUTH; break; case 8: - path.push_front(DIRECTION_SOUTHEAST); + path[i] = DIRECTION_SOUTHEAST; break; default: break; @@ -1638,7 +1651,7 @@ void ProtocolGame::parseAutoWalk(NetworkMessage &msg) { return; } - g_game().playerAutoWalk(player->getID(), path.data()); + g_game().playerAutoWalk(player->getID(), path); } void ProtocolGame::parseSetOutfit(NetworkMessage &msg) { @@ -1668,8 +1681,11 @@ void ProtocolGame::parseSetOutfit(NetworkMessage &msg) { newOutfit.lookMountBody = std::min(132, msg.getByte()); newOutfit.lookMountLegs = std::min(132, msg.getByte()); newOutfit.lookMountFeet = std::min(132, msg.getByte()); + bool isMounted = msg.getByte(); newOutfit.lookFamiliarsType = msg.get(); + g_logger().debug("Bool isMounted: {}", isMounted); } + uint8_t isMountRandomized = msg.getByte(); g_game().playerChangeOutfit(player->getID(), newOutfit, isMountRandomized); } else if (outfitType == 1) { @@ -1789,11 +1805,23 @@ void ProtocolGame::parseQuickLoot(NetworkMessage &msg) { return; } - Position pos = msg.getPosition(); - uint16_t itemId = msg.get(); - uint8_t stackpos = msg.getByte(); - bool lootAllCorpses = msg.getByte(); - bool autoLoot = msg.getByte(); + uint8_t variant = msg.getByte(); + const Position pos = msg.getPosition(); + uint16_t itemId = 0; + uint8_t stackpos = 0; + bool lootAllCorpses = true; + bool autoLoot = true; + + if (variant == 2) { + // Loot player nearby (13.40) + } else { + itemId = msg.get(); + stackpos = msg.getByte(); + lootAllCorpses = variant == 1; + autoLoot = false; + } + g_logger().debug("[{}] variant {}, pos {}, itemId {}, stackPos {}", __FUNCTION__, variant, pos.toString(), itemId, stackpos); + g_game().playerQuickLoot(player->getID(), pos, itemId, stackpos, nullptr, lootAllCorpses, autoLoot); } @@ -2348,6 +2376,10 @@ void ProtocolGame::parseBestiarysendMonsterData(NetworkMessage &msg) { newmsg.addString(Class, "ProtocolGame::parseBestiarysendMonsterData - Class"); newmsg.addByte(currentLevel); + + newmsg.add(0); // Animus Mastery Bonus + newmsg.add(0); // Animus Mastery Points + newmsg.add(killCounter); newmsg.add(mtype->info.bestiaryFirstUnlock); @@ -2962,6 +2994,7 @@ void ProtocolGame::parseBestiarysendCreatures(NetworkMessage &msg) { newmsg.add(raceid_); uint8_t progress = 0; + uint8_t occurrence = 0; for (const auto &_it : creaturesKilled) { if (_it.first == raceid_) { const auto tmpType = g_monsters().getMonsterType(it_.second); @@ -2969,15 +3002,22 @@ void ProtocolGame::parseBestiarysendCreatures(NetworkMessage &msg) { return; } progress = g_iobestiary().getKillStatus(tmpType, _it.second); + occurrence = tmpType->info.bestiaryOccurrence; } } if (progress > 0) { - newmsg.add(static_cast(progress)); + newmsg.addByte(progress); + newmsg.addByte(occurrence); } else { newmsg.addByte(0); } + + newmsg.add(0); // Creature Animous Bonus } + + newmsg.add(0); // Animus Mastery Points + writeToOutputBuffer(newmsg); } @@ -4259,12 +4299,10 @@ void ProtocolGame::sendBasicData() { msg.addByte(player->getVocation()->getClientId()); // Prey window - if (!oldProtocol) { - if (player->getVocation()->getId() == 0 && player->getGroup()->id < GROUP_TYPE_GAMEMASTER) { - msg.addByte(0); - } else { - msg.addByte(1); // has reached Main (allow player to open Prey window) - } + if (player->getVocation()->getId() == 0 && player->getGroup()->id < GROUP_TYPE_GAMEMASTER) { + msg.addByte(0); + } else { + msg.addByte(1); // has reached Main (allow player to open Prey window) } // Filter only valid ids @@ -4664,6 +4702,19 @@ void ProtocolGame::sendContainer(uint8_t cid, std::shared_ptr contain msg.addByte(0x00); } + // New container menu options + if (container->isMovable()) { // Pickupable/Moveable (?) + msg.addByte(1); + } else { + msg.addByte(0); + } + + if (container->getHoldingPlayer()) { // Player holding the item (?) + msg.addByte(1); + } else { + msg.addByte(0); + } + writeToOutputBuffer(msg); } @@ -4860,9 +4911,9 @@ void ProtocolGame::sendSaleItemList(const std::vector &shopVector, co msg.add(player->getMoney() + player->getBankBalance()); } - uint8_t itemsToSend = 0; + uint16_t itemsToSend = 0; auto msgPosition = msg.getBufferPosition(); - msg.skipBytes(1); + msg.skipBytes(2); for (const ShopBlock &shopBlock : shopVector) { if (shopBlock.itemSellPrice == 0) { @@ -4877,14 +4928,14 @@ void ProtocolGame::sendSaleItemList(const std::vector &shopVector, co } else { msg.add(std::min(it->second, std::numeric_limits::max())); } - if (++itemsToSend >= 0xFF) { + if (++itemsToSend >= 0xFFFF) { break; } } } msg.setBufferPosition(msgPosition); - msg.addByte(itemsToSend); + msg.add(itemsToSend); writeToOutputBuffer(msg); } diff --git a/src/server/network/protocol/protocolgame.hpp b/src/server/network/protocol/protocolgame.hpp index 8e99aa68a54..f6b7be93cb2 100644 --- a/src/server/network/protocol/protocolgame.hpp +++ b/src/server/network/protocol/protocolgame.hpp @@ -503,6 +503,7 @@ class ProtocolGame final : public Protocol { bool oldProtocol = false; uint16_t otclientV8 = 0; + bool isOTC = false; void sendInventory(); void sendOpenStash();