mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
[8103] More wide use IsInWorld checks and delayed at teleport operations. Author: Ambal
* IsInWorld used to prevent return unexpected not in world objects.
* Delayed operations need to process its in world state.
--HG--
branch : trunk
This commit is contained in:
@@ -8338,7 +8338,7 @@ bool Unit::Attack(Unit *victim, bool meleeAttack)
|
||||
return false;
|
||||
|
||||
// dead units can neither attack nor be attacked
|
||||
if(!isAlive() || !victim->isAlive())
|
||||
if(!isAlive() || !victim->IsInWorld() || !victim->isAlive())
|
||||
return false;
|
||||
|
||||
// player cannot attack in mount state
|
||||
|
||||
Reference in New Issue
Block a user