mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Packet fixes
This commit is contained in:
parent
1c1bc92d54
commit
5114c17da2
8 changed files with 65 additions and 59 deletions
|
|
@ -56,6 +56,7 @@ float baseMoveSpeed[MAX_MOVE_TYPE] =
|
|||
3.141594f, // MOVE_TURN
|
||||
7.0f, // MOVE_FLY
|
||||
4.5f, // MOVE_FLYBACK
|
||||
3.14f // MOVE_PITCH
|
||||
};
|
||||
|
||||
// auraTypes contains attacker auras capable of proc'ing cast auras
|
||||
|
|
@ -1470,9 +1471,8 @@ uint32 Unit::SpellNonMeleeDamageLog(Unit *pVictim, uint32 spellID, uint32 damage
|
|||
void Unit::HandleEmoteCommand(uint32 anim_id)
|
||||
{
|
||||
WorldPacket data( SMSG_EMOTE, 12 );
|
||||
data << anim_id << GetGUID();
|
||||
WPAssert(data.size() == 12);
|
||||
|
||||
data << uint32(anim_id);
|
||||
data << uint64(GetGUID());
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
|
|
@ -1665,7 +1665,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
|
|||
RemainingDamage -= currentAbsorb;
|
||||
}
|
||||
|
||||
// only split damage if not damaing yourself
|
||||
// only split damage if not damaging yourself
|
||||
if(pVictim != this)
|
||||
{
|
||||
AuraList const& vSplitDamageFlat = pVictim->GetAurasByType(SPELL_AURA_SPLIT_DAMAGE_FLAT);
|
||||
|
|
@ -2585,8 +2585,8 @@ float Unit::CalculateLevelPenalty(SpellEntry const* spellProto) const
|
|||
void Unit::SendAttackStart(Unit* pVictim)
|
||||
{
|
||||
WorldPacket data( SMSG_ATTACKSTART, 16 );
|
||||
data << GetGUID();
|
||||
data << pVictim->GetGUID();
|
||||
data << uint64(GetGUID());
|
||||
data << uint64(pVictim->GetGUID());
|
||||
|
||||
SendMessageToSet(&data, true);
|
||||
DEBUG_LOG( "WORLD: Sent SMSG_ATTACKSTART" );
|
||||
|
|
@ -3847,7 +3847,7 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
|
|||
if(is_triggered_by_spell)
|
||||
break;
|
||||
|
||||
// prevent remove form main spell by triggred passive spells
|
||||
// prevent remove form main spell by triggered passive spells
|
||||
switch(i_spellProto->EffectApplyAuraName[j]) // main aura added before triggered spell
|
||||
{
|
||||
case SPELL_AURA_MOD_SHAPESHIFT:
|
||||
|
|
@ -6924,7 +6924,7 @@ bool Unit::Attack(Unit *victim, bool meleeAttack)
|
|||
if(GetTypeId()==TYPEID_UNIT)
|
||||
{
|
||||
WorldPacket data(SMSG_AI_REACTION, 12);
|
||||
data << GetGUID();
|
||||
data << uint64(GetGUID());
|
||||
data << uint32(AI_REACTION_AGGRO); // Aggro sound
|
||||
((WorldObject*)this)->SendMessageToSet(&data, true);
|
||||
|
||||
|
|
@ -7174,6 +7174,7 @@ void Unit::SendHealSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, bool c
|
|||
data.append(GetPackGUID());
|
||||
data << uint32(SpellID);
|
||||
data << uint32(Damage);
|
||||
data << uint32(0); // over healing?
|
||||
data << uint8(critical ? 1 : 0);
|
||||
data << uint8(0); // unused in client?
|
||||
SendMessageToSet(&data, true);
|
||||
|
|
@ -7187,7 +7188,6 @@ void Unit::SendEnergizeSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, Po
|
|||
data << uint32(SpellID);
|
||||
data << uint32(powertype);
|
||||
data << uint32(Damage);
|
||||
//data << uint8(critical ? 1 : 0); // removed in 2.4.0
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
|
|
@ -7644,7 +7644,7 @@ int32 Unit::SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit *pVic
|
|||
|
||||
bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType)
|
||||
{
|
||||
// not criting spell
|
||||
// not critting spell
|
||||
if((spellProto->AttributesEx2 & SPELL_ATTR_EX2_CANT_CRIT))
|
||||
return false;
|
||||
|
||||
|
|
@ -8327,7 +8327,7 @@ void Unit::ApplySpellDispelImmunity(const SpellEntry * spellProto, DispelType ty
|
|||
float Unit::GetWeaponProcChance() const
|
||||
{
|
||||
// normalized proc chance for weapon attack speed
|
||||
// (odd formulae...)
|
||||
// (odd formula...)
|
||||
if(isAttackReady(BASE_ATTACK))
|
||||
return (GetAttackTime(BASE_ATTACK) * 1.8f / 1000.0f);
|
||||
else if (haveOffhandWeapon() && isAttackReady(OFF_ATTACK))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue