本文整理汇总了C++中AddObjectToRemoveList函数的典型用法代码示例。如果您正苦于以下问题:C++ AddObjectToRemoveList函数的具体用法?C++ AddObjectToRemoveList怎么用?C++ AddObjectToRemoveList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AddObjectToRemoveList函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ForcedUnsummonDelayEvent
void 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();
}
示例2: RemoveAllPassengers
void Vehicle::Dismiss()
{
RemoveAllPassengers();
SendObjectDeSpawnAnim(GetGUID());
CombatStop();
AddObjectToRemoveList();
}
示例3: CombatStop
void 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();
}
示例4: CombatStop
void 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();
}
示例5: ForcedUnsummonDelayEvent
void 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();
}
示例6: ForcedUnsummonDelayEvent
void 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();
}
示例7: ForcedUnsummonDelayEvent
void 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();
}
示例8: AddObjectToRemoveList
void AreaTrigger::Remove()
{
if (IsInWorld())
{
AddObjectToRemoveList(); // calls RemoveFromWorld
}
}
示例9: ASSERT
void 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();
}
示例10: SendObjectDeSpawnAnim
void DynamicObject::Remove() {
if (IsInWorld()) {
SendObjectDeSpawnAnim(GetGUID());
RemoveFromWorld();
AddObjectToRemoveList();
}
}
示例11: CombatStop
void 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();
}
示例12: CombatStop
void 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;
}
示例13: ForcedUnsummonDelayEvent
void 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();
}
示例14: CombatStop
void 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();
}
示例15: RemoveFromWorld
void DynamicObject::Remove()
{
if (IsInWorld())
{
RemoveFromWorld();
AddObjectToRemoveList();
}
}