Fix a crash caused by spell with CAST_FLAG_RUNE_LIST casted by a creature mover. Thanks to Vasago.
This commit is contained in:
@@ -3834,7 +3834,10 @@ void Spell::SendSpellGo()
|
||||
|
||||
if (castFlags & CAST_FLAG_RUNE_LIST) // rune cooldowns list
|
||||
{
|
||||
Player* player = m_caster->ToPlayer();
|
||||
//TODO: There is a crash caused by a spell with CAST_FLAG_RUNE_LIST casted by a creature
|
||||
//The creature is the mover of a player, so HandleCastSpellOpcode uses it as the caster
|
||||
if (Player* player = m_caster->ToPlayer())
|
||||
{
|
||||
uint8 runeMaskInitial = m_runesState;
|
||||
uint8 runeMaskAfterCast = player->GetRunesState();
|
||||
data << uint8(runeMaskInitial); // runes state before
|
||||
@@ -3850,6 +3853,7 @@ void Spell::SendSpellGo()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (castFlags & CAST_FLAG_UNKNOWN_18) // unknown wotlk
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user