Skip to content

Commit

Permalink
Merge pull request AirSkyBoat#3796 from AirSkyBoat-Dev/staging
Browse files Browse the repository at this point in the history
Fixed bug where healing allied mobs would claim them
  • Loading branch information
Frankie-hz authored Jul 5, 2024
2 parents 21bce6a + 7507896 commit 603007b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/map/utils/battleutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5290,8 +5290,9 @@ namespace battleutils
void ClaimMob(CBattleEntity* PDefender, CBattleEntity* PAttacker, bool passing)
{
TracyZoneScoped;

if (PDefender == nullptr || (PDefender && PDefender->objtype != ENTITYTYPE::TYPE_MOB)) // Do not try to claim anything but mobs (trusts, pets, players don't count)
if (PDefender == nullptr ||
(PDefender && PDefender->objtype != ENTITYTYPE::TYPE_MOB) || // Do not try to claim anything but mobs (trusts, pets, players don't count)
(PDefender && PDefender->objtype == ENTITYTYPE::TYPE_MOB && PDefender->allegiance == ALLEGIANCE_TYPE::PLAYER)) // Added mobs that are in allied with player
{
return;
}
Expand Down

0 comments on commit 603007b

Please sign in to comment.