mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-17 21:50:50 -04:00
Core/Entities: Use ObjectGuid class in game project
This commit is contained in:
@@ -61,7 +61,7 @@ SmartAI::SmartAI(Creature* c) : CreatureAI(c)
|
||||
mDespawnState = 0;
|
||||
|
||||
mEscortInvokerCheckTimer = 1000;
|
||||
mFollowGuid = 0;
|
||||
mFollowGuid.Clear();
|
||||
mFollowDist = 0;
|
||||
mFollowAngle = 0;
|
||||
mFollowCredit = 0;
|
||||
@@ -540,7 +540,7 @@ void SmartAI::JustRespawned()
|
||||
mJustReset = true;
|
||||
JustReachedHome();
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_RESPAWN);
|
||||
mFollowGuid = 0;//do not reset follower on Reset(), we need it after combat evade
|
||||
mFollowGuid.Clear();//do not reset follower on Reset(), we need it after combat evade
|
||||
mFollowDist = 0;
|
||||
mFollowAngle = 0;
|
||||
mFollowCredit = 0;
|
||||
@@ -674,8 +674,8 @@ void SmartAI::OnCharmed(bool apply)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_CHARMED, NULL, 0, 0, apply);
|
||||
|
||||
if (!apply && !me->IsInEvadeMode() && me->GetUInt64Value(UNIT_FIELD_CHARMEDBY))
|
||||
if (Unit* charmer = ObjectAccessor::GetUnit(*me, me->GetUInt64Value(UNIT_FIELD_CHARMEDBY)))
|
||||
if (!apply && !me->IsInEvadeMode() && me->GetCharmerGUID())
|
||||
if (Unit* charmer = ObjectAccessor::GetUnit(*me, me->GetCharmerGUID()))
|
||||
AttackStart(charmer);
|
||||
}
|
||||
|
||||
@@ -800,7 +800,7 @@ void SmartAI::StopFollow()
|
||||
player->GroupEventHappens(mFollowCredit, me);
|
||||
}
|
||||
|
||||
mFollowGuid = 0;
|
||||
mFollowGuid.Clear();
|
||||
mFollowDist = 0;
|
||||
mFollowAngle = 0;
|
||||
mFollowCredit = 0;
|
||||
|
||||
Reference in New Issue
Block a user