18
18
* All images, skill names and descriptions are (C) ArenaNet.
19
19
***************************************************************************/
20
20
21
- require_once ( GWBBCODE_ROOT . '/constants.inc.php ' ) ;
21
+ require_once GWBBCODE_ROOT . '/constants.inc.php ' ;
22
22
23
23
/***************************************************************************
24
24
* GLOBALS
39
39
}
40
40
$ pvp_to_pve_skill_list = load ( SKILLIDSPVP_PATH );
41
41
42
-
43
42
/***************************************************************************
44
43
* MAIN FUNCTION
45
44
***************************************************************************/
@@ -261,10 +260,9 @@ function skill_name_replace( $reg ) {
261
260
}
262
261
263
262
// Handle the difference between [[shock] and [shock]
264
- if ( $ noicon )
263
+ if ( $ noicon ) {
265
264
// PHP note: Use of double quotes replaces variables inside with their values
266
265
// PHP note: Use of single quotes shows the variable names like JS would.
267
- {
268
266
return "[skill noicon $ attr$ show] " . $ name . '[/skill] ' ;
269
267
} else {
270
268
return "[skill $ attr] " . $ name . '[/skill] ' ;
@@ -318,7 +316,6 @@ function build_replace( $reg ) {
318
316
$ secondary_display_name = 'Any ' ;
319
317
}
320
318
321
-
322
319
// Attributes
323
320
$ attributes = '' ;
324
321
foreach ( $ attr_list_raw as $ attribute_name => $ attribute_value ) {
@@ -334,7 +331,6 @@ function build_replace( $reg ) {
334
331
$ attributes = preg_replace ( '/\s* \\+\s*/ ' , ' + ' , $ attributes );
335
332
$ skills = str_replace ( '[skill ' , '[skill ' . $ att , $ skills );
336
333
337
-
338
334
// Build description
339
335
$ desc = preg_match ( '|desc= \\"([^"]+) \\"| ' , $ att , $ reg ) ? $ reg [1 ] : '' ;
340
336
$ desc = empty ( $ desc ) ? '' : ( $ desc . '<br/> ' );
@@ -579,8 +575,8 @@ function build_replace( $reg ) {
579
575
arsort ( $ attr_primary );
580
576
foreach ( $ attr_runes as $ attr => $ rune ) {
581
577
if ( $ rune < 3 ) {
582
- $ attr_primary [$ attr ] --;
583
- $ attr_runes [$ attr ] ++;
578
+ $ attr_primary [$ attr ]--;
579
+ $ attr_runes [$ attr ]++;
584
580
break ;
585
581
}
586
582
}
@@ -1557,7 +1553,7 @@ function add_strength( $desc, &$extra_desc, $attr_list, $type ) {
1557
1553
if ( isset ( $ attr_list ['Strength ' ] ) && $ attr_list ['Strength ' ] > 0 && strpos ( $ type , 'Attack ' ) !== false ) {
1558
1554
// Strength does not stack with skills with inherent armor penetration
1559
1555
if ( preg_match ( '@[Tt]his (attack|axe attack) has ([0-9]+)% armor penetration@ ' , $ desc , $ reg ) ) {
1560
- if ( $ reg [2 ] < $ attr_list ['Strength ' ] ) {
1556
+ if ( $ reg [2 ] < $ attr_list ['Strength ' ] ) {
1561
1557
$ extra_desc =
1562
1558
'This attack skill has <b> ' . $ attr_list ['Strength ' ] .
1563
1559
'</b>% armor penetration. Its inherent armor penetration is overwritten. ' ;
@@ -1906,7 +1902,7 @@ function load( $filename ) {
1906
1902
if ( !file_exists ( $ filename ) ) {
1907
1903
return false ;
1908
1904
} else {
1909
- return require ( $ filename ) ;
1905
+ return require $ filename ;
1910
1906
}
1911
1907
}
1912
1908
@@ -2336,5 +2332,3 @@ function bin_to_template( $bin ) {
2336
2332
2337
2333
return $ ret ;
2338
2334
}
2339
-
2340
- ?>
0 commit comments