[11893] Fix copy&paste error from last commit - otherwise server will crash with first loaded player pet

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
rsa 2012-01-31 17:03:13 +04:00 committed by Schmoozerd
parent 6aab5c1022
commit c9ead52e68
2 changed files with 3 additions and 3 deletions

View file

@ -5448,7 +5448,7 @@ bool Unit::IsHostileTo(Unit const* unit) const
if (tester_faction->faction)
{
// forced reaction
if (ReputationRank const* force = ((Player*)unit)->GetReputationMgr().GetForcedRankIfAny(tester_faction))
if (ReputationRank const* force = ((Player*)target)->GetReputationMgr().GetForcedRankIfAny(tester_faction))
return *force <= REP_HOSTILE;
// apply reputation state
@ -5560,7 +5560,7 @@ bool Unit::IsFriendlyTo(Unit const* unit) const
if (tester_faction->faction)
{
// forced reaction
if (ReputationRank const* force =((Player*)unit)->GetReputationMgr().GetForcedRankIfAny(tester_faction))
if (ReputationRank const* force =((Player*)target)->GetReputationMgr().GetForcedRankIfAny(tester_faction))
return *force >= REP_FRIENDLY;
// apply reputation state

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11892"
#define REVISION_NR "11893"
#endif // __REVISION_NR_H__