*Fix a crash bug caused by bindsight spells.
--HG-- branch : trunk
This commit is contained in:
@@ -19874,14 +19874,6 @@ void Player::HandleFallUnderMap()
|
|||||||
sLog.outDetail("Viewport for "I64FMT" (%s) changed to "I64FMT, GetGUID(), GetName(), guid);
|
sLog.outDetail("Viewport for "I64FMT" (%s) changed to "I64FMT, GetGUID(), GetName(), guid);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
void Player::SetBindSight(Unit *target)
|
|
||||||
{
|
|
||||||
if(target)
|
|
||||||
target->AddPlayerToVision(this);
|
|
||||||
else
|
|
||||||
target->RemovePlayerFromVision(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
WorldObject* Player::GetFarsightTarget() const
|
WorldObject* Player::GetFarsightTarget() const
|
||||||
{
|
{
|
||||||
// Players can have in farsight field another player's guid, a creature's guid, or a dynamic object's guid
|
// Players can have in farsight field another player's guid, a creature's guid, or a dynamic object's guid
|
||||||
|
|||||||
@@ -2027,7 +2027,6 @@ class TRINITY_DLL_SPEC Player : public Unit
|
|||||||
void StopCastingBindSight();
|
void StopCastingBindSight();
|
||||||
uint64 GetFarSightGUID() const { return GetUInt64Value(PLAYER_FARSIGHT); }
|
uint64 GetFarSightGUID() const { return GetUInt64Value(PLAYER_FARSIGHT); }
|
||||||
void SetFarSightGUID(uint64 guid) { SetUInt64Value(PLAYER_FARSIGHT, guid); }
|
void SetFarSightGUID(uint64 guid) { SetUInt64Value(PLAYER_FARSIGHT, guid); }
|
||||||
void SetBindSight(Unit *target);
|
|
||||||
WorldObject* GetFarsightTarget() const;
|
WorldObject* GetFarsightTarget() const;
|
||||||
void ClearFarsight();
|
void ClearFarsight();
|
||||||
void SetFarsightTarget(WorldObject* target);
|
void SetFarsightTarget(WorldObject* target);
|
||||||
|
|||||||
@@ -2832,7 +2832,10 @@ void Aura::HandleBindSight(bool apply, bool Real)
|
|||||||
if(!caster || caster->GetTypeId() != TYPEID_PLAYER)
|
if(!caster || caster->GetTypeId() != TYPEID_PLAYER)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
((Player*)caster)->SetBindSight(apply ? m_target : NULL);
|
if(apply)
|
||||||
|
m_target->AddPlayerToVision((Player*)caster);
|
||||||
|
else
|
||||||
|
m_target->RemovePlayerFromVision((Player*)caster);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aura::HandleFarSight(bool apply, bool Real)
|
void Aura::HandleFarSight(bool apply, bool Real)
|
||||||
|
|||||||
Reference in New Issue
Block a user