*Fix the bug that Eye of Acherus does not fly in some servers.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-21 02:46:48 -05:00
parent f8bec55205
commit 457f7971de
4 changed files with 27 additions and 4 deletions

View File

@@ -8860,6 +8860,16 @@ Unit* Unit::GetNextRandomRaidMemberOrPet(float radius)
return nearMembers[randTarget];
}
Player * Unit::GetMoverSource() const
{
if(GetTypeId() == TYPEID_PLAYER && ((Player*)this)->m_mover == this)
return (Player*)this;
if(Unit *charmer = GetCharmer())
if(charmer->GetTypeId() == TYPEID_PLAYER && ((Player*)charmer)->m_mover == this)
return (Player*)charmer;
return NULL;
}
//only called in Player::SetSeer
void Unit::AddPlayerToVision(Player* plr)
{
@@ -14725,12 +14735,12 @@ void Unit::SetFlying(bool apply)
if(apply)
{
SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0x02);
AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
AddUnitMovementFlag(MOVEMENTFLAG_FLY_MODE + MOVEMENTFLAG_FLYING);
}
else
{
RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, 0x02);
RemoveUnitMovementFlag(MOVEMENTFLAG_FLYING);
RemoveUnitMovementFlag(MOVEMENTFLAG_FLY_MODE + MOVEMENTFLAG_FLYING);
}
}