mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Switch to support client 3.0.8a (build 3506)
Merge commit 'origin/308'
This commit is contained in:
commit
0fd361a0a3
11 changed files with 120 additions and 63 deletions
|
|
@ -177,7 +177,7 @@ bool SpellCastTargets::read ( WorldPacket * data, Unit *caster )
|
|||
if(!data->readPackGUID(m_unitTargetGUID))
|
||||
return false;
|
||||
|
||||
if( m_targetMask & ( TARGET_FLAG_OBJECT | TARGET_FLAG_OBJECT_UNK ))
|
||||
if( m_targetMask & ( TARGET_FLAG_OBJECT ))
|
||||
if(!data->readPackGUID(m_GOTargetGUID))
|
||||
return false;
|
||||
|
||||
|
|
@ -185,6 +185,10 @@ bool SpellCastTargets::read ( WorldPacket * data, Unit *caster )
|
|||
if(!data->readPackGUID(m_itemTargetGUID))
|
||||
return false;
|
||||
|
||||
if( m_targetMask & (TARGET_FLAG_CORPSE | TARGET_FLAG_PVP_CORPSE ) )
|
||||
if(!data->readPackGUID(m_CorpseTargetGUID))
|
||||
return false;
|
||||
|
||||
if( m_targetMask & TARGET_FLAG_SOURCE_LOCATION )
|
||||
{
|
||||
if(data->rpos()+4+4+4 > data->size())
|
||||
|
|
@ -197,7 +201,10 @@ bool SpellCastTargets::read ( WorldPacket * data, Unit *caster )
|
|||
|
||||
if( m_targetMask & TARGET_FLAG_DEST_LOCATION )
|
||||
{
|
||||
if(data->rpos()+4+4+4 > data->size())
|
||||
if(data->rpos()+1+4+4+4 > data->size())
|
||||
return false;
|
||||
|
||||
if(!data->readPackGUID(m_unitTargetGUID))
|
||||
return false;
|
||||
|
||||
*data >> m_destX >> m_destY >> m_destZ;
|
||||
|
|
@ -213,10 +220,6 @@ bool SpellCastTargets::read ( WorldPacket * data, Unit *caster )
|
|||
*data >> m_strTarget;
|
||||
}
|
||||
|
||||
if( m_targetMask & (TARGET_FLAG_CORPSE | TARGET_FLAG_PVP_CORPSE ) )
|
||||
if(!data->readPackGUID(m_CorpseTargetGUID))
|
||||
return false;
|
||||
|
||||
// find real units/GOs
|
||||
Update(caster);
|
||||
return true;
|
||||
|
|
@ -226,7 +229,7 @@ void SpellCastTargets::write ( WorldPacket * data )
|
|||
{
|
||||
*data << uint32(m_targetMask);
|
||||
|
||||
if( m_targetMask & ( TARGET_FLAG_UNIT | TARGET_FLAG_PVP_CORPSE | TARGET_FLAG_OBJECT | TARGET_FLAG_OBJECT_UNK | TARGET_FLAG_CORPSE | TARGET_FLAG_UNK2 ) )
|
||||
if( m_targetMask & ( TARGET_FLAG_UNIT | TARGET_FLAG_PVP_CORPSE | TARGET_FLAG_OBJECT | TARGET_FLAG_CORPSE | TARGET_FLAG_UNK2 ) )
|
||||
{
|
||||
if(m_targetMask & TARGET_FLAG_UNIT)
|
||||
{
|
||||
|
|
@ -235,7 +238,7 @@ void SpellCastTargets::write ( WorldPacket * data )
|
|||
else
|
||||
*data << uint8(0);
|
||||
}
|
||||
else if( m_targetMask & ( TARGET_FLAG_OBJECT | TARGET_FLAG_OBJECT_UNK ) )
|
||||
else if( m_targetMask & TARGET_FLAG_OBJECT )
|
||||
{
|
||||
if(m_GOTarget)
|
||||
data->append(m_GOTarget->GetPackGUID());
|
||||
|
|
@ -260,7 +263,14 @@ void SpellCastTargets::write ( WorldPacket * data )
|
|||
*data << m_srcX << m_srcY << m_srcZ;
|
||||
|
||||
if( m_targetMask & TARGET_FLAG_DEST_LOCATION )
|
||||
{
|
||||
if(m_unitTarget)
|
||||
data->append(m_unitTarget->GetPackGUID());
|
||||
else
|
||||
*data << uint8(0);
|
||||
|
||||
*data << m_destX << m_destY << m_destZ;
|
||||
}
|
||||
|
||||
if( m_targetMask & TARGET_FLAG_STRING )
|
||||
*data << m_strTarget;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue