Skip to content

Commit

Permalink
Merge branch 'phacUFPE/new_augments' of https://github.com/opentibiab…
Browse files Browse the repository at this point in the history
…r/canary into phacUFPE/new_augments
  • Loading branch information
phacUFPE committed Sep 22, 2024
2 parents 885921c + b11d39d commit bbc48f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
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
5 changes: 2 additions & 3 deletions src/creatures/combat/spells.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,9 +640,8 @@ void Spell::getCombatDataAugment(std::shared_ptr<Player> player, CombatDamage &d
continue;
}
if (
augment->type == Augment_t::IncreasedDamage || augment->type == Augment_t::PowerfulImpact ||
augment->type == Augment_t::StrongImpact || augment->type == Augment_t::Base
) {
augment->type == Augment_t::IncreasedDamage || augment->type == Augment_t::PowerfulImpact || augment->type == Augment_t::StrongImpact || augment->type == Augment_t::Base
) {
const float augmentPercent = augment->value / 100.0;
damage.primary.value += static_cast<int32_t>(damage.primary.value * augmentPercent);
damage.secondary.value += static_cast<int32_t>(damage.secondary.value * augmentPercent);
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 bbc48f9

Please sign in to comment.