Compare commits
492
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5142a87b60 | ||
|
|
9b7568b576 | ||
|
|
7bec57e77d | ||
|
|
28bccdd3d8 | ||
|
|
cca342e99d | ||
|
|
e41c79e6d7 | ||
|
|
7dfb0da862 | ||
|
|
c2d4e0c1dd | ||
|
|
512621981a | ||
|
|
81c9a84edf | ||
|
|
c099444464 | ||
|
|
94afb7f40f | ||
|
|
d43f87b295 | ||
|
|
d5b787430e | ||
|
|
3af6cab92e | ||
|
|
106e7be1ac | ||
|
|
0d8f1f7252 | ||
|
|
330344f55b | ||
|
|
7a5f138c78 | ||
|
|
6a9ca26d81 | ||
|
|
32c28e8f54 | ||
|
|
99dcfbb4a2 | ||
|
|
16dffee0e3 | ||
|
|
a5cb785587 | ||
|
|
7bcd75719c | ||
|
|
d96993576a | ||
|
|
17afaf6720 | ||
|
|
3e9f38c857 | ||
|
|
a36dbc6539 | ||
|
|
7d3ff49796 | ||
|
|
d2ac62e320 | ||
|
|
4b83311a89 | ||
|
|
7fd55bb6f3 | ||
|
|
a40025bca1 | ||
|
|
d58ba67cc2 | ||
|
|
3d4a9e18d0 | ||
|
|
7e5fe56bc0 | ||
|
|
4cf3b0929f | ||
|
|
98a6d268d0 | ||
|
|
a9a4b36121 | ||
|
|
75a4a69036 | ||
|
|
982a35bb4f | ||
|
|
27c3fe515c | ||
|
|
29d82d9e81 | ||
|
|
81427e6911 | ||
|
|
296a7012b0 | ||
|
|
b9b88449ed | ||
|
|
6585248eb8 | ||
|
|
feebddd495 | ||
|
|
3e510a487c | ||
|
|
5277fbbe56 | ||
|
|
1a64272801 | ||
|
|
fc7b7eb915 | ||
|
|
1e3249561c | ||
|
|
1ac76ae4d3 | ||
|
|
56cea25e06 | ||
|
|
2c33ff5a2a | ||
|
|
3cdf848e33 | ||
|
|
7ed291860f | ||
|
|
e3e8fae90c | ||
|
|
0a2e487a76 | ||
|
|
6018be3c72 | ||
|
|
486141ce0b | ||
|
|
cc96d68974 | ||
|
|
6740896244 | ||
|
|
811eb42e47 | ||
|
|
1633b5d0dd | ||
|
|
808eb989ea | ||
|
|
6879a8dccf | ||
|
|
8cf17e3abd | ||
|
|
0711c8f05b | ||
|
|
b0ad37dbf8 | ||
|
|
2c3d5a3fcf | ||
|
|
78e8aab808 | ||
|
|
2bc033170f | ||
|
|
556eb30ab0 | ||
|
|
4f74d43081 | ||
|
|
80c4dcc082 | ||
|
|
9cd30d5299 | ||
|
|
b148ea5f6e | ||
|
|
3612232788 | ||
|
|
99acc4736f | ||
|
|
fac426a09c | ||
|
|
c75a153c92 | ||
|
|
ce5611aafd | ||
|
|
9e6b50d264 | ||
|
|
f5801e0837 | ||
|
|
79864713b5 | ||
|
|
42daf1c049 | ||
|
|
1784ac1e5d | ||
|
|
137a547d3d | ||
|
|
d9738c39a5 | ||
|
|
45bd3159ce | ||
|
|
acd1246a87 | ||
|
|
1e64108b56 | ||
|
|
1481cc7ac0 | ||
|
|
c0b75564c2 | ||
|
|
4958165603 | ||
|
|
35258f6ab5 | ||
|
|
3913201eed | ||
|
|
37bedcf919 | ||
|
|
11e40d7e57 | ||
|
|
0cdd8a75dc | ||
|
|
2e45d8548f | ||
|
|
61f8c210ae | ||
|
|
acc5c04810 | ||
|
|
8030ecb800 | ||
|
|
12b350580a | ||
|
|
78dd409fa8 | ||
|
|
0727175cb2 | ||
|
|
7c3a3fb84c | ||
|
|
5781737afc | ||
|
|
75e1dddd08 | ||
|
|
1e78442910 | ||
|
|
de6158842d | ||
|
|
0c07586927 | ||
|
|
cfca585ab5 | ||
|
|
db2a168229 | ||
|
|
040121f7cd | ||
|
|
570a22f0cb | ||
|
|
1ebc5d5e00 | ||
|
|
4b1d7ea718 | ||
|
|
402f608f7a | ||
|
|
b9b6b37505 | ||
|
|
3be5236ba8 | ||
|
|
4cbe9fc236 | ||
|
|
6ac05d3db2 | ||
|
|
2531041d7c | ||
|
|
77e5866351 | ||
|
|
22e80e1ef4 | ||
|
|
a86e07a89f | ||
|
|
5f277c3cff | ||
|
|
ef234beeb7 | ||
|
|
69c5c5da92 | ||
|
|
7ed5431c99 | ||
|
|
627255ce3d | ||
|
|
0d1c9e8b8b | ||
|
|
5fa79fbac6 | ||
|
|
45b4ae9e3e | ||
|
|
f410fc5482 | ||
|
|
92db9e1086 | ||
|
|
f0875a6093 | ||
|
|
0c50cd9536 | ||
|
|
3c1280e546 | ||
|
|
aece43a3bc | ||
|
|
1417760f5b | ||
|
|
2947753c3c | ||
|
|
98664a8983 | ||
|
|
5e5203aa36 | ||
|
|
a41288ac78 | ||
|
|
bdb9a12bd5 | ||
|
|
458bdbd72d | ||
|
|
65b10f72fa | ||
|
|
b50110f7b0 | ||
|
|
1e09930bdb | ||
|
|
614fb9a5e9 | ||
|
|
17b4b993e2 | ||
|
|
fa45e9556f | ||
|
|
deab274ba2 | ||
|
|
82cefce424 | ||
|
|
0fd6dfb648 | ||
|
|
a5ccba2e27 | ||
|
|
e09bd9aae0 | ||
|
|
74b1994f5e | ||
|
|
dfa646d828 | ||
|
|
668b61b734 | ||
|
|
20c032fa4d | ||
|
|
62235497ad | ||
|
|
983dd46870 | ||
|
|
4da089e9b8 | ||
|
|
aaff28d720 | ||
|
|
93befc0887 | ||
|
|
d304d0706c | ||
|
|
eff44c334d | ||
|
|
e082a0b49c | ||
|
|
42186fd2a3 | ||
|
|
769b84b9da | ||
|
|
3842cce1ab | ||
|
|
f4fc7fc75b | ||
|
|
f89ce2ee15 | ||
|
|
ecd7215003 | ||
|
|
585f984554 | ||
|
|
3d96e6504e | ||
|
|
f0efd0c477 | ||
|
|
bc50408c45 | ||
|
|
7125e9b360 | ||
|
|
2fb7260077 | ||
|
|
d3ef0c828d | ||
|
|
bedf3761bd | ||
|
|
b3b9867624 | ||
|
|
d0f1a73a9f | ||
|
|
4bcf00fd6f | ||
|
|
5f7465194e | ||
|
|
f0c6584818 | ||
|
|
a61b8d193b | ||
|
|
c863cd5f54 | ||
|
|
c01c69db83 | ||
|
|
001a89ccf0 | ||
|
|
c2633d0d9f | ||
|
|
5957ff6f7b | ||
|
|
afc80c0e03 | ||
|
|
740949812c | ||
|
|
ee0fc67984 | ||
|
|
434a9d5fda | ||
|
|
ec6ec33c74 | ||
|
|
71c240e347 | ||
|
|
eaf9894f99 | ||
|
|
b68aa3b289 | ||
|
|
345e729d1a | ||
|
|
2e8b4c97ac | ||
|
|
01d5e37a81 | ||
|
|
67dc95e496 | ||
|
|
e56c5a4fdc | ||
|
|
4e3a578ad1 | ||
|
|
1b7114d8bd | ||
|
|
27cc7655b3 | ||
|
|
f7b593149d | ||
|
|
01e7e0fac3 | ||
|
|
228781e62f | ||
|
|
d0c41816ac | ||
|
|
2bc872e9d9 | ||
|
|
127300c58b | ||
|
|
1da1b2f546 | ||
|
|
79f7458010 | ||
|
|
c8f90ea654 | ||
|
|
27c1ec0e55 | ||
|
|
bda4bb66e1 | ||
|
|
2691b4317b | ||
|
|
25878db5f0 | ||
|
|
9cd5e42c08 | ||
|
|
c39dc59ef5 | ||
|
|
0b5564267f | ||
|
|
6ca5e46ef6 | ||
|
|
4b855cdf6e | ||
|
|
b4638f9218 | ||
|
|
5b8934c922 | ||
|
|
9d89f5d7f4 | ||
|
|
1c6be6a1ea | ||
|
|
5d054142ff | ||
|
|
7723ac8830 | ||
|
|
b5cc45aafd | ||
|
|
94d3364808 | ||
|
|
dab46c185c | ||
|
|
8bf5360f6f | ||
|
|
ee431510fb | ||
|
|
465736912b | ||
|
|
f2ae969e84 | ||
|
|
f2eaf61bd0 | ||
|
|
189c052ed5 | ||
|
|
fa28129aa4 | ||
|
|
c42d438a7c | ||
|
|
2e1efce858 | ||
|
|
825d7eb071 | ||
|
|
cd80b9f228 | ||
|
|
502dda0b3b | ||
|
|
a8ea778c6e | ||
|
|
6c29321581 | ||
|
|
7ed94d171a | ||
|
|
afd73082f3 | ||
|
|
890f3523f3 | ||
|
|
8e8ed92e26 | ||
|
|
b935ae9fc4 | ||
|
|
d6272d7310 | ||
|
|
e60a7a5ac0 | ||
|
|
7e8cb056ed | ||
|
|
9ae3cb796d | ||
|
|
9a6a131bbf | ||
|
|
3909ddb3ba | ||
|
|
dbc26b8243 | ||
|
|
93a4acb108 | ||
|
|
9c1c4e02a9 | ||
|
|
00aa06c5f1 | ||
|
|
f3578f82e6 | ||
|
|
85ee1faf4a | ||
|
|
b72c8e8ce3 | ||
|
|
77a89b8f8a | ||
|
|
a9a9b6a8ac | ||
|
|
fab77a0dbb | ||
|
|
e83e0def2e | ||
|
|
ebcc721d43 | ||
|
|
ff6d236ea7 | ||
|
|
41a9c19001 | ||
|
|
187ef18ac2 | ||
|
|
93304e3eb7 | ||
|
|
b1f14c4beb | ||
|
|
1b2c073886 | ||
|
|
f20a5bb881 | ||
|
|
394ba5a165 | ||
|
|
c35e689d1b | ||
|
|
a9b6fcb9ee | ||
|
|
8eeb539f16 | ||
|
|
a863902370 | ||
|
|
12f8139d1e | ||
|
|
4f25e7e24f | ||
|
|
5860a263d9 | ||
|
|
1460ddb975 | ||
|
|
5326126dcb | ||
|
|
e6a8cdd5e2 | ||
|
|
0dc8eeee90 | ||
|
|
e719d13c8c | ||
|
|
9ee2592ec7 | ||
|
|
720b97dc69 | ||
|
|
177917a8c8 | ||
|
|
a1323e5d17 | ||
|
|
760b2c3df1 | ||
|
|
31f8b5a294 | ||
|
|
3498cc370f | ||
|
|
66dd7b5f90 | ||
|
|
5cc979e2f3 | ||
|
|
1bcf307f94 | ||
|
|
cdf67f4ce5 | ||
|
|
67f2dce2fd | ||
|
|
162f28d874 | ||
|
|
c6ab1b5468 | ||
|
|
d17db3a1fd | ||
|
|
9428436883 | ||
|
|
62dfb8a42e | ||
|
|
c6647a99b8 | ||
|
|
a11797c5e4 | ||
|
|
84a124bb52 | ||
|
|
b296742de0 | ||
|
|
c0560ece47 | ||
|
|
89fd647870 | ||
|
|
07da5cb77c | ||
|
|
aaf84d13f8 | ||
|
|
fd1bb0def7 | ||
|
|
3223eae7b6 | ||
|
|
d836f80805 | ||
|
|
1a6dcf3f57 | ||
|
|
dce48f3d66 | ||
|
|
10d98f32b6 | ||
|
|
acdf6db91a | ||
|
|
0ee7269c8f | ||
|
|
4b888b3d92 | ||
|
|
f0ed15baf0 | ||
|
|
6c882a7788 | ||
|
|
11e03e0051 | ||
|
|
6e47b80d23 | ||
|
|
a3d3c32b07 | ||
|
|
3a27f2f4c8 | ||
|
|
1638804f1f | ||
|
|
362958c0f1 | ||
|
|
74720956a1 | ||
|
|
58e1f4d70b | ||
|
|
c871c253b1 | ||
|
|
547b101c60 | ||
|
|
b9ccbe219f | ||
|
|
c31409d26f | ||
|
|
00d6e4f819 | ||
|
|
dc9f33dc7b | ||
|
|
3d45f26611 | ||
|
|
8554bad731 | ||
|
|
b2a8fe357e | ||
|
|
08ac0b8d8d | ||
|
|
23bf491d4b | ||
|
|
76d22abd0b | ||
|
|
e4e8086e41 | ||
|
|
63116551bc | ||
|
|
d06ce44bd5 | ||
|
|
387f75766f | ||
|
|
2a18b96d23 | ||
|
|
bf2174fbe5 | ||
|
|
462f6725b6 | ||
|
|
ed09bffc87 | ||
|
|
218de2bb70 | ||
|
|
c90961b691 | ||
|
|
1b5b904a8f | ||
|
|
ed219efb92 | ||
|
|
4d704d3ab0 | ||
|
|
11076ff586 | ||
|
|
6b22e624f6 | ||
|
|
a81f90238b | ||
|
|
e7c2e827b9 | ||
|
|
82aa2f9b77 | ||
|
|
d9cc2d2a56 | ||
|
|
28e3769d1e | ||
|
|
e092d764bd | ||
|
|
27c0a852e9 | ||
|
|
bf6ad69d4c | ||
|
|
0b4b270d2f | ||
|
|
4b63493b73 | ||
|
|
9b6c8af171 | ||
|
|
4c7421cd62 | ||
|
|
7662069100 | ||
|
|
adb10e34f3 | ||
|
|
bd0d814142 | ||
|
|
06364a2b9e | ||
|
|
afb6d3e8a3 | ||
|
|
a48ff5851c | ||
|
|
ede21f8d54 | ||
|
|
d08190cbff | ||
|
|
cd50ca4309 | ||
|
|
97c118ae1a | ||
|
|
8878f07628 | ||
|
|
dee30d8121 | ||
|
|
5087465ecb | ||
|
|
39844251b0 | ||
|
|
8c983eadff | ||
|
|
7efe5209aa | ||
|
|
95cf5fa209 | ||
|
|
adde3fc3a8 | ||
|
|
b7089e88d3 | ||
|
|
da63d9d926 | ||
|
|
c8a5224c75 | ||
|
|
d4618ae4b9 | ||
|
|
0591b9d41f | ||
|
|
52c5f51613 | ||
|
|
f8b9c97730 | ||
|
|
c7fa537cfb | ||
|
|
e0e8296339 | ||
|
|
e677ca9f33 | ||
|
|
c19f6df690 | ||
|
|
3ed7f7c3fb | ||
|
|
6b10374adb | ||
|
|
0a65ea61e7 | ||
|
|
6500659c1f | ||
|
|
480887a78f | ||
|
|
05ac2d0a90 | ||
|
|
bbac9ce6b9 | ||
|
|
5b9866f704 | ||
|
|
4a6e4d2a85 | ||
|
|
b7ef3de527 | ||
|
|
4bfb866abe | ||
|
|
23d2b595d9 | ||
|
|
7d30fd2b96 | ||
|
|
93d5976c1e | ||
|
|
260bc453d1 | ||
|
|
5a619db9bd | ||
|
|
d622406912 | ||
|
|
a5e2b69ae3 | ||
|
|
56686944af | ||
|
|
aa957f41af | ||
|
|
9336305334 | ||
|
|
bc9c5224d0 | ||
|
|
eda27b2e9c | ||
|
|
c5d6b382f8 | ||
|
|
ae0d182e2e | ||
|
|
ad78d152f7 | ||
|
|
000ccdaf0a | ||
|
|
57249727de | ||
|
|
d6c49d0793 | ||
|
|
2fa58c4f38 | ||
|
|
c361c2a78a | ||
|
|
4d862355be | ||
|
|
52028e0e97 | ||
|
|
3e4e13a8ae | ||
|
|
0ceea002d5 | ||
|
|
7d8f4049b9 | ||
|
|
dbefaa7ead | ||
|
|
9c1ec1069f | ||
|
|
f36c980eb9 | ||
|
|
cb1a7f014d | ||
|
|
e729bc9541 | ||
|
|
c97a6f555a | ||
|
|
95a104e397 | ||
|
|
e7ad83cc60 | ||
|
|
821b7264ec | ||
|
|
0bf3456119 | ||
|
|
ff7bd7a699 | ||
|
|
a028bebafd | ||
|
|
789d9a3bb6 | ||
|
|
8e19b66a9b | ||
|
|
975845375f | ||
|
|
74b37063bf | ||
|
|
c2fee2290d | ||
|
|
f7c8c44ebb | ||
|
|
91b2ff6e62 | ||
|
|
8293f552b1 | ||
|
|
a84336fc31 | ||
|
|
3951114eb7 | ||
|
|
f24877e9ce | ||
|
|
b81b83570a | ||
|
|
2417073a4d | ||
|
|
ebc0b7a89e | ||
|
|
3d6bfcf48f | ||
|
|
a5864b74f8 | ||
|
|
de8896ff4e | ||
|
|
e579912733 | ||
|
|
c7b4404c36 | ||
|
|
f1de7d413a | ||
|
|
cc6f5f5f25 | ||
|
|
19bf75ade8 | ||
|
|
73eacc3779 | ||
|
|
69f3504ee9 | ||
|
|
bd89b5e975 | ||
|
|
186eea3099 | ||
|
|
5e0badef17 | ||
|
|
ea24d493fd | ||
|
|
d12d040def | ||
|
|
491a9dbae9 | ||
|
|
1e0372c40d | ||
|
|
d2f6344846 |
@@ -1,6 +0,0 @@
|
|||||||
package engine.ConfigParsing.EffectsData;
|
|
||||||
|
|
||||||
public class Condition {
|
|
||||||
public String type;
|
|
||||||
public String value;
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package engine.ConfigParsing.EffectsData;
|
|
||||||
|
|
||||||
import engine.mbEnums;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
public class EffectData {
|
|
||||||
public String id;
|
|
||||||
public String name;
|
|
||||||
public int icon;
|
|
||||||
public ArrayList<mbEnums.EffectSourceType> sources;
|
|
||||||
public ArrayList<Mod> mods;
|
|
||||||
public ArrayList<String> conditions;
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
package engine.ConfigParsing.EffectsData;
|
|
||||||
|
|
||||||
import engine.mbEnums;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
public class Mod {
|
|
||||||
public mbEnums.ModType type;
|
|
||||||
public ArrayList<String> values;
|
|
||||||
}
|
|
||||||
@@ -1,200 +0,0 @@
|
|||||||
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
|
||||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
|
||||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
|
||||||
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
|
||||||
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
|
||||||
// Magicbane Emulator Project © 2013 - 2024
|
|
||||||
// www.magicbane.com
|
|
||||||
|
|
||||||
|
|
||||||
package engine.ConfigParsing;
|
|
||||||
|
|
||||||
import engine.ConfigParsing.EffectsData.Condition;
|
|
||||||
import engine.ConfigParsing.EffectsData.EffectData;
|
|
||||||
import engine.ConfigParsing.EffectsData.Mod;
|
|
||||||
import engine.gameManager.ConfigManager;
|
|
||||||
import engine.mbEnums;
|
|
||||||
import org.pmw.tinylog.Logger;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.nio.file.Paths;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class EffectsParser {
|
|
||||||
|
|
||||||
public static String EffectsPath = ConfigManager.DEFAULT_DATA_DIR + "wpak/Effects.cfg";
|
|
||||||
public static HashMap<String, EffectData> effect_data = new HashMap<>();
|
|
||||||
|
|
||||||
public static void init() throws IOException {
|
|
||||||
|
|
||||||
ArrayList<ArrayList<String>> compiledData = new ArrayList<>();
|
|
||||||
List<String> fileData = Files.readAllLines(Paths.get(EffectsPath));
|
|
||||||
ArrayList<String> modData = new ArrayList<>();
|
|
||||||
|
|
||||||
for (String line : fileData) {
|
|
||||||
|
|
||||||
if (line.contains("EFFECTBEGIN")) {
|
|
||||||
modData = new ArrayList<>();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (line.contains("EFFECTEND"))
|
|
||||||
compiledData.add(modData);
|
|
||||||
else
|
|
||||||
modData.add(line);
|
|
||||||
}
|
|
||||||
|
|
||||||
CreateBlocks(compiledData);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void CreateBlocks(ArrayList<ArrayList<String>> compiledData) {
|
|
||||||
|
|
||||||
for (ArrayList<String> compiledLines : compiledData) {
|
|
||||||
|
|
||||||
EffectData effectData = new EffectData();
|
|
||||||
effectData.id = compiledLines.get(1).replace(" ", "").split(" ")[0];
|
|
||||||
effectData.sources = new ArrayList<>();
|
|
||||||
effectData.mods = new ArrayList<>();
|
|
||||||
effectData.conditions = new ArrayList<>();
|
|
||||||
|
|
||||||
try {
|
|
||||||
String rawData = compiledLines.get(1).replace(" ", "");
|
|
||||||
if(rawData.contains("\"")){
|
|
||||||
int startIndex = rawData.indexOf('"') + 1;
|
|
||||||
int endIndex = rawData.lastIndexOf('"');
|
|
||||||
char[] nameValue = rawData.toCharArray();
|
|
||||||
String name = "";
|
|
||||||
for(int i = startIndex; i < endIndex; i++){
|
|
||||||
name += nameValue[i];
|
|
||||||
}
|
|
||||||
effectData.name = name;
|
|
||||||
}
|
|
||||||
int iconID;
|
|
||||||
try {
|
|
||||||
iconID = Integer.parseInt(compiledLines.get(1).replace(" ", "").split(" ")[2]);
|
|
||||||
} catch(Exception e){
|
|
||||||
iconID = 0;
|
|
||||||
}
|
|
||||||
effectData.icon = iconID;
|
|
||||||
} catch (Exception e) {
|
|
||||||
Logger.error(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
int index = 0;
|
|
||||||
|
|
||||||
//log all sources
|
|
||||||
|
|
||||||
for (String line : compiledLines) {
|
|
||||||
String rawValue;
|
|
||||||
if (line.contains("SOURCEBEGIN")) {
|
|
||||||
rawValue = compiledLines.get(index + 1).replace(" ", "");
|
|
||||||
switch (rawValue) {
|
|
||||||
case "Crush":
|
|
||||||
rawValue = "Crushing";
|
|
||||||
break;
|
|
||||||
case "Slash":
|
|
||||||
rawValue = "Slashing";
|
|
||||||
break;
|
|
||||||
case "Pierce":
|
|
||||||
rawValue = "Piercing";
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
effectData.sources.add(mbEnums.EffectSourceType.valueOf(rawValue));
|
|
||||||
}
|
|
||||||
index++;
|
|
||||||
}
|
|
||||||
|
|
||||||
//log all mods
|
|
||||||
|
|
||||||
index = 0;
|
|
||||||
|
|
||||||
for (String line : compiledLines) {
|
|
||||||
|
|
||||||
if (line.contains("MODSBEGIN")) {
|
|
||||||
|
|
||||||
int extra = 1;
|
|
||||||
Mod mod = new Mod();
|
|
||||||
|
|
||||||
while (!compiledLines.get(index + extra).contains("MODSEND")) {
|
|
||||||
//data.mods.add(lines[index + extra].Replace(" ", ""));
|
|
||||||
String rawValue = compiledLines.get(index + extra).replace(" ", "").split(" ")[0];
|
|
||||||
try {
|
|
||||||
mod.type = mbEnums.ModType.valueOf(rawValue);
|
|
||||||
}catch(Exception e){
|
|
||||||
mod.type = mbEnums.ModType.None;
|
|
||||||
}
|
|
||||||
GenerateModValues(mod, compiledLines.get(index + extra).replace(" ", "").replace(" ", "").split(" "));
|
|
||||||
extra++;
|
|
||||||
}
|
|
||||||
effectData.mods.add(mod);
|
|
||||||
}
|
|
||||||
index++;
|
|
||||||
}
|
|
||||||
|
|
||||||
//log all conditions
|
|
||||||
|
|
||||||
index = 0;
|
|
||||||
for (String line : compiledLines) {
|
|
||||||
|
|
||||||
if (line.contains("CONDITIONBEGIN")) {
|
|
||||||
|
|
||||||
int extra = 1;
|
|
||||||
|
|
||||||
while (!compiledLines.get(index + extra).contains("CONDITIONEND")) {
|
|
||||||
|
|
||||||
if (!compiledLines.get(index + extra).contains("#")) {
|
|
||||||
//data.conditions.add(lines[index + extra].Replace(" ", ""));
|
|
||||||
Condition condition = new Condition();
|
|
||||||
condition.type = compiledLines.get(index + extra).replace(" ", "").split(" ")[0];
|
|
||||||
condition.value = compiledLines.get(index + extra).replace(" ", "").split(" ")[1];
|
|
||||||
}
|
|
||||||
extra++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
index++;
|
|
||||||
}
|
|
||||||
effect_data.put(effectData.id, effectData);
|
|
||||||
}
|
|
||||||
Logger.info("Effects.cfg Parsing Completed");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void GenerateModValues(Mod inMod, String[] data) {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int maxValue = 5;
|
|
||||||
|
|
||||||
if(inMod.type != null && inMod.type.name().equals("Health")){
|
|
||||||
maxValue = 7;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(data.length < maxValue)
|
|
||||||
maxValue = data.length;
|
|
||||||
|
|
||||||
inMod.values = new ArrayList<>();
|
|
||||||
|
|
||||||
for (int i = 1; i < data.length; i++)
|
|
||||||
if (!data[i].isEmpty()) {
|
|
||||||
if (i >= maxValue)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (i == maxValue - 1)
|
|
||||||
try {
|
|
||||||
String entry = "";
|
|
||||||
for (int j = i; j < data.length; j ++){
|
|
||||||
entry += data[j] + " ";
|
|
||||||
}
|
|
||||||
entry = entry.trim();
|
|
||||||
inMod.values.add(entry.trim());
|
|
||||||
} catch (Exception e) {
|
|
||||||
inMod.values.add(data[i]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
inMod.values.add(data[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,303 +0,0 @@
|
|||||||
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
|
||||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
|
||||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
|
||||||
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
|
||||||
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
|
||||||
// Magicbane Emulator Project © 2013 - 2022
|
|
||||||
// www.magicbane.com
|
|
||||||
|
|
||||||
|
|
||||||
package engine.db.handlers;
|
|
||||||
|
|
||||||
import engine.gameManager.DbManager;
|
|
||||||
import engine.gameManager.PowersManager;
|
|
||||||
import engine.mbEnums;
|
|
||||||
import engine.powers.EffectsBase;
|
|
||||||
import engine.powers.effectmodifiers.*;
|
|
||||||
import org.pmw.tinylog.Logger;
|
|
||||||
|
|
||||||
import java.sql.Connection;
|
|
||||||
import java.sql.PreparedStatement;
|
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashSet;
|
|
||||||
|
|
||||||
public class dbEffectsBaseHandler extends dbHandlerBase {
|
|
||||||
|
|
||||||
public dbEffectsBaseHandler() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ArrayList<EffectsBase> getAllEffectsBase() {
|
|
||||||
|
|
||||||
ArrayList<EffectsBase> effectList = new ArrayList<>();
|
|
||||||
|
|
||||||
try (Connection connection = DbManager.getConnection();
|
|
||||||
PreparedStatement prepareStatement = connection.prepareStatement("SELECT * FROM static_power_effectbase ORDER BY `IDString` DESC")) {
|
|
||||||
|
|
||||||
ResultSet rs = prepareStatement.executeQuery();
|
|
||||||
|
|
||||||
while (rs.next()) {
|
|
||||||
EffectsBase effectBase = new EffectsBase(rs);
|
|
||||||
effectList.add(effectBase);
|
|
||||||
}
|
|
||||||
} catch (SQLException e) {
|
|
||||||
Logger.error(e.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
return effectList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void cacheAllEffectModifiers() {
|
|
||||||
|
|
||||||
String IDString;
|
|
||||||
AbstractEffectModifier abstractEffectModifier = null;
|
|
||||||
|
|
||||||
try (Connection connection = DbManager.getConnection();
|
|
||||||
PreparedStatement prepareStatement = connection.prepareStatement("SELECT * FROM static_power_effectmod")) {
|
|
||||||
|
|
||||||
ResultSet rs = prepareStatement.executeQuery();
|
|
||||||
|
|
||||||
while (rs.next()) {
|
|
||||||
|
|
||||||
IDString = rs.getString("IDString");
|
|
||||||
EffectsBase effectBase = PowersManager.getEffectByIDString(IDString);
|
|
||||||
mbEnums.ModType modifier = mbEnums.ModType.GetModType(rs.getString("modType"));
|
|
||||||
|
|
||||||
//combine item prefix and suffix effect modifiers
|
|
||||||
|
|
||||||
abstractEffectModifier = getCombinedModifiers(abstractEffectModifier, rs, effectBase, modifier);
|
|
||||||
|
|
||||||
if (abstractEffectModifier != null) {
|
|
||||||
|
|
||||||
if (EffectsBase.modifiersMap.containsKey(effectBase.getIDString()) == false)
|
|
||||||
EffectsBase.modifiersMap.put(effectBase.getIDString(), new HashSet<>());
|
|
||||||
|
|
||||||
EffectsBase.modifiersMap.get(effectBase.getIDString()).add(abstractEffectModifier);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
Logger.error(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private static AbstractEffectModifier getCombinedModifiers(AbstractEffectModifier abstractEffectModifier, ResultSet rs, EffectsBase effectBase, mbEnums.ModType modifier) throws SQLException {
|
|
||||||
switch (modifier) {
|
|
||||||
case AdjustAboveDmgCap:
|
|
||||||
abstractEffectModifier = new AdjustAboveDmgCapEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Ambidexterity:
|
|
||||||
abstractEffectModifier = new AmbidexterityEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case AnimOverride:
|
|
||||||
break;
|
|
||||||
case ArmorPiercing:
|
|
||||||
abstractEffectModifier = new ArmorPiercingEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case AttackDelay:
|
|
||||||
abstractEffectModifier = new AttackDelayEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Attr:
|
|
||||||
abstractEffectModifier = new AttributeEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case BlackMantle:
|
|
||||||
abstractEffectModifier = new BlackMantleEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case BladeTrails:
|
|
||||||
abstractEffectModifier = new BladeTrailsEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Block:
|
|
||||||
abstractEffectModifier = new BlockEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case BlockedPowerType:
|
|
||||||
abstractEffectModifier = new BlockedPowerTypeEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case CannotAttack:
|
|
||||||
abstractEffectModifier = new CannotAttackEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case CannotCast:
|
|
||||||
abstractEffectModifier = new CannotCastEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case CannotMove:
|
|
||||||
abstractEffectModifier = new CannotMoveEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case CannotTrack:
|
|
||||||
abstractEffectModifier = new CannotTrackEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Charmed:
|
|
||||||
abstractEffectModifier = new CharmedEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case ConstrainedAmbidexterity:
|
|
||||||
abstractEffectModifier = new ConstrainedAmbidexterityEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case DamageCap:
|
|
||||||
abstractEffectModifier = new DamageCapEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case DamageShield:
|
|
||||||
abstractEffectModifier = new DamageShieldEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case DCV:
|
|
||||||
abstractEffectModifier = new DCVEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Dodge:
|
|
||||||
abstractEffectModifier = new DodgeEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case DR:
|
|
||||||
abstractEffectModifier = new DREffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Durability:
|
|
||||||
abstractEffectModifier = new DurabilityEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case ExclusiveDamageCap:
|
|
||||||
abstractEffectModifier = new ExclusiveDamageCapEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Fade:
|
|
||||||
abstractEffectModifier = new FadeEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Fly:
|
|
||||||
abstractEffectModifier = new FlyEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Health:
|
|
||||||
abstractEffectModifier = new HealthEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case HealthFull:
|
|
||||||
abstractEffectModifier = new HealthFullEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case HealthRecoverRate:
|
|
||||||
abstractEffectModifier = new HealthRecoverRateEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case IgnoreDamageCap:
|
|
||||||
abstractEffectModifier = new IgnoreDamageCapEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case IgnorePassiveDefense:
|
|
||||||
abstractEffectModifier = new IgnorePassiveDefenseEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case ImmuneTo:
|
|
||||||
abstractEffectModifier = new ImmuneToEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case ImmuneToAttack:
|
|
||||||
abstractEffectModifier = new ImmuneToAttackEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case ImmuneToPowers:
|
|
||||||
abstractEffectModifier = new ImmuneToPowersEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Invisible:
|
|
||||||
abstractEffectModifier = new InvisibleEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case ItemName:
|
|
||||||
abstractEffectModifier = new ItemNameEffectModifier(rs);
|
|
||||||
if (((ItemNameEffectModifier) abstractEffectModifier).name.isEmpty())
|
|
||||||
break;
|
|
||||||
if (effectBase != null)
|
|
||||||
effectBase.setName((((ItemNameEffectModifier) abstractEffectModifier).name));
|
|
||||||
break;
|
|
||||||
case Mana:
|
|
||||||
abstractEffectModifier = new ManaEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case ManaFull:
|
|
||||||
abstractEffectModifier = new ManaFullEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case ManaRecoverRate:
|
|
||||||
abstractEffectModifier = new ManaRecoverRateEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case MaxDamage:
|
|
||||||
abstractEffectModifier = new MaxDamageEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case MeleeDamageModifier:
|
|
||||||
abstractEffectModifier = new MeleeDamageEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case MinDamage:
|
|
||||||
abstractEffectModifier = new MinDamageEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case NoMod:
|
|
||||||
abstractEffectModifier = new NoModEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case OCV:
|
|
||||||
abstractEffectModifier = new OCVEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Parry:
|
|
||||||
abstractEffectModifier = new ParryEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case PassiveDefense:
|
|
||||||
abstractEffectModifier = new PassiveDefenseEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case PowerCost:
|
|
||||||
abstractEffectModifier = new PowerCostEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case PowerCostHealth:
|
|
||||||
abstractEffectModifier = new PowerCostHealthEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case PowerDamageModifier:
|
|
||||||
abstractEffectModifier = new PowerDamageEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case ProtectionFrom:
|
|
||||||
abstractEffectModifier = new ProtectionFromEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Resistance:
|
|
||||||
abstractEffectModifier = new ResistanceEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case ScaleHeight:
|
|
||||||
abstractEffectModifier = new ScaleHeightEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case ScaleWidth:
|
|
||||||
abstractEffectModifier = new ScaleWidthEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case ScanRange:
|
|
||||||
abstractEffectModifier = new ScanRangeEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case SeeInvisible:
|
|
||||||
abstractEffectModifier = new SeeInvisibleEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Silenced:
|
|
||||||
abstractEffectModifier = new SilencedEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Skill:
|
|
||||||
abstractEffectModifier = new SkillEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Slay:
|
|
||||||
abstractEffectModifier = new SlayEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Speed:
|
|
||||||
abstractEffectModifier = new SpeedEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case SpireBlock:
|
|
||||||
abstractEffectModifier = new SpireBlockEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Stamina:
|
|
||||||
abstractEffectModifier = new StaminaEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case StaminaFull:
|
|
||||||
abstractEffectModifier = new StaminaFullEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case StaminaRecoverRate:
|
|
||||||
abstractEffectModifier = new StaminaRecoverRateEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Stunned:
|
|
||||||
abstractEffectModifier = new StunnedEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case Value:
|
|
||||||
abstractEffectModifier = new ValueEffectModifier(rs);
|
|
||||||
if (effectBase != null) {
|
|
||||||
ValueEffectModifier valueEffect = (ValueEffectModifier) abstractEffectModifier;
|
|
||||||
effectBase.setValue(valueEffect.minMod);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case WeaponProc:
|
|
||||||
abstractEffectModifier = new WeaponProcEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case WeaponRange:
|
|
||||||
abstractEffectModifier = new WeaponRangeEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case WeaponSpeed:
|
|
||||||
abstractEffectModifier = new WeaponSpeedEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
return abstractEffectModifier;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -221,20 +221,4 @@ public class dbLootHandler extends dbHandlerBase {
|
|||||||
return bootySets;
|
return bootySets;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LOAD_ENCHANT_VALUES() {
|
|
||||||
|
|
||||||
try (Connection connection = DbManager.getConnection();
|
|
||||||
PreparedStatement preparedStatement = connection.prepareStatement("SELECT `IDString`, `minMod` FROM `static_power_effectmod` WHERE `modType` = ?")) {
|
|
||||||
|
|
||||||
preparedStatement.setString(1, "Value");
|
|
||||||
ResultSet rs = preparedStatement.executeQuery();
|
|
||||||
|
|
||||||
while (rs.next())
|
|
||||||
Item.addEnchantValue(rs.getString("IDString"), rs.getInt("minMod"));
|
|
||||||
|
|
||||||
} catch (SQLException e) {
|
|
||||||
Logger.error(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,82 +0,0 @@
|
|||||||
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
|
||||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
|
||||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
|
||||||
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
|
||||||
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
|
||||||
// Magicbane Emulator Project © 2013 - 2022
|
|
||||||
// www.magicbane.com
|
|
||||||
|
|
||||||
|
|
||||||
package engine.db.handlers;
|
|
||||||
|
|
||||||
import engine.gameManager.DbManager;
|
|
||||||
import engine.gameManager.PowersManager;
|
|
||||||
import engine.mbEnums;
|
|
||||||
import engine.objects.Mob;
|
|
||||||
import engine.powers.EffectsBase;
|
|
||||||
import org.pmw.tinylog.Logger;
|
|
||||||
|
|
||||||
import java.sql.Connection;
|
|
||||||
import java.sql.PreparedStatement;
|
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.util.HashSet;
|
|
||||||
|
|
||||||
public class dbPowerHandler extends dbHandlerBase {
|
|
||||||
|
|
||||||
public dbPowerHandler() {
|
|
||||||
this.localClass = Mob.class;
|
|
||||||
this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void addAllSourceTypes() {
|
|
||||||
|
|
||||||
try (Connection connection = DbManager.getConnection();
|
|
||||||
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM static_power_sourcetype")) {
|
|
||||||
|
|
||||||
ResultSet rs = preparedStatement.executeQuery();
|
|
||||||
String IDString, source;
|
|
||||||
|
|
||||||
while (rs.next()) {
|
|
||||||
IDString = rs.getString("IDString");
|
|
||||||
int token = DbManager.hasher.SBStringHash(IDString);
|
|
||||||
|
|
||||||
source = rs.getString("source").replace("-", "").trim();
|
|
||||||
mbEnums.EffectSourceType effectSourceType = mbEnums.EffectSourceType.GetEffectSourceType(source);
|
|
||||||
|
|
||||||
if (EffectsBase.effectSourceTypeMap.containsKey(token) == false)
|
|
||||||
EffectsBase.effectSourceTypeMap.put(token, new HashSet<>());
|
|
||||||
|
|
||||||
EffectsBase.effectSourceTypeMap.get(token).add(effectSourceType);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
Logger.error(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void addAllAnimationOverrides() {
|
|
||||||
|
|
||||||
try (Connection connection = DbManager.getConnection();
|
|
||||||
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM static_power_animation_override")) {
|
|
||||||
|
|
||||||
ResultSet rs = preparedStatement.executeQuery();
|
|
||||||
|
|
||||||
String IDString;
|
|
||||||
int animation;
|
|
||||||
while (rs.next()) {
|
|
||||||
IDString = rs.getString("IDString");
|
|
||||||
|
|
||||||
EffectsBase eb = PowersManager.getEffectByIDString(IDString);
|
|
||||||
if (eb != null)
|
|
||||||
IDString = eb.getIDString();
|
|
||||||
|
|
||||||
animation = rs.getInt("animation");
|
|
||||||
PowersManager.AnimationOverrides.put(IDString, animation);
|
|
||||||
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
Logger.error(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,156 +0,0 @@
|
|||||||
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
|
||||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
|
||||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
|
||||||
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
|
||||||
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
|
||||||
// Magicbane Emulator Project © 2013 - 2022
|
|
||||||
// www.magicbane.com
|
|
||||||
|
|
||||||
|
|
||||||
package engine.devcmd.cmds;
|
|
||||||
|
|
||||||
import engine.devcmd.AbstractDevCmd;
|
|
||||||
import engine.gameManager.ChatManager;
|
|
||||||
import engine.gameManager.PowersManager;
|
|
||||||
import engine.mbEnums.PowerActionType;
|
|
||||||
import engine.objects.AbstractGameObject;
|
|
||||||
import engine.objects.PlayerCharacter;
|
|
||||||
import engine.powers.ActionsBase;
|
|
||||||
import engine.powers.PowersBase;
|
|
||||||
import engine.powers.effectmodifiers.AbstractEffectModifier;
|
|
||||||
import engine.util.ThreadUtils;
|
|
||||||
import org.pmw.tinylog.Logger;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
|
||||||
|
|
||||||
public class ApplyBonusCmd extends AbstractDevCmd {
|
|
||||||
|
|
||||||
public ApplyBonusCmd() {
|
|
||||||
super("applybonus");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void _doCmd(PlayerCharacter pcSender, String[] words,
|
|
||||||
AbstractGameObject target) {
|
|
||||||
|
|
||||||
String action = words[0];
|
|
||||||
|
|
||||||
PowerActionType actionType = null;
|
|
||||||
|
|
||||||
HashMap<String, HashSet<String>> appliedMods = new HashMap<>();
|
|
||||||
|
|
||||||
try {
|
|
||||||
|
|
||||||
if (action.equals("all") == false)
|
|
||||||
for (PowerActionType powerActionType : PowerActionType.values()) {
|
|
||||||
if (powerActionType.name().equalsIgnoreCase(action) == false)
|
|
||||||
continue;
|
|
||||||
actionType = powerActionType;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
this.throwbackError(pcSender, "Invalid power Action type for " + action);
|
|
||||||
this.throwbackInfo(pcSender, "Valid Types : " + this.getActionTypes());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (action.equals("all") == false)
|
|
||||||
if (actionType == null) {
|
|
||||||
this.throwbackError(pcSender, "Invalid power Action type for " + action);
|
|
||||||
this.throwbackInfo(pcSender, "Valid Types : " + this.getActionTypes());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
for (PowersBase pb : PowersManager.powersBaseByIDString.values()) {
|
|
||||||
if (pb.getActions() == null || pb.getActions().isEmpty())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
for (ActionsBase ab : pb.getActions()) {
|
|
||||||
if (ab.getPowerAction() == null)
|
|
||||||
continue;
|
|
||||||
if (action.equals("all") == false)
|
|
||||||
if (ab.getPowerAction().getType().equalsIgnoreCase(action) == false)
|
|
||||||
continue;
|
|
||||||
String effect1 = "";
|
|
||||||
String effect2 = "";
|
|
||||||
ChatManager.chatSystemInfo(pcSender, "Applying Power " + pb.getName() + " : " + pb.getDescription());
|
|
||||||
if (ab.getPowerAction().getEffectsBase() == null) {
|
|
||||||
|
|
||||||
try {
|
|
||||||
PowersManager.runPowerAction(pcSender, pcSender, pcSender.getLoc(), ab, 1, pb);
|
|
||||||
} catch (Exception e) {
|
|
||||||
// TODO Auto-generated catch block
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
ThreadUtils.sleep(500);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (ab.getPowerAction().getEffectsBase().getModifiers() == null || ab.getPowerAction().getEffectsBase().getModifiers().isEmpty()) {
|
|
||||||
try {
|
|
||||||
PowersManager.runPowerAction(pcSender, pcSender, pcSender.getLoc(), ab, 1, pb);
|
|
||||||
} catch (Exception e) {
|
|
||||||
// TODO Auto-generated catch block
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean run = true;
|
|
||||||
for (AbstractEffectModifier mod : ab.getPowerAction().getEffectsBase().getModifiers()) {
|
|
||||||
if (appliedMods.containsKey(mod.modType.name()) == false) {
|
|
||||||
appliedMods.put(mod.modType.name(), new HashSet<>());
|
|
||||||
}
|
|
||||||
|
|
||||||
// if (appliedMods.get(mod.modType.name()).contains(mod.sourceType.name())){
|
|
||||||
// continue;
|
|
||||||
// }
|
|
||||||
|
|
||||||
appliedMods.get(mod.modType.name()).add(mod.sourceType.name());
|
|
||||||
try {
|
|
||||||
try {
|
|
||||||
PowersManager.runPowerAction(pcSender, pcSender, pcSender.getLoc(), ab, 1, pb);
|
|
||||||
} catch (Exception e) {
|
|
||||||
// TODO Auto-generated catch block
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
Logger.error(e);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String _getUsageString() {
|
|
||||||
return "' /bounds'";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String _getHelpString() {
|
|
||||||
return "Audits all the mobs in a zone.";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getActionTypes() {
|
|
||||||
String output = "";
|
|
||||||
|
|
||||||
for (PowerActionType actionType : PowerActionType.values()) {
|
|
||||||
output += actionType.name() + " | ";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return output.substring(0, output.length() - 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -798,7 +798,7 @@ public enum BuildingManager {
|
|||||||
// Attempt to write to database or delete the building
|
// Attempt to write to database or delete the building
|
||||||
// if we are destroying it.
|
// if we are destroying it.
|
||||||
|
|
||||||
if (rank == -1)
|
if (rank < 0)
|
||||||
success = DbManager.BuildingQueries.DELETE_FROM_DATABASE(building);
|
success = DbManager.BuildingQueries.DELETE_FROM_DATABASE(building);
|
||||||
else
|
else
|
||||||
success = DbManager.BuildingQueries.updateBuildingRank(building, rank);
|
success = DbManager.BuildingQueries.updateBuildingRank(building, rank);
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ package engine.gameManager;
|
|||||||
import engine.mbEnums;
|
import engine.mbEnums;
|
||||||
import engine.server.login.LoginServer;
|
import engine.server.login.LoginServer;
|
||||||
import engine.server.world.WorldServer;
|
import engine.server.world.WorldServer;
|
||||||
|
import engine.wpak.EffectsParser;
|
||||||
|
import engine.wpak.PowerActionParser;
|
||||||
|
import engine.wpak.PowersParser;
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
@@ -164,6 +167,13 @@ public enum ConfigManager {
|
|||||||
Logger.info("Compiling regex");
|
Logger.info("Compiling regex");
|
||||||
|
|
||||||
regex.put(MB_LOGIN_FNAME_REGEX, Pattern.compile(MB_LOGIN_FNAME_REGEX.getValue()));
|
regex.put(MB_LOGIN_FNAME_REGEX, Pattern.compile(MB_LOGIN_FNAME_REGEX.getValue()));
|
||||||
|
|
||||||
|
Logger.info("Loading WPAK data");
|
||||||
|
|
||||||
|
//EffectsParser.parseWpakFile();
|
||||||
|
//PowersParser.parseWpakFile();
|
||||||
|
//PowerActionParser.parseWpakFile();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,8 +69,6 @@ public enum DbManager {
|
|||||||
public static final dbBlueprintHandler BlueprintQueries = new dbBlueprintHandler();
|
public static final dbBlueprintHandler BlueprintQueries = new dbBlueprintHandler();
|
||||||
public static final dbShrineHandler ShrineQueries = new dbShrineHandler();
|
public static final dbShrineHandler ShrineQueries = new dbShrineHandler();
|
||||||
public static final dbRunegateHandler RunegateQueries = new dbRunegateHandler();
|
public static final dbRunegateHandler RunegateQueries = new dbRunegateHandler();
|
||||||
|
|
||||||
public static final dbPowerHandler PowerQueries = new dbPowerHandler();
|
|
||||||
public static final dbPetitionHandler PetitionQueries = new dbPetitionHandler();
|
public static final dbPetitionHandler PetitionQueries = new dbPetitionHandler();
|
||||||
private static final EnumMap<GameObjectType, ConcurrentHashMap<Integer, AbstractGameObject>> objectCache = new EnumMap<>(GameObjectType.class);
|
private static final EnumMap<GameObjectType, ConcurrentHashMap<Integer, AbstractGameObject>> objectCache = new EnumMap<>(GameObjectType.class);
|
||||||
public static Hasher hasher;
|
public static Hasher hasher;
|
||||||
|
|||||||
@@ -122,7 +122,6 @@ public enum DevCmdManager {
|
|||||||
DevCmdManager.registerDevCmd(new SetNpcNameCmd());
|
DevCmdManager.registerDevCmd(new SetNpcNameCmd());
|
||||||
DevCmdManager.registerDevCmd(new BoundsCmd());
|
DevCmdManager.registerDevCmd(new BoundsCmd());
|
||||||
DevCmdManager.registerDevCmd(new RegionCmd());
|
DevCmdManager.registerDevCmd(new RegionCmd());
|
||||||
DevCmdManager.registerDevCmd(new ApplyBonusCmd());
|
|
||||||
DevCmdManager.registerDevCmd(new SlotTestCmd());
|
DevCmdManager.registerDevCmd(new SlotTestCmd());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ package engine.gameManager;
|
|||||||
|
|
||||||
import engine.InterestManagement.Terrain;
|
import engine.InterestManagement.Terrain;
|
||||||
import engine.InterestManagement.WorldGrid;
|
import engine.InterestManagement.WorldGrid;
|
||||||
import engine.db.handlers.dbEffectsBaseHandler;
|
|
||||||
import engine.db.handlers.dbPowerHandler;
|
|
||||||
import engine.db.handlers.dbSkillReqHandler;
|
import engine.db.handlers.dbSkillReqHandler;
|
||||||
import engine.job.AbstractJob;
|
import engine.job.AbstractJob;
|
||||||
import engine.job.AbstractScheduleJob;
|
import engine.job.AbstractScheduleJob;
|
||||||
@@ -29,8 +27,14 @@ import engine.net.client.ClientConnection;
|
|||||||
import engine.net.client.msg.*;
|
import engine.net.client.msg.*;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.powers.*;
|
import engine.powers.*;
|
||||||
import engine.powers.poweractions.AbstractPowerAction;
|
import engine.powers.poweractions.*;
|
||||||
import engine.server.MBServerStatics;
|
import engine.server.MBServerStatics;
|
||||||
|
import engine.wpak.EffectsParser;
|
||||||
|
import engine.wpak.PowerActionParser;
|
||||||
|
import engine.wpak.PowersParser;
|
||||||
|
import engine.wpak.data.Effect;
|
||||||
|
import engine.wpak.data.PowerAction;
|
||||||
|
import engine.wpakpowers.WpakPowerManager;
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -53,7 +57,6 @@ public enum PowersManager {
|
|||||||
public static HashMap<String, AbstractPowerAction> powerActionsByIDString = new HashMap<>();
|
public static HashMap<String, AbstractPowerAction> powerActionsByIDString = new HashMap<>();
|
||||||
public static HashMap<Integer, AbstractPowerAction> powerActionsByID = new HashMap<>();
|
public static HashMap<Integer, AbstractPowerAction> powerActionsByID = new HashMap<>();
|
||||||
public static HashMap<String, Integer> ActionTokenByIDString = new HashMap<>();
|
public static HashMap<String, Integer> ActionTokenByIDString = new HashMap<>();
|
||||||
public static HashMap<String, Integer> AnimationOverrides = new HashMap<>();
|
|
||||||
public static HashMap<Integer, ArrayList<RunePowerEntry>> _allRunePowers;
|
public static HashMap<Integer, ArrayList<RunePowerEntry>> _allRunePowers;
|
||||||
public static HashMap<Integer, ArrayList<RuneSkillAdjustEntry>> _allRuneSkillAdjusts;
|
public static HashMap<Integer, ArrayList<RuneSkillAdjustEntry>> _allRuneSkillAdjusts;
|
||||||
public static HashMap<String, HashMap<ResourceType, Integer>> _effect_costMaps = new HashMap<>();
|
public static HashMap<String, HashMap<ResourceType, Integer>> _effect_costMaps = new HashMap<>();
|
||||||
@@ -61,10 +64,12 @@ public enum PowersManager {
|
|||||||
|
|
||||||
public static void initPowersManager(boolean fullPowersLoad) {
|
public static void initPowersManager(boolean fullPowersLoad) {
|
||||||
|
|
||||||
if (fullPowersLoad)
|
if (fullPowersLoad) {
|
||||||
PowersManager.InitializePowers();
|
//PowersManager.InitializePowers();
|
||||||
else
|
WpakPowerManager.init();
|
||||||
|
}else {
|
||||||
PowersManager.InitializeLoginPowers();
|
PowersManager.InitializeLoginPowers();
|
||||||
|
}
|
||||||
|
|
||||||
PowersManager.js = JobScheduler.getInstance();
|
PowersManager.js = JobScheduler.getInstance();
|
||||||
|
|
||||||
@@ -112,33 +117,138 @@ public enum PowersManager {
|
|||||||
return powerEntries;
|
return powerEntries;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This pre-loads all powers and effects
|
public static void InitializeEffects(){
|
||||||
public static void InitializePowers() {
|
|
||||||
|
|
||||||
// Add EffectsBase
|
// Add EffectsBase
|
||||||
ArrayList<EffectsBase> ebList = dbEffectsBaseHandler.getAllEffectsBase();
|
ArrayList<EffectsBase> effectList = new ArrayList<>();
|
||||||
|
|
||||||
for (EffectsBase eb : ebList) {
|
for (Effect entry : WpakPowerManager._effectsLookup.values()) {
|
||||||
PowersManager.effectsBaseByToken.put(eb.getToken(), eb);
|
EffectsBase effectBase = new EffectsBase(entry);
|
||||||
PowersManager.effectsBaseByIDString.put(eb.getIDString(), eb);
|
effectList.add(effectBase);
|
||||||
|
PowersManager.effectsBaseByToken.put(effectBase.getToken(), effectBase);
|
||||||
|
PowersManager.effectsBaseByIDString.put(effectBase.getIDString(), effectBase);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add Fail Conditions
|
public static void InitializePowerActions(){
|
||||||
EffectsBase.getFailConditions(PowersManager.effectsBaseByIDString);
|
|
||||||
|
|
||||||
// Add Modifiers to Effects
|
|
||||||
dbEffectsBaseHandler.cacheAllEffectModifiers();
|
|
||||||
|
|
||||||
// Add Source Types to Effects
|
|
||||||
dbPowerHandler.addAllSourceTypes();
|
|
||||||
dbPowerHandler.addAllAnimationOverrides();
|
|
||||||
|
|
||||||
// Add PowerActions
|
// Add PowerActions
|
||||||
AbstractPowerAction.getAllPowerActions(PowersManager.powerActionsByIDString, PowersManager.powerActionsByID, PowersManager.effectsBaseByIDString);
|
//AbstractPowerAction.getAllPowerActions(PowersManager.powerActionsByIDString, PowersManager.powerActionsByID, PowersManager.effectsBaseByIDString);
|
||||||
|
|
||||||
// Load valid Item Flags
|
HashMap<String, EffectsBase> effects = PowersManager.effectsBaseByIDString;
|
||||||
// AbstractPowerAction.loadValidItemFlags(PowersManager.powerActionsByIDString);
|
|
||||||
|
for (PowerAction powerAction : WpakPowerManager._powerActionLookup.values()) {
|
||||||
|
AbstractPowerAction apa;
|
||||||
|
PowerActionType type = powerAction.action_type;
|
||||||
|
String IDString = powerAction.action_id;
|
||||||
|
int token = DbManager.hasher.SBStringHash(IDString);
|
||||||
|
//cache token, used for applying effects.
|
||||||
|
PowersManager.ActionTokenByIDString.put(IDString, token);
|
||||||
|
apa = null;
|
||||||
|
switch (type) {
|
||||||
|
default:
|
||||||
|
Logger.error("valid type not found for poweraction of ID" + IDString);
|
||||||
|
break;
|
||||||
|
case ApplyEffect:
|
||||||
|
apa = new ApplyEffectPowerAction(powerAction, effects);
|
||||||
|
break;
|
||||||
|
case ApplyEffects:
|
||||||
|
apa = new ApplyEffectsPowerAction(powerAction, effects);
|
||||||
|
break;
|
||||||
|
case DeferredPower:
|
||||||
|
apa = new DeferredPowerPowerAction(powerAction, effects);
|
||||||
|
break;
|
||||||
|
case DamageOverTime:
|
||||||
|
apa = new DamageOverTimePowerAction(powerAction, effects);
|
||||||
|
break;
|
||||||
|
case Peek:
|
||||||
|
apa = new PeekPowerAction(powerAction);
|
||||||
|
break;
|
||||||
|
case Charm:
|
||||||
|
apa = new CharmPowerAction(powerAction);
|
||||||
|
break;
|
||||||
|
case RemoveEffect:
|
||||||
|
apa = new RemoveEffectPowerAction(powerAction);
|
||||||
|
break;
|
||||||
|
case Track:
|
||||||
|
apa = new TrackPowerAction(powerAction, effects);
|
||||||
|
break;
|
||||||
|
case DirectDamage:
|
||||||
|
apa = new DirectDamagePowerAction(powerAction, effects);
|
||||||
|
break;
|
||||||
|
case Transform:
|
||||||
|
apa = new TransformPowerAction(powerAction, effects);
|
||||||
|
break;
|
||||||
|
case CreateMob:
|
||||||
|
apa = new CreateMobPowerAction(powerAction);
|
||||||
|
break;
|
||||||
|
case Invis:
|
||||||
|
apa = new InvisPowerAction(powerAction, effects);
|
||||||
|
break;
|
||||||
|
case ClearNearbyAggro:
|
||||||
|
apa = new ClearNearbyAggroPowerAction(powerAction);
|
||||||
|
break;
|
||||||
|
case MobRecall:
|
||||||
|
apa = new MobRecallPowerAction(powerAction);
|
||||||
|
break;
|
||||||
|
case SetItemFlag:
|
||||||
|
apa = new SetItemFlagPowerAction(powerAction);
|
||||||
|
break;
|
||||||
|
case SimpleDamage:
|
||||||
|
apa = new SimpleDamagePowerAction(powerAction);
|
||||||
|
break;
|
||||||
|
case TransferStatOT:
|
||||||
|
apa = new TransferStatOTPowerAction(powerAction, effects);
|
||||||
|
break;
|
||||||
|
case TransferStat:
|
||||||
|
apa = new TransferStatPowerAction(powerAction, effects);
|
||||||
|
break;
|
||||||
|
case Teleport:
|
||||||
|
apa = new TeleportPowerAction(powerAction);
|
||||||
|
break;
|
||||||
|
case TreeChoke:
|
||||||
|
apa = new TreeChokePowerAction(powerAction);
|
||||||
|
break;
|
||||||
|
case Block:
|
||||||
|
apa = new BlockPowerAction(powerAction);
|
||||||
|
break;
|
||||||
|
case Resurrect:
|
||||||
|
apa = new ResurrectPowerAction(powerAction);
|
||||||
|
break;
|
||||||
|
case ClaimMine:
|
||||||
|
apa = new ClaimMinePowerAction(powerAction);
|
||||||
|
break;
|
||||||
|
case Recall:
|
||||||
|
apa = new RecallPowerAction(powerAction);
|
||||||
|
break;
|
||||||
|
case SpireDisable:
|
||||||
|
apa = new SpireDisablePowerAction(powerAction);
|
||||||
|
break;
|
||||||
|
case Steal:
|
||||||
|
apa = new StealPowerAction(powerAction);
|
||||||
|
break;
|
||||||
|
case Summon:
|
||||||
|
apa = new SummonPowerAction(powerAction);
|
||||||
|
break;
|
||||||
|
case RunegateTeleport:
|
||||||
|
apa = new RunegateTeleportPowerAction(powerAction);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
PowersManager.powerActionsByIDString.put(IDString, apa);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// This pre-loads all powers and effects
|
||||||
|
public static void InitializePowers() {
|
||||||
|
|
||||||
|
EffectsParser.parseWpakFile();
|
||||||
|
PowersParser.parseWpakFile();
|
||||||
|
PowerActionParser.parseWpakFile();
|
||||||
|
|
||||||
|
//Initialize Effects Data
|
||||||
|
InitializeEffects();
|
||||||
|
|
||||||
|
//Initialize Power Actions
|
||||||
|
InitializePowerActions();
|
||||||
|
|
||||||
// get all PowersBase
|
// get all PowersBase
|
||||||
ArrayList<PowersBase> pbList = dbSkillReqHandler.getAllPowersBase();
|
ArrayList<PowersBase> pbList = dbSkillReqHandler.getAllPowersBase();
|
||||||
@@ -159,16 +269,6 @@ public enum PowersManager {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static EffectsBase setEffectToken(int ID, int token) {
|
|
||||||
for (EffectsBase eb : PowersManager.effectsBaseByIDString.values()) {
|
|
||||||
if (eb.getUUID() == ID) {
|
|
||||||
eb.setToken(token);
|
|
||||||
return eb;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void usePower(final PerformActionMsg msg, ClientConnection origin,
|
public static void usePower(final PerformActionMsg msg, ClientConnection origin,
|
||||||
boolean sendCastToSelf) {
|
boolean sendCastToSelf) {
|
||||||
|
|
||||||
@@ -957,7 +1057,7 @@ public enum PowersManager {
|
|||||||
// if (!stackType.equals("IgnoreStack")) {
|
// if (!stackType.equals("IgnoreStack")) {
|
||||||
if (target.getEffects().containsKey(stackType)) {
|
if (target.getEffects().containsKey(stackType)) {
|
||||||
// remove any existing power that overrides
|
// remove any existing power that overrides
|
||||||
Effect ef = target.getEffects().get(stackType);
|
engine.objects.Effect ef = target.getEffects().get(stackType);
|
||||||
AbstractEffectJob effect = null;
|
AbstractEffectJob effect = null;
|
||||||
if (ef != null) {
|
if (ef != null) {
|
||||||
JobContainer jc = ef.getJobContainer();
|
JobContainer jc = ef.getJobContainer();
|
||||||
@@ -1129,7 +1229,7 @@ public enum PowersManager {
|
|||||||
// if (!stackType.equals("IgnoreStack")) {
|
// if (!stackType.equals("IgnoreStack")) {
|
||||||
if (target.getEffects().containsKey(stackType)) {
|
if (target.getEffects().containsKey(stackType)) {
|
||||||
// remove any existing power that overrides
|
// remove any existing power that overrides
|
||||||
Effect ef = target.getEffects().get(stackType);
|
engine.objects.Effect ef = target.getEffects().get(stackType);
|
||||||
AbstractEffectJob effect = null;
|
AbstractEffectJob effect = null;
|
||||||
if (ef != null) {
|
if (ef != null) {
|
||||||
JobContainer jc = ef.getJobContainer();
|
JobContainer jc = ef.getJobContainer();
|
||||||
@@ -1443,7 +1543,7 @@ public enum PowersManager {
|
|||||||
stackType = (stackType.equals("IgnoreStack")) ? Integer.toString(ab.getUUID()) : stackType;
|
stackType = (stackType.equals("IgnoreStack")) ? Integer.toString(ab.getUUID()) : stackType;
|
||||||
if (target.getEffects().containsKey(stackType)) {
|
if (target.getEffects().containsKey(stackType)) {
|
||||||
// remove any existing power that overrides
|
// remove any existing power that overrides
|
||||||
Effect ef = target.getEffects().get(stackType);
|
engine.objects.Effect ef = target.getEffects().get(stackType);
|
||||||
AbstractEffectJob effect = null;
|
AbstractEffectJob effect = null;
|
||||||
if (ef != null) {
|
if (ef != null) {
|
||||||
JobContainer jc = ef.getJobContainer();
|
JobContainer jc = ef.getJobContainer();
|
||||||
@@ -1890,7 +1990,7 @@ public enum PowersManager {
|
|||||||
stackType = (stackType.equals("IgnoreStack")) ? Integer
|
stackType = (stackType.equals("IgnoreStack")) ? Integer
|
||||||
.toString(toRemove.getUUID()) : stackType;
|
.toString(toRemove.getUUID()) : stackType;
|
||||||
if (fromChant) {
|
if (fromChant) {
|
||||||
Effect eff = awo.getEffects().get(stackType);
|
engine.objects.Effect eff = awo.getEffects().get(stackType);
|
||||||
if (eff != null)
|
if (eff != null)
|
||||||
eff.cancelJob(true);
|
eff.cancelJob(true);
|
||||||
} else
|
} else
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import engine.job.AbstractScheduleJob;
|
|||||||
import engine.net.client.msg.PerformActionMsg;
|
import engine.net.client.msg.PerformActionMsg;
|
||||||
import engine.objects.PlayerCharacter;
|
import engine.objects.PlayerCharacter;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
|
import engine.wpak.data.Power;
|
||||||
|
|
||||||
public class UsePowerJob extends AbstractScheduleJob {
|
public class UsePowerJob extends AbstractScheduleJob {
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||||||
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||||||
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||||||
|
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
||||||
|
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
||||||
|
// Magicbane Emulator Project © 2013 - 2022
|
||||||
|
// www.magicbane.com
|
||||||
|
|
||||||
|
|
||||||
|
package engine.jobs;
|
||||||
|
|
||||||
|
import engine.gameManager.PowersManager;
|
||||||
|
import engine.job.AbstractScheduleJob;
|
||||||
|
import engine.net.client.msg.PerformActionMsg;
|
||||||
|
import engine.objects.AbstractWorldObject;
|
||||||
|
import engine.objects.PlayerCharacter;
|
||||||
|
import engine.wpakpowers.WpakPowerManager;
|
||||||
|
|
||||||
|
public class WpakUsePowerJob extends AbstractScheduleJob {
|
||||||
|
|
||||||
|
private final PlayerCharacter pc;
|
||||||
|
private final PerformActionMsg msg;
|
||||||
|
private AbstractWorldObject target;
|
||||||
|
|
||||||
|
public WpakUsePowerJob(PlayerCharacter pc, PerformActionMsg msg, AbstractWorldObject tar) {
|
||||||
|
super();
|
||||||
|
this.pc = pc;
|
||||||
|
this.msg = msg;
|
||||||
|
this.target = tar;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void doJob() {
|
||||||
|
WpakPowerManager.finishUsePower(this.msg, this.pc,this.target);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void _cancelJob() {
|
||||||
|
//cast stopped early, reset recycle timer
|
||||||
|
PowersManager.finishRecycleTime(this.msg, this.pc, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
+578
-438
File diff suppressed because it is too large
Load Diff
@@ -8,10 +8,10 @@
|
|||||||
|
|
||||||
package engine.net.client.handlers;
|
package engine.net.client.handlers;
|
||||||
|
|
||||||
import engine.gameManager.PowersManager;
|
|
||||||
import engine.net.client.ClientConnection;
|
import engine.net.client.ClientConnection;
|
||||||
import engine.net.client.msg.ClientNetMsg;
|
import engine.net.client.msg.ClientNetMsg;
|
||||||
import engine.net.client.msg.PerformActionMsg;
|
import engine.net.client.msg.PerformActionMsg;
|
||||||
|
import engine.wpakpowers.WpakPowerManager;
|
||||||
|
|
||||||
public class PerformActionMsgHandler extends AbstractClientMsgHandler {
|
public class PerformActionMsgHandler extends AbstractClientMsgHandler {
|
||||||
|
|
||||||
@@ -23,7 +23,8 @@ public class PerformActionMsgHandler extends AbstractClientMsgHandler {
|
|||||||
protected boolean _handleNetMsg(ClientNetMsg baseMsg, ClientConnection origin) {
|
protected boolean _handleNetMsg(ClientNetMsg baseMsg, ClientConnection origin) {
|
||||||
|
|
||||||
PerformActionMsg msg = (PerformActionMsg) baseMsg;
|
PerformActionMsg msg = (PerformActionMsg) baseMsg;
|
||||||
PowersManager.usePower(msg, origin, false); // Wtf ?
|
//PowersManager.beginCast(msg, origin, false); // Wtf ?
|
||||||
|
WpakPowerManager.beginCast(msg, origin, false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,8 +17,10 @@ import engine.net.client.msg.PerformActionMsg;
|
|||||||
import engine.net.client.msg.SendSummonsMsg;
|
import engine.net.client.msg.SendSummonsMsg;
|
||||||
import engine.objects.PlayerCharacter;
|
import engine.objects.PlayerCharacter;
|
||||||
import engine.server.MBServerStatics;
|
import engine.server.MBServerStatics;
|
||||||
|
import engine.wpakpowers.WpakPowerManager;
|
||||||
|
|
||||||
import static engine.gameManager.PowersManager.*;
|
import static engine.gameManager.PowersManager.sendPowerMsg;
|
||||||
|
import static engine.gameManager.PowersManager.sendRecyclePower;
|
||||||
|
|
||||||
public class SendSummonsMsgHandler extends AbstractClientMsgHandler {
|
public class SendSummonsMsgHandler extends AbstractClientMsgHandler {
|
||||||
|
|
||||||
@@ -81,7 +83,8 @@ public class SendSummonsMsgHandler extends AbstractClientMsgHandler {
|
|||||||
|
|
||||||
// Client removes 200 mana on summon use.. so don't send message to self
|
// Client removes 200 mana on summon use.. so don't send message to self
|
||||||
target.addSummoner(playerCharacter.getObjectUUID(), System.currentTimeMillis() + MBServerStatics.FOURTYFIVE_SECONDS);
|
target.addSummoner(playerCharacter.getObjectUUID(), System.currentTimeMillis() + MBServerStatics.FOURTYFIVE_SECONDS);
|
||||||
usePower(pam, origin, false);
|
//beginCast(pam, origin, false);
|
||||||
|
WpakPowerManager.beginCast(pam, origin, false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,15 +86,15 @@ public class TrackWindowMsgHandler extends AbstractClientMsgHandler {
|
|||||||
if (ablist == null)
|
if (ablist == null)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
TrackPowerAction tpa = null;
|
TrackPowerAction trackPowerAction = null;
|
||||||
|
|
||||||
for (ActionsBase ab : ablist) {
|
for (ActionsBase ab : ablist) {
|
||||||
AbstractPowerAction apa = ab.getPowerAction();
|
AbstractPowerAction apa = ab.getPowerAction();
|
||||||
if (apa != null && apa instanceof TrackPowerAction)
|
if (apa != null && apa instanceof TrackPowerAction)
|
||||||
tpa = (TrackPowerAction) apa;
|
trackPowerAction = (TrackPowerAction) apa;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tpa == null)
|
if (trackPowerAction == null)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Check powers for normal users
|
// Check powers for normal users
|
||||||
@@ -111,16 +111,16 @@ public class TrackWindowMsgHandler extends AbstractClientMsgHandler {
|
|||||||
int mask = 0;
|
int mask = 0;
|
||||||
|
|
||||||
if (pb.targetPlayer())
|
if (pb.targetPlayer())
|
||||||
if (tpa.trackVampire()) // track vampires
|
if (trackPowerAction.powerAction.trackEntry.filter.equals(mbEnums.MonsterType.Vampire)) // track vampires
|
||||||
mask = MBServerStatics.MASK_PLAYER | MBServerStatics.MASK_UNDEAD;
|
mask = MBServerStatics.MASK_PLAYER | MBServerStatics.MASK_UNDEAD;
|
||||||
else
|
else
|
||||||
// track all players
|
// track all players
|
||||||
mask = MBServerStatics.MASK_PLAYER;
|
mask = MBServerStatics.MASK_PLAYER;
|
||||||
else if (pb.targetCorpse()) // track corpses
|
else if (pb.targetCorpse()) // track corpses
|
||||||
mask = MBServerStatics.MASK_CORPSE;
|
mask = MBServerStatics.MASK_CORPSE;
|
||||||
else if (tpa.trackNPC()) // Track NPCs
|
else if (trackPowerAction.powerAction.trackEntry.filter.equals(mbEnums.MonsterType.NPC)) // Track NPCs
|
||||||
mask = MBServerStatics.MASK_NPC;
|
mask = MBServerStatics.MASK_NPC;
|
||||||
else if (tpa.trackUndead()) // Track Undead
|
else if (trackPowerAction.powerAction.trackEntry.filter.equals(mbEnums.MonsterType.Undead)) // Track Undead
|
||||||
mask = MBServerStatics.MASK_MOB | MBServerStatics.MASK_UNDEAD;
|
mask = MBServerStatics.MASK_MOB | MBServerStatics.MASK_UNDEAD;
|
||||||
else
|
else
|
||||||
// Track All
|
// Track All
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import engine.net.client.ClientConnection;
|
|||||||
import engine.net.client.msg.UpdateEffectsMsg;
|
import engine.net.client.msg.UpdateEffectsMsg;
|
||||||
import engine.powers.EffectsBase;
|
import engine.powers.EffectsBase;
|
||||||
import engine.server.MBServerStatics;
|
import engine.server.MBServerStatics;
|
||||||
|
import engine.wpakpowers.AppliedEffect;
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
@@ -60,6 +61,10 @@ public abstract class AbstractWorldObject extends AbstractGameObject {
|
|||||||
private int objectTypeMask = 0;
|
private int objectTypeMask = 0;
|
||||||
private Bounds bounds;
|
private Bounds bounds;
|
||||||
|
|
||||||
|
// Effects collection for wpak power manager
|
||||||
|
|
||||||
|
public ConcurrentHashMap<engine.wpak.data.Effect, AppliedEffect> _effects = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* No Id Constructor
|
* No Id Constructor
|
||||||
*/
|
*/
|
||||||
@@ -375,7 +380,7 @@ public abstract class AbstractWorldObject extends AbstractGameObject {
|
|||||||
if (eff == null) {
|
if (eff == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (eff.containsSource(source) && trains >= eff.getTrains()) {
|
if (eff.getEffectsBase().effectSources.contains(source) && trains >= eff.getTrains()) {
|
||||||
if (removeAll) {
|
if (removeAll) {
|
||||||
//remove all effects of source type
|
//remove all effects of source type
|
||||||
if (eff.cancel()) {
|
if (eff.cancel()) {
|
||||||
|
|||||||
@@ -561,7 +561,7 @@ public class Building extends AbstractWorldObject {
|
|||||||
BuildingManager.setRank(barracksBuilding, -1);
|
BuildingManager.setRank(barracksBuilding, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the tree is R8 and deranking, we need to update it's
|
// If the tree is R8 and deranking, we need to update the
|
||||||
// mesh along with buildings losing their health bonus
|
// mesh along with buildings losing their health bonus
|
||||||
|
|
||||||
if (this.rank == 8) {
|
if (this.rank == 8) {
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.ThreadLocalRandom;
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
|
|
||||||
public class City extends AbstractWorldObject {
|
public class City extends AbstractWorldObject {
|
||||||
@@ -80,6 +81,7 @@ public class City extends AbstractWorldObject {
|
|||||||
private String hash;
|
private String hash;
|
||||||
public Warehouse warehouse;
|
public Warehouse warehouse;
|
||||||
public Realm realm;
|
public Realm realm;
|
||||||
|
public AtomicBoolean isDestroyed = new AtomicBoolean(false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ResultSet Constructor
|
* ResultSet Constructor
|
||||||
@@ -306,6 +308,21 @@ public class City extends AbstractWorldObject {
|
|||||||
if (city.parentZone == null)
|
if (city.parentZone == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// Can't teleport to something without a tree
|
||||||
|
|
||||||
|
if (city.getTOL() == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// No abandoned cities
|
||||||
|
|
||||||
|
if (city.getTOL().getGuild().isEmptyGuild())
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// No destroyed cities
|
||||||
|
|
||||||
|
if (city.getTOL().getRank() == -1)
|
||||||
|
continue;
|
||||||
|
|
||||||
//can't repledge to a guild you're already part of
|
//can't repledge to a guild you're already part of
|
||||||
|
|
||||||
if (repledge && city.getGuild().equals(playerCharacter.guild))
|
if (repledge && city.getGuild().equals(playerCharacter.guild))
|
||||||
@@ -1102,17 +1119,21 @@ public class City extends AbstractWorldObject {
|
|||||||
|
|
||||||
public final void destroy() {
|
public final void destroy() {
|
||||||
|
|
||||||
|
if (this.isDestroyed.compareAndSet(false, true)) {
|
||||||
|
|
||||||
Thread destroyCityThread = new Thread(new DestroyCityThread(this));
|
Thread destroyCityThread = new Thread(new DestroyCityThread(this));
|
||||||
|
|
||||||
destroyCityThread.setName("destroyCity:" + this.getName());
|
destroyCityThread.setName("destroyCity:" + this.getParent().zoneName);
|
||||||
destroyCityThread.start();
|
destroyCityThread.start();
|
||||||
|
} else
|
||||||
|
Logger.error("Attempt to destroy destroyed city");
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void transfer(AbstractCharacter newOwner) {
|
public final void transfer(AbstractCharacter newOwner) {
|
||||||
|
|
||||||
Thread transferCityThread = new Thread(new TransferCityThread(this, newOwner));
|
Thread transferCityThread = new Thread(new TransferCityThread(this, newOwner));
|
||||||
|
|
||||||
transferCityThread.setName("TransferCity:" + this.getName());
|
transferCityThread.setName("TransferCity:" + this.getParent().zoneName);
|
||||||
transferCityThread.start();
|
transferCityThread.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -433,12 +433,6 @@ public class Effect {
|
|||||||
return duration;
|
return duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean containsSource(EffectSourceType source) {
|
|
||||||
if (this.eb != null)
|
|
||||||
return this.eb.containsSource(source);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public JobContainer getJobContainer() {
|
public JobContainer getJobContainer() {
|
||||||
return this.jc;
|
return this.jc;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -220,8 +220,7 @@ public class Mine extends AbstractGameObject {
|
|||||||
// Only inactive mines are returned.
|
// Only inactive mines are returned.
|
||||||
|
|
||||||
for (Mine mine : Mine.mineMap.keySet()) {
|
for (Mine mine : Mine.mineMap.keySet()) {
|
||||||
if (mine.owningGuild.getObjectUUID() == guildID &&
|
if (mine.owningGuild.getObjectUUID() == guildID)
|
||||||
mine.isActive == false)
|
|
||||||
mineList.add(mine);
|
mineList.add(mine);
|
||||||
}
|
}
|
||||||
return mineList;
|
return mineList;
|
||||||
|
|||||||
+365
-207
@@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
package engine.powers;
|
package engine.powers;
|
||||||
|
|
||||||
import engine.gameManager.DbManager;
|
|
||||||
import engine.gameManager.DispatchManager;
|
import engine.gameManager.DispatchManager;
|
||||||
import engine.gameManager.PowersManager;
|
import engine.gameManager.PowersManager;
|
||||||
import engine.job.JobContainer;
|
import engine.job.JobContainer;
|
||||||
@@ -26,63 +25,60 @@ import engine.net.client.ClientConnection;
|
|||||||
import engine.net.client.msg.ApplyEffectMsg;
|
import engine.net.client.msg.ApplyEffectMsg;
|
||||||
import engine.objects.AbstractCharacter;
|
import engine.objects.AbstractCharacter;
|
||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Effect;
|
import engine.objects.Item;
|
||||||
import engine.objects.PlayerCharacter;
|
import engine.objects.PlayerCharacter;
|
||||||
import engine.powers.effectmodifiers.AbstractEffectModifier;
|
import engine.powers.effectmodifiers.*;
|
||||||
import engine.server.MBServerStatics;
|
import engine.server.MBServerStatics;
|
||||||
|
import engine.util.Hasher;
|
||||||
|
import engine.wpak.data.ConditionEntry;
|
||||||
|
import engine.wpak.data.Effect;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.sql.Connection;
|
|
||||||
import java.sql.PreparedStatement;
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
public class EffectsBase {
|
public class EffectsBase {
|
||||||
|
private static final ConcurrentHashMap<String, String> itemEffectsByName = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
|
||||||
public static HashMap<Integer, HashSet<EffectSourceType>> effectSourceTypeMap = new HashMap<>();
|
public static int NewID = 3000;
|
||||||
public static HashMap<String, HashSet<AbstractEffectModifier>> modifiersMap = new HashMap<>();
|
public int UUID;
|
||||||
public static HashMap<String, HashMap<String, ArrayList<String>>> OldEffectsMap = new HashMap<>();
|
public String IDString;
|
||||||
public static HashMap<String, HashMap<String, ArrayList<String>>> NewEffectsMap = new HashMap<>();
|
// public String name;
|
||||||
public static HashMap<String, HashMap<String, ArrayList<String>>> ChangedEffectsMap = new HashMap<>();
|
public int token;
|
||||||
public static HashMap<String, HashSet<PowerFailCondition>> EffectFailConditions = new HashMap<>();
|
public float amount;
|
||||||
public static HashMap<Integer, HashSet<mbEnums.DamageType>> EffectDamageTypes = new HashMap<>();
|
public float amountRamp;
|
||||||
public static HashSet<AbstractEffectModifier> DefaultModifiers = new HashSet<>();
|
|
||||||
private static ConcurrentHashMap<String, String> itemEffectsByName = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
|
|
||||||
private static int NewID = 3000;
|
|
||||||
private int UUID;
|
|
||||||
private String IDString;
|
|
||||||
// private String name;
|
|
||||||
private int token;
|
|
||||||
private float amount;
|
|
||||||
private float amountRamp;
|
|
||||||
// flags
|
// flags
|
||||||
private boolean isItemEffect;
|
public boolean isItemEffect;
|
||||||
private boolean isSpireEffect;
|
public boolean isSpireEffect;
|
||||||
private boolean ignoreMod;
|
public boolean ignoreNoMod;
|
||||||
private boolean dontSave;
|
public boolean dontSave;
|
||||||
private boolean cancelOnAttack = false;
|
public boolean cancelOnAttack = false;
|
||||||
private boolean cancelOnAttackSwing = false;
|
public boolean cancelOnAttackSwing = false;
|
||||||
private boolean cancelOnCast = false;
|
public boolean cancelOnCast = false;
|
||||||
private boolean cancelOnCastSpell = false;
|
public boolean cancelOnCastSpell = false;
|
||||||
private boolean cancelOnEquipChange = false;
|
public boolean cancelOnEquipChange = false;
|
||||||
private boolean cancelOnLogout = false;
|
public boolean cancelOnLogout = false;
|
||||||
private boolean cancelOnMove = false;
|
public boolean cancelOnMove = false;
|
||||||
private boolean cancelOnNewCharm = false;
|
public boolean cancelOnNewCharm = false;
|
||||||
private boolean cancelOnSit = false;
|
public boolean cancelOnSit = false;
|
||||||
private boolean cancelOnTakeDamage = false;
|
public boolean cancelOnTakeDamage = false;
|
||||||
private boolean cancelOnTerritoryClaim = false;
|
public boolean cancelOnTerritoryClaim = false;
|
||||||
private boolean cancelOnUnEquip = false;
|
public boolean cancelOnUnEquip = false;
|
||||||
private boolean useRampAdd;
|
public boolean useRampAdd;
|
||||||
private boolean isPrefix = false; //used by items
|
public boolean isPrefix = false; //used by items
|
||||||
private boolean isSuffix = false; //used by items
|
public boolean isSuffix = false; //used by items
|
||||||
private String name = "";
|
public String name = "";
|
||||||
private float value = 0;
|
public float value = 0;
|
||||||
private ConcurrentHashMap<mbEnums.ResourceType, Integer> resourceCosts = new ConcurrentHashMap<>();
|
private ConcurrentHashMap<mbEnums.ResourceType, Integer> resourceCosts = new ConcurrentHashMap<>();
|
||||||
private ConcurrentHashMap<String, Boolean> sourceTypes = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
|
|
||||||
|
//loaded values from parser
|
||||||
|
public HashSet<EffectSourceType> effectSources = new HashSet<>();
|
||||||
|
public HashSet<AbstractEffectModifier> effectModifiers = new HashSet<>();
|
||||||
|
public HashSet<PowerFailCondition> effectFailCondition = new HashSet<>();
|
||||||
|
|
||||||
|
public HashSet<mbEnums.DamageType> effectDamageTypes = new HashSet<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* No Table ID Constructor
|
* No Table ID Constructor
|
||||||
@@ -91,6 +87,110 @@ public class EffectsBase {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EffectEntry Constructor
|
||||||
|
*/
|
||||||
|
|
||||||
|
public EffectsBase(Effect entry) {
|
||||||
|
this.IDString = entry.effect_id;
|
||||||
|
this.name = entry.effect_name;
|
||||||
|
this.token = Hasher.SBStringHash(entry.effect_name);
|
||||||
|
|
||||||
|
//override tokens for some effects like Safemode that use the Action Token instead of the effect Token,
|
||||||
|
switch (this.IDString) {
|
||||||
|
case "INVIS-D":
|
||||||
|
this.token = -1661751254;
|
||||||
|
break;
|
||||||
|
case "SafeMode":
|
||||||
|
this.token = -1661750486;
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
this.isItemEffect = entry.isItemEffect;
|
||||||
|
this.isSpireEffect = entry.isSpireEffect;
|
||||||
|
this.ignoreNoMod = entry.ignoreNoMod;
|
||||||
|
this.dontSave = entry.dontSave;
|
||||||
|
|
||||||
|
if (this.IDString.startsWith("PRE-"))
|
||||||
|
this.isPrefix = true;
|
||||||
|
else if (this.IDString.startsWith("SUF-"))
|
||||||
|
this.isSuffix = true;
|
||||||
|
|
||||||
|
//load effect modifiers
|
||||||
|
for (ModifierEntry mod : entry.mods)
|
||||||
|
this.effectModifiers.add(getCombinedModifiers(null, mod, this, mod.type));
|
||||||
|
|
||||||
|
//load sources
|
||||||
|
for (String source : entry.sources)
|
||||||
|
this.effectSources.add(EffectSourceType.GetEffectSourceType(source));
|
||||||
|
|
||||||
|
//load fail conditions
|
||||||
|
for (ConditionEntry condition : entry.conditions) {
|
||||||
|
PowerFailCondition failCondition = PowerFailCondition.valueOf(condition.condition);
|
||||||
|
this.effectFailCondition.add(failCondition);
|
||||||
|
loadFailConditions(failCondition, this, condition);
|
||||||
|
|
||||||
|
//add all damage types
|
||||||
|
if(!condition.damageTypes.isEmpty())
|
||||||
|
this.effectDamageTypes.addAll(condition.damageTypes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void loadFailConditions(PowerFailCondition failCondition, EffectsBase eb, ConditionEntry entry) {
|
||||||
|
|
||||||
|
if (failCondition == null || eb == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (failCondition) {
|
||||||
|
|
||||||
|
case TakeDamage:
|
||||||
|
|
||||||
|
eb.cancelOnTakeDamage = true;
|
||||||
|
|
||||||
|
|
||||||
|
eb.amount = entry.arg;
|
||||||
|
eb.amountRamp = (float) entry.curveType.value;
|
||||||
|
eb.useRampAdd = (float) entry.curveType.value != 0;
|
||||||
|
break;
|
||||||
|
case Attack:
|
||||||
|
eb.cancelOnAttack = true;
|
||||||
|
break;
|
||||||
|
case AttackSwing:
|
||||||
|
eb.cancelOnAttackSwing = true;
|
||||||
|
break;
|
||||||
|
case Cast:
|
||||||
|
eb.cancelOnCast = true;
|
||||||
|
break;
|
||||||
|
case CastSpell:
|
||||||
|
eb.cancelOnCastSpell = true;
|
||||||
|
break;
|
||||||
|
case EquipChange:
|
||||||
|
eb.cancelOnEquipChange = true;
|
||||||
|
break;
|
||||||
|
case Logout:
|
||||||
|
eb.cancelOnLogout = true;
|
||||||
|
break;
|
||||||
|
case Move:
|
||||||
|
eb.cancelOnMove = true;
|
||||||
|
break;
|
||||||
|
case NewCharm:
|
||||||
|
eb.cancelOnNewCharm = true;
|
||||||
|
break;
|
||||||
|
case Sit:
|
||||||
|
eb.cancelOnSit = true;
|
||||||
|
break;
|
||||||
|
case TerritoryClaim:
|
||||||
|
eb.cancelOnTerritoryClaim = true;
|
||||||
|
break;
|
||||||
|
case UnEquip:
|
||||||
|
eb.cancelOnUnEquip = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public EffectsBase(EffectsBase copyEffect, int newToken, String IDString) {
|
public EffectsBase(EffectsBase copyEffect, int newToken, String IDString) {
|
||||||
|
|
||||||
UUID = NewID++;
|
UUID = NewID++;
|
||||||
@@ -102,7 +202,7 @@ public class EffectsBase {
|
|||||||
int flags = 0;
|
int flags = 0;
|
||||||
this.isItemEffect = ((flags & 1) != 0) ? true : false;
|
this.isItemEffect = ((flags & 1) != 0) ? true : false;
|
||||||
this.isSpireEffect = ((flags & 2) != 0) ? true : false;
|
this.isSpireEffect = ((flags & 2) != 0) ? true : false;
|
||||||
this.ignoreMod = ((flags & 4) != 0) ? true : false;
|
this.ignoreNoMod = ((flags & 4) != 0) ? true : false;
|
||||||
this.dontSave = ((flags & 8) != 0) ? true : false;
|
this.dontSave = ((flags & 8) != 0) ? true : false;
|
||||||
|
|
||||||
if (this.IDString.startsWith("PRE-"))
|
if (this.IDString.startsWith("PRE-"))
|
||||||
@@ -117,7 +217,7 @@ public class EffectsBase {
|
|||||||
this.amountRamp = copyEffect.amountRamp;
|
this.amountRamp = copyEffect.amountRamp;
|
||||||
this.isItemEffect = copyEffect.isItemEffect;
|
this.isItemEffect = copyEffect.isItemEffect;
|
||||||
this.isSpireEffect = copyEffect.isSpireEffect;
|
this.isSpireEffect = copyEffect.isSpireEffect;
|
||||||
this.ignoreMod = copyEffect.ignoreMod;
|
this.ignoreNoMod = copyEffect.ignoreNoMod;
|
||||||
this.dontSave = copyEffect.dontSave;
|
this.dontSave = copyEffect.dontSave;
|
||||||
this.cancelOnAttack = copyEffect.cancelOnAttack;
|
this.cancelOnAttack = copyEffect.cancelOnAttack;
|
||||||
this.cancelOnAttackSwing = copyEffect.cancelOnAttackSwing;
|
this.cancelOnAttackSwing = copyEffect.cancelOnAttackSwing;
|
||||||
@@ -163,7 +263,7 @@ public class EffectsBase {
|
|||||||
int flags = rs.getInt("flags");
|
int flags = rs.getInt("flags");
|
||||||
this.isItemEffect = ((flags & 1) != 0) ? true : false;
|
this.isItemEffect = ((flags & 1) != 0) ? true : false;
|
||||||
this.isSpireEffect = ((flags & 2) != 0) ? true : false;
|
this.isSpireEffect = ((flags & 2) != 0) ? true : false;
|
||||||
this.ignoreMod = ((flags & 4) != 0) ? true : false;
|
this.ignoreNoMod = ((flags & 4) != 0) ? true : false;
|
||||||
this.dontSave = ((flags & 8) != 0) ? true : false;
|
this.dontSave = ((flags & 8) != 0) ? true : false;
|
||||||
|
|
||||||
if (this.IDString.startsWith("PRE-"))
|
if (this.IDString.startsWith("PRE-"))
|
||||||
@@ -173,113 +273,6 @@ public class EffectsBase {
|
|||||||
// getFailConditions();
|
// getFailConditions();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void getFailConditions(HashMap<String, EffectsBase> effects) {
|
|
||||||
|
|
||||||
try (Connection connection = DbManager.getConnection();
|
|
||||||
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM static_power_failcondition WHERE powerOrEffect = 'Effect';")) {
|
|
||||||
|
|
||||||
ResultSet rs = preparedStatement.executeQuery();
|
|
||||||
|
|
||||||
PowerFailCondition failCondition = null;
|
|
||||||
|
|
||||||
while (rs.next()) {
|
|
||||||
String fail = rs.getString("type");
|
|
||||||
|
|
||||||
|
|
||||||
String IDString = rs.getString("IDString");
|
|
||||||
failCondition = PowerFailCondition.valueOf(fail);
|
|
||||||
|
|
||||||
if (failCondition == null) {
|
|
||||||
Logger.error("Couldn't Find FailCondition " + fail + " for " + IDString);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (EffectsBase.EffectFailConditions.get(IDString) == null) {
|
|
||||||
EffectsBase.EffectFailConditions.put(IDString, new HashSet<>());
|
|
||||||
}
|
|
||||||
|
|
||||||
EffectsBase.EffectFailConditions.get(IDString).add(failCondition);
|
|
||||||
EffectsBase eb = effects.get(IDString);
|
|
||||||
|
|
||||||
switch (failCondition) {
|
|
||||||
|
|
||||||
case TakeDamage:
|
|
||||||
|
|
||||||
// dont go any further.
|
|
||||||
|
|
||||||
if (eb == null)
|
|
||||||
break;
|
|
||||||
|
|
||||||
eb.cancelOnTakeDamage = true;
|
|
||||||
|
|
||||||
|
|
||||||
eb.amount = rs.getFloat("amount");
|
|
||||||
eb.amountRamp = rs.getFloat("ramp");
|
|
||||||
eb.useRampAdd = rs.getBoolean("UseAddFormula");
|
|
||||||
|
|
||||||
String damageType1 = rs.getString("damageType1");
|
|
||||||
String damageType2 = rs.getString("damageType2");
|
|
||||||
String damageType3 = rs.getString("damageType3");
|
|
||||||
|
|
||||||
if (damageType1.isEmpty() && damageType2.isEmpty() && damageType3.isEmpty())
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (!EffectsBase.EffectDamageTypes.containsKey(eb.getToken()))
|
|
||||||
EffectsBase.EffectDamageTypes.put(eb.getToken(), new HashSet<>());
|
|
||||||
|
|
||||||
mbEnums.DamageType dt = mbEnums.DamageType.getDamageType(damageType1);
|
|
||||||
if (dt != null)
|
|
||||||
EffectsBase.EffectDamageTypes.get(eb.token).add(dt);
|
|
||||||
|
|
||||||
dt = mbEnums.DamageType.getDamageType(damageType2);
|
|
||||||
if (dt != null)
|
|
||||||
EffectsBase.EffectDamageTypes.get(eb.token).add(dt);
|
|
||||||
dt = mbEnums.DamageType.getDamageType(damageType3);
|
|
||||||
if (dt != null)
|
|
||||||
EffectsBase.EffectDamageTypes.get(eb.token).add(dt);
|
|
||||||
break;
|
|
||||||
case Attack:
|
|
||||||
eb.cancelOnAttack = true;
|
|
||||||
break;
|
|
||||||
case AttackSwing:
|
|
||||||
eb.cancelOnAttackSwing = true;
|
|
||||||
break;
|
|
||||||
case Cast:
|
|
||||||
eb.cancelOnCast = true;
|
|
||||||
break;
|
|
||||||
case CastSpell:
|
|
||||||
eb.cancelOnCastSpell = true;
|
|
||||||
break;
|
|
||||||
case EquipChange:
|
|
||||||
eb.cancelOnEquipChange = true;
|
|
||||||
break;
|
|
||||||
case Logout:
|
|
||||||
eb.cancelOnLogout = true;
|
|
||||||
break;
|
|
||||||
case Move:
|
|
||||||
eb.cancelOnMove = true;
|
|
||||||
break;
|
|
||||||
case NewCharm:
|
|
||||||
eb.cancelOnNewCharm = true;
|
|
||||||
break;
|
|
||||||
case Sit:
|
|
||||||
eb.cancelOnSit = true;
|
|
||||||
break;
|
|
||||||
case TerritoryClaim:
|
|
||||||
eb.cancelOnTerritoryClaim = true;
|
|
||||||
break;
|
|
||||||
case UnEquip:
|
|
||||||
eb.cancelOnUnEquip = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rs.close();
|
|
||||||
} catch (Exception e) {
|
|
||||||
Logger.error(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getItemEffectsByName(String string) {
|
public static String getItemEffectsByName(String string) {
|
||||||
if (EffectsBase.itemEffectsByName.containsKey(string))
|
if (EffectsBase.itemEffectsByName.containsKey(string))
|
||||||
return EffectsBase.itemEffectsByName.get(string);
|
return EffectsBase.itemEffectsByName.get(string);
|
||||||
@@ -303,14 +296,12 @@ public class EffectsBase {
|
|||||||
|
|
||||||
public boolean damageTypeSpecific() {
|
public boolean damageTypeSpecific() {
|
||||||
|
|
||||||
return EffectsBase.EffectDamageTypes.containsKey(this.token);
|
return !this.effectDamageTypes.isEmpty();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean containsDamageType(mbEnums.DamageType dt) {
|
public boolean containsDamageType(mbEnums.DamageType dt) {
|
||||||
if (!EffectsBase.EffectDamageTypes.containsKey(this.token))
|
return this.effectDamageTypes.contains(dt);
|
||||||
return false;
|
|
||||||
return EffectsBase.EffectDamageTypes.get(this.token).contains(dt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getUUID() {
|
public int getUUID() {
|
||||||
@@ -330,32 +321,8 @@ public class EffectsBase {
|
|||||||
this.token = token;
|
this.token = token;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConcurrentHashMap<String, Boolean> getSourceTypes() {
|
|
||||||
return this.sourceTypes;
|
|
||||||
}
|
|
||||||
|
|
||||||
public HashSet<AbstractEffectModifier> getModifiers() {
|
public HashSet<AbstractEffectModifier> getModifiers() {
|
||||||
|
return this.effectModifiers;
|
||||||
if (EffectsBase.modifiersMap.containsKey(this.IDString) == false)
|
|
||||||
return EffectsBase.DefaultModifiers;
|
|
||||||
|
|
||||||
return EffectsBase.modifiersMap.get(this.IDString);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isItemEffect() {
|
|
||||||
return this.isItemEffect;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSpireEffect() {
|
|
||||||
return this.isSpireEffect;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean ignoreMod() {
|
|
||||||
return this.ignoreMod;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean dontSave() {
|
|
||||||
return this.dontSave;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPrefix() {
|
public boolean isPrefix() {
|
||||||
@@ -404,7 +371,7 @@ public class EffectsBase {
|
|||||||
float duration = ab.getDurationInSeconds(trains);
|
float duration = ab.getDurationInSeconds(trains);
|
||||||
if (pb.getToken() == 1672601862) {
|
if (pb.getToken() == 1672601862) {
|
||||||
|
|
||||||
Effect eff = awo.getEffects().get("DeathShroud");
|
engine.objects.Effect eff = awo.getEffects().get("DeathShroud");
|
||||||
|
|
||||||
|
|
||||||
if (eff != null) {
|
if (eff != null) {
|
||||||
@@ -639,13 +606,6 @@ public class EffectsBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean containsSource(EffectSourceType sourceType) {
|
|
||||||
if (EffectsBase.effectSourceTypeMap.containsKey(this.token) == false)
|
|
||||||
return false;
|
|
||||||
return EffectsBase.effectSourceTypeMap.get(this.token).contains(sourceType);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean cancelOnAttack() {
|
public boolean cancelOnAttack() {
|
||||||
return this.cancelOnAttack;
|
return this.cancelOnAttack;
|
||||||
}
|
}
|
||||||
@@ -694,16 +654,6 @@ public class EffectsBase {
|
|||||||
return this.cancelOnUnEquip;
|
return this.cancelOnUnEquip;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDamageTypes() {
|
|
||||||
String text = "";
|
|
||||||
if (!EffectsBase.EffectDamageTypes.containsKey(this.token))
|
|
||||||
return text;
|
|
||||||
for (mbEnums.DamageType type : EffectsBase.EffectDamageTypes.get(this.token)) {
|
|
||||||
text += type.name() + ' ';
|
|
||||||
}
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
@@ -713,12 +663,220 @@ public class EffectsBase {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getValue() {
|
public static AbstractEffectModifier getCombinedModifiers(AbstractEffectModifier abstractEffectModifier, ModifierEntry rs, EffectsBase effectBase, mbEnums.ModType modifier){
|
||||||
return value;
|
switch (modifier) {
|
||||||
|
case AdjustAboveDmgCap:
|
||||||
|
abstractEffectModifier = new AdjustAboveDmgCapEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Ambidexterity:
|
||||||
|
abstractEffectModifier = new AmbidexterityEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case AnimOverride:
|
||||||
|
break;
|
||||||
|
case ArmorPiercing:
|
||||||
|
abstractEffectModifier = new ArmorPiercingEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case AttackDelay:
|
||||||
|
abstractEffectModifier = new AttackDelayEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Attr:
|
||||||
|
abstractEffectModifier = new AttributeEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case BlackMantle:
|
||||||
|
abstractEffectModifier = new BlackMantleEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case BladeTrails:
|
||||||
|
abstractEffectModifier = new BladeTrailsEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Block:
|
||||||
|
abstractEffectModifier = new BlockEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case BlockedPowerType:
|
||||||
|
abstractEffectModifier = new BlockedPowerTypeEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case CannotAttack:
|
||||||
|
abstractEffectModifier = new CannotAttackEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case CannotCast:
|
||||||
|
abstractEffectModifier = new CannotCastEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case CannotMove:
|
||||||
|
abstractEffectModifier = new CannotMoveEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case CannotTrack:
|
||||||
|
abstractEffectModifier = new CannotTrackEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Charmed:
|
||||||
|
abstractEffectModifier = new CharmedEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case ConstrainedAmbidexterity:
|
||||||
|
abstractEffectModifier = new ConstrainedAmbidexterityEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case DamageCap:
|
||||||
|
abstractEffectModifier = new DamageCapEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case DamageShield:
|
||||||
|
abstractEffectModifier = new DamageShieldEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case DCV:
|
||||||
|
abstractEffectModifier = new DCVEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Dodge:
|
||||||
|
abstractEffectModifier = new DodgeEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case DR:
|
||||||
|
abstractEffectModifier = new DREffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Durability:
|
||||||
|
abstractEffectModifier = new DurabilityEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case ExclusiveDamageCap:
|
||||||
|
abstractEffectModifier = new ExclusiveDamageCapEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Fade:
|
||||||
|
abstractEffectModifier = new FadeEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Fly:
|
||||||
|
abstractEffectModifier = new FlyEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Health:
|
||||||
|
abstractEffectModifier = new HealthEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case HealthFull:
|
||||||
|
abstractEffectModifier = new HealthFullEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case HealthRecoverRate:
|
||||||
|
abstractEffectModifier = new HealthRecoverRateEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case IgnoreDamageCap:
|
||||||
|
abstractEffectModifier = new IgnoreDamageCapEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case IgnorePassiveDefense:
|
||||||
|
abstractEffectModifier = new IgnorePassiveDefenseEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case ImmuneTo:
|
||||||
|
abstractEffectModifier = new ImmuneToEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case ImmuneToAttack:
|
||||||
|
abstractEffectModifier = new ImmuneToAttackEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case ImmuneToPowers:
|
||||||
|
abstractEffectModifier = new ImmuneToPowersEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Invisible:
|
||||||
|
abstractEffectModifier = new InvisibleEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case ItemName:
|
||||||
|
abstractEffectModifier = new ItemNameEffectModifier(rs);
|
||||||
|
if (((ItemNameEffectModifier) abstractEffectModifier).name.isEmpty())
|
||||||
|
break;
|
||||||
|
if (effectBase != null)
|
||||||
|
effectBase.setName((((ItemNameEffectModifier) abstractEffectModifier).name));
|
||||||
|
break;
|
||||||
|
case Mana:
|
||||||
|
abstractEffectModifier = new ManaEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case ManaFull:
|
||||||
|
abstractEffectModifier = new ManaFullEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case ManaRecoverRate:
|
||||||
|
abstractEffectModifier = new ManaRecoverRateEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case MaxDamage:
|
||||||
|
abstractEffectModifier = new MaxDamageEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case MeleeDamageModifier:
|
||||||
|
abstractEffectModifier = new MeleeDamageEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case MinDamage:
|
||||||
|
abstractEffectModifier = new MinDamageEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case NoMod:
|
||||||
|
abstractEffectModifier = new NoModEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case OCV:
|
||||||
|
abstractEffectModifier = new OCVEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Parry:
|
||||||
|
abstractEffectModifier = new ParryEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case PassiveDefense:
|
||||||
|
abstractEffectModifier = new PassiveDefenseEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case PowerCost:
|
||||||
|
abstractEffectModifier = new PowerCostEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case PowerCostHealth:
|
||||||
|
abstractEffectModifier = new PowerCostHealthEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case PowerDamageModifier:
|
||||||
|
abstractEffectModifier = new PowerDamageEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case ProtectionFrom:
|
||||||
|
abstractEffectModifier = new ProtectionFromEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Resistance:
|
||||||
|
abstractEffectModifier = new ResistanceEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case ScaleHeight:
|
||||||
|
abstractEffectModifier = new ScaleHeightEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case ScaleWidth:
|
||||||
|
abstractEffectModifier = new ScaleWidthEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case ScanRange:
|
||||||
|
abstractEffectModifier = new ScanRangeEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case SeeInvisible:
|
||||||
|
abstractEffectModifier = new SeeInvisibleEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Silenced:
|
||||||
|
abstractEffectModifier = new SilencedEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Skill:
|
||||||
|
abstractEffectModifier = new SkillEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Slay:
|
||||||
|
abstractEffectModifier = new SlayEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Speed:
|
||||||
|
abstractEffectModifier = new SpeedEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case SpireBlock:
|
||||||
|
abstractEffectModifier = new SpireBlockEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Stamina:
|
||||||
|
abstractEffectModifier = new StaminaEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case StaminaFull:
|
||||||
|
abstractEffectModifier = new StaminaFullEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case StaminaRecoverRate:
|
||||||
|
abstractEffectModifier = new StaminaRecoverRateEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Stunned:
|
||||||
|
abstractEffectModifier = new StunnedEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case Value:
|
||||||
|
abstractEffectModifier = new ValueEffectModifier(rs);
|
||||||
|
if (effectBase != null) {
|
||||||
|
ValueEffectModifier valueEffect = (ValueEffectModifier) abstractEffectModifier;
|
||||||
|
effectBase.value = valueEffect.minMod;
|
||||||
|
Item.addEnchantValue(effectBase.getIDString(), (int)valueEffect.minMod);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case WeaponProc:
|
||||||
|
abstractEffectModifier = new WeaponProcEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case WeaponRange:
|
||||||
|
abstractEffectModifier = new WeaponRangeEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
case WeaponSpeed:
|
||||||
|
abstractEffectModifier = new WeaponSpeedEffectModifier(rs);
|
||||||
|
break;
|
||||||
|
|
||||||
public void setValue(float Value) {
|
}
|
||||||
this.value = Value;
|
return abstractEffectModifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ import engine.objects.AbstractWorldObject;
|
|||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.powers.EffectsBase;
|
import engine.powers.EffectsBase;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
|
||||||
|
|
||||||
|
|
||||||
public abstract class AbstractEffectModifier {
|
public abstract class AbstractEffectModifier {
|
||||||
@@ -39,22 +39,24 @@ public abstract class AbstractEffectModifier {
|
|||||||
protected String string1;
|
protected String string1;
|
||||||
protected String string2;
|
protected String string2;
|
||||||
|
|
||||||
public AbstractEffectModifier(ResultSet rs) throws SQLException {
|
public AbstractEffectModifier(ResultSet rs){
|
||||||
|
|
||||||
this.UUID = rs.getInt("ID");
|
}
|
||||||
this.IDString = rs.getString("IDString");
|
public AbstractEffectModifier(ModifierEntry mod) {
|
||||||
this.effectType = rs.getString("modType");
|
|
||||||
this.modType = ModType.GetModType(this.effectType);
|
this.IDString = mod.type.name();
|
||||||
this.type = rs.getString("type").replace("\"", "");
|
this.effectType = mod.type.name();
|
||||||
|
this.modType = mod.type;
|
||||||
|
this.type = mod.type.name().replace("\"", "");
|
||||||
this.sourceType = SourceType.GetSourceType(this.type.replace(" ", "").replace("-", ""));
|
this.sourceType = SourceType.GetSourceType(this.type.replace(" ", "").replace("-", ""));
|
||||||
this.minMod = rs.getFloat("minMod");
|
this.minMod = mod.min;
|
||||||
this.maxMod = rs.getFloat("maxMod");
|
this.maxMod = mod.max;
|
||||||
this.percentMod = rs.getFloat("percentMod");
|
this.percentMod = mod.percentage;
|
||||||
this.ramp = rs.getFloat("ramp");
|
this.ramp = (float) mod.compoundCurveType.value;
|
||||||
this.useRampAdd = (rs.getInt("useRampAdd") == 1) ? true : false;
|
this.useRampAdd = (float) mod.compoundCurveType.value != 0;
|
||||||
|
|
||||||
this.string1 = rs.getString("string1");
|
this.string1 = mod.arg1;
|
||||||
this.string2 = rs.getString("string2");
|
this.string2 = mod.arg2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -18,7 +19,7 @@ import java.sql.SQLException;
|
|||||||
|
|
||||||
public class AdjustAboveDmgCapEffectModifier extends AbstractEffectModifier {
|
public class AdjustAboveDmgCapEffectModifier extends AbstractEffectModifier {
|
||||||
|
|
||||||
public AdjustAboveDmgCapEffectModifier(ResultSet rs) throws SQLException {
|
public AdjustAboveDmgCapEffectModifier(ModifierEntry rs){
|
||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import engine.jobs.AbstractEffectJob;
|
|||||||
import engine.mbEnums.ModType;
|
import engine.mbEnums.ModType;
|
||||||
import engine.mbEnums.SourceType;
|
import engine.mbEnums.SourceType;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -20,7 +21,7 @@ import java.sql.SQLException;
|
|||||||
|
|
||||||
public class AmbidexterityEffectModifier extends AbstractEffectModifier {
|
public class AmbidexterityEffectModifier extends AbstractEffectModifier {
|
||||||
|
|
||||||
public AmbidexterityEffectModifier(ResultSet rs) throws SQLException {
|
public AmbidexterityEffectModifier(ModifierEntry rs) {
|
||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -18,7 +19,7 @@ import java.sql.SQLException;
|
|||||||
|
|
||||||
public class ArmorPiercingEffectModifier extends AbstractEffectModifier {
|
public class ArmorPiercingEffectModifier extends AbstractEffectModifier {
|
||||||
|
|
||||||
public ArmorPiercingEffectModifier(ResultSet rs) throws SQLException {
|
public ArmorPiercingEffectModifier(ModifierEntry rs){
|
||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,9 @@ public class AttackDelayEffectModifier extends AbstractEffectModifier {
|
|||||||
public AttackDelayEffectModifier(ResultSet rs) throws SQLException {
|
public AttackDelayEffectModifier(ResultSet rs) throws SQLException {
|
||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
public AttackDelayEffectModifier(ModifierEntry rs){
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,6 +23,10 @@ public class AttributeEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AttributeEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import engine.jobs.AbstractEffectJob;
|
|||||||
import engine.mbEnums.ModType;
|
import engine.mbEnums.ModType;
|
||||||
import engine.mbEnums.SourceType;
|
import engine.mbEnums.SourceType;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
@@ -25,6 +27,10 @@ public class BlackMantleEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BlackMantleEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -24,6 +25,10 @@ public class BladeTrailsEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BladeTrailsEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,6 +23,10 @@ public class BlockEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BlockEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ package engine.powers.effectmodifiers;
|
|||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.mbEnums.ModType;
|
import engine.mbEnums.ModType;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -24,6 +25,10 @@ public class BlockedPowerTypeEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BlockedPowerTypeEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
@@ -37,7 +42,7 @@ public class BlockedPowerTypeEffectModifier extends AbstractEffectModifier {
|
|||||||
|
|
||||||
for (String effect : ac.getEffects().keySet()) {
|
for (String effect : ac.getEffects().keySet()) {
|
||||||
Effect eff = ac.getEffects().get(effect);
|
Effect eff = ac.getEffects().get(effect);
|
||||||
ModType toBlock = ModType.None;
|
ModType toBlock = null;
|
||||||
|
|
||||||
switch (this.sourceType) {
|
switch (this.sourceType) {
|
||||||
case Invisible:
|
case Invisible:
|
||||||
@@ -45,6 +50,10 @@ public class BlockedPowerTypeEffectModifier extends AbstractEffectModifier {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (toBlock == null)
|
||||||
|
return;
|
||||||
|
;
|
||||||
|
|
||||||
HashSet<AbstractEffectModifier> aemList = eff.getEffectModifiers();
|
HashSet<AbstractEffectModifier> aemList = eff.getEffectModifiers();
|
||||||
for (AbstractEffectModifier aem : aemList) {
|
for (AbstractEffectModifier aem : aemList) {
|
||||||
if (aem.modType.equals(toBlock)) {
|
if (aem.modType.equals(toBlock)) {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,6 +23,10 @@ public class CannotAttackEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CannotAttackEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ package engine.powers.effectmodifiers;
|
|||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.mbEnums;
|
import engine.mbEnums;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -23,6 +24,10 @@ public class CannotCastEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CannotCastEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,6 +23,10 @@ public class CannotMoveEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CannotMoveEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,6 +23,10 @@ public class CannotTrackEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CannotTrackEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -24,6 +25,10 @@ public class CharmedEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CharmedEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,6 +23,10 @@ public class ConstrainedAmbidexterityEffectModifier extends AbstractEffectModifi
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ConstrainedAmbidexterityEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,6 +23,10 @@ public class DCVEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DCVEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -24,6 +25,10 @@ public class DREffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DREffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,6 +23,10 @@ public class DamageCapEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DamageCapEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import engine.jobs.AbstractEffectJob;
|
|||||||
import engine.mbEnums;
|
import engine.mbEnums;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.powers.DamageShield;
|
import engine.powers.DamageShield;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -24,6 +25,10 @@ public class DamageShieldEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DamageShieldEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,6 +23,10 @@ public class DodgeEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DodgeEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -24,6 +25,10 @@ public class DurabilityEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DurabilityEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,6 +23,10 @@ public class ExclusiveDamageCapEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ExclusiveDamageCapEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -24,6 +25,10 @@ public class FadeEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public FadeEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class FlyEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public FlyEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import engine.net.AbstractNetMsg;
|
|||||||
import engine.net.client.msg.ModifyHealthKillMsg;
|
import engine.net.client.msg.ModifyHealthKillMsg;
|
||||||
import engine.net.client.msg.ModifyHealthMsg;
|
import engine.net.client.msg.ModifyHealthMsg;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
@@ -41,6 +42,10 @@ public class HealthEffectModifier extends AbstractEffectModifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public HealthEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
public static float getMinDamage(float baseMin, float intelligence, float spirit, float focus) {
|
public static float getMinDamage(float baseMin, float intelligence, float spirit, float focus) {
|
||||||
float min = baseMin * (((float) Math.pow(intelligence, 0.75f) * 0.0311f) + (0.02f * (int) focus) + ((float) Math.pow(spirit, 0.75f) * 0.0416f));
|
float min = baseMin * (((float) Math.pow(intelligence, 0.75f) * 0.0311f) + (0.02f * (int) focus) + ((float) Math.pow(spirit, 0.75f) * 0.0416f));
|
||||||
return (float) ((int) (min + 0.5f)); //round to nearest whole number
|
return (float) ((int) (min + 0.5f)); //round to nearest whole number
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class HealthFullEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public HealthFullEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class HealthRecoverRateEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public HealthRecoverRateEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,6 +23,10 @@ public class IgnoreDamageCapEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IgnoreDamageCapEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class IgnorePassiveDefenseEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IgnorePassiveDefenseEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class ImmuneToAttackEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ImmuneToAttackEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class ImmuneToEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ImmuneToEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class ImmuneToPowersEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ImmuneToPowersEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import engine.net.client.ClientConnection;
|
|||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.powers.ActionsBase;
|
import engine.powers.ActionsBase;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
@@ -27,6 +28,10 @@ public class InvisibleEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public InvisibleEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import engine.objects.AbstractWorldObject;
|
|||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.powers.EffectsBase;
|
import engine.powers.EffectsBase;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -122,6 +123,10 @@ public class ItemNameEffectModifier extends AbstractEffectModifier {
|
|||||||
EffectsBase.addItemEffectsByName(n, IDString);
|
EffectsBase.addItemEffectsByName(n, IDString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ItemNameEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return this.name;
|
return this.name;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import engine.powers.ActionsBase;
|
|||||||
import engine.powers.poweractions.AbstractPowerAction;
|
import engine.powers.poweractions.AbstractPowerAction;
|
||||||
import engine.powers.poweractions.DamageOverTimePowerAction;
|
import engine.powers.poweractions.DamageOverTimePowerAction;
|
||||||
import engine.powers.poweractions.DirectDamagePowerAction;
|
import engine.powers.poweractions.DirectDamagePowerAction;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
@@ -43,6 +44,10 @@ public class ManaEffectModifier extends AbstractEffectModifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ManaEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
if (awo == null) {
|
if (awo == null) {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class ManaFullEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ManaFullEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class ManaRecoverRateEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ManaRecoverRateEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -24,6 +25,10 @@ public class MaxDamageEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MaxDamageEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class MeleeDamageEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MeleeDamageEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -24,6 +25,10 @@ public class MinDamageEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MinDamageEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ package engine.powers.effectmodifiers;
|
|||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.mbEnums.GameObjectType;
|
import engine.mbEnums.GameObjectType;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,6 +23,10 @@ public class NoModEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public NoModEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
//TODO check if anything needs removed.
|
//TODO check if anything needs removed.
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class OCVEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public OCVEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class ParryEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ParryEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class PassiveDefenseEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PassiveDefenseEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class PowerCostEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PowerCostEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -24,6 +25,10 @@ public class PowerCostHealthEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PowerCostHealthEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class PowerDamageEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PowerDamageEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class ProtectionFromEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ProtectionFromEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class ResistanceEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ResistanceEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -24,6 +25,10 @@ public class ScaleHeightEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ScaleHeightEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -24,6 +25,10 @@ public class ScaleWidthEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ScaleWidthEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class ScanRangeEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ScanRangeEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class SeeInvisibleEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SeeInvisibleEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class SilencedEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SilencedEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class SkillEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SkillEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class SlayEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SlayEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class SpeedEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SpeedEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
//Logger.error(this.getSimpleClassName(), "Speed applied with " + trains + " trains");
|
//Logger.error(this.getSimpleClassName(), "Speed applied with " + trains + " trains");
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class SpireBlockEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SpireBlockEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import engine.powers.ActionsBase;
|
|||||||
import engine.powers.poweractions.AbstractPowerAction;
|
import engine.powers.poweractions.AbstractPowerAction;
|
||||||
import engine.powers.poweractions.DamageOverTimePowerAction;
|
import engine.powers.poweractions.DamageOverTimePowerAction;
|
||||||
import engine.powers.poweractions.DirectDamagePowerAction;
|
import engine.powers.poweractions.DirectDamagePowerAction;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
@@ -43,6 +44,10 @@ public class StaminaEffectModifier extends AbstractEffectModifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public StaminaEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
if (awo == null) {
|
if (awo == null) {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class StaminaFullEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public StaminaFullEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class StaminaRecoverRateEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public StaminaRecoverRateEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ package engine.powers.effectmodifiers;
|
|||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.mbEnums.GameObjectType;
|
import engine.mbEnums.GameObjectType;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,6 +23,10 @@ public class StunnedEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public StunnedEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -24,6 +25,10 @@ public class ValueEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ValueEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -26,6 +27,10 @@ public class WeaponProcEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public WeaponProcEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,6 +22,10 @@ public class WeaponRangeEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public WeaponRangeEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
|
import engine.wpak.data.ModifierEntry;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -24,6 +25,10 @@ public class WeaponSpeedEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public WeaponSpeedEffectModifier(ModifierEntry rs) {
|
||||||
|
super(rs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -9,22 +9,15 @@
|
|||||||
|
|
||||||
package engine.powers.poweractions;
|
package engine.powers.poweractions;
|
||||||
|
|
||||||
import engine.gameManager.DbManager;
|
|
||||||
import engine.gameManager.PowersManager;
|
|
||||||
import engine.math.Vector3fImmutable;
|
import engine.math.Vector3fImmutable;
|
||||||
|
import engine.mbEnums;
|
||||||
import engine.objects.AbstractCharacter;
|
import engine.objects.AbstractCharacter;
|
||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.powers.ActionsBase;
|
import engine.powers.ActionsBase;
|
||||||
import engine.powers.EffectsBase;
|
import engine.powers.EffectsBase;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
import org.pmw.tinylog.Logger;
|
import engine.wpak.data.PowerAction;
|
||||||
|
|
||||||
import java.sql.Connection;
|
|
||||||
import java.sql.PreparedStatement;
|
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
|
|
||||||
public abstract class AbstractPowerAction {
|
public abstract class AbstractPowerAction {
|
||||||
@@ -32,7 +25,7 @@ public abstract class AbstractPowerAction {
|
|||||||
protected PowersBase parent;
|
protected PowersBase parent;
|
||||||
protected int UUID;
|
protected int UUID;
|
||||||
protected String IDString;
|
protected String IDString;
|
||||||
protected String type;
|
protected mbEnums.PowerActionType type;
|
||||||
protected boolean isAggressive;
|
protected boolean isAggressive;
|
||||||
protected long validItemFlags;
|
protected long validItemFlags;
|
||||||
|
|
||||||
@@ -46,16 +39,15 @@ public abstract class AbstractPowerAction {
|
|||||||
/**
|
/**
|
||||||
* ResultSet Constructor
|
* ResultSet Constructor
|
||||||
*/
|
*/
|
||||||
public AbstractPowerAction(ResultSet rs) throws SQLException {
|
public AbstractPowerAction(PowerAction powerAction) {
|
||||||
|
|
||||||
this.UUID = rs.getInt("ID");
|
this.IDString = powerAction.action_id;
|
||||||
this.IDString = rs.getString("IDString");
|
this.type = powerAction.action_type;
|
||||||
this.type = rs.getString("type");
|
int flags = powerAction.itemFlag.ordinal();
|
||||||
int flags = rs.getInt("flags");
|
this.isAggressive = powerAction.isAggressive;
|
||||||
this.isAggressive = ((flags & 128) != 0) ? true : false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public AbstractPowerAction(int uUID, String iDString, String type, boolean isAggressive,
|
public AbstractPowerAction(int uUID, String iDString, mbEnums.PowerActionType type, boolean isAggressive,
|
||||||
long validItemFlags) {
|
long validItemFlags) {
|
||||||
super();
|
super();
|
||||||
UUID = uUID;
|
UUID = uUID;
|
||||||
@@ -64,139 +56,6 @@ public abstract class AbstractPowerAction {
|
|||||||
this.isAggressive = false;
|
this.isAggressive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void getAllPowerActions(HashMap<String, AbstractPowerAction> powerActions, HashMap<Integer, AbstractPowerAction> powerActionsByID, HashMap<String, EffectsBase> effects) {
|
|
||||||
|
|
||||||
|
|
||||||
try (Connection connection = DbManager.getConnection();
|
|
||||||
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM static_power_poweraction")) {
|
|
||||||
|
|
||||||
ResultSet rs = preparedStatement.executeQuery();
|
|
||||||
String IDString, type;
|
|
||||||
|
|
||||||
while (rs.next()) {
|
|
||||||
AbstractPowerAction apa;
|
|
||||||
type = rs.getString("type");
|
|
||||||
IDString = rs.getString("IDString");
|
|
||||||
int token = DbManager.hasher.SBStringHash(IDString);
|
|
||||||
//cache token, used for applying effects.
|
|
||||||
PowersManager.ActionTokenByIDString.put(IDString, token);
|
|
||||||
apa = null;
|
|
||||||
switch (type) {
|
|
||||||
default:
|
|
||||||
Logger.error("valid type not found for poweraction of ID" + rs.getInt("ID"));
|
|
||||||
break;
|
|
||||||
case "ApplyEffect":
|
|
||||||
apa = new ApplyEffectPowerAction(rs, effects);
|
|
||||||
break;
|
|
||||||
case "ApplyEffects":
|
|
||||||
apa = new ApplyEffectsPowerAction(rs, effects);
|
|
||||||
break;
|
|
||||||
case "DeferredPower":
|
|
||||||
apa = new DeferredPowerPowerAction(rs, effects);
|
|
||||||
break;
|
|
||||||
case "DamageOverTime":
|
|
||||||
apa = new DamageOverTimePowerAction(rs, effects);
|
|
||||||
break;
|
|
||||||
case "Peek":
|
|
||||||
apa = new PeekPowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "Charm":
|
|
||||||
apa = new CharmPowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "Fear":
|
|
||||||
apa = new FearPowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "Confusion":
|
|
||||||
apa = new ConfusionPowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "RemoveEffect":
|
|
||||||
apa = new RemoveEffectPowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "Track":
|
|
||||||
apa = new TrackPowerAction(rs, effects);
|
|
||||||
break;
|
|
||||||
case "DirectDamage":
|
|
||||||
apa = new DirectDamagePowerAction(rs, effects);
|
|
||||||
break;
|
|
||||||
case "Transform":
|
|
||||||
apa = new TransformPowerAction(rs, effects);
|
|
||||||
break;
|
|
||||||
case "CreateMob":
|
|
||||||
apa = new CreateMobPowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "Invis":
|
|
||||||
apa = new InvisPowerAction(rs, effects);
|
|
||||||
break;
|
|
||||||
case "ClearNearbyAggro":
|
|
||||||
apa = new ClearNearbyAggroPowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "MobRecall":
|
|
||||||
apa = new MobRecallPowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "SetItemFlag":
|
|
||||||
apa = new SetItemFlagPowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "SimpleDamage":
|
|
||||||
apa = new SimpleDamagePowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "TransferStatOT":
|
|
||||||
apa = new TransferStatOTPowerAction(rs, effects);
|
|
||||||
break;
|
|
||||||
case "TransferStat":
|
|
||||||
apa = new TransferStatPowerAction(rs, effects);
|
|
||||||
break;
|
|
||||||
case "Teleport":
|
|
||||||
apa = new TeleportPowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "TreeChoke":
|
|
||||||
apa = new TreeChokePowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "Block":
|
|
||||||
apa = new BlockPowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "Resurrect":
|
|
||||||
apa = new ResurrectPowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "ClearAggro":
|
|
||||||
apa = new ClearAggroPowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "ClaimMine":
|
|
||||||
apa = new ClaimMinePowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "Recall":
|
|
||||||
apa = new RecallPowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "SpireDisable":
|
|
||||||
apa = new SpireDisablePowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "Steal":
|
|
||||||
apa = new StealPowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "Summon":
|
|
||||||
apa = new SummonPowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "RunegateTeleport":
|
|
||||||
apa = new RunegateTeleportPowerAction(rs);
|
|
||||||
break;
|
|
||||||
case "OpenGate":
|
|
||||||
apa = new OpenGatePowerAction(rs);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
powerActions.put(IDString, apa);
|
|
||||||
powerActionsByID.put(apa.UUID, apa);
|
|
||||||
apa.validItemFlags = 0;
|
|
||||||
}
|
|
||||||
rs.close();
|
|
||||||
} catch (Exception e) {
|
|
||||||
Logger.error(e.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
//Add OpenGatePowerAction
|
|
||||||
AbstractPowerAction openGateAction = new OpenGatePowerAction(5000, "OPENGATE", "OpenGate", false, 0);
|
|
||||||
powerActions.put("OPENGATE", openGateAction);
|
|
||||||
powerActionsByID.put(openGateAction.UUID, openGateAction);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void startAction(AbstractCharacter source, AbstractWorldObject awo, Vector3fImmutable targetLoc, int numTrains, ActionsBase ab, PowersBase pb) {
|
public void startAction(AbstractCharacter source, AbstractWorldObject awo, Vector3fImmutable targetLoc, int numTrains, ActionsBase ab, PowersBase pb) {
|
||||||
this._startAction(source, awo, targetLoc, numTrains, ab, pb);
|
this._startAction(source, awo, targetLoc, numTrains, ab, pb);
|
||||||
}
|
}
|
||||||
@@ -272,7 +131,7 @@ public abstract class AbstractPowerAction {
|
|||||||
return this.validItemFlags;
|
return this.validItemFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getType() {
|
public mbEnums.PowerActionType getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,10 +25,9 @@ import engine.powers.ActionsBase;
|
|||||||
import engine.powers.EffectsBase;
|
import engine.powers.EffectsBase;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
import engine.server.MBServerStatics;
|
import engine.server.MBServerStatics;
|
||||||
|
import engine.wpak.data.PowerAction;
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
public class ApplyEffectPowerAction extends AbstractPowerAction {
|
public class ApplyEffectPowerAction extends AbstractPowerAction {
|
||||||
@@ -38,11 +37,11 @@ public class ApplyEffectPowerAction extends AbstractPowerAction {
|
|||||||
private String effectParentID;
|
private String effectParentID;
|
||||||
private EffectsBase effectParent;
|
private EffectsBase effectParent;
|
||||||
|
|
||||||
public ApplyEffectPowerAction(ResultSet rs, HashMap<String, EffectsBase> effects) throws SQLException {
|
public ApplyEffectPowerAction(PowerAction powerAction, HashMap<String, EffectsBase> effects) {
|
||||||
super(rs);
|
super(powerAction);
|
||||||
this.effectParentID = rs.getString("IDString");
|
this.effectParentID = powerAction.effects.get(0).effect_id;
|
||||||
this.effectParent = effects.get(this.effectParentID);
|
this.effectParent = effects.get(this.effectParentID);
|
||||||
this.effectID = rs.getString("effectID");
|
this.effectID = powerAction.effects.get(0).effect_id;
|
||||||
this.effect = effects.get(this.effectID);
|
this.effect = effects.get(this.effectID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,9 @@ import engine.objects.Item;
|
|||||||
import engine.powers.ActionsBase;
|
import engine.powers.ActionsBase;
|
||||||
import engine.powers.EffectsBase;
|
import engine.powers.EffectsBase;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
|
import engine.wpak.data.PowerAction;
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
|
||||||
@@ -32,11 +31,11 @@ public class ApplyEffectsPowerAction extends AbstractPowerAction {
|
|||||||
private EffectsBase effect2;
|
private EffectsBase effect2;
|
||||||
private EffectsBase effectParent;
|
private EffectsBase effectParent;
|
||||||
|
|
||||||
public ApplyEffectsPowerAction(ResultSet rs, HashMap<String, EffectsBase> effects) throws SQLException {
|
public ApplyEffectsPowerAction(PowerAction powerAction, HashMap<String, EffectsBase> effects) {
|
||||||
super(rs);
|
super(powerAction);
|
||||||
this.IDString = rs.getString("IDString");
|
this.IDString = powerAction.action_id;
|
||||||
this.effectID = rs.getString("effectID");
|
this.effectID = powerAction.effects.get(0).effect_id;
|
||||||
this.effectID2 = rs.getString("effectID2");
|
this.effectID2 = powerAction.effects.get(2).effect_id;
|
||||||
this.effect = effects.get(this.effectID);
|
this.effect = effects.get(this.effectID);
|
||||||
this.effect2 = effects.get(this.effectID2);
|
this.effect2 = effects.get(this.effectID2);
|
||||||
this.effectParent = effects.get(this.IDString);
|
this.effectParent = effects.get(this.IDString);
|
||||||
|
|||||||
@@ -14,15 +14,13 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.powers.ActionsBase;
|
import engine.powers.ActionsBase;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
|
import engine.wpak.data.PowerAction;
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
|
|
||||||
|
|
||||||
public class BlockPowerAction extends AbstractPowerAction {
|
public class BlockPowerAction extends AbstractPowerAction {
|
||||||
|
|
||||||
public BlockPowerAction(ResultSet rs) throws SQLException {
|
public BlockPowerAction(PowerAction powerAction) {
|
||||||
super(rs);
|
super(powerAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -18,9 +18,7 @@ import engine.objects.Mob;
|
|||||||
import engine.objects.PlayerCharacter;
|
import engine.objects.PlayerCharacter;
|
||||||
import engine.powers.ActionsBase;
|
import engine.powers.ActionsBase;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
|
import engine.wpak.data.PowerAction;
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
|
|
||||||
|
|
||||||
public class CharmPowerAction extends AbstractPowerAction {
|
public class CharmPowerAction extends AbstractPowerAction {
|
||||||
@@ -28,10 +26,10 @@ public class CharmPowerAction extends AbstractPowerAction {
|
|||||||
private int levelCap;
|
private int levelCap;
|
||||||
private int levelCapRamp;
|
private int levelCapRamp;
|
||||||
|
|
||||||
public CharmPowerAction(ResultSet rs) throws SQLException {
|
public CharmPowerAction(PowerAction powerAction) {
|
||||||
super(rs);
|
super(powerAction);
|
||||||
this.levelCap = rs.getInt("levelCap");
|
this.levelCap = powerAction.levelCap;
|
||||||
this.levelCapRamp = rs.getInt("levelCapRamp");
|
this.levelCapRamp = powerAction.levelCapCurve.ordinal();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -15,15 +15,13 @@ import engine.mbEnums;
|
|||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.powers.ActionsBase;
|
import engine.powers.ActionsBase;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
|
import engine.wpak.data.PowerAction;
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
|
|
||||||
|
|
||||||
public class ClaimMinePowerAction extends AbstractPowerAction {
|
public class ClaimMinePowerAction extends AbstractPowerAction {
|
||||||
|
|
||||||
public ClaimMinePowerAction(ResultSet rs) throws SQLException {
|
public ClaimMinePowerAction(PowerAction powerAction) {
|
||||||
super(rs);
|
super(powerAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -16,15 +16,13 @@ import engine.objects.AbstractWorldObject;
|
|||||||
import engine.objects.Mob;
|
import engine.objects.Mob;
|
||||||
import engine.powers.ActionsBase;
|
import engine.powers.ActionsBase;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
|
import engine.wpak.data.PowerAction;
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
|
|
||||||
|
|
||||||
public class ClearAggroPowerAction extends AbstractPowerAction {
|
public class ClearAggroPowerAction extends AbstractPowerAction {
|
||||||
|
|
||||||
public ClearAggroPowerAction(ResultSet rs) throws SQLException {
|
public ClearAggroPowerAction(PowerAction powerAction) {
|
||||||
super(rs);
|
super(powerAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -15,15 +15,13 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.powers.ActionsBase;
|
import engine.powers.ActionsBase;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
|
import engine.wpak.data.PowerAction;
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
|
|
||||||
|
|
||||||
public class ClearNearbyAggroPowerAction extends AbstractPowerAction {
|
public class ClearNearbyAggroPowerAction extends AbstractPowerAction {
|
||||||
|
|
||||||
public ClearNearbyAggroPowerAction(ResultSet rs) throws SQLException {
|
public ClearNearbyAggroPowerAction(PowerAction powerAction) {
|
||||||
super(rs);
|
super(powerAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user