mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
*Fix crash in latest rev.
--HG-- branch : trunk
This commit is contained in:
@@ -11978,9 +11978,6 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue( Aura* triggeredByAura )
|
||||
// current aura expire
|
||||
triggeredByAura->SetAuraCharges(1); // will removed at next charges decrease
|
||||
|
||||
//Get max possible jumps for aura to get proper charges amount for target
|
||||
int32 maxJumps = spellProto->procCharges;
|
||||
|
||||
// next target selection
|
||||
if(jumps > 0 && IS_PLAYER_GUID(caster_guid))
|
||||
{
|
||||
@@ -11990,6 +11987,9 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue( Aura* triggeredByAura )
|
||||
else
|
||||
radius = GetSpellMaxRangeForTarget(triggeredByAura->GetCaster() ,sSpellRangeStore.LookupEntry(spellProto->rangeIndex));
|
||||
|
||||
//Get max possible jumps for aura to get proper charges amount for target
|
||||
int32 maxJumps = spellProto->procCharges;
|
||||
|
||||
if(Player* caster = ((Player*)triggeredByAura->GetCaster()))
|
||||
{
|
||||
caster->ApplySpellMod(spellProto->Id, SPELLMOD_RADIUS, radius,NULL);
|
||||
@@ -12001,8 +12001,8 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue( Aura* triggeredByAura )
|
||||
player = (Player*)this;
|
||||
else if (GetTypeId() == TYPEID_UNIT && ((Creature*)this)->isPet())
|
||||
player=(Player*)GetOwner();
|
||||
|
||||
if (Player* target = player->GetNextRandomRaidMember(radius))
|
||||
Player* target= player ? player->GetNextRandomRaidMember(radius): NULL;
|
||||
if (target)
|
||||
{
|
||||
// aura will applied from caster, but spell casted from current aura holder
|
||||
SpellModifier *mod = new SpellModifier;
|
||||
@@ -12058,9 +12058,6 @@ bool Unit::HandleAuraRaidProcFromCharge( Aura* triggeredByAura )
|
||||
// current aura expire
|
||||
triggeredByAura->SetAuraCharges(1); // will removed at next charges decrease
|
||||
|
||||
//Get max possible jumps for aura to get proper charges amount for target
|
||||
int32 maxJumps = spellProto->procCharges;
|
||||
|
||||
// next target selection
|
||||
if(jumps > 0 && IS_PLAYER_GUID(caster_guid))
|
||||
{
|
||||
@@ -12070,6 +12067,9 @@ bool Unit::HandleAuraRaidProcFromCharge( Aura* triggeredByAura )
|
||||
else
|
||||
radius = GetSpellMaxRangeForTarget(triggeredByAura->GetCaster() ,sSpellRangeStore.LookupEntry(spellProto->rangeIndex));
|
||||
|
||||
//Get max possible jumps for aura to get proper charges amount for target
|
||||
int32 maxJumps = spellProto->procCharges;
|
||||
|
||||
if(Player* caster = ((Player*)triggeredByAura->GetCaster()))
|
||||
{
|
||||
caster->ApplySpellMod(spellProto->Id, SPELLMOD_RADIUS, radius,NULL);
|
||||
@@ -12081,8 +12081,8 @@ bool Unit::HandleAuraRaidProcFromCharge( Aura* triggeredByAura )
|
||||
player = (Player*)this;
|
||||
else if (GetTypeId() == TYPEID_UNIT && ((Creature*)this)->isPet())
|
||||
player=(Player*)GetOwner();
|
||||
|
||||
if (Player* target = player->GetNextRandomRaidMember(radius))
|
||||
Player* target= player ? player->GetNextRandomRaidMember(radius): NULL;
|
||||
if (target)
|
||||
{
|
||||
// aura will applied from caster, but spell casted from current aura holder
|
||||
SpellModifier *mod = new SpellModifier;
|
||||
|
||||
Reference in New Issue
Block a user