本文整理汇总了C++中ObjectGuid::Clear方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjectGuid::Clear方法的具体用法?C++ ObjectGuid::Clear怎么用?C++ ObjectGuid::Clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectGuid
的用法示例。
在下文中一共展示了ObjectGuid::Clear方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoDespawnPursuingSpikes
// Wrapper to despawn the Spikes
void DoDespawnPursuingSpikes()
{
if (Creature* pPursuingSpikes = m_creature->GetMap()->GetCreature(m_PursuingSpikesGuid))
pPursuingSpikes->ForcedDespawn();
m_PursuingSpikesGuid.Clear();
}
示例2: Reset
void Reset() override
{
m_uiSaluteTimer = 0;
m_uiResetTimer = 0;
m_playerGuid.Clear();
}
示例3: Reset
void Reset() override
{
m_doctorGuid.Clear();
m_pCoord = nullptr;
// no select
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
// no regen health
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
// to make them lay with face down
m_creature->SetStandState(UNIT_STAND_STATE_DEAD);
switch (m_creature->GetEntry())
{
// lower max health
case 12923:
case 12938: // Injured Soldier
m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.75));
break;
case 12924:
case 12936: // Badly injured Soldier
m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.50));
break;
case 12925:
case 12937: // Critically injured Soldier
m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.25));
break;
}
}
示例4: Reset
void Reset() override
{
m_uiPhase = 0;
m_uiPhaseTimer = 5000;
SetReactState(REACT_AGGRESSIVE);
m_playerGuid.Clear();
}
示例5: Reset
void Reset() override
{
m_uiAcidBreathTimer = 10000;
m_uiNoxiousBreathTimer = 3000;
m_uiShadowboltVolleyTimer = 5000;
m_uiTyrandeMoveTimer = 0;
m_remulosGuid.Clear();
m_tyrandeGuid.Clear();
m_uiHealthCheck = 85;
m_uiEventPhase = 0;
m_uiEventTimer = 0;
// For some reason the boss doesn't move in combat
SetCombatMovement(false);
}
示例6: SummonedCreatureDespawn
void SummonedCreatureDespawn(Creature* pSummoned) override
{
if (pSummoned->GetEntry() == NPC_WINDSOR)
{
m_windsorGuid.Clear();
m_bIsEventInProgress = false;
}
}
示例7: Reset
void Reset() override
{
m_uiKnockBackTimer = urand(5000, 8000);
m_playerGuid.Clear();
if (!m_uiPhase)
m_creature->SetStandState(UNIT_STAND_STATE_DEAD);
}
示例8: Reset
void Reset()
{
m_uiPhase = 0;
m_uiPhaseTimer = 5000;
m_playerGuid.Clear();
if (m_creature->getFaction() != m_uiNormFaction)
m_creature->setFaction(m_uiNormFaction);
}
示例9: Reset
void Reset()
{
m_creature->SetUInt32Value(UNIT_NPC_FLAGS, m_uiNpcFlags);
m_playerGuid.Clear();
m_creepjackGuid.Clear();
m_maloneGuid.Clear();
bEvent = false;
bActiveAttack = false;
m_uiSayTimer = 1000;
m_uiStep = 0;
//expect database to have correct faction (1194) and then only unit flags set/remove needed
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE);
}
示例10: Reset
void Reset() override
{
_Reset();
_armDied = false;
_ifLooks = true;
_rubbleCount = 0;
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
eyebeamTarget.Clear();
}
示例11: DespawnBoatGhosts
void DespawnBoatGhosts(ObjectGuid& CreatureGUID)
{
// @todo: fire visual after ancestor despawns.
if (CreatureGUID)
if (Creature* temp = ObjectAccessor::GetCreature(*me, CreatureGUID))
temp->DisappearAndDie();
CreatureGUID.Clear();
}
示例12: UpdateAI
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
return;
DoMeleeAttackIfReady();
if (ChaseTimer <= diff)
{
if (!IsChasing)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
Talk(SAY_WOLF_HOOD);
DoCast(target, SPELL_LITTLE_RED_RIDING_HOOD, true);
TempThreat = DoGetThreat(target);
if (TempThreat)
DoModifyThreatPercent(target, -100);
HoodGUID = target->GetGUID();
me->AddThreat(target, 1000000.0f);
ChaseTimer = 20000;
IsChasing = true;
}
}
else
{
IsChasing = false;
if (Unit* target = ObjectAccessor::GetUnit(*me, HoodGUID))
{
HoodGUID.Clear();
if (DoGetThreat(target))
DoModifyThreatPercent(target, -100);
me->AddThreat(target, TempThreat);
TempThreat = 0;
}
ChaseTimer = 40000;
}
} else ChaseTimer -= diff;
if (IsChasing)
return;
if (FearTimer <= diff)
{
DoCastVictim(SPELL_TERRIFYING_HOWL);
FearTimer = urand(25000, 35000);
} else FearTimer -= diff;
if (SwipeTimer <= diff)
{
DoCastVictim(SPELL_WIDE_SWIPE);
SwipeTimer = urand(25000, 30000);
} else SwipeTimer -= diff;
}
示例13: UpdateAI
void UpdateAI(const uint32 diff)
{
if (me->isSpawned() && cleansedGuid)
{
GameObject* cleansed = me->GetMap()->GetGameObject(cleansedGuid);
if (cleansed)
cleansed->AddObjectToRemoveList();
cleansedGuid.Clear();
}
}
示例14: Reset
void Reset() override
{
m_targetGuid.Clear();
m_uiFearTimer = urand(11000, 29000);
m_uiRibbonOfSoulsTimer = urand(4000, 8000);
m_uiStolenSoulTimer = urand(19000, 31000);
m_bHasSummonedAvatar = false;
}
示例15: WaypointStart
void WaypointStart(uint32 uiPointId)
{
if (uiPointId == 30)
{
if (GameObject* pBogbeanPlant = m_creature->GetMap()->GetGameObject(m_bogbeanPlantGuid))
pBogbeanPlant->Use(m_creature);
m_bogbeanPlantGuid.Clear();
m_creature->HandleEmote(EMOTE_ONESHOT_NONE);
}
}