diff options
author | Haru <haru@dotalux.com> | 2017-06-03 17:36:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-03 17:36:58 +0200 |
commit | 0a4abf01c3b3c41ce169752cd3d6d74766d1eee1 (patch) | |
tree | 50dcdf0d6f5d29664ff90efa280aec7fbd1fa925 /npc/other/Global_Functions.txt | |
parent | d2af893049845c4be0710f8939d09ba87485dddc (diff) | |
parent | 392c4b225dfc99401faeef882b10ce0b6d6a2209 (diff) | |
download | hercules-0a4abf01c3b3c41ce169752cd3d6d74766d1eee1.tar.gz hercules-0a4abf01c3b3c41ce169752cd3d6d74766d1eee1.tar.bz2 hercules-0a4abf01c3b3c41ce169752cd3d6d74766d1eee1.tar.xz hercules-0a4abf01c3b3c41ce169752cd3d6d74766d1eee1.zip |
Merge pull request #1739 from mekolat/pow2
implementation of the exponentiation operator
Diffstat (limited to 'npc/other/Global_Functions.txt')
-rw-r--r-- | npc/other/Global_Functions.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt index 544e3a672..bc19ff048 100644 --- a/npc/other/Global_Functions.txt +++ b/npc/other/Global_Functions.txt @@ -203,11 +203,11 @@ function script F_SaveQuestSkills { ADV_QSK = 0; ADV_QSK2 = 0; //1st classes quest skills for (.@i = 0; .@i < 14; ++.@i) { - if(getskilllv(144+.@i)) ADV_QSK |= pow(2,.@i); + if(getskilllv(144+.@i)) ADV_QSK |= (2 ** .@i); } //2nd classes quest skills for (.@i = 0; .@i < 19; ++.@i) { - if(getskilllv(1001+.@i)) ADV_QSK2 |= pow(2,.@i); + if(getskilllv(1001+.@i)) ADV_QSK2 |= (2 ** .@i); } return; } @@ -217,7 +217,7 @@ function script F_SaveQuestSkills { function script F_Load1Skills { //1st classes quest skills for(.@i = 0; .@i < 14; ++.@i) { - if(ADV_QSK|pow(2,.@i) == ADV_QSK) skill 144+.@i,1,0; + if(ADV_QSK|(2 ** .@i) == ADV_QSK) skill 144+.@i,1,0; } ADV_QSK = 0; //Clear var return; @@ -228,7 +228,7 @@ function script F_Load1Skills { function script F_Load2Skills { //2nd classes quest skills for (.@i = 0; .@i < 19; ++.@i) { - if(ADV_QSK2|pow(2,.@i) == ADV_QSK2) skill 1001+.@i,1,0; + if(ADV_QSK2|(2 ** .@i) == ADV_QSK2) skill 1001+.@i,1,0; } ADV_QSK2 = 0; //Clear var return; |