这篇教程C++ AddObjectToRemoveList函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中AddObjectToRemoveList函数的典型用法代码示例。如果您正苦于以下问题:C++ AddObjectToRemoveList函数的具体用法?C++ AddObjectToRemoveList怎么用?C++ AddObjectToRemoveList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了AddObjectToRemoveList函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ForcedUnsummonDelayEventvoid TempSummon::UnSummon(uint32 msTime){ if (msTime) { ForcedUnsummonDelayEvent* pEvent = new ForcedUnsummonDelayEvent(*this); m_Events.AddEvent(pEvent, m_Events.CalculateTime(msTime)); return; } //ASSERT(!isPet()); if (isPet()) { ((Pet*)this)->Remove(PET_SAVE_NOT_IN_SLOT); ASSERT(!IsInWorld()); return; } Unit* owner = GetSummoner(); if (owner && GetEntry() == 30230) // Risen ally { owner->RemoveAurasDueToSpell(62218); owner->RemoveAurasDueToSpell(46619); } if (owner && owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->IsAIEnabled) owner->ToCreature()->AI()->SummonedCreatureDespawn(this); AddObjectToRemoveList();}
开发者ID:DaShutok,项目名称:TrinityCore,代码行数:29,
示例2: RemoveAllPassengersvoid Vehicle::Dismiss(){ RemoveAllPassengers(); SendObjectDeSpawnAnim(GetGUID()); CombatStop(); AddObjectToRemoveList();}
开发者ID:sc0rpio0o,项目名称:diamondcore,代码行数:7,
示例3: CombatStopvoid Totem::UnSummon() { CombatStop(); RemoveAurasDueToSpell(GetSpell()); // clear owner's totem slot for (int i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i) { if (m_owner->m_SummonSlot[i] == GetGUID()) { m_owner->m_SummonSlot[i] = 0; break; } } m_owner->RemoveAurasDueToSpell(GetSpell()); //remove aura all party members too Group *pGroup = NULL; if (m_owner->GetTypeId() == TYPEID_PLAYER) { m_owner->ToPlayer()->SendAutoRepeatCancel(this); // Not only the player can summon the totem (scripted AI) pGroup = m_owner->ToPlayer()->GetGroup(); if (pGroup) { for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* Target = itr->getSource(); if (Target && pGroup->SameSubGroup((Player*) m_owner, Target)) Target->RemoveAurasDueToSpell(GetSpell()); } } } AddObjectToRemoveList();}
开发者ID:ProjectStarGate,项目名称:StarGate-Plus-EMU,代码行数:32,
示例4: CombatStopvoid Totem::UnSummon(){ CombatStop(); // clear owner's totem slot for (int i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i) { if (_owner->m_SummonSlot[i] == GetGUID()) { _owner->m_SummonSlot[i] = 0; break; } } //remove aura all party members too if (Player* owner = _owner->ToPlayer()) { owner->SendAutoRepeatCancel(this); if (SpellInfo const* spell = sSpellMgr->GetSpellInfo(GetUInt32Value(UNIT_CREATED_BY_SPELL))) owner->SendCooldownEvent(spell, 0, NULL, false); } AddObjectToRemoveList();}
开发者ID:Exodius,项目名称:ZapekFapeCore,代码行数:25,
示例5: ForcedUnsummonDelayEventvoid TempSummon::UnSummon(uint32 msTime){ if (msTime) { ForcedUnsummonDelayEvent *pEvent = new ForcedUnsummonDelayEvent(*this); m_Events.AddEvent(pEvent, m_Events.CalculateTime(msTime)); return; } //ASSERT(!isPet()); if (isPet()) { if(((Pet*)this)->getPetType() == HUNTER_PET) ((Pet*)this)->Remove(PET_SAVE_AS_CURRENT); else ((Pet*)this)->Remove(PET_SAVE_NOT_IN_SLOT); ASSERT(!IsInWorld()); return; } Unit* owner = GetSummoner(); if (owner && owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->IsAIEnabled) owner->ToCreature()->AI()->SummonedCreatureDespawn(this); AddObjectToRemoveList();}
开发者ID:wuhongyi1977,项目名称:StrawberryCore,代码行数:27,
示例6: ForcedUnsummonDelayEventvoid TempSummon::UnSummon(uint32 msTime){ if (msTime) { ForcedUnsummonDelayEvent* pEvent = new ForcedUnsummonDelayEvent(*this); m_Events.AddEvent(pEvent, m_Events.CalculateTime(msTime)); return; } //ASSERT(!isPet()); if (isPet()) { if (ToPet()->getPetType() == HUNTER_PET) ToPet()->Remove(PET_SLOT_ACTUAL_PET_SLOT, false, ToPet()->m_Stampeded); else ToPet()->Remove(PET_SLOT_OTHER_PET, false, ToPet()->m_Stampeded); ASSERT(!IsInWorld()); return; } Unit* owner = GetSummoner(); if (owner && owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->IsAIEnabled) owner->ToCreature()->AI()->SummonedCreatureDespawn(this); AddObjectToRemoveList();}
开发者ID:Exodius,项目名称:JadeCore548,代码行数:27,
示例7: ForcedUnsummonDelayEventvoid TempSummon::UnSummon(uint32 msTime){ if (msTime) { ForcedUnsummonDelayEvent* pEvent = new ForcedUnsummonDelayEvent(*this); m_Events.AddEvent(pEvent, m_Events.CalculateTime(msTime)); return; } //ASSERT(!IsPet()); if (IsPet()) { ((Pet*)this)->Remove(PET_SAVE_NOT_IN_SLOT); ASSERT(!IsInWorld()); return; } Unit* owner = GetSummoner(); if (owner && owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->IsAIEnabled) owner->ToCreature()->AI()->SummonedCreatureDespawn(this); //npcbot if (GetIAmABot() || GetIAmABotsPet()) { //TC_LOG_ERROR("entities.player", "TempSummon::UnSummon(): Trying to unsummon Bot %s (guidLow: %u owner: %s)", GetName().c_str(), GetGUIDLow(), GetBotOwner()->GetName().c_str()); if (IsTempBot()) AI()->JustDied(NULL); return; } //end npcbots AddObjectToRemoveList();}
开发者ID:GlassFace,项目名称:XC_CORE,代码行数:34,
示例8: AddObjectToRemoveListvoid AreaTrigger::Remove(){ if (IsInWorld()) { AddObjectToRemoveList(); // calls RemoveFromWorld }}
开发者ID:Rochet2,项目名称:TrinityCore,代码行数:7,
示例9: ASSERTvoid TempSummon::UnSummon(){ //ASSERT(!isPet()); if (isPet()) { if (((Pet*)this)->getPetType() == HUNTER_PET) ((Pet*)this)->Remove(PET_SLOT_ACTUAL_PET_SLOT); else ((Pet*)this)->Remove(PET_SLOT_OTHER_PET); ASSERT(!IsInWorld()); return; } Unit* owner = GetSummoner(); if (owner && owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->IsAIEnabled) owner->ToCreature()->AI()->SummonedCreatureDespawn(this); if (owner && owner->GetTypeId() == TYPEID_PLAYER && ((Player*)owner)->HaveBot() && ((Player*)owner)->GetBot()->GetGUID()==this->GetGUID() && this->isDead()) { // dont unsummon corpse if a bot return; } AddObjectToRemoveList();}
开发者ID:XEQT,项目名称:SkyFireEMU,代码行数:27,
示例10: SendObjectDeSpawnAnimvoid DynamicObject::Remove() { if (IsInWorld()) { SendObjectDeSpawnAnim(GetGUID()); RemoveFromWorld(); AddObjectToRemoveList(); }}
开发者ID:BlueSellafield,项目名称:ArkCORE,代码行数:7,
示例11: CombatStopvoid Totem::UnSummon(){ CombatStop(); RemoveAurasDueToSpell(GetSpell()); if (Unit *owner = GetOwner()) { owner->_RemoveTotem(this); owner->RemoveAurasDueToSpell(GetSpell()); //remove aura all party members too if (owner->GetTypeId() == TYPEID_PLAYER) { ((Player*)owner)->SendAutoRepeatCancel(this); // Not only the player can summon the totem (scripted AI) if (Group *pGroup = ((Player*)owner)->GetGroup()) { for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* Target = itr->getSource(); if(Target && pGroup->SameSubGroup((Player*)owner, Target)) Target->RemoveAurasDueToSpell(GetSpell()); } } } if (owner->GetTypeId() == TYPEID_UNIT && ((Creature*)owner)->AI()) ((Creature*)owner)->AI()->SummonedCreatureDespawn((Creature*)this); } AddObjectToRemoveList();}
开发者ID:SPIRITnsk,项目名称:mangos,代码行数:33,
示例12: CombatStopvoid TemporarySummon::UnSummon(uint32 delay){ if (delay > 0) { m_type = TEMPSUMMON_TIMED_OR_DEAD_DESPAWN; m_timer = delay; return; } m_isActive = false; CombatStop(); if (GetSummonerGuid().IsCreatureOrVehicle()) { if (Creature* sum = GetMap()->GetCreature(GetSummonerGuid())) { if (sum->AI()) sum->AI()->SummonedCreatureDespawn(this); } } KillAllEvents(false); AddObjectToRemoveList(); // Prevent double unsummonig before remove from world m_type = TEMPSUMMON_MANUAL_DESPAWN;}
开发者ID:AnthoDevMoP,项目名称:mangos4,代码行数:29,
示例13: ForcedUnsummonDelayEventvoid TempSummon::UnSummon(uint32 msTime){ if (msTime) { ForcedUnsummonDelayEvent* pEvent = new ForcedUnsummonDelayEvent(*this); m_Events.AddEvent(pEvent, m_Events.CalculateTime(msTime)); return; } // Dont allow to call this function twice (possible) if (m_type == TEMPSUMMON_DESPAWNED) return; SetTempSummonType(TEMPSUMMON_DESPAWNED); //ASSERT(!IsPet()); if (IsPet()) { ((Pet*)this)->Remove(PET_SAVE_NOT_IN_SLOT); ASSERT(!IsInWorld()); return; } Unit* owner = GetSummoner(); if (owner && owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->IsAIEnabled) owner->ToCreature()->AI()->SummonedCreatureDespawn(this); AddObjectToRemoveList();}
开发者ID:Cryostorm,项目名称:SunwellCore,代码行数:29,
示例14: CombatStopvoid Totem::UnSummon(){ CombatStop(); uint32 maxIdx = GetSpellMaxIndex(); for (int32 i = maxIdx; i >= 0; --i) { if (uint32 spellId = GetSpell(i)) RemoveAurasDueToSpell(spellId); } if (Unit* owner = GetOwner()) { owner->_RemoveTotem(this); for (int32 i = maxIdx; i >= 0; --i) { if (uint32 spellId = GetSpell(i)) owner->RemoveAurasDueToSpell(spellId); } // Remove Sentry Totem aura on totem unsummon if (GetEntry() == SENTRY_TOTEM_ENTRY) owner->RemoveAurasDueToSpell(6495); //remove aura all party members too if (owner->GetTypeId() == TYPEID_PLAYER) { ((Player*)owner)->SendAutoRepeatCancel(this); // Not only the player can summon the totem (scripted AI) if (Group* pGroup = ((Player*)owner)->GetGroup()) { for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* Target = itr->getSource(); if (Target && pGroup->SameSubGroup((Player*)owner, Target)) { for (int32 i = maxIdx; i >= 0; --i) { if (uint32 spellId = GetSpell(i)) Target->RemoveAurasDueToSpell(spellId); } } } } } if (owner->GetTypeId() == TYPEID_UNIT && ((Creature*)owner)->AI()) ((Creature*)owner)->AI()->SummonedCreatureDespawn((Creature*)this); } // any totem unsummon look like as totem kill, req. for proper animation if (isAlive()) SetDeathState(DEAD); AddObjectToRemoveList();}
开发者ID:gc,项目名称:mangos,代码行数:59,
示例15: RemoveFromWorldvoid DynamicObject::Remove(){ if (IsInWorld()) { RemoveFromWorld(); AddObjectToRemoveList(); }}
开发者ID:Lyill,项目名称:TrinityCore,代码行数:8,
示例16: SendObjectDeSpawnAnimvoid GameObject::Delete(){ SendObjectDeSpawnAnim(GetGUID()); SetGoState(1); SetUInt32Value(GAMEOBJECT_FLAGS, GetGOInfo()->flags); AddObjectToRemoveList();}
开发者ID:Actionfox,项目名称:mangos,代码行数:9,
示例17: SendObjectDeSpawnAnimvoid AreaTrigger::Remove(){ if (IsInWorld()) { SendObjectDeSpawnAnim(GetGUID()); RemoveFromWorld(); AddObjectToRemoveList(); }}
开发者ID:Myst,项目名称:ElunaTrinityCata,代码行数:9,
示例18: AddObjectToRemoveListvoid TemporarySummon::UnSummon(){ AddObjectToRemoveList(); Unit* sum = m_summoner ? GetMap()->GetUnit(m_summoner) : NULL; if (sum && sum->GetTypeId() == TYPEID_UNIT && ((Creature*)sum)->IsAIEnabled) { ((Creature*)sum)->AI()->SummonedCreatureDespawn(this); }}
开发者ID:wow4all,项目名称:HGCore,代码行数:10,
示例19: ForcedUnsummonDelayEventvoid Totem::UnSummon(uint32 msTime){ if (msTime) { m_Events.AddEvent(new ForcedUnsummonDelayEvent(*this), m_Events.CalculateTime(msTime)); return; } CombatStop(); RemoveAurasDueToSpell(GetSpell(), GetGUID()); // clear owner's totem slot for (uint8 i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i) { if (GetOwner()->m_SummonSlot[i] == GetGUID()) { GetOwner()->m_SummonSlot[i].Clear(); break; } } GetOwner()->RemoveAurasDueToSpell(GetSpell(), GetGUID()); // Remove Sentry Totem Aura if (GetEntry() == SENTRY_TOTEM_ENTRY) GetOwner()->RemoveAurasDueToSpell(SENTRY_TOTEM_SPELLID); //remove aura all party members too if (Player* owner = GetOwner()->ToPlayer()) { owner->SendAutoRepeatCancel(this); if (SpellInfo const* spell = sSpellMgr->GetSpellInfo(GetUInt32Value(UNIT_CREATED_BY_SPELL))) GetSpellHistory()->SendCooldownEvent(spell, 0, nullptr, false); if (Group* group = owner->GetGroup()) { for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* target = itr->GetSource(); if (target && group->SameSubGroup(owner, target)) target->RemoveAurasDueToSpell(GetSpell(), GetGUID()); } } } //npcbot: send SummonedCreatureDespawn() if (GetCreatorGUID().IsCreature()) if (Unit* bot = ObjectAccessor::FindConnectedPlayer(GetCreatorGUID())) if (bot->ToCreature()->GetIAmABot()) bot->ToCreature()->OnBotDespawn(this); //end npcbot AddObjectToRemoveList();}
开发者ID:fannyfinal,项目名称:LordPsyanBots,代码行数:55,
示例20: ASSERTvoid Corpse::DeleteBonesFromWorld() { ASSERT(GetType() == CORPSE_BONES); Corpse* corpse = ObjectAccessor::GetCorpse(*this, GetGUID()); if (!corpse) { sLog->outError("Bones %u not found in world.", GetGUIDLow()); return; } AddObjectToRemoveList();}
开发者ID:Bootz,项目名称:DeepshjirRepack,代码行数:11,
示例21: CombatStopvoid TemporarySummon::UnSummon(){ CombatStop(); if (GetSummonerGuid().IsCreature()) if(Creature* sum = GetMap()->GetCreature(GetSummonerGuid())) if (sum->AI()) sum->AI()->SummonedCreatureDespawn(this); AddObjectToRemoveList();}
开发者ID:SeTM,项目名称:mangos,代码行数:11,
示例22: CombatStopvoid TemporarySummon::UnSummon(){ CombatStop(); Unit* sum = m_summoner ? ObjectAccessor::GetUnit(*this, m_summoner) : NULL; if (sum && sum->GetTypeId() == TYPEID_UNIT && ((Creature*)sum)->AI()) { ((Creature*)sum)->AI()->SummonedCreatureDespawn(this); } AddObjectToRemoveList();}
开发者ID:web0316,项目名称:WOW,代码行数:12,
示例23: ForcedUnsummonDelayEventvoid Totem::UnSummon(uint32 msTime){ if (msTime) { m_Events.AddEvent(new ForcedUnsummonDelayEvent(*this), m_Events.CalculateTime(msTime)); return; } CombatStop(); RemoveAurasDueToSpell(GetSpell(), GetGUID()); // clear owner's totem slot for (uint8 i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i) { if (GetOwner()->m_SummonSlot[i] == GetGUID()) { GetOwner()->m_SummonSlot[i].Clear(); break; } } GetOwner()->RemoveAurasDueToSpell(GetSpell(), GetGUID()); // Remove Sentry Totem Aura if (GetEntry() == SENTRY_TOTEM_ENTRY) GetOwner()->RemoveAurasDueToSpell(SENTRY_TOTEM_SPELLID); //remove aura all party members too if (Player* owner = GetOwner()->ToPlayer()) { owner->SendAutoRepeatCancel(this); if (SpellInfo const* spell = sSpellMgr->GetSpellInfo(GetUInt32Value(UNIT_CREATED_BY_SPELL))) GetSpellHistory()->SendCooldownEvent(spell, 0, nullptr, false); if (Group* group = owner->GetGroup()) { for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* target = itr->GetSource(); if (target && group->SameSubGroup(owner, target)) target->RemoveAurasDueToSpell(GetSpell(), GetGUID()); } } } // any totem unsummon look like as totem kill, req. for proper animation if (IsAlive()) setDeathState(DEAD); AddObjectToRemoveList();}
开发者ID:AwkwardDev,项目名称:RE,代码行数:52,
示例24: SendObjectDeSpawnAnimvoid GameObject::Delete(){ SendObjectDeSpawnAnim(GetGUID()); SetGoState(GO_STATE_READY); SetUInt32Value(GAMEOBJECT_FLAGS, GetGOInfo()->flags); uint16 poolid = sPoolMgr.IsPartOfAPool(GetGUIDLow(), TYPEID_GAMEOBJECT); if (poolid) sPoolMgr.UpdatePool(poolid, GetGUIDLow(), TYPEID_GAMEOBJECT); else AddObjectToRemoveList();}
开发者ID:wk23,项目名称:tst,代码行数:13,
示例25: MANGOS_ASSERTvoid Corpse::DeleteBonesFromWorld(){ MANGOS_ASSERT(GetType() == CORPSE_BONES); Corpse* corpse = GetMap()->GetCorpse(GetObjectGuid()); if (!corpse) { sLog.outError("Bones %u not found in world.", GetGUIDLow()); return; } AddObjectToRemoveList();}
开发者ID:krullgor,项目名称:mangos-wotlk,代码行数:13,
示例26: ASSERTvoid Corpse::DeleteBonesFromWorld(){ ASSERT(GetType() == CORPSE_BONES); Corpse* corpse = ObjectAccessor::GetCorpse(*this, GetGUID()); if (!corpse) { TC_LOG_ERROR("entities.player", "Bones %u not found in world.", GetGUIDLow()); return; } AddObjectToRemoveList();}
开发者ID:Everf,项目名称:Imortal,代码行数:13,
示例27: ForcedUnsummonDelayEventvoid Totem::UnSummon(uint32 msTime){ if (msTime) { m_Events.AddEvent(new ForcedUnsummonDelayEvent(*this), m_Events.CalculateTime(msTime)); return; } CombatStop(); RemoveAurasDueToSpell(GetSpell(), GetGUID()); Unit *m_owner = GetOwner(); // clear owner's totem slot for (uint8 i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i) { if (m_owner->m_SummonSlot[i] == GetGUID()) { m_owner->m_SummonSlot[i] = 0; break; } } m_owner->RemoveAurasDueToSpell(GetSpell(), GetGUID()); // Remove Sentry Totem Aura if (GetEntry() == SENTRY_TOTEM_ENTRY) m_owner->RemoveAurasDueToSpell(SENTRY_TOTEM_SPELLID); //remove aura all party members too if (Player* owner = m_owner->ToPlayer()) { owner->SendAutoRepeatCancel(this); if (SpellInfo const* spell = sSpellMgr->GetSpellInfo(GetUInt32Value(UNIT_CREATED_BY_SPELL))) owner->SendCooldownEvent(spell, 0, NULL, false); if (Group* group = owner->GetGroup()) { for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* target = itr->GetSource(); if (target && target->IsInMap(owner) && group->SameSubGroup(owner, target)) target->RemoveAurasDueToSpell(GetSpell(), GetGUID()); } } } AddObjectToRemoveList();}
开发者ID:Cryostorm,项目名称:SunwellCore,代码行数:49,
示例28: SendObjectDeSpawnAnimvoid DynamicObject::Delete(){ if (m_aura) { // dynObj may be removed in Aura::Remove - we cannot delete there // so recheck aura here if (!m_aura->IsRemoved()) m_aura->_Remove(AURA_REMOVE_BY_DEFAULT); delete m_aura; m_aura = NULL; } SendObjectDeSpawnAnim(GetGUID()); RemoveFromWorld(); AddObjectToRemoveList();}
开发者ID:Bootz,项目名称:S6.RO.WoW,代码行数:15,
示例29: ASSERTvoid TempSummon::UnSummon(){ if (isPet()) { ((Pet*)this)->Remove(PET_SAVE_NOT_IN_SLOT); ASSERT(!IsInWorld()); return; } Unit* owner = GetSummoner(); if (owner && owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->IsAIEnabled) owner->ToCreature()->AI()->SummonedCreatureDespawn(this); AddObjectToRemoveList();}
开发者ID:AwkwardDev,项目名称:Project-WoW,代码行数:15,
注:本文中的AddObjectToRemoveList函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ AddOption函数代码示例 C++ AddObject函数代码示例 |