[0093] Enabled and updated lots of opcodes, mostly spell-related. All structures checked .

Signed-off-by: Yaki Khadafi <ElSolDolLo@gmail.com>
This commit is contained in:
Yaki Khadafi 2012-08-15 12:06:00 +03:00 committed by Antz
parent 2833e3f2db
commit e0a8e30cc3
11 changed files with 168 additions and 135 deletions

View file

@ -2055,11 +2055,14 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
alreadyDone.insert(*i);
uint32 damage = (*i)->GetModifier()->m_amount;
SpellEntry const* i_spellProto = (*i)->GetSpellProto();
// Calculate absorb resist ??? no data in opcode for this possibly unable to absorb or resist?
// uint32 absorb;
// uint32 resist;
// CalcAbsorbResist(pVictim, SpellSchools(spellProto->School), SPELL_DIRECT_DAMAGE, damage, &absorb, &resist);
// damage-=absorb + resist;
uint32 absorb, resist;
CalculateDamageAbsorbAndResist(pVictim, GetSpellSchoolMask(i_spellProto), SPELL_DIRECT_DAMAGE, damage, &absorb, &resist);
if (damage >= absorb + resist)
damage -= absorb + resist;
else
damage = 0;
pVictim->DealDamageMods(this, damage, NULL);
@ -2073,6 +2076,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
data << uint32(damage); // Damage
data << uint32(overkill); // Overkill
data << uint32(i_spellProto->SchoolMask);
data << uint32(resist); // Resist
pVictim->SendMessageToSet(&data, true);
pVictim->DealDamage(this, damage, 0, SPELL_DIRECT_DAMAGE, GetSpellSchoolMask(i_spellProto), i_spellProto, true);
@ -5555,11 +5559,16 @@ void Unit::SendSpellMiss(Unit* target, uint32 spellID, SpellMissInfo missInfo)
WorldPacket data(SMSG_SPELLLOGMISS, (4 + 8 + 1 + 4 + 8 + 1));
data << uint32(spellID);
data << GetObjectGuid();
data << uint8(0); // can be 0 or 1
data << uint8(0); // can be 0 or 1, flag
data << uint32(1); // target count
// for(i = 0; i < target count; ++i)
data << target->GetObjectGuid(); // target GUID
data << uint8(missInfo);
//if (flag)
//{
// data << float(0.0f);
// data << float(0.0f);
//}
// end loop
SendMessageToSet(&data, true);
}