- Included the fix for g3d to make it compile on FreeBSD

- Pulled in a patch from cmangos that fixed the spells being broken
This commit is contained in:
bels 2013-07-24 20:40:50 -04:00 committed by Antz
parent c410f30f65
commit 0759658736
3 changed files with 15 additions and 10 deletions

View file

@ -27,6 +27,14 @@
# include <io.h> # include <io.h>
#define stat64 _stat64 #define stat64 _stat64
#elif defined(__FreeBSD__)
# include <dirent.h>
# include <fnmatch.h>
# include <unistd.h>
# define O_LARGEFILE 0100000
# define stat64 stat
# define _stat stat
# define _getcwd getcwd
#else #else
# include <dirent.h> # include <dirent.h>
# include <fnmatch.h> # include <fnmatch.h>

View file

@ -1895,14 +1895,13 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
{ {
if (Unit* pUnitTarget = m_caster->SelectMagnetTarget(m_targets.getUnitTarget(), this, effIndex)) if (Unit* pUnitTarget = m_caster->SelectMagnetTarget(m_targets.getUnitTarget(), this, effIndex))
{ {
if (m_targets.getUnitTarget() != pUnitTarget) if (m_targets.getUnitTarget() && m_targets.getUnitTarget() != pUnitTarget)
{
m_targets.setUnitTarget(pUnitTarget);
m_spellFlags |= SPELL_FLAG_REDIRECTED; m_spellFlags |= SPELL_FLAG_REDIRECTED;
m_targets.setUnitTarget(pUnitTarget);
targetUnitMap.push_back(pUnitTarget); targetUnitMap.push_back(pUnitTarget);
} }
} }
}
else else
{ {
Unit* pUnitTarget = m_targets.getUnitTarget(); Unit* pUnitTarget = m_targets.getUnitTarget();
@ -2462,11 +2461,9 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
{ {
if (Unit* pUnitTarget = m_caster->SelectMagnetTarget(m_targets.getUnitTarget(), this, effIndex)) if (Unit* pUnitTarget = m_caster->SelectMagnetTarget(m_targets.getUnitTarget(), this, effIndex))
{ {
if (m_targets.getUnitTarget() != pUnitTarget) if (m_targets.getUnitTarget() && m_targets.getUnitTarget() != pUnitTarget)
{
m_targets.setUnitTarget(pUnitTarget);
m_spellFlags |= SPELL_FLAG_REDIRECTED; m_spellFlags |= SPELL_FLAG_REDIRECTED;
}
targetUnitMap.push_back(pUnitTarget); targetUnitMap.push_back(pUnitTarget);
} }
break; break;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "12651" #define REVISION_NR "12652"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__