mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
Fixed crash
This commit is contained in:
parent
b37ccbd08b
commit
84f43e60ab
3 changed files with 13 additions and 24 deletions
|
|
@ -1839,6 +1839,7 @@ void Player::RegenerateAll()
|
|||
if (!isInCombat() && !HasAuraType(SPELL_AURA_INTERRUPT_REGEN))
|
||||
{
|
||||
Regenerate(POWER_RAGE);
|
||||
if(getClass() == CLASS_DEATH_KNIGHT)
|
||||
Regenerate(POWER_RUNIC_POWER);
|
||||
}
|
||||
}
|
||||
|
|
@ -1847,6 +1848,7 @@ void Player::RegenerateAll()
|
|||
|
||||
Regenerate( POWER_MANA );
|
||||
|
||||
if(getClass() == CLASS_DEATH_KNIGHT)
|
||||
Regenerate( POWER_RUNE );
|
||||
|
||||
m_regenTimer = regenDelay;
|
||||
|
|
|
|||
|
|
@ -219,7 +219,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_CORPSE | TARGET_FLAG_UNK2 ) )
|
||||
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)
|
||||
{
|
||||
|
|
@ -2633,13 +2633,6 @@ void Spell::SendCastResult(uint8 result)
|
|||
}
|
||||
((Player*)m_caster)->GetSession()->SendPacket(&data);
|
||||
}
|
||||
/*else
|
||||
{
|
||||
WorldPacket data(SMSG_CLEAR_EXTRA_AURA_INFO_OBSOLETE, (8+4));
|
||||
data.append(m_caster->GetPackGUID());
|
||||
data << uint32(m_spellInfo->Id);
|
||||
((Player*)m_caster)->GetSession()->SendPacket(&data);
|
||||
}*/
|
||||
}
|
||||
|
||||
void Spell::SendSpellStart()
|
||||
|
|
@ -2653,14 +2646,10 @@ void Spell::SendSpellStart()
|
|||
if(IsRangedSpell())
|
||||
castFlags |= CAST_FLAG_AMMO;
|
||||
|
||||
if(m_runesState)
|
||||
if(m_spellInfo->runeCostID)
|
||||
castFlags |= CAST_FLAG_UNKNOWN10;
|
||||
|
||||
Unit *target;
|
||||
if(!m_targets.getUnitTarget())
|
||||
target = m_caster;
|
||||
else
|
||||
target = m_targets.getUnitTarget();
|
||||
Unit *target = m_targets.getUnitTarget() ? m_targets.getUnitTarget() : m_caster;
|
||||
|
||||
WorldPacket data(SMSG_SPELL_START, (8+8+4+4+2));
|
||||
if(m_CastItem)
|
||||
|
|
@ -2701,6 +2690,7 @@ void Spell::SendSpellStart()
|
|||
if ( castFlags & CAST_FLAG_AMMO )
|
||||
WriteAmmoToPacket(&data);
|
||||
|
||||
data.hexlike();
|
||||
m_caster->SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
|
|
@ -2710,19 +2700,15 @@ void Spell::SendSpellGo()
|
|||
if(!IsNeedSendToClient())
|
||||
return;
|
||||
|
||||
sLog.outDebug("Sending SMSG_SPELL_GO id=%u",m_spellInfo->Id);
|
||||
sLog.outDebug("Sending SMSG_SPELL_GO id=%u", m_spellInfo->Id);
|
||||
|
||||
Unit * target;
|
||||
if(!m_targets.getUnitTarget())
|
||||
target = m_caster;
|
||||
else
|
||||
target = m_targets.getUnitTarget();
|
||||
Unit *target = m_targets.getUnitTarget() ? m_targets.getUnitTarget() : m_caster;
|
||||
|
||||
uint32 castFlags = CAST_FLAG_UNKNOWN3;
|
||||
if(IsRangedSpell())
|
||||
castFlags |= CAST_FLAG_AMMO; // arrows/bullets visual
|
||||
|
||||
if(m_runesState)
|
||||
if(m_spellInfo->runeCostID)
|
||||
{
|
||||
castFlags |= CAST_FLAG_UNKNOWN10; // same as in SMSG_SPELL_START
|
||||
castFlags |= CAST_FLAG_UNKNOWN6; // makes cooldowns visible
|
||||
|
|
@ -2787,6 +2773,7 @@ void Spell::SendSpellGo()
|
|||
data << uint8(0);
|
||||
}
|
||||
|
||||
data.hexlike();
|
||||
m_caster->SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class RASocket: public TcpSocket
|
|||
bool bLog;
|
||||
bool bSecure; //kick on wrong pass, non exist. user, user with no priv
|
||||
//will protect from DOS, bruteforce attacks
|
||||
//some 'smart' protection must be added for more scurity
|
||||
//some 'smart' protection must be added for more security
|
||||
uint8 iMinLevel;
|
||||
enum
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue