What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

Temporary GilesCombatReplacer Azmodan Fix

Bazingaw

New Member
Joined
Jun 17, 2012
Messages
386
Reaction score
4
Temporary Fixes for GilesCombatReplacer

---
 
Last edited:
iirc, the reason giles coded his combat replacer to use the location of the unit, instead of the actual unit, is because if the unit DIES a second before the bot tries to attack it, it will crash diablo 3 because it is trying to attack a target that no longer exists. However I don't know how often this occurs!
 
Forgot about that actually, but just did a quick test through some areas of Keep, and Core manually running through with a combat profile - it seemed to be pretty okay running through clearing and killing mobs without any crashes though it might have just been like you mentioned a really reduced chance or the problem was fixed over one of the releases. Any one testing mind chiming in?
 
ran it once thru the a3 champ fram profile.. worked fine. killed boss way quicker since it actually attacks

edit: will do
 
Ahh sweet good to hear soju, do let us know if any crashes happen down the line please
 
Becareful with this one as I know Giles handles FoT differently due to not being able to check what runes we use for FoT, this should be the proper change but I can't gaurentee it even works as I haven't tested nor can test it atm
Code:
                    // Fists of thunder as the primary, repeatable attack
                    if (!bBuffsOnly && !bAvoidanceEmergency && !bMeIncapacitated && powerHotbarAbilities.Contains(SNOPower.Monk_FistsofThunder) && PowerManager.CanCast(SNOPower.Monk_FistsofThunder))
                    {
                        // Unsafe mode
                        if (fDistanceFromTarget > 11f && unitCurrentTarget.iThisHitPoints >= 0.6)
                        {
                            return new GilesPower(SNOPower.Monk_FistsofThunder, 30f, vNullLocation, -1, unitCurrentTarget.iThisActorACDGUID, USE_COMBAT_ONLY, FOR_INSTANT_USE);
                        }
                        // Safe mode
                        if (unitCurrentTarget.diaThisUnit != null && unitCurrentTarget.diaThisUnit.BaseAddress != IntPtr.Zero)
                            vCurrentTargetPosition = unitCurrentTarget.diaThisUnit.Position;
                        return new GilesPower(SNOPower.Monk_FistsofThunder, 11f, new Vector3(vCurrentTargetPosition.X, vCurrentTargetPosition.Y, vCurrentTargetPosition.Z + iThisHeight), iCurrentWorldID, -1, USE_COMBAT_ONLY, FOR_INSTANT_USE);
                    }
to
Code:
                    // Fists of thunder as the primary, repeatable attack
                    if (!bBuffsOnly && !bAvoidanceEmergency && !bMeIncapacitated && powerHotbarAbilities.Contains(SNOPower.Monk_FistsofThunder) && PowerManager.CanCast(SNOPower.Monk_FistsofThunder))
                    {
                        // Unsafe mode
                        if (fDistanceFromTarget > 11f && unitCurrentTarget.iThisHitPoints >= 0.6)
                        {
                            return new GilesPower(SNOPower.Monk_FistsofThunder, 30f, vNullLocation, -1, unitCurrentTarget.iThisActorACDGUID, USE_COMBAT_ONLY, FOR_INSTANT_USE);
                        }
                        // Safe mode
                        if (unitCurrentTarget.diaThisUnit != null && unitCurrentTarget.diaThisUnit.BaseAddress != IntPtr.Zero)
                            vCurrentTargetPosition = unitCurrentTarget.diaThisUnit.Position;
                        return new GilesPower(SNOPower.Monk_FistsofThunder, 11f, vNullLocation, -1, unitCurrentTarget.iThisActorACDGUID, USE_COMBAT_ONLY, FOR_INSTANT_USE);
                    }
 
becareful with this one as i know giles handles fot differently due to not being able to check what runes we use for fot, this should be the proper change but i can't gaurentee it even works as i haven't tested nor can test it atm
Code:
                    // fists of thunder as the primary, repeatable attack
                    if (!bbuffsonly && !bavoidanceemergency && !bmeincapacitated && powerhotbarabilities.contains(snopower.monk_fistsofthunder) && powermanager.cancast(snopower.monk_fistsofthunder))
                    {
                        // unsafe mode
                        if (fdistancefromtarget > 11f && unitcurrenttarget.ithishitpoints >= 0.6)
                        {
                            return new gilespower(snopower.monk_fistsofthunder, 30f, vnulllocation, -1, unitcurrenttarget.ithisactoracdguid, use_combat_only, for_instant_use);
                        }
                        // safe mode
                        if (unitcurrenttarget.diathisunit != null && unitcurrenttarget.diathisunit.baseaddress != intptr.zero)
                            vcurrenttargetposition = unitcurrenttarget.diathisunit.position;
                        return new gilespower(snopower.monk_fistsofthunder, 11f, new vector3(vcurrenttargetposition.x, vcurrenttargetposition.y, vcurrenttargetposition.z + ithisheight), icurrentworldid, -1, use_combat_only, for_instant_use);
                    }
to
Code:
                    // fists of thunder as the primary, repeatable attack
                    if (!bbuffsonly && !bavoidanceemergency && !bmeincapacitated && powerhotbarabilities.contains(snopower.monk_fistsofthunder) && powermanager.cancast(snopower.monk_fistsofthunder))
                    {
                        // unsafe mode
                        if (fdistancefromtarget > 11f && unitcurrenttarget.ithishitpoints >= 0.6)
                        {
                            return new gilespower(snopower.monk_fistsofthunder, 30f, vnulllocation, -1, unitcurrenttarget.ithisactoracdguid, use_combat_only, for_instant_use);
                        }
                        // safe mode
                        if (unitcurrenttarget.diathisunit != null && unitcurrenttarget.diathisunit.baseaddress != intptr.zero)
                            vcurrenttargetposition = unitcurrenttarget.diathisunit.position;
                        return new gilespower(snopower.monk_fistsofthunder, 11f, vnulllocation, -1, unitcurrenttarget.ithisactoracdguid, use_combat_only, for_instant_use);
                    }
thanks! Trying it
 
Doing it perfectly, Awesome!

Could you please figure out how to disable the avoidance when out of combat, cause I think this will cause some items unable to be loot.
 
@JoeC: No, the main concept behind this fix is changing the attack target of your primary resource generator/attack from a Location in world to the Current Target. Look at the difference between the 2 codes and apply the difference to any Primary Resource Generator/attack that isn't working with GilesCombatReplacer and it should fix it.

@Thunder: out of combat avoidance is already set to False default in GIles' plugin. I think what you're seeing is just the backtracking kicking in but it should loot eventually. That or you are referring to the Post Combat avoidance if so look for

Code:
            // Force avoidance for 5 seconds if out of combat
            if (bOutOfCombatAvoidance && DateTime.Now.Subtract(lastTimeInCombat).TotalSeconds < 5)
            {
                FindSafeZone(true);
                iEmergencyLoops = 0;
                return RunStatus.Running;
            }

and remove it
 
Last edited:
Back
Top