Skip to content
Permalink
Browse files

Core/Spells: Fix crash in EffectTeleportUnits

  • Loading branch information...
AbraKabastard committed May 27, 2019
1 parent 265390a commit 3cd1ed19c71544533499da915332aae59ad14c36
Showing with 2 additions and 5 deletions.
  1. +1 −4 src/game/Player.h
  2. +1 −1 src/game/SpellEffects.cpp
@@ -2063,10 +2063,7 @@ class Player : public Unit, public GridObject<Player>
void CheckAreaExploreAndOutdoor(void);

static uint32 TeamForRace(uint8 race);
uint32 GetTeam() const
{
return m_team;
}
uint32 GetTeam() const { return m_team; }
TeamId GetTeamId() const
{
return m_team == ALLIANCE ? TEAM_ALLIANCE : TEAM_HORDE;
@@ -2637,7 +2637,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
case 4:
// Transform
{
if (m_caster->ToPlayer()->GetTeam() == ALLIANCE)
if (m_caster->ToPlayer() && m_caster->ToPlayer()->GetTeam() == ALLIANCE)
m_caster->CastSpell(m_caster, 36897, true);
else
m_caster->CastSpell(m_caster, 36899, true);

0 comments on commit 3cd1ed1

Please sign in to comment.
You can’t perform that action at this time.