View Single Post
08-19-08, 09:57 AM   #17
Shirik
Blasphemer!
Premium Member
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2007
Posts: 818
Originally Posted by kerrang View Post
and then nil is returned if you have a valid UNIT and SPELL but the API 'just knows' that the spell has no range - despite there not seeming to be a way to tell this from the API itself...
Once again, you fail to realize that your lack of knowledge of the API is the problem, not the API itself.

You can determine this from the SpellHasRange() and SpellCanTargetUnit() functions easily. If you wanted to write your own IsSpellInRange() function then you could certainly modify it to take these into account.

Originally Posted by kerrang View Post
I still think that is neither a logical nor a meaningful return value for an API to give in those circumstances...
And I think it's perfectly logical. And so does Blizzard. Fortunately, your opinion is irrelevant in this situation, because the API isn't changing.

Originally Posted by kerrang View Post
It's bad coding and it's a pet hate of mine - it's a sign you're either lazy or lack the logical rigor needed to define an API properly - you leave 'assumptions' in you code because you 'know' about them and it's not a problem to you...
No, it's a sign that you're being lazy and not finding out what the API actually does. Again, there is no formal documentation on this code. YOUR assumptions are irrelevant. Blizzard makes the API and gets to decide what it does. Not you. Therefore, you aren't the one who gets to decide what is "known" or "assumed" by Blizzard.

On that note, I think that this thread has served its purpose (actually, I think this thread has no purpose whatsoever, but its nothingness has been fufilled). You are going nowhere with your arguments except bashing Blizzard because something didn't do what you expect it to do, and unfortunately you fail to realize that it's not "wrong" just because you say it is. As such it's time to end this thread.

-- Shirik
__________________
たしかにひとつのじだいがおわるのお
ぼくはこのめでみたよ
だけどつぎがじぶんおばんだってことわ
しりたくなかったんだ
It's my turn next.

Shakespeare liked regexes too!
/(bb|[^b]{2})/