I understand what your saying about spell IDs, but how do you go in reverse? Say I want to know what spell is ID 1459?
Sometimes google works, but sometimes not. You can't just look at the code and know what's there unless it's commented, and it wasn't.
Code-wise, I really don't know what I'm doing. I'm just hacking together bits from the code that's already there, and seeing if it works. As I recall, one class had offensive and defensive checks at one point, and I just copied that format.
- Registered User
Member for 11 years
Last active Tue, Sep, 30 2008 14:06:02
- 0 Followers
- 47 Total Posts
- 0 Thanks
Aug 14, 2008_ForgeUser1199152 posted a message on [Pitbull RangeCheck] - Still broken, can't fix it myself anymorePosted in: Unit Frames
Aug 13, 2008_ForgeUser1199152 posted a message on [Pitbull RangeCheck] - Still broken, can't fix it myself anymoreOh, I feel I should mention that this will only add offensive/defensive range checks, it won't fix the fact that un-flagged enemy players and some NPCs will always evaluate as out of range. This is especially distracting, but mostly on the un-flagged players.Posted in: Unit Frames
The RangeCheck function USED to display all in-range things as, well, in-range (after fixing it, that is) I don't know exactly how the function has changed, but now only things you can cast on are treated as in-range. I don't know how to fix this.
It seems RangeCheck has become more of a "can I affect this target" as opposed to a "range to target". Ugg.
Aug 12, 2008_ForgeUser1199152 posted a message on [Pitbull RangeCheck] - Still broken, can't fix it myself anymoreOk, I think I managed to fix it once again, though it was a real pain to look up all the spell IDsPosted in: Unit Frames
The basic goal here is to make the offensive range at the range of your speced offensive spell, while the defensive range to be that of 40 yards. This ensures that you are near healers and such. Also, this should work for characters level 19 and above to accomidate twinks. (Not sure if speced range is calculated, but if not, there's nothing I can do about it.)
Below is a segment of code you can use to replace the default. I have removed the short and long range thresholds and just went with the long one, as I just found it to make the situation more confusing. Some may argue that there is benefit to this, but strangely only Locks and Mages have this built in. If the argument is that it is indeed usefull, then just about every class should get it, no?
There are a couple problems for Pallys, Hunters, and Locks.
Pallies have little offence greater than 10 yards, and keeping targets faded until 10 yards seems like a poor choice. Exorcism may be a possibility, but that appears at level 20 and not sure if the range check will work against all enemies or just undead and demons.
Locks have no deffnsive spell at 40 yards, so the 30 yard buffs will have to do.
Not sure what to do about Hunters as they have no suitable defensive spells.
Also, it is necessary to manualy swap out some spells to use your speced range.
For instance, if you're a forst mage, fireball is an innappropriate range check, and vice versa.
Arcane - Arcane Missiles 5143
Fire - Fireball 133
Frost - Frostbolt 116
Affliction - Corruption 172
Destruction - Shadow Bolt 686
I'm not currently sure how Rogues and Warriors are handled.
It's not fully tested, (seems to work on my mage) but for what it's worth here is the code to use.
if class == "PRIEST" then distanceCheckFunction = function(unit) return IsSpellInRange(GetSpellInfo(2050), unit) == 1 or IsSpellInRange(GetSpellInfo(589), unit) == 1 end elseif class == "DRUID" then distanceCheckFunction = function(unit) return IsSpellInRange(GetSpellInfo(5176), unit) == 1 or IsSpellInRange(GetSpellInfo(5185), unit) == 1 end elseif class == "PALADIN" then distanceCheckFunction = function(unit) return IsSpellInRange(GetSpellInfo(879), unit) == 1 or IsSpellInRange(GetSpellInfo(635), unit) == 1 end elseif class == "SHAMAN" then distanceCheckFunction = function(unit) return IsSpellInRange(GetSpellInfo(403), unit) == 1 or IsSpellInRange(GetSpellInfo(331), unit) == 1 end elseif class == "WARLOCK" then distanceCheckFunction = function(unit) return IsSpellInRange(GetSpellInfo(172), unit) == 1 or IsSpellInRange(GetSpellInfo(5697), unit) == 1 end elseif class == "MAGE" then distanceCheckFunction = function(unit) return IsSpellInRange(GetSpellInfo(116), unit) == 1 or IsSpellInRange(GetSpellInfo(1459), unit) == 1 end elseif class == "HUNTER" then distanceCheckFunction = function(unit) return IsSpellInRange(UnitIsUnit(unit, "pet") == 1 and GetSpellInfo(136) or GetSpellInfo(75), unit) == 1 or CheckInteractDistance(unit, 4) end
Aug 12, 2008I've noticed that the RangeCheck for Pitbull is still broken. Strangely, changes seem to be made to that part of the code now and then, but the really big issues seem to never get fixed.Posted in: Unit Frames
I did a search, and have noticed that other users have also pointed out these problems, and every post I checked had gotten no answers, or even any acknowledgment. Why is this?
Basically, here are the main problems:
1) Most classes only get offensive OR defensive range checks - but not both
2) The Mage class has two offensive ranges and they don't seem to match my spells.
3) The Priest class uses the wrong heal spell to check - it's not available until level 20
4) Whoever designed it seems to have forgotten that RangeCheck is very useful for situational awareness (who is close to you and such - friend and foe alike) but without range check working for both friend and foe it becomes useless for this.
Instead, there seems to be an attempt to make range check be sensitive to multiple spells, and it doesn't work as well for this. Witness the short-range and long-range threshold, despite the face that most classes have more than just two spell ranges.
So on my druid, all enemies appear in range, and all non-healable NPCs appear out of range. It uses a heal spell to check and has no offensive spell. So basically, I have no idea how close anyone is. Please don't assume I'm resto.
On my mage, when the long-range threshold triggers i'm still not in range for frostbolt. Huh? Then at some point a short-range threshold triggers - not sure what spell this short range is keying off of. But having three fade vales is making situational awareness more muddled, not less.
If I go into a BG, I want to know what friendlies are in range on the raid frames, and if any raid members are targeting something, I also want to know if those targets are near or far from me. This makes it easy to focus on the players that are relevant to my immediate tactical situation.
The default setup makes this impossible for some classes.
I used to be able to fix all the problems by changing the code myself. But now it no longer uses spell names and refers to them by a number, and won't accept my changes anymore. Why is the code getting more obfuscated?
So, here are four basic questions:
1) Why is RangeCheck set up so silly? Is there some rationale behind this?
2) Wouldn't it be simpler and clearer to make friendly and enemy units have a single threshold at your max primary spell range? Or simply at 30 yards if no spells? This way it doesn't matter if your offensive or defensive - you know what friends and enemies are in your immediate area, and ranged classes know where their exact max range is.
3) On the harder end, why not give the user the option of picking any particular spell to be used for a range check? (e.g. x-pearl unit frames) maybe seperate picks for offensive and defensives spells, or even multiple spell options for your short and long thresholds.
May 19, 2008I'm using the fullbar add-on to pitbull.Posted in: Unit Frames
The problem I'm getting is that sometimes fullbar is darkened (ONLY the fullbar itself, not the rest of the frame) as if the unit was out-of-range.
This doesn't not occur upon login, but rather, if I reload the UI for some reason. Then it will remain darker until I re-log.
May 10, 2008In the Raid frames, sometimes buffs don't display properly.Posted in: Unit Frames
I'll rebuff myself, and the timer spiral doesn't refresh.
I'll buff someone, and sometimes the buff will not appear.
Once, the debuff border highlite didn't dissapear when the debuff was gone. (Showed me as cursed, while not cursed)
May 10, 2008Ok, the status indicator is not functioning properly for the player.Posted in: Unit Frames
Not specifically the player frame, but rather, any frame where the player appears.
At some point while playing BGs, it suddenly decides to list me as "Offline" until I reload the UI.
I think this may occur when zoning out, but I'm not positive.
May 9, 2008I've been updating all my custom text strings from the older DogTag spec but the color tag is still eluding me.Posted in: Unit Frames
What used to work:
Made HP a dark gray.
According to the DogTag 3.0 wiki this should be the equivalent:
But this doesn't work, nor does the original.
What is wrong?
May 9, 2008Ok, the weird graphic artifacts are gone now, and the party and raid frames seem to work.Posted in: Unit Frames
Not sure what changed.
However, I can't get the cast bar text to work.
I'm using the default CastName and CastTime scripts supplied with the program.
CastName and CastTime display nothing on Player, Focus, Target frames.
But, CastName seems to work on TargetsTarget and FocusTarget, however CastTime displays the time to about 10 decimal places despite having a Round(1) function in the script.
I can't see any differences between the Target and TargetsTarget frame, so I'm not sure what the problem is.
May 9, 2008Ok, I haven't played WoW in a few months, and today I spent a lot of time updating all the mods and everything.Posted in: Unit Frames
I guess I missed some major changes to Pitbull and DogTags, because everything was completely messed up.
I re-worked my many custom text strings, and got them working again.
But right now my biggest problem is that things become completely borked when I join a party or raid.
I get all kinds of errors, and graphic artifacts are left all over the place. The frames come and go, sometimes they are invisible, sometimes the just show where the frame box is - but with nothing in it. Oddly colored bars are left on-screen after de-selecting targets. RangeCheck seems to be malfunctioning when in a party or raid, but seems to work fine when solo.
I also notice that RangeCheck is still weird in that either enemies or friendlies are always evaluated as in range, depending on class.
For instance as a Druid, all friendlies are ranged for Healing Touch, but enemies always look in range. This is silly, but at least it's user fixable.
Also, Priests still use Lesser Heal to evaluate range, but this is a level 20 spell. This causes problems for Priests who are not 20. Use Flash Heal instead.
Feb 19, 2008Posted in: Unit FramesQuote from Somaru »
I was wrong! That does work, the problem is that pressing the modifier key doesn't cause the frame to update so it doesn't show up unless the frame is being updated for some reason and even then it is a little laggy. thanks!
There are some other strings that don't update properly, like the creature type tag. Notably for druids and shammys that can change type.
The interesting part about this is that this varies depending on the particular frame.
Creature type updates if it is in the focus frame, but not if it is the target frame.
I wonder if this is true for the key presses too?
Out of curiosity, why would you want to display what keys you are pressing?
Feb 19, 2008I apologize if this has been addressed already, but I'm having an issue where the frame doesn't seem to update when switching targets under some circumstances.Posted in: Unit Frames
For instance, I'm attacking a target and for some reason or another I have to switch targets. When I switch back, the class color and health is incorrect. I believe it takes on the properties of the target I just switched from. This seems to persist until I actually strike the target, and then it becomes normal again.
Example: I'm attacking a pally who gets low on health. He bubbles. So I switch targets and start attacking a hunter while waiting for the bubble to expire. The bubble expires, and I go back to attacking the pally. However the frame is colored as if he were a hunter, and shows the percent of health that the hunter had, until I hit the pally, where it changes back to the correct color and percentage.
Nov 13, 2007Meh, I keep finding messiness/redundancy in the code. It probably had something to do with making the originals at 5am. Here are some updated versions.Posted in: Unit Frames
They do the same thing (with a darker grey) but the code is cleaner.
[IsFriend?Status:Color(333333):SureHP?PercentHP:IsGreater(89)?MaxHP!PercentHP:IsLess(34)?CurHP:Red:append( )!SmartMissingHP!PercentHP:Percent][PercentHP:IsLess(34)?MissingHP:VeryShort:Prepend( -):Color(333333)] [IsEnemy?Status:SureHP?CurHP!PercentHP:Percent]
[Status:Trunc(5):Color(333333):PercentHP:IsGreater(89)?~MaxHP!PercentHP:IsLess(34)?CurHP:Red:Append( )!SmartMissingHP][PercentHP:IsLess(34)?MissingHP:VeryShort:Prepend( -):Color(333333)]
Player, just for kicks:
[Status:Color(333333):PercentHP:IsLess(34)?CurHP:Red:Append( )!SmartMissingHP][PercentHP:IsLess(34)?MissingHP:VeryShort:Prepend( -):Color(333333)]
I keep the background colors of my health bars at black, so the dark gray "Color(333333)" may or may not show up well if your color is different. Adjust as necessary.
Disclaimer: Not tested 100%
- To post a comment, please login or register a new account.