mirror of
https://github.com/mangosfour/server.git
synced 2025-12-20 16:37:04 +00:00
[10629] Drop function GuidHigh2TypeId
Added ObjectGuid version Aura::GetCasterGuid() But for prevent big problen with backporting AuraHolder to mangos-0.12 in most cases still used old uint64 version Aura::GetCasterGUID. Recommended use new version where possible in clean way as done for some cases in commit already.
This commit is contained in:
parent
fdc5a1dd67
commit
31c9efd219
17 changed files with 54 additions and 66 deletions
|
|
@ -610,7 +610,7 @@ void Aura::Update(uint32 diff)
|
|||
void AreaAura::Update(uint32 diff)
|
||||
{
|
||||
// update for the caster of the aura
|
||||
if(GetCasterGUID() == GetTarget()->GetGUID())
|
||||
if(GetCasterGuid() == GetTarget()->GetObjectGuid())
|
||||
{
|
||||
Unit* caster = GetTarget();
|
||||
|
||||
|
|
@ -1088,10 +1088,10 @@ void Aura::HandleAddModifier(bool apply, bool Real)
|
|||
|
||||
void Aura::TriggerSpell()
|
||||
{
|
||||
const uint64& casterGUID = GetCasterGUID();
|
||||
ObjectGuid casterGUID = GetCasterGuid();
|
||||
Unit* triggerTarget = GetTriggerTarget();
|
||||
|
||||
if (!casterGUID || !triggerTarget)
|
||||
if (casterGUID.IsEmpty() || !triggerTarget)
|
||||
return;
|
||||
|
||||
// generic casting code with custom spells and target/caster customs
|
||||
|
|
@ -1840,7 +1840,7 @@ void Aura::TriggerSpell()
|
|||
// 2) maybe aura must be replace by new with accumulative stat mods instead stacking
|
||||
|
||||
// prevent cast by triggered auras
|
||||
if (casterGUID == triggerTarget->GetGUID())
|
||||
if (casterGUID == triggerTarget->GetObjectGuid())
|
||||
return;
|
||||
|
||||
// stop triggering after each affected stats lost > 90
|
||||
|
|
@ -6570,8 +6570,8 @@ void Aura::PeriodicTick()
|
|||
|
||||
target->CalculateDamageAbsorbAndResist(pCaster, GetSpellSchoolMask(spellProto), DOT, pdamage, &absorb, &resist, !(GetSpellProto()->AttributesEx2 & SPELL_ATTR_EX2_CANT_REFLECTED));
|
||||
|
||||
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %u (TypeId: %u) attacked %u (TypeId: %u) for %u dmg inflicted by %u abs is %u",
|
||||
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), pdamage, GetId(),absorb);
|
||||
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %s attacked %s for %u dmg inflicted by %u abs is %u",
|
||||
GetCasterGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str(), pdamage, GetId(),absorb);
|
||||
|
||||
pCaster->DealDamageMods(target, pdamage, &absorb);
|
||||
|
||||
|
|
@ -6664,8 +6664,8 @@ void Aura::PeriodicTick()
|
|||
if(target->GetHealth() < pdamage)
|
||||
pdamage = uint32(target->GetHealth());
|
||||
|
||||
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %u (TypeId: %u) health leech of %u (TypeId: %u) for %u dmg inflicted by %u abs is %u",
|
||||
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), pdamage, GetId(),absorb);
|
||||
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %s health leech of %s for %u dmg inflicted by %u abs is %u",
|
||||
GetCasterGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str(), pdamage, GetId(),absorb);
|
||||
|
||||
pCaster->DealDamageMods(target, pdamage, &absorb);
|
||||
|
||||
|
|
@ -6755,8 +6755,8 @@ void Aura::PeriodicTick()
|
|||
pCaster->CalculateHealAbsorb(pdamage, &absorbHeal);
|
||||
pdamage -= absorbHeal;
|
||||
|
||||
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %u (TypeId: %u) heal of %u (TypeId: %u) for %u health (absorbed %u) inflicted by %u",
|
||||
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), pdamage, absorbHeal, GetId());
|
||||
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %s heal of %s for %u health (absorbed %u) inflicted by %u",
|
||||
GetCasterGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str(), pdamage, absorbHeal, GetId());
|
||||
|
||||
int32 gain = target->ModifyHealth(pdamage);
|
||||
SpellPeriodicAuraLogInfo pInfo(this, pdamage, (pdamage - uint32(gain)), absorbHeal, 0, 0.0f, isCrit);
|
||||
|
|
@ -6850,8 +6850,8 @@ void Aura::PeriodicTick()
|
|||
pdamage = maxmana;
|
||||
}
|
||||
|
||||
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %u (TypeId: %u) power leech of %u (TypeId: %u) for %u dmg inflicted by %u",
|
||||
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), pdamage, GetId());
|
||||
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %s power leech of %s for %u dmg inflicted by %u",
|
||||
GetCasterGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str(), pdamage, GetId());
|
||||
|
||||
int32 drain_amount = target->GetPower(power) > pdamage ? pdamage : target->GetPower(power);
|
||||
|
||||
|
|
@ -6892,8 +6892,8 @@ void Aura::PeriodicTick()
|
|||
// ignore non positive values (can be result apply spellmods to aura damage
|
||||
uint32 pdamage = m_modifier.m_amount > 0 ? m_modifier.m_amount : 0;
|
||||
|
||||
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u",
|
||||
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), pdamage, GetId());
|
||||
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %s energize %s (TypeId: %u) for %u dmg inflicted by %u",
|
||||
GetCasterGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str(), pdamage, GetId());
|
||||
|
||||
if(m_modifier.m_miscvalue < 0 || m_modifier.m_miscvalue >= MAX_POWERS)
|
||||
break;
|
||||
|
|
@ -6923,8 +6923,8 @@ void Aura::PeriodicTick()
|
|||
|
||||
uint32 pdamage = uint32(target->GetMaxPower(POWER_MANA) * amount / 100);
|
||||
|
||||
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u mana inflicted by %u",
|
||||
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), pdamage, GetId());
|
||||
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %s energize %s for %u mana inflicted by %u",
|
||||
GetCasterGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str(), pdamage, GetId());
|
||||
|
||||
if(target->GetMaxPower(POWER_MANA) == 0)
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue