mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[10747] Some other aura caster object guid use cases.
This commit is contained in:
parent
f034a9bd0a
commit
12b80fec68
9 changed files with 67 additions and 67 deletions
|
|
@ -1911,17 +1911,17 @@ void Aura::TriggerSpell()
|
|||
|
||||
void Aura::TriggerSpellWithValue()
|
||||
{
|
||||
const uint64& casterGUID = GetCasterGUID();
|
||||
ObjectGuid casterGuid = GetCasterGuid();
|
||||
Unit* target = GetTriggerTarget();
|
||||
|
||||
if(!casterGUID || !target)
|
||||
if (casterGuid.IsEmpty() || !target)
|
||||
return;
|
||||
|
||||
// generic casting code with custom spells and target/caster customs
|
||||
uint32 trigger_spell_id = GetSpellProto()->EffectTriggerSpell[m_effIndex];
|
||||
int32 basepoints0 = GetModifier()->m_amount;
|
||||
|
||||
target->CastCustomSpell(target, trigger_spell_id, &basepoints0, NULL, NULL, true, NULL, this, casterGUID);
|
||||
target->CastCustomSpell(target, trigger_spell_id, &basepoints0, NULL, NULL, true, NULL, this, casterGuid);
|
||||
}
|
||||
|
||||
/*********************************************************/
|
||||
|
|
@ -2340,7 +2340,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
return;
|
||||
|
||||
for (uint32 i = 0; i < spell->StackAmount; ++i)
|
||||
caster->CastSpell(target, spellId, true, NULL, NULL, GetCasterGUID());
|
||||
caster->CastSpell(target, spellId, true, NULL, NULL, GetCasterGuid());
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -2358,7 +2358,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
return;
|
||||
|
||||
for (uint32 i=0; i < spell->StackAmount; ++i)
|
||||
caster->CastSpell(target, spell->Id, true, NULL, NULL, GetCasterGUID());
|
||||
caster->CastSpell(target, spell->Id, true, NULL, NULL, GetCasterGuid());
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -2465,7 +2465,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
return;
|
||||
}
|
||||
case 47178: // Plague Effect Self
|
||||
target->SetFeared(apply, GetCasterGUID(), GetId());
|
||||
target->SetFeared(apply, GetCasterGuid(), GetId());
|
||||
return;
|
||||
case 58204: // LK Intro VO (1)
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
|
|
@ -2606,12 +2606,12 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
if (target->IsInWorld() && GetStackAmount() > 0)
|
||||
{
|
||||
int32 amount = m_modifier.m_amount;
|
||||
target->CastCustomSpell(target, 33778, &amount, NULL, NULL, true, NULL, this, GetCasterGUID());
|
||||
target->CastCustomSpell(target, 33778, &amount, NULL, NULL, true, NULL, this, GetCasterGuid());
|
||||
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
int32 returnmana = (GetSpellProto()->ManaCostPercentage * caster->GetCreateMana() / 100) * GetStackAmount() / 2;
|
||||
caster->CastCustomSpell(caster, 64372, &returnmana, NULL, NULL, true, NULL, this, GetCasterGUID());
|
||||
caster->CastCustomSpell(caster, 64372, &returnmana, NULL, NULL, true, NULL, this, GetCasterGuid());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3215,7 +3215,7 @@ void Aura::HandleAuraTransform(bool apply, bool Real)
|
|||
{
|
||||
// for players, start regeneration after 1s (in polymorph fast regeneration case)
|
||||
// only if caster is Player (after patch 2.4.2)
|
||||
if (IS_PLAYER_GUID(GetCasterGUID()) )
|
||||
if (GetCasterGuid().IsPlayer())
|
||||
((Player*)target)->setRegenTimer(1*IN_MILLISECONDS);
|
||||
|
||||
//dismount polymorphed target (after patch 2.4.2)
|
||||
|
|
@ -3439,7 +3439,7 @@ void Aura::HandleModPossess(bool apply, bool Real)
|
|||
Unit *target = GetTarget();
|
||||
|
||||
// not possess yourself
|
||||
if(GetCasterGUID() == target->GetGUID())
|
||||
if (GetCasterGuid() == target->GetObjectGuid())
|
||||
return;
|
||||
|
||||
Unit* caster = GetCaster();
|
||||
|
|
@ -3623,7 +3623,7 @@ void Aura::HandleModCharm(bool apply, bool Real)
|
|||
Unit *target = GetTarget();
|
||||
|
||||
// not charm yourself
|
||||
if(GetCasterGUID() == target->GetGUID())
|
||||
if (GetCasterGuid() == target->GetObjectGuid())
|
||||
return;
|
||||
|
||||
Unit* caster = GetCaster();
|
||||
|
|
@ -3738,7 +3738,7 @@ void Aura::HandleModConfuse(bool apply, bool Real)
|
|||
if(!Real)
|
||||
return;
|
||||
|
||||
GetTarget()->SetConfused(apply, GetCasterGUID(), GetId());
|
||||
GetTarget()->SetConfused(apply, GetCasterGuid(), GetId());
|
||||
}
|
||||
|
||||
void Aura::HandleModFear(bool apply, bool Real)
|
||||
|
|
@ -3746,7 +3746,7 @@ void Aura::HandleModFear(bool apply, bool Real)
|
|||
if (!Real)
|
||||
return;
|
||||
|
||||
GetTarget()->SetFeared(apply, GetCasterGUID(), GetId());
|
||||
GetTarget()->SetFeared(apply, GetCasterGuid(), GetId());
|
||||
}
|
||||
|
||||
void Aura::HandleFeignDeath(bool apply, bool Real)
|
||||
|
|
@ -3754,7 +3754,7 @@ void Aura::HandleFeignDeath(bool apply, bool Real)
|
|||
if(!Real)
|
||||
return;
|
||||
|
||||
GetTarget()->SetFeignDeath(apply, GetCasterGUID(), GetId());
|
||||
GetTarget()->SetFeignDeath(apply, GetCasterGuid(), GetId());
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModDisarm(bool apply, bool Real)
|
||||
|
|
@ -3806,7 +3806,7 @@ void Aura::HandleAuraModStun(bool apply, bool Real)
|
|||
target->SetTargetGuid(ObjectGuid());
|
||||
|
||||
target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
|
||||
target->CastStop(target->GetGUID() == GetCasterGUID() ? GetId() : 0);
|
||||
target->CastStop(target->GetObjectGuid() == GetCasterGuid() ? GetId() : 0);
|
||||
|
||||
// Creature specific
|
||||
if(target->GetTypeId() != TYPEID_PLAYER)
|
||||
|
|
@ -5100,7 +5100,7 @@ void Aura::HandleAuraModDispelResist(bool apply, bool Real)
|
|||
return;
|
||||
|
||||
if(GetId() == 33206)
|
||||
GetTarget()->CastSpell(GetTarget(), 44416, true, NULL, this, GetCasterGUID());
|
||||
GetTarget()->CastSpell(GetTarget(), 44416, true, NULL, this, GetCasterGuid());
|
||||
}
|
||||
|
||||
void Aura::HandleModSpellDamagePercentFromAttackPower(bool /*apply*/, bool /*Real*/)
|
||||
|
|
@ -6393,10 +6393,10 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
|
|||
switch(target->getPowerType())
|
||||
{
|
||||
case POWER_RUNIC_POWER:
|
||||
target->CastSpell(target, 63652, true, NULL, NULL, GetCasterGUID());
|
||||
target->CastSpell(target, 63652, true, NULL, NULL, GetCasterGuid());
|
||||
break;
|
||||
case POWER_RAGE:
|
||||
target->CastSpell(target, 63653, true, NULL, NULL, GetCasterGUID());
|
||||
target->CastSpell(target, 63653, true, NULL, NULL, GetCasterGuid());
|
||||
break;
|
||||
case POWER_MANA:
|
||||
{
|
||||
|
|
@ -6405,7 +6405,7 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
|
|||
break;
|
||||
}
|
||||
case POWER_ENERGY:
|
||||
target->CastSpell(target, 63655, true, NULL, NULL, GetCasterGUID());
|
||||
target->CastSpell(target, 63655, true, NULL, NULL, GetCasterGuid());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -6635,7 +6635,7 @@ void Aura::PeriodicTick()
|
|||
|
||||
// only from players
|
||||
// FIXME: need use SpellDamageBonus instead?
|
||||
if (IS_PLAYER_GUID(GetCasterGUID()))
|
||||
if (GetCasterGuid().IsPlayer())
|
||||
pdamage -= target->GetSpellDamageReduction(pdamage);
|
||||
|
||||
target->CalculateDamageAbsorbAndResist(pCaster, GetSpellSchoolMask(spellProto), DOT, pdamage, &absorb, &resist, !(spellProto->AttributesEx2 & SPELL_ATTR_EX2_CANT_REFLECTED));
|
||||
|
|
@ -7384,7 +7384,7 @@ void Aura::PeriodicDummyTick()
|
|||
// Explosive Shot
|
||||
if (spell->SpellFamilyFlags & UI64LIT(0x8000000000000000))
|
||||
{
|
||||
target->CastCustomSpell(target, 53352, &m_modifier.m_amount, 0, 0, true, 0, this, GetCasterGUID());
|
||||
target->CastCustomSpell(target, 53352, &m_modifier.m_amount, 0, 0, true, 0, this, GetCasterGuid());
|
||||
return;
|
||||
}
|
||||
switch (spell->Id)
|
||||
|
|
@ -7482,7 +7482,7 @@ void Aura::HandlePreventFleeing(bool apply, bool Real)
|
|||
if( !fearAuras.empty() )
|
||||
{
|
||||
if (apply)
|
||||
GetTarget()->SetFeared(false, fearAuras.front()->GetCasterGUID());
|
||||
GetTarget()->SetFeared(false, fearAuras.front()->GetCasterGuid());
|
||||
else
|
||||
GetTarget()->SetFeared(true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue