These are chat archives for arenanet/api-cdi

1st
Jun 2017
Darqam
@Darqam
Jun 01 2017 03:13
http://prntscr.com/fehxbz the wiki logs amuse me sometimes
Eearslya Sleiarion
@Eearslya
Jun 01 2017 06:16
more commits to gw2oracle after like a..3 week drought \o/
Michael Dougall
@madou
Jun 01 2017 07:36
nice link?
Eearslya Sleiarion
@Eearslya
Jun 01 2017 13:53
@madou well there's not exactly much to see on the site itself but https://github.com/Eearslya/GW2Oracle
Darqam
@Darqam
Jun 01 2017 15:47
so quick question, can an SQL query be 'dangerous' if it contains ONLY numbers?
that's poor wording
can an SQL query be dangerous if it takes in user input that is guaranteed to be ONLY numbers
Nabrok
@Nabrok
Jun 01 2017 15:55
If you're positive it's only numbers or has otherwise been escaped you're ok.
In general it's best to use placeholders if you can at all.
Darqam
@Darqam
Jun 01 2017 15:59
yeah, basically I'm in the scenario where I need to use an id to find stuff in my database. It first passes through a if(!ctype_digit($search)) so it should be only numbers. I'll see if I can find an additional way to keep it safe.
Eearslya Sleiarion
@Eearslya
Jun 01 2017 15:59
I can't see any injection happening with numbers
that said, it is always good to do it anyway
It protects you from yourself
Say you go back and refactor the search to allow chat codes, but forget about the SQL query
Boom, injection point
Nabrok
@Nabrok
Jun 01 2017 16:00
Whatever library you're using should support placeholders, so something like "... WHERE id = ?"
and then the library will handle escaping anything
The only time I've come across where you can't use that is with a dynamically generated IN clause from an array.
Darqam
@Darqam
Jun 01 2017 16:01
I'll take a look for some extra safety, thanks
Nabrok
@Nabrok
Jun 01 2017 16:01
In that case you'd use the libraries escape function to map the array values first and then join it with a comma before inserting it into the query string.
Eearslya Sleiarion
@Eearslya
Jun 01 2017 16:02
mysql_real_escape_string
darthmaim
@darthmaim
Jun 01 2017 16:02
prepared statements
don't trust any library, let the db handle it
Darqam
@Darqam
Jun 01 2017 16:04
yeah I through the mysql escape string everywhere, but given it's my first experience with it, I want to be completely and entirely safe
Oh I see, prepared statements basically 'test' the query before actually running it?
Eearslya Sleiarion
@Eearslya
Jun 01 2017 16:06
Never trust absolutely anything a user can generate. Cookies, form fields, URLs...
darthmaim
@darthmaim
Jun 01 2017 16:07
no there is no testing
Eearslya Sleiarion
@Eearslya
Jun 01 2017 16:07
prepared statements use ? and the DB will know whatever replaces that ? is not part of the statement
Darqam
@Darqam
Jun 01 2017 16:07
OOOooooh
darthmaim
@darthmaim
Jun 01 2017 16:07
you basically prepare a statement with ? placeholders
Darqam
@Darqam
Jun 01 2017 16:07
thanks, I'll keep looking into it
darthmaim
@darthmaim
Jun 01 2017 16:07
then you pass the parameters to use to the db, then you execute it
no escaping needed
the db handles everything for you
Nabrok
@Nabrok
Jun 01 2017 16:09
With that, 99.9% of your queries shouldn't have any string interpolation.
Eearslya Sleiarion
@Eearslya
Jun 01 2017 16:10
prepared statements are also super efficient for similar, repeated queries
i.e. a bunch of inserts in a row
darthmaim
@darthmaim
Jun 01 2017 16:11
yep, you can prepare them once (the db optimizes it here and creates the execution plan), and then execute it multiple times
Darqam
@Darqam
Jun 01 2017 16:12
hum ok; I'll make sure I understand it well enough and then work on implementing it when I can
Nabrok
@Nabrok
Jun 01 2017 16:12
It's fairly straightforward, you prepare the query with ? placeholders, and then when you execute it you provide the values for the placeholders.
There's options to either save the prepared statement to run multiple times, or to do it in one shot.
Darqam
@Darqam
Jun 01 2017 16:14
I think I get it, but until a throw a few attempts at it myself I won't be willing to say I understand it.

The Skirmish reward track awards WvW-specific items such as improvements, tactics, siege, tricks, and traps, as well as other rewards. It also grants Tournament Tickets—now called Skirmish Claim Tickets—which will allow you to purchase both exotic and ascended Tier 2 WvW weapons, armor, and more from the Skirmish Supervisor vendor.

:point_up: 31 mei 2017 18:42 called it

Darqam
@Darqam
Jun 01 2017 16:26
WvW backpiece \o/
time for me to go back into wvw
Archomeda
@Archomeda
Jun 01 2017 16:26
more work for @lye to expose wvw skirmish reward track progress
Darqam
@Darqam
Jun 01 2017 16:26
what doesn't give lye more work?
Archomeda
@Archomeda
Jun 01 2017 16:27
true

We also wanted to improve how WvW info is displayed in-game, so we have added a new tab along the top of the Match Overview UI, called Match History. The Match History tab will display the war score, victory points, and kill/death statistics throughout the match, making it easier to track how well your world is doing.

the API was first D:

also, are these tier 2 wvw weapons and armor new? or do they already exist?
Darqam
@Darqam
Jun 01 2017 16:31
I know there's been new wvw armor in the dat for months
always assumed it was for a new tournament
well, they basically confirmed some time ago that there won't be any tournaments anymore, at least not in the format from 2013 and 2014
it wasn't healthy for the game mode
so, i welcome this reward update

In addition to Tier 2 armor, you’ll be able to earn Tier 3 Mistforged Triumphant Hero’s armor in this release. Tier 3 armor is the ultimate prestigious WvW armor, and it will require you to have earned both Tier 1 and Tier 2 to acquire. Each piece requires a very high WvW rank to purchase.

though, what is "very high"?

Darqam
@Darqam
Jun 01 2017 16:36
given it starts at rank 50...
I imagine not amazingly high, but then if you compare the timesinc from raids... who knows
smiley
@codemasher
Jun 01 2017 16:36
@Darqam if it's only numbers, you could also just use intval or cast the values as int
(or float)
Darqam
@Darqam
Jun 01 2017 16:37
Thanks
Archomeda
@Archomeda
Jun 01 2017 16:37
https://gw2efficiency.com/account/statistics/statistics.wvwRank doesn't give much insight either... if we can only filter people with rank <50
well actually...
10-20% of players sounds like a good start for this?
with 4000h+
2k rank maybe?
seems a little bit excessive, i think it's 1.5k rank max

oh i just noticed:

And of course, as with all legendary backpacks, Warbringer has an awesome glider to go along with it.

tfw wvw doesn't have gliders

Nabrok
@Nabrok
Jun 01 2017 16:40
If you use the party view in a squad, you can see there's still a lot of people under 2k.
Obviously this means they're introducing gliding to wvw maps!
With combat skills!
Archomeda
@Archomeda
Jun 01 2017 16:41
i have gained 50 ranks in the past 9 months
heh
Eearslya Sleiarion
@Eearslya
Jun 01 2017 16:42
didn't quaggan bot have a wvw rank feature
Archomeda
@Archomeda
Jun 01 2017 16:42
!rank
Quaggan BooOOoot
@QuagganBooOOoot
Jun 01 2017 16:42
Oooo, @Archomeda. Your WvW rank is Silver Assaulter (695).
Eearslya Sleiarion
@Eearslya
Jun 01 2017 16:42
!rank
Quaggan BooOOoot
@QuagganBooOOoot
Jun 01 2017 16:42
Oooo, @Eearslya. Your WvW rank is Silver Raider (749).
Eearslya Sleiarion
@Eearslya
Jun 01 2017 16:42
yiss
Archomeda
@Archomeda
Jun 01 2017 16:42
give me another 9 months before i catch up
Nabrok
@Nabrok
Jun 01 2017 16:42
How do I add a key for that?
Archomeda
@Archomeda
Jun 01 2017 16:43
!register <key> maybe?
can't remember
@darthmaim
Nabrok
@Nabrok
Jun 01 2017 16:43
!rank
Quaggan BooOOoot
@QuagganBooOOoot
Jun 01 2017 16:43
Noooo @Nabrok! Quaggan doesn't have your API key yet. Use !auth <API-Key> to link your API key.
Oah! Quaggan couldn't connect to the GW2 Api (Error: Status 403).
Nabrok
@Nabrok
Jun 01 2017 16:43
there we go
Archomeda
@Archomeda
Jun 01 2017 16:43
well then :D
windwarrior
@windwarrior
Jun 01 2017 16:45
I have one question tho
Nabrok
@Nabrok
Jun 01 2017 16:45
!rank
windwarrior
@windwarrior
Jun 01 2017 16:45
how are people gonna match that backpiece with the blue haired pastel pink charrs that are WvW players
Quaggan BooOOoot
@QuagganBooOOoot
Jun 01 2017 16:45
Oooo, @Nabrok. Your WvW rank is Gold Champion (2432).
Eearslya Sleiarion
@Eearslya
Jun 01 2017 16:45
pfft, charrs
asura master race
https://i.imgur.com/9r5LwNO.png it'll match just fine
windwarrior
@windwarrior
Jun 01 2017 16:46
you are not WvW meta then
Eearslya Sleiarion
@Eearslya
Jun 01 2017 16:47
if charr is meta then the meta is wrong
windwarrior
@windwarrior
Jun 01 2017 16:47
maybe this is EU, but I see so many super sayan haired charrs in WvW
when I need my gift of battle
Nabrok
@Nabrok
Jun 01 2017 16:48
Commanders are going asura because of all the pin sniping.
windwarrior
@windwarrior
Jun 01 2017 16:49
I am scared, I still have tournament tickets
do I hold on to them
or do I spend them
Archomeda
@Archomeda
Jun 01 2017 16:50
commanders are going charr because otherwise they can't see themselves and/or others are complaining they can't see the commander
at least in EU wvw charr are very common
i haven't seen asura commanders in ages
only charr or norn
Darqam
@Darqam
Jun 01 2017 16:52
!rank
Quaggan BooOOoot
@QuagganBooOOoot
Jun 01 2017 16:52
Oooo, @Darqam. Your WvW rank is Bronze Veteran (535).
Darqam
@Darqam
Jun 01 2017 16:52
rip me
@Archomeda could you open an issue for that? I actually whiffed and totally forgot about it.
Archomeda
@Archomeda
Jun 01 2017 16:53
wait, the wvw skirmish reward track progress?
is the pvp season track progress exposed actually?
I tho-- maybe not?
I don't remember
Archomeda
@Archomeda
Jun 01 2017 16:56
i only see /v2/pvp/standings
but that's your pvp season rank
Nabrok
@Nabrok
Jun 01 2017 16:57
I think it is
I thought I did something with it on my old guild website.
smiley
@codemasher
Jun 01 2017 16:58
@Darqam i don't know what language you're working in, but this might help a bit https://github.com/chillerlan/database/tree/master/src/Drivers (just pushed the most recent WIP)
Archomeda
@Archomeda
Jun 01 2017 16:58
ah, the official name is PvP League Rewards
then we also have the PvP Reward Track
and we currently have the WvW Reward Track too
and now additionally we'll get WvW Skirmish Reward Track
argh, all these names
#279 is for PvP Reward Track progress
i don't see anything related to the others
Werdes
@werdes
Jun 01 2017 17:08
That super saiyan charr meta (with zephyrite backpack or guild flag) is most likely an EU thing. TA started all those..
@Archomeda yeah the names could be better.
hmm, that blog post
the image under the "tier 3 armor" is actually a picture of warbringer, not the armor
kind of tempting to just have /v2/rewardtracks, hmm.
Maybe should make them separate.
Archomeda
@Archomeda
Jun 01 2017 18:26
well, we have /v2/pvp and /v2/wvw endpoints
yeah
but map reward tracks are the same thing
Archomeda
@Archomeda
Jun 01 2017 18:27
oh right
and there's no /v2/pve
could have /v2/map/tracks I guess
Archomeda
@Archomeda
Jun 01 2017 18:28
possibly
probably cleaner to have them separate, just in case the data diverges
Darqam
@Darqam
Jun 01 2017 18:33
well the reward tracks already aren't a 100% match
pvp and wvw give their unique tokens for example
and I think here and there the loot boxes are different
fair.
ChieftainAlex
@ChieftainAlex
Jun 01 2017 19:42
@lye pve map tracks would be neat, anything that doesn't involve me consuming 40 pact scout consumables in every map each week for eight weeks is good.
yeah :<
I need to look at how map rewards work
I don't recall if they use the same reward track system
the normal reward track stuff doesn't have a way to express rotating rewards
so each map might have a list of reward tracks that it rotates; need to take another look at it
I'll figure something out