Skip to content

Commit

Permalink
Spell/Unit: Fix linux compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed May 20, 2023
1 parent b2734d9 commit 238c912
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/Globals/UnitCondition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ int32 UnitConditionMgr::getConditionValue(Unit const* source, Unit const* target
case UnitCondition::HAS_HARMFUL_AURA_SCHOOL:
return source->HasAuraHolder([value](SpellAuraHolder* holder)
{
return !holder->IsPositive() && GetSpellSchoolMask(holder->GetSpellProto()) & (1 << value);
return !holder->IsPositive() && holder->GetSpellProto()->GetSchoolMask() & (1 << value);
}) ? value : 0;
case UnitCondition::DAMAGE_PHYSICAL: break;
case UnitCondition::DAMAGE_HOLY: break;
Expand Down
5 changes: 5 additions & 0 deletions src/game/Server/DBCStructure.h
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,11 @@ struct SpellEntry
return mask;
}

SpellSchoolMask GetSchoolMask() const
{
return SpellSchoolMask(1 << School);
}

private:
// prevent creating custom entries (copy data from original in fact)
SpellEntry(SpellEntry const&); // DON'T must have implementation
Expand Down

0 comments on commit 238c912

Please sign in to comment.