Fix refer a friend Summon

This commit is contained in:
h0rs
2017-02-10 20:24:17 +00:00
committed by lee1991
parent b6d1d5dd56
commit 57b8cf0235
3 changed files with 42 additions and 4 deletions
+8 -2
View File
@@ -6175,6 +6175,12 @@ void Spell::EffectSummonRaFFriend(SpellEffIndex effIndex)
if (m_caster->GetTypeId() != TYPEID_PLAYER || !unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
// Xinef: Unit Target can be on other map, thank god we dont use RaF...
m_caster->CastSpell(unitTarget, m_spellInfo->Effects[effIndex].TriggerSpell, true);
float x, y, z;
m_caster->GetPosition(x, y, z);
unitTarget->ToPlayer()->SetSummonPoint(m_caster->GetMapId(), x, y, z);
WorldPacket data(SMSG_SUMMON_REQUEST, 8 + 4 + 4);
data << uint64(m_caster->GetGUID());
data << uint32(m_caster->GetZoneId());
data << uint32(MAX_PLAYER_SUMMON_DELAY*IN_MILLISECONDS); // auto decline after msecs
unitTarget->ToPlayer()->GetSession()->SendPacket(&data);
}