本文整理汇总了C++中GuidList::remove方法的典型用法代码示例。如果您正苦于以下问题:C++ GuidList::remove方法的具体用法?C++ GuidList::remove怎么用?C++ GuidList::remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GuidList
的用法示例。
在下文中一共展示了GuidList::remove方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SummonedCreatureJustDied
void SummonedCreatureJustDied(Creature* pSummoned) override
{
if (pSummoned->GetEntry() == NPC_GLOB_OF_VISCIDUS)
{
// shrink - modify scale
m_creature->ApplyPercentModFloatValue(OBJECT_FIELD_SCALE_X, float(-4), true);
m_creature->UpdateModelData();
m_creature->SetHealth(m_creature->GetHealth() - (m_creature->GetMaxHealth() * 0.05f));
m_lGlobesGuidList.remove(pSummoned->GetObjectGuid());
// suicide if required
if (m_creature->GetHealthPercent() < 5.0f)
{
m_creature->SetVisibility(VISIBILITY_ON);
if (DoCastSpellIfCan(m_creature, SPELL_VISCIDUS_SUICIDE, CAST_TRIGGERED) == CAST_OK)
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false);
}
else if (m_lGlobesGuidList.empty())
{
m_creature->SetVisibility(VISIBILITY_ON);
m_creature->SetStandState(UNIT_STAND_STATE_STAND);
m_uiPhase = PHASE_NORMAL;
SetCombatMovement(true);
DoStartMovement(m_creature->getVictim());
}
}
}
示例2: ActivateRandomConstellation
// Activate a random Constellation
void ActivateRandomConstellation()
{
// spawn a new set of constellations if empty
if (m_lConstellationsGuids.empty())
{
DoSpawnConstellations();
m_uiConstellationTimer = 5000;
return;
}
GuidList::iterator iter = m_lConstellationsGuids.begin();
advance(iter, urand(0, m_lConstellationsGuids.size() - 1));
if (Creature* pConstellation = m_creature->GetMap()->GetCreature(*iter))
{
// follow second top aggro player
if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, uint32(0), SELECT_FLAG_PLAYER))
{
pConstellation->GetMotionMaster()->MoveFollow(pTarget, CONTACT_DISTANCE, 0);
SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pConstellation);
++m_uiActiveConstelations;
}
}
m_lConstellationsGuids.remove(*iter);
}
示例3: SummonedCreatureJustDied
void SummonedCreatureJustDied(Creature* pSummoned) override
{
if (pSummoned->GetEntry() == NPC_IRONTREE_STOMPER || pSummoned->GetEntry() == NPC_IRONTREE_WANDERER)
{
m_lSummonsGuids.remove(pSummoned->GetObjectGuid());
if (m_lSummonsGuids.empty())
dialogueStep = 1;
}
}
示例4: SummonedCreatureJustDied
void SummonedCreatureJustDied(Creature* pSummoned) override
{
if (pSummoned->GetEntry() == NPC_GRUBBIS)
{
if (m_pInstance)
m_pInstance->SetData(TYPE_GRUBBIS, DONE);
m_uiPhaseTimer = 1000;
}
m_luiSummonedMobGUIDs.remove(pSummoned->GetObjectGuid());
}
示例5: SummonedCreatureJustDied
void SummonedCreatureJustDied(Creature* pSummoned) override
{
if (pSummoned->GetEntry() == NPC_IRONTREE_STOMPER || pSummoned->GetEntry() == NPC_IRONTREE_WANDERER)
{
m_lSummonsGuids.remove(pSummoned->GetObjectGuid());
if (m_lSummonsGuids.empty())
StartNextDialogueText(SAY_CLEAR_PATH);
}
}
示例6: SummonedCreatureJustDied
void SummonedCreatureJustDied(Creature* pSummoned) override
{
if (pSummoned->GetEntry() == NPC_TWILIGHT_VOLUNTEER)
{
m_lVolunteerGuidList.remove(pSummoned->GetObjectGuid());
if (m_pInstance)
{
m_pInstance->SetData(TYPE_DO_JEDOGA, 1);
}
m_creature->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, aJedogaLandingLoc[0], aJedogaLandingLoc[1], aJedogaLandingLoc[2]);
}
}
示例7: SummonedCreatureJustDied
void SummonedCreatureJustDied(Creature* pSummoned) override
{
if (pSummoned->GetEntry() == NPC_TWILIGHT_VOLUNTEER)
{
m_lVolunteerGuidList.remove(pSummoned->GetObjectGuid());
if (m_pInstance)
{
if (Creature* pTemp = m_creature->GetMap()->GetCreature(m_pInstance->SelectJedogaSacrificeControllerGuid()))
pTemp->RemoveAurasDueToSpell(SPELL_SACRIFICE_VISUAL);
}
m_creature->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, aJedogaLandingLoc[0], aJedogaLandingLoc[1], aJedogaLandingLoc[2]);
}
}
示例8: SummonedCreatureJustDied
void SummonedCreatureJustDied(Creature* pSummoned) override
{
switch (pSummoned->GetEntry())
{
case NPC_INFINITE_ADVERSARY:
case NPC_INFINITE_AGENT:
case NPC_INFINITE_HUNTER:
m_lSummonedGuidsList.remove(pSummoned->GetObjectGuid());
if (m_lSummonedGuidsList.empty())
SetEscortPaused(false);
break;
case NPC_LORD_EPOCH:
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
break;
}
}
示例9: SummonedMovementInform
void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId) override
{
if (pSummoned->GetEntry() != NPC_GLOB_OF_VISCIDUS || uiType != POINT_MOTION_TYPE || !uiPointId)
return;
m_lGlobesGuidList.remove(pSummoned->GetObjectGuid());
pSummoned->CastSpell(m_creature, SPELL_REJOIN_VISCIDUS, TRIGGERED_OLD_TRIGGERED);
pSummoned->ForcedDespawn(1000);
if (m_lGlobesGuidList.empty())
{
m_creature->SetVisibility(VISIBILITY_ON);
m_creature->SetStandState(UNIT_STAND_STATE_STAND);
m_uiPhase = PHASE_NORMAL;
SetCombatMovement(true);
DoStartMovement(m_creature->getVictim());
}
}
示例10: SummonedCreatureJustDied
void SummonedCreatureJustDied(Creature* pSummoned) override
{
m_lSummonedAddGuids.remove(pSummoned->GetObjectGuid());
if (!m_pInstance)
return;
if (Creature* pAnchor = m_pInstance->GetClosestAnchorForGoth(pSummoned, true))
{
switch (pSummoned->GetEntry())
{
// Wrong caster, it expected to be pSummoned.
// Mangos deletes the spell event at caster death, so for delayed spell like this
// it's just a workaround. Does not affect other than the visual though (+ spell takes longer to "travel")
case NPC_UNREL_TRAINEE: m_creature->CastSpell(pAnchor, SPELL_A_TO_ANCHOR_1, TRIGGERED_OLD_TRIGGERED, nullptr, nullptr, pSummoned->GetObjectGuid()); break;
case NPC_UNREL_DEATH_KNIGHT: m_creature->CastSpell(pAnchor, SPELL_B_TO_ANCHOR_1, TRIGGERED_OLD_TRIGGERED, nullptr, nullptr, pSummoned->GetObjectGuid()); break;
case NPC_UNREL_RIDER: m_creature->CastSpell(pAnchor, SPELL_C_TO_ANCHOR_1, TRIGGERED_OLD_TRIGGERED, nullptr, nullptr, pSummoned->GetObjectGuid()); break;
}
}
}
示例11: SummonedCreatureJustDied
void SummonedCreatureJustDied(Creature* pSummoned) override
{
m_lSummonedAddGuids.remove(pSummoned->GetObjectGuid());
if (!m_pInstance)
return;
m_pInstance->SetData64(DATA64_GOTH_RIGHT_ANCHOR, pSummoned->GetObjectGuid().GetRawValue());
if (Creature* pAnchor = m_creature->GetMap()->GetCreature(ObjectGuid(m_pInstance->GetData64(DATA64_GOTH_RIGHT_ANCHOR))))
{
switch (pSummoned->GetEntry())
{
// Wrong caster, it expected to be pSummoned.
// Mangos deletes the spell event at caster death, so for delayed spell like this
// it's just a workaround. Does not affect other than the visual though (+ spell takes longer to "travel")
case NPC_UNREL_TRAINEE: m_creature->CastSpell(pAnchor, SPELL_A_TO_ANCHOR_1, true, NULL, NULL, pSummoned->GetObjectGuid()); break;
case NPC_UNREL_DEATH_KNIGHT: m_creature->CastSpell(pAnchor, SPELL_B_TO_ANCHOR_1, true, NULL, NULL, pSummoned->GetObjectGuid()); break;
case NPC_UNREL_RIDER: m_creature->CastSpell(pAnchor, SPELL_C_TO_ANCHOR_1, true, NULL, NULL, pSummoned->GetObjectGuid()); break;
}
}
}
示例12: UpdateEscortAI
void UpdateEscortAI(const uint32 uiDiff) override
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
return;
// special script for snake fight
if (m_uiActivateMummiesTimer)
{
if (m_uiActivateMummiesTimer <= uiDiff)
{
if (Creature* pTecahuna = m_creature->GetMap()->GetCreature(m_tecahunaGuid))
{
// activate 2 mummies at each turn
for (uint8 i = 0; i < 2; ++i)
{
if (Creature* pBunny = m_creature->GetMap()->GetCreature(m_lImmolationBunnyGuids.front()))
{
pTecahuna->CastSpell(pBunny, SPELL_TECAHUNA_SPIRIT_BEAM, TRIGGERED_OLD_TRIGGERED);
pBunny->CastSpell(pBunny, SPELL_SUMMON_DRAKKARI_KING, TRIGGERED_OLD_TRIGGERED, NULL, NULL, m_creature->GetObjectGuid());
pBunny->RemoveAurasDueToSpell(SPELL_BUNNY_IMMOLATION);
m_lImmolationBunnyGuids.remove(m_lImmolationBunnyGuids.front());
}
}
}
// set timer based on the remaining mummies
if (m_lImmolationBunnyGuids.empty())
m_uiActivateMummiesTimer = 0;
else
m_uiActivateMummiesTimer = urand(5000, 10000);
}
else
m_uiActivateMummiesTimer -= uiDiff;
}
DoMeleeAttackIfReady();
}
示例13: KilledUnit
void KilledUnit(Unit* pVictim) override
{
// Note: this is called from the Shade, Channeler and Sorcerer script
// If the function is changed in the future, please review this.
switch (pVictim->GetEntry())
{
case NPC_SHADE_OF_AKAMA:
m_uiPhase = PHASE_EPILOGUE;
m_creature->GetMotionMaster()->MovePoint(PHASE_EPILOGUE, afAkamaWP[1].m_fX, afAkamaWP[1].m_fY, afAkamaWP[1].m_fZ);
break;
case NPC_ASH_SORCERER:
// Decrease the sorcerer counter
m_lSorcerersGUIDList.remove(pVictim->GetObjectGuid());
break;
case NPC_ASH_CHANNELER:
++m_uiChannelersDead;
// Move the shade to Akama when all channelers are dead
// Note: the boss should be already slowly moving, but this isn't possible because of the missing stack for the speed debuff
if (m_uiChannelersDead == MAX_CHANNELERS)
{
if (m_pInstance)
{
if (Creature* pShade = m_pInstance->GetSingleCreatureFromStorage(NPC_SHADE_OF_AKAMA))
{
float fX, fY, fZ;
m_creature->GetContactPoint(pShade, fX, fY, fZ);
pShade->GetMotionMaster()->MovePoint(1, fX, fY, fZ);
}
}
}
break;
}
}
示例14: SummonedCreatureDespawn
void SummonedCreatureDespawn(Creature* pSummoned) override
{
m_lSummonedBombGUIDs.remove(pSummoned->GetObjectGuid());
}
示例15: SummonedCreatureDespawn
void SummonedCreatureDespawn(Creature* pSummoned) override
{
m_lZombieChowGuidList.remove(pSummoned->GetObjectGuid());
}