mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[8163] Fixed typo and wrong check affecting threat calculation.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
0dc7ea6cc2
commit
e6d40697a1
3 changed files with 19 additions and 28 deletions
|
|
@ -32,11 +32,9 @@
|
|||
// The pHatingUnit is not used yet
|
||||
float ThreatCalcHelper::calcThreat(Unit* pHatedUnit, Unit* pHatingUnit, float pThreat, SpellSchoolMask schoolMask, SpellEntry const *pThreatSpell)
|
||||
{
|
||||
if(pThreatSpell)
|
||||
{
|
||||
if( Player* modOwner = pHatingUnit->GetSpellModOwner() )
|
||||
if (pThreatSpell)
|
||||
if (Player* modOwner = pHatedUnit->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(pThreatSpell->Id, SPELLMOD_THREAT, pThreat);
|
||||
}
|
||||
|
||||
float threat = pHatedUnit->ApplyTotalThreatModifier(pThreat, schoolMask);
|
||||
return threat;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue