From 9a802b9147221ec1f31109242be2919f53401fd3 Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 14 Sep 2013 08:13:28 +0200 Subject: Corrected operator precedence table. - [ This commit is part of a larger script engine related update ] - Operator precedence rules now closely follow those of languages such as C and derivates/related (C++, Java, PHP, etc.) - Please note that if you had custom scripts with non parenthesized expressions containing bitwise |, &, ^ operators, they may behave incorrectly now (or perhaps they were already behaving incorrectly, since the previous behavior was undocumented). - Added an up to date operator precedence/associativity table in the script documentation. - Added an operator/keyword self-test script in the npc/custom folder, in case if may be of some use for future regression-testing. --- npc/custom/breeder.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'npc/custom/breeder.txt') diff --git a/npc/custom/breeder.txt b/npc/custom/breeder.txt index 3eef8af0a..0222f5b3a 100644 --- a/npc/custom/breeder.txt +++ b/npc/custom/breeder.txt @@ -15,7 +15,7 @@ prontera,124,201,1 script Universal Rental NPC 4_F_JOB_BLACKSMITH,{ message strcharinfo(0),"You must first remove your mount."; end; } - else if ((eaclass()&EAJ_THIRDMASK==EAJ_RANGER) && !countitem(6124)) { + else if ((eaclass()&EAJ_THIRDMASK) == EAJ_RANGER && !countitem(6124)) { if (!checkfalcon() && getskilllv("HT_FALCON") && !checkoption(Option_Wug) && !checkoption(Option_Wugrider)) { if(select(" ~ Falcon: ~ Warg")==1) setfalcon; else getitem 6124,1; @@ -24,7 +24,7 @@ prontera,124,201,1 script Universal Rental NPC 4_F_JOB_BLACKSMITH,{ } else getitem 6124,1; } - else if ((eaclass()&EAJ_THIRDMASK==EAJ_MECHANIC) && !checkcart() && getskilllv("MC_PUSHCART")) { + else if ((eaclass()&EAJ_THIRDMASK) == EAJ_MECHANIC && !checkcart() && getskilllv("MC_PUSHCART")) { if (!checkmadogear() && getskilllv("NC_MADOLICENCE")) { if(select(" ~ Cart: ~ Mado")==1) setcart; else setmadogear; @@ -36,7 +36,7 @@ prontera,124,201,1 script Universal Rental NPC 4_F_JOB_BLACKSMITH,{ else if (!checkcart() && getskilllv("MC_PUSHCART")) setcart; else if (!checkfalcon() && getskilllv("HT_FALCON") && !checkoption(Option_Wug) && !checkoption(Option_Wugrider)) setfalcon; else if (!checkriding() && getskilllv("KN_RIDING")) { - if (eaclass()&EAJ_THIRDMASK==EAJ_RUNE_KNIGHT) setdragon; + if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) setdragon; else setriding; } else if (!checkmadogear() && getskilllv("NC_MADOLICENCE")) setmadogear; -- cgit v1.2.3-70-g09d2