本文整理汇总了C++中GetCasterGUID函数的典型用法代码示例。如果您正苦于以下问题:C++ GetCasterGUID函数的具体用法?C++ GetCasterGUID怎么用?C++ GetCasterGUID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetCasterGUID函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ASSERT
void DynamicObject::BindToCaster() {
ASSERT(!m_caster);
m_caster = ObjectAccessor::GetUnit(*this, GetCasterGUID());
ASSERT(m_caster);
ASSERT(m_caster->GetMap() == GetMap());
m_caster->_RegisterDynObject(this);
}
示例2: GetCasterGUID
void AreaTrigger::BindToCaster()
{
//ASSERT(!m_caster);
m_caster = ObjectAccessor::GetUnit(*this, GetCasterGUID());
//ASSERT(GetCaster());
//ASSERT(GetCaster()->GetMap() == GetMap());
if (m_caster)
m_caster->_RegisterAreaTrigger(this);
}
示例3: GetCasterGUID
void DynamicObject::BindToCaster()
{
//ASSERT(!_caster);
_caster = ObjectAccessor::GetUnit(*this, GetCasterGUID());
//ASSERT(_caster);
//ASSERT(_caster->GetMap() == GetMap());
if (_caster)
_caster->_RegisterDynObject(this);
}
示例4: HandleEffectRemove
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
uint32 spellId = GetSpellInfo()->GetFirstRankSpell()->Id;
if ((spellId == SPELL_PALADIN_SANCTIFIED_RETRIBUTION_R1 && GetTarget()->GetAuraOfRankedSpell(SPELL_PALADIN_SWIFT_RETRIBUTION_R1))
|| (spellId == SPELL_PALADIN_SWIFT_RETRIBUTION_R1 && GetTarget()->GetAuraOfRankedSpell(SPELL_PALADIN_SANCTIFIED_RETRIBUTION_R1)))
return;
GetTarget()->RemoveOwnedAura(_spellId, GetCasterGUID());
}
示例5: isVisibleForInState
bool DynamicObject::isVisibleForInState(Player const* player, WorldObject const* viewPoint, bool inVisibleList) const
{
if (!IsInWorld() || !player->IsInWorld())
return false;
if (GetCasterGUID() == player->GetGUID())
return true;
return IsWithinDistInMap(viewPoint, GetMap()->GetVisibilityDistance(const_cast<DynamicObject*>(this), const_cast<Player*>(player)) + (inVisibleList ? World::GetVisibleObjectGreyDistance() : 0.0f), false);
}
示例6: OnApply
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (GetTarget()->GetTypeId() != TYPEID_PLAYER)
return;
oldAI = GetTarget()->GetAI();
oldAIState = GetTarget()->IsAIEnabled;
GetTarget()->SetAI(new player_overlord_brandAI(GetTarget()->ToPlayer()));
GetTarget()->GetAI()->SetGUID(GetCasterGUID());
}
示例7: isVisibleForInState
bool DynamicObject::isVisibleForInState(Player const* u, WorldObject const* viewPoint, bool inVisibleList) const
{
if(!IsInWorld() || !u->IsInWorld())
return false;
// always seen by owner
if(GetCasterGUID()==u->GetGUID())
return true;
// normal case
return IsWithinDistInMap(viewPoint, GetMap()->GetVisibilityDistance() + (inVisibleList ? World::GetVisibleObjectGreyDistance() : 0.0f), false);
}
示例8: GetMap
void DynamicObject::Delay(int32 delaytime)
{
m_aliveDuration -= delaytime;
for(AffectedSet::iterator iter = m_affected.begin(); iter != m_affected.end(); )
{
Unit *target = GetMap()->GetUnit((*iter));
if (target)
{
SpellAuraHolder *holder = target->GetSpellAuraHolder(m_spellId, GetCasterGUID());
if (!holder)
{
++iter;
continue;
}
bool foundAura = false;
for (int32 i = m_effIndex + 1; i < MAX_EFFECT_INDEX; ++i)
{
if ((holder->GetSpellProto()->Effect[i] == SPELL_EFFECT_PERSISTENT_AREA_AURA || holder->GetSpellProto()->Effect[i] == SPELL_EFFECT_ADD_FARSIGHT) && holder->m_auras[i])
{
foundAura = true;
break;
}
}
if (foundAura)
{
++iter;
continue;
}
target->DelaySpellAuraHolder(m_spellId, delaytime, GetCasterGUID());
++iter;
}
else
m_affected.erase(iter++);
}
}
示例9: OnApply
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (affected)
remove();
auto p = GetTarget()->ToPlayer();
if (!p)
return;
oldAI = p->GetAI().get();
oldAIState = GetTarget()->IsAIEnabled;
p->SetAI(new player_overlord_brandAI(p));
p->GetAI()->SetGUID(GetCasterGUID());
p->IsAIEnabled = true;
affected = p;
}
示例10: CheckAreaTarget
bool CheckAreaTarget(Unit* target)
{
Unit::AuraApplicationMap& appliedAuras = target->GetAppliedAuras();
for (Unit::AuraApplicationMap::iterator itr = appliedAuras.begin(); itr != appliedAuras.end(); ++itr)
{
Aura const* aura = itr->second->GetBase();
if (aura->GetSpellInfo()->GetSpellSpecific() == SPELL_SPECIFIC_AURA && aura->GetCasterGUID() == GetCasterGUID())
{
// Not allow for Retribution Aura (prevent stacking) - Retribution Aura Overflow and Retribution Aura has same spell effects
if (GetSpellInfo()->Id == SPELL_PALADIN_SANCTIFIED_RETRIBUTION_AURA && aura->GetSpellInfo()->SpellIconID == PALADIN_ICON_ID_RETRIBUTION_AURA)
return false;
return true;
}
}
return false;
}
示例11: HandleEffectRemove
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->RemoveOwnedAura(SPELL_PALADIN_AURA_MASTERY_IMMUNE, GetCasterGUID());
}
示例12: HandleDummy
void HandleDummy(AuraEffect const* /*aurEff*/)
{
if (AuraEffect* slowEff = GetEffect(EFFECT_0))
{
int32 newAmount = slowEff->GetAmount() - 10;
if (newAmount < -100)
newAmount = -100;
slowEff->ChangeAmount(newAmount);
if (newAmount == -100 && !GetTarget()->HasAura(SPELL_PARALYSIS))
GetTarget()->CastSpell(GetTarget(), SPELL_PARALYSIS, CastSpellExtraArgs(slowEff).SetOriginalCaster(GetCasterGUID()));
}
}
示例13: HandleRemove
void HandleRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
if (Unit* caster = GetCaster())
{
int32 amount = aurEff->GetAmount();
GetTarget()->CastCustomSpell(caster, SPELL_WARLOCK_HAUNT_HEAL, &amount, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
}
}
示例14: HandleShareBuff
void HandleShareBuff (AuraEffect const* aurEff, AuraEffectHandleModes mode)
{
if (!GetTargetApplication())
return;
if (!GetTargetApplication()->GetBase())
return;
if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_ENEMY_SPELL)
{
if (Unit* target = GetTarget())
{
CustomSpellValues values;
values.AddSpellMod(SPELLVALUE_MAX_TARGETS, 2);
values.AddSpellMod(SPELLVALUE_BASE_POINT1, GetTargetApplication()->GetBase()->GetDuration());
GetTarget()->CastCustomSpell(SPELL_WRACK_JUMP, values, NULL, TRIGGERED_FULL_MASK, NULL, NULL, GetCasterGUID());
}
}
}
示例15: HandleRemove
void HandleRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL && GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
return;
if (Unit* caster = GetCaster())
{
int32 amount = aurEff->GetAmount();
GetTarget()->CastCustomSpell(caster, WARLOCK_HAUNT_HEAL, &amount, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
}
}