*Fix crash in latest rev.
--HG-- branch : trunk
This commit is contained in:
+10
-10
@@ -11978,9 +11978,6 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue( Aura* triggeredByAura )
|
|||||||
// current aura expire
|
// current aura expire
|
||||||
triggeredByAura->SetAuraCharges(1); // will removed at next charges decrease
|
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
|
// next target selection
|
||||||
if(jumps > 0 && IS_PLAYER_GUID(caster_guid))
|
if(jumps > 0 && IS_PLAYER_GUID(caster_guid))
|
||||||
{
|
{
|
||||||
@@ -11990,6 +11987,9 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue( Aura* triggeredByAura )
|
|||||||
else
|
else
|
||||||
radius = GetSpellMaxRangeForTarget(triggeredByAura->GetCaster() ,sSpellRangeStore.LookupEntry(spellProto->rangeIndex));
|
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()))
|
if(Player* caster = ((Player*)triggeredByAura->GetCaster()))
|
||||||
{
|
{
|
||||||
caster->ApplySpellMod(spellProto->Id, SPELLMOD_RADIUS, radius,NULL);
|
caster->ApplySpellMod(spellProto->Id, SPELLMOD_RADIUS, radius,NULL);
|
||||||
@@ -12001,8 +12001,8 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue( Aura* triggeredByAura )
|
|||||||
player = (Player*)this;
|
player = (Player*)this;
|
||||||
else if (GetTypeId() == TYPEID_UNIT && ((Creature*)this)->isPet())
|
else if (GetTypeId() == TYPEID_UNIT && ((Creature*)this)->isPet())
|
||||||
player=(Player*)GetOwner();
|
player=(Player*)GetOwner();
|
||||||
|
Player* target= player ? player->GetNextRandomRaidMember(radius): NULL;
|
||||||
if (Player* target = player->GetNextRandomRaidMember(radius))
|
if (target)
|
||||||
{
|
{
|
||||||
// aura will applied from caster, but spell casted from current aura holder
|
// aura will applied from caster, but spell casted from current aura holder
|
||||||
SpellModifier *mod = new SpellModifier;
|
SpellModifier *mod = new SpellModifier;
|
||||||
@@ -12058,9 +12058,6 @@ bool Unit::HandleAuraRaidProcFromCharge( Aura* triggeredByAura )
|
|||||||
// current aura expire
|
// current aura expire
|
||||||
triggeredByAura->SetAuraCharges(1); // will removed at next charges decrease
|
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
|
// next target selection
|
||||||
if(jumps > 0 && IS_PLAYER_GUID(caster_guid))
|
if(jumps > 0 && IS_PLAYER_GUID(caster_guid))
|
||||||
{
|
{
|
||||||
@@ -12070,6 +12067,9 @@ bool Unit::HandleAuraRaidProcFromCharge( Aura* triggeredByAura )
|
|||||||
else
|
else
|
||||||
radius = GetSpellMaxRangeForTarget(triggeredByAura->GetCaster() ,sSpellRangeStore.LookupEntry(spellProto->rangeIndex));
|
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()))
|
if(Player* caster = ((Player*)triggeredByAura->GetCaster()))
|
||||||
{
|
{
|
||||||
caster->ApplySpellMod(spellProto->Id, SPELLMOD_RADIUS, radius,NULL);
|
caster->ApplySpellMod(spellProto->Id, SPELLMOD_RADIUS, radius,NULL);
|
||||||
@@ -12081,8 +12081,8 @@ bool Unit::HandleAuraRaidProcFromCharge( Aura* triggeredByAura )
|
|||||||
player = (Player*)this;
|
player = (Player*)this;
|
||||||
else if (GetTypeId() == TYPEID_UNIT && ((Creature*)this)->isPet())
|
else if (GetTypeId() == TYPEID_UNIT && ((Creature*)this)->isPet())
|
||||||
player=(Player*)GetOwner();
|
player=(Player*)GetOwner();
|
||||||
|
Player* target= player ? player->GetNextRandomRaidMember(radius): NULL;
|
||||||
if (Player* target = player->GetNextRandomRaidMember(radius))
|
if (target)
|
||||||
{
|
{
|
||||||
// aura will applied from caster, but spell casted from current aura holder
|
// aura will applied from caster, but spell casted from current aura holder
|
||||||
SpellModifier *mod = new SpellModifier;
|
SpellModifier *mod = new SpellModifier;
|
||||||
|
|||||||
Reference in New Issue
Block a user