What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Tuanha Paladin Holy PvP

Status
Not open for further replies.
o ok u should test it sometimes it doesend heal the target that need heals in 2s its verry good and rbg bg but 3s is abit harder also what u changed in 3.1 hand of salvation?
 
I played around a little with the Pulse Method and this is the result.

Code:
[20:58:18:242] Before: 26.029744008160589790731766200 ms   |  After: 3.2020398557897204421972198000 ms
[20:58:18:285] Before: 6.493035390141742124050152000 ms   |  After: 3.0401696866025821208564974000 ms
[20:58:18:329] Before: 6.5608458664228406100172115000 ms   |  After: 3.1951129791803609194371439000 ms
[20:58:18:373] Before: 6.737663506188070533103361000 ms   |  After: 2.9712654929621110786641628000 ms
[20:58:18:417] Before: 7.0519249607811183551657547000 ms   |  After: 3.2713086218833156697979795000 ms
[20:58:18:461] Before: 6.3767367775951269787625609000 ms   |  After: 4.0828469025377523889521422000 ms
[20:58:18:505] Before: 7.3501452274367020192574461000 ms   |  After: 2.9541305876652743644681854000 ms
[20:58:18:548] Before: 6.6264689079851939835337206000 ms   |  After: 3.1579265889616940077777887000 ms
[20:58:18:593] Before: 7.7373211726545869230048499000 ms   |  After: 2.9603283193683855164114113000 ms
[20:58:18:636] Before: 6.3304360760483554318925795000 ms   |  After: 3.0153787597901375130835939000 ms
[20:58:18:679] Before: 6.5028788463760951300776284000 ms   |  After: 3.0576691643525430204608998000 ms
[20:58:18:723] Before: 6.5827202136102917345227145000 ms   |  After: 3.2767772086801784509243552000 ms
[20:58:18:767] Before: 6.3176760401890089425977027000 ms   |  After: 4.1885729139437661573954069000 ms
[20:58:18:810] Before: 6.3348109454858456567936801000 ms   |  After: 2.9647031888058757413125119000 ms
[20:58:18:853] Before: 6.5382423743291411146948583000 ms   |  After: 2.9679843408839934099883373000 ms
[20:58:18:896] Before: 6.4091837259231794801123904000 ms   |  After: 3.1145424670399159441752077000 ms
[20:58:18:939] Before: 6.5258469109229188108084066000 ms   |  After: 3.0963138443837066737539552000 ms
[20:58:18:982] Before: 6.6027716985321219319860923000 ms   |  After: 2.9479328559621632125249595000 ms
[20:58:19:025] Before: 6.3384566700170875108779306000 ms   |  After: 3.09522012702433411752868000 ms
[20:58:19:069] Before: 6.6213648936414553878157699000 ms   |  After: 3.0835538085243601844590784000 ms
[20:58:19:112] Before: 6.3249674892514926507662037000 ms   |  After: 2.9242356465090911609773312000 ms
[20:58:19:156] Before: 7.3505097998898262046658712000 ms   |  After: 3.2662046075395770740800288000 ms
[20:58:19:200] Before: 6.8911485089533525900503074000 ms   |  After: 3.4455742544766762950251537000 ms
[20:58:19:244] Before: 7.4051956678584540159296288000 ms   |  After: 3.1014178587274452694719059000 ms
[20:58:19:289] Before: 6.5170971720479383610062054000 ms   |  After: 4.4448673484900684995182175000 ms
[20:58:19:336] Before: 8.395374450543741585212066300 ms   |  After: 4.5287190127086311434559792000 ms
[20:58:19:380] Before: 6.6899045148288022445996794000 ms   |  After: 3.9559756888505358668202246000 ms
[20:58:19:423] Before: 6.5838139309696642907479897000 ms   |  After: 3.0784497941806215887411277000 ms
[20:58:19:469] Before: 7.2254614484682306095760788000 ms   |  After: 3.7602002815228483024959724000 ms
[20:58:19:512] Before: 6.4099128708294278509292405000 ms   |  After: 3.0259513609307388899279204000 ms
[20:58:19:555] Before: 6.6414163785632855852791477000 ms   |  After: 3.0288679405557323731953208000 ms
[20:58:19:598] Before: 6.3964236900638329908175136000 ms   |  After: 2.9778277971183464160158137000 ms
[20:58:19:641] Before: 6.3880385236419767264237375000 ms   |  After: 2.9391831170871827627227583000 ms
[20:58:19:684] Before: 6.8138591488910252834641966000 ms   |  After: 2.9811089491964640846916392000 ms
[20:58:19:730] Before: 7.5477434970300105106238236000 ms   |  After: 3.4178667480392382039848498000 ms
[20:58:19:773] Before: 6.3767367775951269787625609000 ms   |  After: 2.9749112174933529327484133000 ms
[20:58:19:816] Before: 6.3224154820796233529072283000 ms   |  After: 2.9986084269464249842960416000 ms
[20:58:19:859] Before: 6.3515812783295581855812324000 ms   |  After: 2.9348082476496925378216577000 ms
[20:58:19:902] Before: 6.3581435824857935229328833000 ms   |  After: 2.9570471672902678477355858000 ms
[20:58:19:946] Before: 6.5338675048916508897937577000 ms   |  After: 3.3103178743676035084994599000 ms
[20:58:19:989] Before: 6.5163680271416899901893553000 ms   |  After: 2.9927752676964380177612408000 ms
[20:58:20:032] Before: 6.4110065881888004071545156000 ms   |  After: 2.9410059793528036897648836000 ms
[20:58:20:075] Before: 6.4237666240481468964493924000 ms   |  After: 2.9563180223840194769187357000 ms
[20:58:20:119] Before: 7.1401514944371712240046169000 ms   |  After: 2.9956918473214315010286412000 ms
[20:58:20:162] Before: 6.4033505666731925135775896000 ms   |  After: 2.9209544944309734923015058000 ms
[20:58:20:205] Before: 6.3373629526577149546526554000 ms   |  After: 3.1980295588053544027045443000 ms
[20:58:20:266] Before: 24.261932182961414745278695600 ms   |  After: 3.0503777152900593122923988000 ms
[20:58:20:310] Before: 7.2137951299682566765064772000 ms   |  After: 3.0857412432431052969096287000 ms
[20:58:20:353] Before: 6.3876739511888525410153124000 ms   |  After: 2.9617866091808822580451115000 ms
[20:58:20:396] Before: 6.6279271977976907251674208000 ms   |  After: 2.9508494355871566957923599000 ms

I replaced the IEnumerables with Lists.

Code:
public List<WoWPlayer> NearbyFriendlyPlayers = new List<WoWPlayer>();
public List<WoWPlayer> NearbyUnfriendlyPlayers = new List<WoWPlayer>();
public List<WoWUnit> NearbyUnfriendlyUnits = new List<WoWUnit>();
public List<WoWPlayer> FarFriendlyPlayers = new List<WoWPlayer>();
public List<WoWUnit> FarUnFriendlyUnits = new List<WoWUnit>();

//public List<WoWUnit> NearbyFriendlyUnits = new List<WoWUnit>();
//public List<WoWUnit> FarFriendlyUnit = new List<WoWUnit>();
//public List<WoWPlayer> FarUnFriendlyPlayers = new List<WoWPlayer>();

private const double NEAR_DISTANCE_SQUARED = 1600;
private const double FAR_DISTANCE_SQUARED = 10000;

public override void Pulse()
{
	////NearbyFriendlyUnits = ObjectManager.GetObjectsOfType<WoWUnit>(true, true).Where(p => ValidUnit(p) && p.DistanceSqr <= NEAR_DISTANCE_SQUARED && !IsEnemy(p)).ToList();
	////FarFriendlyUnit = ObjectManager.GetObjectsOfType<WoWUnit>(true, true).Where(p => ValidUnit(p) && p.DistanceSqr <= FAR_DISTANCE_SQUARED && !IsEnemy(p)).ToList();
	////FarUnFriendlyPlayers = ObjectManager.GetObjectsOfType<WoWPlayer>(true, false).Where(p => p.IsAlive && p.DistanceSqr <= FAR_DISTANCE_SQUARED && IsEnemy(p)).ToList();

	NearbyFriendlyPlayers.Clear();
	NearbyUnfriendlyPlayers.Clear();
	NearbyUnfriendlyUnits.Clear();
	FarFriendlyPlayers.Clear();
	FarUnFriendlyUnits.Clear();

	var units = ObjectManager.GetObjectsOfType<WoWUnit>(true, true);
	foreach (var unit in units)
	{
		var player = unit as WoWPlayer;
		if (player != null)
		{
			if (!player.IsAlive) continue;
			
			var distanceSqr = player.DistanceSqr;

			if (distanceSqr > FAR_DISTANCE_SQUARED) continue;

			var isEnemy = IsEnemy(player);

			if (isEnemy)
			{
				FarUnFriendlyUnits.Add(player);
			}
			else
			{
				FarFriendlyPlayers.Add(player);
			}

			if (distanceSqr > NEAR_DISTANCE_SQUARED) continue;

			if (isEnemy)
			{
				NearbyUnfriendlyPlayers.Add(player);
				NearbyUnfriendlyUnits.Add(player);
			}
			else
			{
				NearbyFriendlyPlayers.Add(player);
			}
		}
		else
		{
			if (!ValidUnit(unit)) continue;

			var distanceSqr = unit.DistanceSqr;

			if (distanceSqr > FAR_DISTANCE_SQUARED) continue;

			if (!IsEnemy(unit)) continue;

			FarUnFriendlyUnits.Add(unit);

			if (distanceSqr > NEAR_DISTANCE_SQUARED) continue;

			NearbyUnfriendlyUnits.Add(unit);
		}
	}
}

This is the most performant way I can think of right now.
 
Last edited:
Thank cazma12,

I try your method and it FASTER.

I like your idea in foreach (var unit in units) that really nice.

My only question is about
Code:
private const double NEAR_DISTANCE_SQUARED = 1600;
private const double FAR_DISTANCE_SQUARED = 10000;

My old method, Nearby <= 40 yard, Far <= 80 yard

What NEAR_DISTANCE_SQUARED = 1600; FAR_DISTANCE_SQUARED = 10000 exactly mean?

Thank for helping improved my CC.
 
Thank cazma12,

I try your method and it FASTER.

I like your idea in foreach (var unit in units) that really nice.

My only question is about
Code:
private const double NEAR_DISTANCE_SQUARED = 1600;
private const double FAR_DISTANCE_SQUARED = 10000;

My old method, Nearby <= 40 yard, Far <= 80 yard

What NEAR_DISTANCE_SQUARED = 1600; FAR_DISTANCE_SQUARED = 10000 exactly mean?

Thank for helping improved my CC.

Well, before it was like this
Code:
NearbyFriendlyPlayers = ObjectManager.GetObjectsOfType<WoWPlayer>(true, true).Where(p => p.IsAlive && p.DistanceSqr <= 40 * 40 && !IsEnemy(p)).ToList();
FarFriendlyPlayers = ObjectManager.GetObjectsOfType<WoWPlayer>(true, true).Where(p => p.IsAlive && p.DistanceSqr <= 100 * 100 && !IsEnemy(p)).ToList();

and I didn't know for sure if the 40 * 40 are calculated every time he he find's a player that is alive, so I did the multiplication myself(40*40 = 1600). Since those values don't change I used constants for them. Constants get evaluated at compile time, so you could also write
Code:
private const double NEAR_DISTANCE_SQUARED = 40 * 40;
private const double FAR_DISTANCE_SQUARED = 100 * 100;
without any effect on the performance(though one more multiplication at compile time(probably when honorbuddy starts, or when you select your CC)).

After all, it shouldn't make any difference, since it's just a multiplication, but as I said, I was looking for the best performance.
 
Code:
                                new Decorator(ret => Battlegrounds.IsInsideBattleground && !CastingorGCDL() && !Me.HasAura("Concentration Aura") && !Me.Mounted,
                    new Action(delegate
                    {
                        CastSpell("Concentration Aura", Me);
                    })),

                                new Decorator(ret => Battlegrounds.IsInsideBattleground && !CastingorGCDL() && !Me.HasAura("Crusader Aura") && Me.Mounted,
                    new Action(delegate
                    {
                        CastSpell("Crusader Aura", Me);
                    })),

Should do you ;)

Changed the whole CC to work in afk BGs. This is the shit :D Thanks much :)
 
Great CC.

One Suggestion:

Put up Crusader Aura when Mounted.
Crusader Aura take 1.5 sec Global Cooldown and in PvP you must switch to Concentration Aura to heal.

In PvP healing, every single second count so I don't think I'll add this.
 
Thank cazma12,

I try your method and it FASTER.

I like your idea in foreach (var unit in units) that really nice.

My only question is about
Code:
private const double NEAR_DISTANCE_SQUARED = 1600;
private const double FAR_DISTANCE_SQUARED = 10000;

My old method, Nearby <= 40 yard, Far <= 80 yard

What NEAR_DISTANCE_SQUARED = 1600; FAR_DISTANCE_SQUARED = 10000 exactly mean?

Thank for helping improved my CC.

are u fixing that S like always so with cazma code its really more faster?
 
Yeah, cazma12 method if faster,

The already fast CC is now very fast.

I just need more time testing before release.
 
Yeah, cazma12 method if faster,

The already fast CC is now very fast.

I just need more time testing before release.

i could be your tester if you want:P also it would be nice if tyou make an option for aura in some fights you need resistance aura etc but it always choose consecreation aura what is the difference between cazma12 code?
 
Just upload version 3.2

Added ability to cast Hand of Salvation to protect Avenging Wrath and Hand of Freedom dispel

I think i fixed the "sometime it not healing" bug. Test in a heated fight with 5-6 ppl need heal at the same time and it chose heal target perfectly. But I have no chance to play RBG or 3v3 so I don't really know if the problem have been finally fixed.

Need your test.

Thank you

PS: getting tired test all new version lol
 
awsome m8 going to test it in bg did u added cazma method?
Yeah I did. + trying to fix the "sometime it not healing" bug. Hope it gone.

Not extensively tested, and I need you play arena & rgbs and let me know.
 
Status
Not open for further replies.
Back
Top