[7801] Apply damage mods from scripts or target state not in DealDamage but in new function before send data to client.

* Fixed bug with health decrease (client side visual bug) at spell damage by target with AI::DamageTaken damage set to 0
* Fixed bug with ignore .die command and instant kill damage in some cases.
This commit is contained in:
VladimirMangos 2009-05-08 16:43:52 +04:00
parent b9cd3ffd0d
commit f53d06ad70
8 changed files with 80 additions and 31 deletions

View file

@ -846,6 +846,8 @@ void Player::EnvironmentalDamage(EnviromentalDamage type, uint32 damage)
damage-=absorb+resist;
DealDamageMods(this,damage,&absorb);
WorldPacket data(SMSG_ENVIRONMENTALDAMAGELOG, (21));
data << uint64(GetGUID());
data << uint8(type!=DAMAGE_FALL_TO_VOID ? type : DAMAGE_FALL);