mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
Merge branch 'master' into Playerbot
# Conflicts: # src/server/game/Server/WorldSession.cpp # src/server/game/Server/WorldSession.h
This commit is contained in:
@@ -1031,7 +1031,7 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
|
||||
if (!attacker || attacker->IsControlledByPlayer() || attacker->IsCreatedByPlayer())
|
||||
{
|
||||
uint32 unDamage = health < damage ? health : damage;
|
||||
bool damagedByPlayer = unDamage && attacker && attacker->m_movedByPlayer != nullptr;
|
||||
bool damagedByPlayer = unDamage && attacker && (attacker->IsPlayer() || attacker->m_movedByPlayer != nullptr);
|
||||
victim->ToCreature()->LowerPlayerDamageReq(unDamage, damagedByPlayer);
|
||||
}
|
||||
}
|
||||
@@ -18215,6 +18215,11 @@ void Unit::SetControlled(bool apply, UnitState state)
|
||||
|
||||
void Unit::SetStunned(bool apply)
|
||||
{
|
||||
if (HasUnitState(UNIT_STATE_IN_FLIGHT))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (apply)
|
||||
{
|
||||
SetTarget();
|
||||
|
||||
Reference in New Issue
Block a user