Skip to content

Commit

Permalink
Merge branch 'main' into fix-2859
Browse files Browse the repository at this point in the history
  • Loading branch information
Luan Luciano authored Sep 24, 2024
2 parents b9fe9a5 + 10823e3 commit 4bfce12
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions data-otservbr-global/lib/quests/soul_war.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1112,9 +1112,9 @@ function MonsterType:calculateBagYouDesireChance(player, itemChance)
itemChance = itemChance + (playerTaintLevel * SoulWarQuest.bagYouDesireChancePerTaint)
end

logger.info("Player {} killed {} with {} taints, loot chance {}", player:getName(), monsterName, playerTaintLevel, itemChance)
logger.debug("Player {} killed {} with {} taints, loot chance {}", player:getName(), monsterName, playerTaintLevel, itemChance)

if math.random(1, 100000) <= totalChance then
if math.random(1, 100000) <= itemChance then
logger.debug("Player {} killed {} and got a bag you desire with drop chance {}", player:getName(), monsterName, itemChance)
if monsterName == "Goshnar's Megalomania" then
-- Reset kill count on successful drop
Expand Down
2 changes: 2 additions & 0 deletions qodana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ version: "1.0"
profile:
name: qodana.recommended

linter: jetbrains/qodana-clang:latest

bootstrap: |
set -e
sudo apt-get update && sudo apt-get -y dist-upgrade
Expand Down
2 changes: 1 addition & 1 deletion src/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3909,7 +3909,7 @@ void Game::playerUseWithCreature(uint32_t playerId, const Position &fromPos, uin
}

const std::shared_ptr<Monster> monster = creature->getMonster();
if (monster && monster->isFamiliar() && creature->getMaster()->getPlayer() == player && (it.isRune() || it.type == ITEM_TYPE_POTION)) {
if (monster && monster->isFamiliar() && creature->getMaster() && creature->getMaster()->getPlayer() == player && (it.isRune() || it.type == ITEM_TYPE_POTION)) {
player->setNextPotionAction(OTSYS_TIME() + g_configManager().getNumber(EX_ACTIONS_DELAY_INTERVAL, __FUNCTION__));

if (it.isMultiUse()) {
Expand Down

0 comments on commit 4bfce12

Please sign in to comment.