mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[8011] Send energize packets in correct order to avoid strange client behaviour.
If you send SMSG_SPELLENERGIZELOG after SMSG_POWER_UPDATE client shows mana gain twice. Signed-off-by: hunuza <hunuza@gmail.com>
This commit is contained in:
parent
dcba023261
commit
82d3e2ae7d
5 changed files with 13 additions and 10 deletions
|
|
@ -7643,6 +7643,13 @@ void Unit::SendEnergizeSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, Po
|
|||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
void Unit::EnergizeBySpell(Unit *pVictim, uint32 SpellID, uint32 Damage, Powers powertype)
|
||||
{
|
||||
SendEnergizeSpellLog(pVictim, SpellID, Damage, powertype);
|
||||
// needs to be called after sending spell log
|
||||
ModifyPower(powertype, Damage);
|
||||
}
|
||||
|
||||
uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack)
|
||||
{
|
||||
if(!spellProto || !pVictim || damagetype==DIRECT_DAMAGE )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue