Merge branch 'develop' into feature/TaskThread
# Conflicts: # Assets/AddressableAssetsData/AssetGroups/configuration.asset
This commit is contained in:
+54
-54
@@ -1,54 +1,54 @@
|
||||
1 -3023.42 218.73 3804.07 -2315.22 251.55 4416.35
|
||||
2 -1922.07 217.27 4276.7 -1194.75 220.13 4256.25
|
||||
3 -856.27 219.49 3957.78 -355.67 237.19 3916.26
|
||||
4 897.03 219.1 4351.59 35.11 219.65 3989.86
|
||||
5 1549.96 243.59 3865.42 1243.7 219.07 4543.64
|
||||
6 2453.35 228.05 4307.06 2715.47 247.63 4105.12
|
||||
7 -2510.53 218.28 2802.99 -2402.91 218.09 3356.69
|
||||
8 -1557.7 218.62 2583.67 -1349.28 264.35 2927.5
|
||||
9 -212.46 220.38 2724.44 -654.49 222.47 3541.15
|
||||
10 197.31 248.51 3087.58 483.42 222.32 2844.72
|
||||
11 2038.49 218.29 3936.27 1578.52 229 3672.47
|
||||
12 1745.09 273.48 2860.03 1602.8 218.98 3481.97
|
||||
13 2343.84 219.9 2511.81 2266.59 221.58 1991.78
|
||||
14 -2591.45 218.19 2454.08 -2261.2 218.91 1746.06
|
||||
15 -1860.3 218.36 2139.75 -1150.03 245.14 1773.89
|
||||
16 -791.97 214.17 2471.02 -129.35 224.08 2081.36
|
||||
17 368.38 219.54 2182.4 279.82 221.15 1761.76
|
||||
18 2011.77 222.19 2400.27 1294.64 336.56 2261.45
|
||||
19 -2292.16 469.47 1185.61 -2842.81 528.89 760.08
|
||||
20 -1674.26 220.34 435.34 -1905.86 229.63 -61.49
|
||||
21 -557.8 413.98 831.01 -21.79 219.42 972.1
|
||||
22 147.18 216.57 1146.07 462.83 231.23 764.32
|
||||
23 1470.78 220.53 645.87 1079.88 221.18 1256.26
|
||||
24 2846.67 217.35 953.47 2413.6 218.71 537.18
|
||||
25 -2957.37 520.29 -272.5 -2225.5 523.78 377.31
|
||||
26 -2025.75 219.2 -375.8 -1894.25 226.35 -192.02
|
||||
27 -993.31 522.37 20.72 -521.16 522.2 489.45
|
||||
28 -285.09 234.15 465.15 -607.3 219.14 -489.76
|
||||
29 646.27 218.46 -271.57 471.1 216.63 380.43
|
||||
30 358.89 218.47 -463.42 492.2 222.58 -109.62
|
||||
31 1271.29 244.23 224.86 1048.12 238.15 -293.67
|
||||
32 2447.06 219.6 -145.47 2778.47 220.67 213.79
|
||||
33 -2149.01 525.18 -1064.02 -2852.9 524.33 -1270.3
|
||||
34 -1702.3 522.73 -1141.74 -1140.11 522.96 -868.99
|
||||
35 -127.76 218.48 -1512.58 -539.96 219.56 -870.73
|
||||
36 25.99 218.68 -833.9 543.07 218.09 -808.75
|
||||
37 1463.93 219.4 -1472.2 1737.68 218.85 -947.34
|
||||
38 2451.27 219.75 -1456.2 2584.51 221.31 -677.67
|
||||
39 -2344.41 523.96 -1576.39 -2819 524.02 -2181.16
|
||||
40 -1160.61 219.03 -2087.02 -1833.15 504.52 -2360.84
|
||||
41 -479.77 218.9 -2059.16 -828.94 216.61 -2484.79
|
||||
42 958.61 219.02 -2082.36 130.06 219.85 -2275.24
|
||||
43 1065.01 218.99 -2207.16 1594.66 220.67 -2471.93
|
||||
44 2310.6 219.28 -1578.46 2532.92 220.95 -1665.75
|
||||
45 2827.66 225.81 -3084.25 2360.43 217.55 -3279.74
|
||||
46 1579.91 245.92 -4094.02 1594.13 248.55 -3849.75
|
||||
47 2453.18 245.07 -3711.65 2865.72 217.89 -4411.53
|
||||
48 -2153.87 204.16 -3154.12 -2573.45 217.27 -3501.96
|
||||
49 -1297.92 216.52 -2908.71 -1716.92 232.57 -2805.03
|
||||
50 -642.59 216.87 -3442.9 -550.52 218.04 -2764.84
|
||||
51 226.82 241.05 -3121.08 880.44 239.78 -3066.87
|
||||
52 3337.821 230.013 3998.825 3717.706 253.014 3667.437
|
||||
|
||||
|
||||
1 -3023.42 218.73 3804.07 -2315.22 251.55 4416.35
|
||||
2 -1922.07 217.27 4276.7 -1194.75 220.13 4256.25
|
||||
3 -856.27 219.49 3957.78 -355.67 237.19 3916.26
|
||||
4 897.03 219.1 4351.59 35.11 219.65 3989.86
|
||||
5 1549.96 243.59 3865.42 1243.7 219.07 4543.64
|
||||
6 2453.35 228.05 4307.06 2715.47 247.63 4105.12
|
||||
7 -2510.53 218.28 2802.99 -2402.91 218.09 3356.69
|
||||
8 -1557.7 218.62 2583.67 -1349.28 264.35 2927.5
|
||||
9 -212.46 220.38 2724.44 -654.49 222.47 3541.15
|
||||
10 197.31 248.51 3087.58 483.42 222.32 2844.72
|
||||
11 2038.49 218.29 3936.27 1578.52 229 3672.47
|
||||
12 1745.09 273.48 2860.03 1602.8 218.98 3481.97
|
||||
13 2343.84 219.9 2511.81 2266.59 221.58 1991.78
|
||||
14 -2591.45 218.19 2454.08 -2261.2 218.91 1746.06
|
||||
15 -1860.3 218.36 2139.75 -1150.03 245.14 1773.89
|
||||
16 -791.97 214.17 2471.02 -129.35 224.08 2081.36
|
||||
17 368.38 219.54 2182.4 279.82 221.15 1761.76
|
||||
18 2011.77 222.19 2400.27 1294.64 336.56 2261.45
|
||||
19 -2292.16 469.47 1185.61 -2842.81 528.89 760.08
|
||||
20 -1674.26 220.34 435.34 -1905.86 229.63 -61.49
|
||||
21 -557.8 413.98 831.01 -21.79 219.42 972.1
|
||||
22 147.18 216.57 1146.07 462.83 231.23 764.32
|
||||
23 1470.78 220.53 645.87 1079.88 221.18 1256.26
|
||||
24 2846.67 217.35 953.47 2413.6 218.71 537.18
|
||||
25 -2957.37 520.29 -272.5 -2225.5 523.78 377.31
|
||||
26 -2025.75 219.2 -375.8 -1894.25 226.35 -192.02
|
||||
27 -993.31 522.37 20.72 -521.16 522.2 489.45
|
||||
28 -285.09 234.15 465.15 -607.3 219.14 -489.76
|
||||
29 646.27 218.46 -271.57 471.1 216.63 380.43
|
||||
30 358.89 218.47 -463.42 492.2 222.58 -109.62
|
||||
31 1271.29 244.23 224.86 1048.12 238.15 -293.67
|
||||
32 2447.06 219.6 -145.47 2778.47 220.67 213.79
|
||||
33 -2149.01 525.18 -1064.02 -2852.9 524.33 -1270.3
|
||||
34 -1702.3 522.73 -1141.74 -1140.11 522.96 -868.99
|
||||
35 -127.76 218.48 -1512.58 -539.96 219.56 -870.73
|
||||
36 25.99 218.68 -833.9 543.07 218.09 -808.75
|
||||
37 1463.93 219.4 -1472.2 1737.68 218.85 -947.34
|
||||
38 2451.27 219.75 -1456.2 2584.51 221.31 -677.67
|
||||
39 -2344.41 523.96 -1576.39 -2819 524.02 -2181.16
|
||||
40 -1160.61 219.03 -2087.02 -1833.15 504.52 -2360.84
|
||||
41 -479.77 218.9 -2059.16 -828.94 216.61 -2484.79
|
||||
42 958.61 219.02 -2082.36 130.06 219.85 -2275.24
|
||||
43 1065.01 218.99 -2207.16 1594.66 220.67 -2471.93
|
||||
44 2310.6 219.28 -1578.46 2532.92 220.95 -1665.75
|
||||
45 2827.66 225.81 -3084.25 2360.43 217.55 -3279.74
|
||||
46 1579.91 245.92 -4094.02 1594.13 248.55 -3849.75
|
||||
47 2453.18 245.07 -3711.65 2865.72 217.89 -4411.53
|
||||
48 -2153.87 204.16 -3154.12 -2573.45 217.27 -3501.96
|
||||
49 -1297.92 216.52 -2908.71 -1716.92 232.57 -2805.03
|
||||
50 -642.59 216.87 -3442.9 -550.52 218.04 -2764.84
|
||||
51 226.82 241.05 -3121.08 880.44 239.78 -3066.87
|
||||
52 3337.821 230.013 3998.825 3717.706 253.014 3667.437
|
||||
|
||||
|
||||
+1669
-1669
File diff suppressed because it is too large
Load Diff
+139
-139
@@ -1,139 +1,139 @@
|
||||
//物品id 喊话id 显示参数 喊话次数(默认为1) 喊话间隔
|
||||
//如果出现同一物品id对应不同的喊话id,程序中将只取靠后的那个喊话id
|
||||
//参数含义(3: 先显示物品名再显示玩家名,2:先显示玩家名再显示物品名,1:显示玩家名,0:都不显示);
|
||||
//0 都不显示
|
||||
//1 显示玩家名
|
||||
//2 先显示玩家名再显示物品名
|
||||
//3 先显示物品名再显示玩家名
|
||||
//4 显示顺序:服务器-玩家-道具
|
||||
//5 显示顺序:道具-服务器-玩家
|
||||
//6 显示顺序:服务器-玩家
|
||||
//7 显示顺序:服务器
|
||||
|
||||
//本服喊话ID对照
|
||||
11599 4521 2
|
||||
11600 4522 2
|
||||
12227 4523 1
|
||||
12265 4524 2
|
||||
12264 4525 2
|
||||
12266 4526 2
|
||||
12769 4527 2
|
||||
12719 4528 2
|
||||
12646 4529 2
|
||||
12647 4529 2
|
||||
12648 4529 2
|
||||
12649 4529 2
|
||||
12650 4529 2
|
||||
12651 4529 2
|
||||
13548 4648 0
|
||||
13565 4665 0
|
||||
13566 4666 0
|
||||
13567 4667 0
|
||||
13568 4668 0
|
||||
13569 4669 0
|
||||
13570 4670 0
|
||||
13571 4671 0
|
||||
13572 4672 0
|
||||
13573 4673 0
|
||||
13574 4674 0
|
||||
13575 4675 0
|
||||
13576 4676 0
|
||||
13577 4677 0
|
||||
13578 4678 0
|
||||
13579 4679 0
|
||||
13580 4680 0
|
||||
13581 4681 0
|
||||
13582 4682 0
|
||||
13583 4683 0
|
||||
13584 4684 0
|
||||
13585 4685 0
|
||||
13586 4686 0
|
||||
13587 4687 0
|
||||
13588 4688 0
|
||||
13589 4689 0
|
||||
13590 4690 0
|
||||
13591 4691 0
|
||||
13592 4692 0
|
||||
13593 4693 0
|
||||
13594 4694 0
|
||||
13595 4695 0
|
||||
13596 4696 0
|
||||
13597 4697 0
|
||||
13598 4698 0
|
||||
13599 4699 0
|
||||
13600 4700 0
|
||||
14290 4532 1
|
||||
20853 4533 3
|
||||
20255 4534 3
|
||||
20289 4535 3
|
||||
21065 4536 3
|
||||
20311 4537 3
|
||||
20852 4538 3
|
||||
20218 4539 3
|
||||
20402 4540 3
|
||||
20851 4541 3
|
||||
20394 4542 3
|
||||
20363 4543 3
|
||||
26061 4544 3
|
||||
26053 4545 3
|
||||
28607 4546 2
|
||||
29453 4547 3
|
||||
30207 4548 3
|
||||
44960 4549 3
|
||||
45043 4550 3
|
||||
48694 4551 3
|
||||
48695 4551 3
|
||||
48696 4552 3
|
||||
48697 4552 3
|
||||
50139 4554 2
|
||||
50145 4554 2
|
||||
50151 4554 2
|
||||
50157 4554 2
|
||||
50163 4554 2
|
||||
50169 4554 2
|
||||
50175 4554 2
|
||||
50181 4554 2
|
||||
50187 4554 2
|
||||
50193 4554 2
|
||||
50199 4554 2
|
||||
50205 4554 2
|
||||
50211 4554 2
|
||||
50217 4554 2
|
||||
50223 4554 2
|
||||
50229 4554 2
|
||||
50140 4555 2
|
||||
50146 4555 2
|
||||
50152 4555 2
|
||||
50158 4555 2
|
||||
50164 4555 2
|
||||
50170 4555 2
|
||||
50176 4555 2
|
||||
50182 4555 2
|
||||
50188 4555 2
|
||||
50194 4555 2
|
||||
50200 4555 2
|
||||
50206 4555 2
|
||||
50212 4555 2
|
||||
50218 4555 2
|
||||
50224 4555 2
|
||||
50230 4555 2
|
||||
|
||||
//跨服喊话ID对照
|
||||
49647 4801 4
|
||||
50702 4802 6
|
||||
50704 4803 6
|
||||
50706 4804 6
|
||||
50708 4805 6
|
||||
50710 4806 6
|
||||
50712 4807 6
|
||||
50714 4808 6
|
||||
50716 4809 6
|
||||
50718 4810 6
|
||||
50720 4811 6
|
||||
50722 4812 6
|
||||
50724 4813 6
|
||||
50726 4814 6
|
||||
50728 4815 6
|
||||
50730 4816 6
|
||||
50732 4817 6
|
||||
|
||||
//物品id 喊话id 显示参数 喊话次数(默认为1) 喊话间隔
|
||||
//如果出现同一物品id对应不同的喊话id,程序中将只取靠后的那个喊话id
|
||||
//参数含义(3: 先显示物品名再显示玩家名,2:先显示玩家名再显示物品名,1:显示玩家名,0:都不显示);
|
||||
//0 都不显示
|
||||
//1 显示玩家名
|
||||
//2 先显示玩家名再显示物品名
|
||||
//3 先显示物品名再显示玩家名
|
||||
//4 显示顺序:服务器-玩家-道具
|
||||
//5 显示顺序:道具-服务器-玩家
|
||||
//6 显示顺序:服务器-玩家
|
||||
//7 显示顺序:服务器
|
||||
|
||||
//本服喊话ID对照
|
||||
11599 4521 2
|
||||
11600 4522 2
|
||||
12227 4523 1
|
||||
12265 4524 2
|
||||
12264 4525 2
|
||||
12266 4526 2
|
||||
12769 4527 2
|
||||
12719 4528 2
|
||||
12646 4529 2
|
||||
12647 4529 2
|
||||
12648 4529 2
|
||||
12649 4529 2
|
||||
12650 4529 2
|
||||
12651 4529 2
|
||||
13548 4648 0
|
||||
13565 4665 0
|
||||
13566 4666 0
|
||||
13567 4667 0
|
||||
13568 4668 0
|
||||
13569 4669 0
|
||||
13570 4670 0
|
||||
13571 4671 0
|
||||
13572 4672 0
|
||||
13573 4673 0
|
||||
13574 4674 0
|
||||
13575 4675 0
|
||||
13576 4676 0
|
||||
13577 4677 0
|
||||
13578 4678 0
|
||||
13579 4679 0
|
||||
13580 4680 0
|
||||
13581 4681 0
|
||||
13582 4682 0
|
||||
13583 4683 0
|
||||
13584 4684 0
|
||||
13585 4685 0
|
||||
13586 4686 0
|
||||
13587 4687 0
|
||||
13588 4688 0
|
||||
13589 4689 0
|
||||
13590 4690 0
|
||||
13591 4691 0
|
||||
13592 4692 0
|
||||
13593 4693 0
|
||||
13594 4694 0
|
||||
13595 4695 0
|
||||
13596 4696 0
|
||||
13597 4697 0
|
||||
13598 4698 0
|
||||
13599 4699 0
|
||||
13600 4700 0
|
||||
14290 4532 1
|
||||
20853 4533 3
|
||||
20255 4534 3
|
||||
20289 4535 3
|
||||
21065 4536 3
|
||||
20311 4537 3
|
||||
20852 4538 3
|
||||
20218 4539 3
|
||||
20402 4540 3
|
||||
20851 4541 3
|
||||
20394 4542 3
|
||||
20363 4543 3
|
||||
26061 4544 3
|
||||
26053 4545 3
|
||||
28607 4546 2
|
||||
29453 4547 3
|
||||
30207 4548 3
|
||||
44960 4549 3
|
||||
45043 4550 3
|
||||
48694 4551 3
|
||||
48695 4551 3
|
||||
48696 4552 3
|
||||
48697 4552 3
|
||||
50139 4554 2
|
||||
50145 4554 2
|
||||
50151 4554 2
|
||||
50157 4554 2
|
||||
50163 4554 2
|
||||
50169 4554 2
|
||||
50175 4554 2
|
||||
50181 4554 2
|
||||
50187 4554 2
|
||||
50193 4554 2
|
||||
50199 4554 2
|
||||
50205 4554 2
|
||||
50211 4554 2
|
||||
50217 4554 2
|
||||
50223 4554 2
|
||||
50229 4554 2
|
||||
50140 4555 2
|
||||
50146 4555 2
|
||||
50152 4555 2
|
||||
50158 4555 2
|
||||
50164 4555 2
|
||||
50170 4555 2
|
||||
50176 4555 2
|
||||
50182 4555 2
|
||||
50188 4555 2
|
||||
50194 4555 2
|
||||
50200 4555 2
|
||||
50206 4555 2
|
||||
50212 4555 2
|
||||
50218 4555 2
|
||||
50224 4555 2
|
||||
50230 4555 2
|
||||
|
||||
//跨服喊话ID对照
|
||||
49647 4801 4
|
||||
50702 4802 6
|
||||
50704 4803 6
|
||||
50706 4804 6
|
||||
50708 4805 6
|
||||
50710 4806 6
|
||||
50712 4807 6
|
||||
50714 4808 6
|
||||
50716 4809 6
|
||||
50718 4810 6
|
||||
50720 4811 6
|
||||
50722 4812 6
|
||||
50724 4813 6
|
||||
50726 4814 6
|
||||
50728 4815 6
|
||||
50730 4816 6
|
||||
50732 4817 6
|
||||
|
||||
@@ -15,21 +15,11 @@ MonoBehaviour:
|
||||
m_GroupName: configuration
|
||||
m_GUID: 402389c9c8797a8489a1d8188e497c23
|
||||
m_SerializeEntries:
|
||||
- m_GUID: 0359747f0eacde04db291d59f55155f3
|
||||
m_Address: Assets/PerfectWorld/Data/tasks.txt
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 4e7b437eecb43c64b87ab9700f5850c9
|
||||
m_Address: Assets/Addressable/elements.txt
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 68c2ec3141053fe4eb413d0698ae9a97
|
||||
m_Address: Assets/PerfectWorld/Data/task_npc.txt
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 6e02334765e10654e874714298f4eef1
|
||||
m_Address: Assets/Addressable/gshop.txt
|
||||
m_ReadOnly: 0
|
||||
@@ -40,8 +30,38 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: b4e097d2e97859c4fbe066b158b5fe4d
|
||||
m_Address: Assets/PerfectWorld/Data/dyn_tasks.txt
|
||||
- m_GUID: bccfbf7d03830734fb6cd82a31536791
|
||||
m_Address: Assets/Addressable/faction_pvp.txt
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 06d9a02a2d455104d9b49c78ed8fc6d3
|
||||
m_Address: Assets/Addressable/fixed_msg.txt
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 22d591e6986fa6c4ab705ee890953236
|
||||
m_Address: Assets/Addressable/item_desc.txt
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 0b095c8d0e089f747a289d8e6c7b693e
|
||||
m_Address: Assets/Addressable/item_ext_desc.txt
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 5429be2b686cda24e8f5ab2049a68b27
|
||||
m_Address: Assets/Addressable/item_ext_prop.txt
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 76f11583e7abe3e4bbf976a45f946fe7
|
||||
m_Address: Assets/Addressable/item_msg_map.txt
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 6ee4a110a33412e4aa3f879764bec33b
|
||||
m_Address: Assets/Addressable/skillstr.txt
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
|
||||
@@ -6,6 +6,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace BrewMonster.Network
|
||||
{
|
||||
@@ -134,40 +135,39 @@ namespace BrewMonster.Network
|
||||
m_SkillDesc = new BrewMonster.CECStringTab();
|
||||
m_BuffDesc = new BrewMonster.CECStringTab();
|
||||
|
||||
//TODO: DUCK Have to remove this after moving all file to persistentDataPath
|
||||
return;
|
||||
// Load string files from StreamingAssets/configs directory
|
||||
string dataPath = Application.streamingAssetsPath + "/configs/";
|
||||
|
||||
try
|
||||
{
|
||||
// Load each string table using the actual file names from StreamingAssets/configs
|
||||
if (!m_FixedMsgs.Init(dataPath + "fixed_msg.txt", true))
|
||||
// Addressables-only loading (no StreamingAssets/configs file IO).
|
||||
// These must match the Addressables "Address" values configured in `Assets/AddressableAssetsData/...`.
|
||||
Addressables.InitializeAsync().WaitForCompletion();
|
||||
|
||||
var fixedMsgTa = Addressables.LoadAssetAsync<TextAsset>("Assets/Addressable/fixed_msg.txt").WaitForCompletion();
|
||||
if (!m_FixedMsgs.InitFromTextAsset(fixedMsgTa, true))
|
||||
{
|
||||
Debug.LogWarning("[EC_Game] Failed to load fixed_msg.txt");
|
||||
}
|
||||
|
||||
if (!m_ItemDesc.Init(dataPath + "item_desc.txt", true))
|
||||
var itemDescTa = Addressables.LoadAssetAsync<TextAsset>("Assets/Addressable/item_desc.txt").WaitForCompletion();
|
||||
if (!m_ItemDesc.InitFromTextAsset(itemDescTa, true))
|
||||
{
|
||||
Debug.LogWarning("[EC_Game] Failed to load item_desc.txt");
|
||||
}
|
||||
|
||||
if (!m_ItemExtDesc.Init(dataPath + "item_ext_desc.txt", true))
|
||||
var itemExtDescTa = Addressables.LoadAssetAsync<TextAsset>("Assets/Addressable/item_ext_desc.txt").WaitForCompletion();
|
||||
if (!m_ItemExtDesc.InitFromTextAsset(itemExtDescTa, true))
|
||||
{
|
||||
Debug.LogWarning("[EC_Game] Failed to load item_ext_desc.txt");
|
||||
}
|
||||
|
||||
if (!m_SkillDesc.Init(dataPath + "skillstr.txt", true))
|
||||
var skillStrTa = Addressables.LoadAssetAsync<TextAsset>("Assets/Addressable/skillstr.txt").WaitForCompletion();
|
||||
if (!m_SkillDesc.InitFromTextAsset(skillStrTa, true))
|
||||
{
|
||||
Debug.LogWarning("[EC_Game] Failed to load skillstr.txt");
|
||||
}
|
||||
|
||||
// Note: There's no buff_desc.txt file in the configs folder
|
||||
// You may need to create this file or use a different source for buff descriptions
|
||||
if (!m_BuffDesc.Init(dataPath + "buff_desc.txt", true))
|
||||
{
|
||||
Debug.LogWarning("[EC_Game] Failed to load buff_desc.txt - file may not exist");
|
||||
}
|
||||
// (If you add it to Addressables later, load it here.)
|
||||
|
||||
// Load item message map (template -> message id)
|
||||
LoadItemMsgMap();
|
||||
@@ -191,15 +191,18 @@ namespace BrewMonster.Network
|
||||
m_ItemMsgMap = new Dictionary<int, ItemMsgMapEntry>();
|
||||
try
|
||||
{
|
||||
string path = Application.streamingAssetsPath + "/configs/item_msg_map.txt";
|
||||
if (!File.Exists(path))
|
||||
Addressables.InitializeAsync().WaitForCompletion();
|
||||
var mapTa = Addressables.LoadAssetAsync<TextAsset>("Assets/Addressable/item_msg_map.txt").WaitForCompletion();
|
||||
if (mapTa == null || string.IsNullOrEmpty(mapTa.text))
|
||||
{
|
||||
Debug.LogWarning(
|
||||
"[EC_Game] item_msg_map.txt not found; descriptions will fall back to template IDs");
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var raw in File.ReadLines(path))
|
||||
using var sr = new StringReader(mapTa.text);
|
||||
string raw;
|
||||
while ((raw = sr.ReadLine()) != null)
|
||||
{
|
||||
var line = raw.Trim();
|
||||
if (line.Length == 0) continue;
|
||||
|
||||
@@ -320,7 +320,6 @@ namespace BrewMonster
|
||||
m_CDRInfo.vAbsVelocity.y = fVertSpeed;
|
||||
m_CDRInfo.fYVel = 0.0f;
|
||||
m_CDRInfo.vTPNormal = EC_Utility.ToA3DVECTOR3(Vector3.zero);
|
||||
|
||||
if (m_iJumpCount == 1)
|
||||
{
|
||||
m_MoveCtrl.SendMoveCmd(GetPos(), 2, GPDataTypeHelper.g_vAxisY, (m_CDRInfo.vAbsVelocity), m_iMoveMode, true);
|
||||
|
||||
@@ -17,8 +17,16 @@ namespace BrewMonster
|
||||
public static LayerMask TerrainMask { get; set; } = 1 << 6;
|
||||
public static LayerMask WaterMask { get; set; } = 1 << 8;
|
||||
|
||||
public static RaycastHit[] hits = new RaycastHit[5];
|
||||
|
||||
const float LOCAL_EPSILON = 1e-5f;
|
||||
const float FLY_MAX_HEIGHT = 800.0f; // ·ÉÐеÄ×î´ó¸ß¶È£¡
|
||||
const float FLY_MAX_HEIGHT = 800.0f; // ·ÉÐеÄ×î´ó¸ß¶È£¡
|
||||
|
||||
const float VEL_EPSILON = 1e-4f;
|
||||
const float DIST_EPSILON = 1e-4f;
|
||||
const float NORMAL_EPSILON = 1e-2f;
|
||||
const float VEL_MAX_SPEED = 200f;
|
||||
const float VEL_REFLECT = 0.3f;
|
||||
|
||||
// change this array when some new submap can go!
|
||||
static uint[,] available_maps =
|
||||
@@ -177,25 +185,20 @@ namespace BrewMonster
|
||||
|
||||
float dist = fDeltaY + vExt.y;//Mathf.Max(fDeltaY, 0f) + vExt.y;
|
||||
Vector3 origin = vStart /*+ Vector3.down * vExt.y*/;
|
||||
if (Physics.Raycast(origin, Vector3.down, out RaycastHit hit, dist, mask))
|
||||
int countHits = Physics.RaycastNonAlloc(origin, Vector3.down, hits, dist, mask);
|
||||
if (countHits > 0)
|
||||
{
|
||||
vHitNormal = hit.normal;
|
||||
//Debug.DrawLine(origin, vHitNormal, Color.black, 10f);
|
||||
vEnd = new Vector3(vStart.x, hit.point.y + vExt.y, vStart.z);
|
||||
vHitNormal = hits[0].normal;
|
||||
vEnd = new Vector3(vStart.x, hits[0].point.y + vExt.y, vStart.z);
|
||||
bSupport = (vHitNormal.y >= 0f);
|
||||
return true;
|
||||
}
|
||||
return true; // không thấy ground → bSupport=false
|
||||
return true;
|
||||
}
|
||||
|
||||
// ======= STATIC OnGroundMove – GIỮ NGUYÊN VAI TRÒ TOÀN CỤC (C API) =======
|
||||
public static void OnGroundMove(ref CDR_INFO CDRInfo)
|
||||
{
|
||||
const float VEL_EPSILON = 1e-4f;
|
||||
const float DIST_EPSILON = 1e-4f;
|
||||
const float NORMAL_EPSILON = 1e-2f;
|
||||
const float VEL_MAX_SPEED = 200f;
|
||||
const float VEL_REFLECT = 0.3f;
|
||||
|
||||
CDRInfo.fMoveDist = 0.0f;
|
||||
|
||||
@@ -208,24 +211,21 @@ namespace BrewMonster
|
||||
|
||||
Vector3 vVelocity = CDRInfo.fSpeed * EC_Utility.ToVector3(CDRInfo.vXOZVelDir) + fYVel * Vector3.up;
|
||||
|
||||
|
||||
if (bFreeFall)
|
||||
{
|
||||
vVelocity += -CDRInfo.fGravityAccel * CDRInfo.t * Vector3.up;
|
||||
vVelocity += -CDRInfo.fGravityAccel * CDRInfo.t * Vector3.up;
|
||||
fYVel += -CDRInfo.fGravityAccel * CDRInfo.t;
|
||||
}
|
||||
A3DVECTOR3 vVelDir = EC_Utility.ToA3DVECTOR3(vVelocity);
|
||||
float fVelSpeed = vVelDir.Normalize();
|
||||
if (!bFreeFall)
|
||||
{
|
||||
//fVelSpeed = Mathf.Max(fVelSpeed, VEL_MAX_SPEED);
|
||||
if (fVelSpeed > VEL_MAX_SPEED)
|
||||
{
|
||||
fVelSpeed = VEL_MAX_SPEED;
|
||||
}
|
||||
}
|
||||
vVelocity = EC_Utility.ToVector3(vVelDir) * fVelSpeed;
|
||||
|
||||
float dtp = DotProduct(vVelDir, CDRInfo.vTPNormal);
|
||||
if (dtp < 0f || !bJump)
|
||||
{
|
||||
@@ -249,70 +249,39 @@ namespace BrewMonster
|
||||
trcInfo.dwCheckFlag = CDR_EVN.CDR_TERRAIN | CDR_EVN.CDR_BRUSH;
|
||||
trcInfo.vExt = CDRInfo.vExtent;
|
||||
|
||||
int countHits = 0;
|
||||
while (nTry < 1)
|
||||
{
|
||||
vDelta = vVelocity * (fTime);
|
||||
float fDeltaDist = vDelta.magnitude;
|
||||
//Debug.LogError("fDeltaDist = " + fDeltaDist + " vVelocity = " + vVelocity + " fTime = " + fTime + " speed = " + (fDeltaDist / fTime));
|
||||
Vector3 posFoot = vStart - Vector3.up * vExt.y;
|
||||
vFinalPos = vStart;
|
||||
if (fDeltaDist < DIST_EPSILON) break;
|
||||
|
||||
Vector3 posFoot = vStart - Vector3.up * vExt.y;
|
||||
if (Physics.Raycast(vStart, (Vector3.down).normalized, out RaycastHit hit, vExt.y, mask))
|
||||
countHits = Physics.RaycastNonAlloc(vStart, (Vector3.down * vExt.y).normalized, hits, vExt.y, mask);
|
||||
if (countHits > 0)
|
||||
{
|
||||
if (hit.point.y > posFoot.y)
|
||||
if (hits[0].point.y >= posFoot.y)
|
||||
{
|
||||
posFoot.y = hit.point.y;
|
||||
posFoot.y = hits[0].point.y;
|
||||
}
|
||||
}
|
||||
|
||||
bool bClear = !Physics.Raycast(posFoot, (posFoot + vDelta).normalized, out hit, fDeltaDist, mask);
|
||||
//bool bClear = false;//!Physics.Raycast(posFoot, (posFoot + vDelta).normalized, out hit, fDeltaDist, mask);
|
||||
//Debug.DrawRay(posFoot, vDelta, Color.yellow, 1f);
|
||||
//float fFraction = 100f;
|
||||
//if(fDeltaDist < 1E-5f)
|
||||
//{
|
||||
// fFraction = 0f;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// if (Physics.Raycast(posFoot, (posFoot + vDelta).normalized, out hit, fDeltaDist, mask))
|
||||
// {
|
||||
// if (Vector3.Dot(hit.normal, vDelta) <= 0.01f)
|
||||
// {
|
||||
// float t = Vector3.Distance(hit.point, posFoot);
|
||||
// float tempfFraction = (t - 5E-4f) / fDeltaDist;
|
||||
// if (tempfFraction < fFraction && t >= 0.0f && t <= fDeltaDist)
|
||||
// {
|
||||
// fFraction = tempfFraction;
|
||||
// if (tempfFraction < 0f)
|
||||
// {
|
||||
// fFraction = 0f;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
////Debug.LogError("fFraction = " + fFraction);
|
||||
//bClear = !(fFraction < 1.0f + 1E-4f);
|
||||
|
||||
//Debug.LogError("fDeltaDist = " + fDeltaDist + " vVelocity = " + vVelocity + " fTime = " + fTime + " speed = " + (fDeltaDist / fTime) + " posFoot + vDelta = " + (posFoot + vDelta) + " posFoot = " + posFoot);
|
||||
countHits = Physics.RaycastNonAlloc(posFoot, (posFoot + vDelta).normalized, hits, fDeltaDist, mask);
|
||||
bool bClear = !(countHits > 0);
|
||||
nTry++;
|
||||
if (bClear)
|
||||
if (bClear || (countHits > 0 && Vector3.Distance(hits[0].point, posFoot) < 0.0009f)) // Is 0.0009f the tolerance used to check if two points are the same?
|
||||
{
|
||||
//Debug.LogError("bClear = true");
|
||||
//Debug.DrawLine(posFoot, posFoot + vDelta, Color.yellow, 10f);
|
||||
vFinalPos = vStart + vDelta;
|
||||
CDRInfo.fMoveDist += fDeltaDist;
|
||||
break;
|
||||
}
|
||||
//Debug.LogError("bClear = false");
|
||||
vStart = hit.point + Vector3.up * vExt.y;
|
||||
//vStart += vDelta * trcInfo.fFraction + Vector3.up * vExt.y;
|
||||
vStart = hits[0].point + Vector3.up * vExt.y;
|
||||
|
||||
vFinalPos = vStart;
|
||||
if (Physics.Raycast(vStart, (Vector3.down).normalized, out hit, vExt.y, mask))
|
||||
countHits = Physics.RaycastNonAlloc(vStart, (Vector3.down).normalized, hits, vExt.y, mask);
|
||||
if (countHits > 0)
|
||||
{
|
||||
vNormal = hit.normal;
|
||||
vNormal = hits[0].normal;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -322,45 +291,36 @@ namespace BrewMonster
|
||||
// Step-up (giữ tinh thần bản gốc)
|
||||
if (!bFreeFall && !bTryPull && !bJump)
|
||||
{
|
||||
//float skin = 0.01f;
|
||||
posFoot = vStart - Vector3.up * vExt.y /*+ Vector3.up * CDRInfo.fStepHeight*/;
|
||||
if (Physics.Raycast(vStart, (vStart + Vector3.down).normalized, out hit, vExt.y, mask))
|
||||
posFoot = vStart - Vector3.up * vExt.y;
|
||||
countHits = Physics.RaycastNonAlloc(vStart, (vStart + Vector3.down).normalized, hits, vExt.y, mask);
|
||||
if (countHits > 0)
|
||||
{
|
||||
if (hit.point.y > posFoot.y)
|
||||
if (hits[0].point.y > posFoot.y)
|
||||
{
|
||||
posFoot.y = hit.point.y;
|
||||
posFoot.y = hits[0].point.y;
|
||||
}
|
||||
}
|
||||
//Vector3 vStartUp = new Vector3(0f, CDRInfo.fStepHeight, 0f);
|
||||
bPull = !Physics.Raycast(posFoot, (Vector3.up).normalized, out hit, CDRInfo.fStepHeight, mask);
|
||||
//if(bPull == false)
|
||||
//{
|
||||
// Debug.LogError("bPull = false hit = " + hit.collider.name);
|
||||
//}
|
||||
countHits = Physics.RaycastNonAlloc(posFoot, (Vector3.up).normalized, hits, CDRInfo.fStepHeight, mask);
|
||||
bPull = !(countHits > 0);
|
||||
if (bPull)
|
||||
{
|
||||
vStart += Vector3.up * CDRInfo.fStepHeight;
|
||||
posFoot = vStart - Vector3.up * vExt.y;
|
||||
fDeltaDist = (vVelocity.normalized).magnitude;
|
||||
bool bMove = !Physics.Raycast(posFoot, (posFoot + vVelocity).normalized, out hit, fDeltaDist, mask);
|
||||
//Vector3 posDelta = vDelta;
|
||||
countHits = Physics.RaycastNonAlloc(posFoot, (posFoot + vVelocity).normalized, hits, fDeltaDist, mask);
|
||||
bool bMove = !(countHits > 0);
|
||||
|
||||
if (!bMove)
|
||||
{
|
||||
//posDelta = vFinalPos - (hit.point + Vector3.up * vExt.y);
|
||||
fDeltaDist *= Vector3.Distance(vFinalPos, (hit.point + Vector3.up * vExt.y)) / fDeltaDist;
|
||||
vFinalPos = hit.point + Vector3.up * vExt.y;
|
||||
//vFinalPos = vStart + vDelta * tmpInfo.fFraction + Vector3.up * vExt.y;
|
||||
fDeltaDist *= Vector3.Distance(vFinalPos, (hits[0].point + Vector3.up * vExt.y)) / fDeltaDist;
|
||||
vFinalPos = hits[0].point + Vector3.up * vExt.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Debug.DrawLine(vFinalPos, vFinalPos + vDelta, Color.red, 10f);
|
||||
vFinalPos += vDelta;
|
||||
}
|
||||
//Debug.LogError("vExt.x * vExt.x * 4 = " + vExt.x * vExt.x * 4 + " fDeltaDist = " + fDeltaDist);
|
||||
if (fDeltaDist < (vExt.x * vExt.x * 4))
|
||||
{
|
||||
//Debug.LogError("set bPull = false");
|
||||
vFinalPos.y -= CDRInfo.fStepHeight;
|
||||
bPull = false;
|
||||
}
|
||||
@@ -388,7 +348,6 @@ namespace BrewMonster
|
||||
{
|
||||
if (vNormal.y >= CDRInfo.fSlopeThresh || vNormal.y < -NORMAL_EPSILON)
|
||||
{
|
||||
//Debug.LogError("1 fYVel = 0f");
|
||||
fYVel = 0f;
|
||||
}
|
||||
}
|
||||
@@ -396,7 +355,6 @@ namespace BrewMonster
|
||||
{
|
||||
if (vNormal.y >= CDRInfo.fSlopeThresh)
|
||||
{
|
||||
//Debug.LogError("2 fYVel = 0f");
|
||||
fYVel = 0f;
|
||||
}
|
||||
}
|
||||
@@ -406,6 +364,7 @@ namespace BrewMonster
|
||||
// “vertical ground trace” – thay RetrieveSupportPlane
|
||||
Vector3 vTPNormal = Vector3.zero;
|
||||
Vector3 vFinal = vFinalPos;
|
||||
//mask = BrushMask;
|
||||
|
||||
float downDist = 0.3f;
|
||||
if (bPull) downDist = CDRInfo.fStepHeight + 0.1f;
|
||||
@@ -432,7 +391,6 @@ namespace BrewMonster
|
||||
|
||||
if ((vTPNormal.y >= CDRInfo.fSlopeThresh && fYVel < 0.0f) || (!bJump && fYVel > 0.0f))
|
||||
{
|
||||
//Debug.LogError("3 fYVel = 0f");
|
||||
fYVel = 0.0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -2253,7 +2253,9 @@ namespace BrewMonster
|
||||
m_MoveCtrl.SetLastSevPos(EC_Utility.ToA3DVECTOR3(pos));
|
||||
//m_CDRInfo.vTPNormal = GroundCheck(out RaycastHit hit) ? hit.normal : Vector3.zero;
|
||||
m_CDRInfo.vExtent = m_aabbServer.Extents;
|
||||
if (Physics.Raycast(pos, Vector3.down, out RaycastHit hit, 0.1f, 1<<6))
|
||||
Vector3 pStart = pos;
|
||||
pos.y += m_CDRInfo.vExtent.y;
|
||||
if (Physics.Raycast(pos, Vector3.down, out RaycastHit hit, m_CDRInfo.vExtent.y, 1<<6))
|
||||
{
|
||||
m_CDRInfo.vTPNormal = EC_Utility.ToA3DVECTOR3(hit.normal);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,48 @@ namespace BrewMonster
|
||||
public CECStringTab() { }
|
||||
~CECStringTab() { Release(); }
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the table directly from a Unity TextAsset (e.g. loaded via Addressables).
|
||||
/// </summary>
|
||||
public bool InitFromTextAsset(TextAsset textAsset, bool bUnicode)
|
||||
{
|
||||
Release();
|
||||
m_bUnicode = bUnicode;
|
||||
|
||||
try
|
||||
{
|
||||
if (textAsset == null)
|
||||
{
|
||||
Debug.LogError("[CECStringTab] InitFromTextAsset failed: textAsset is null");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ok;
|
||||
if (bUnicode)
|
||||
{
|
||||
// Unity TextAsset.text is already UTF-8 decoded.
|
||||
using var sr = new StringReader(textAsset.text);
|
||||
ok = ParseIntoDict(sr, isWide: true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ANSI tables are in CP936 in original PW; keep using CP936 decoder.
|
||||
string content = ByteToStringUtils.ByteArrayToCP936String(textAsset.bytes);
|
||||
using var sr = new StringReader(content);
|
||||
ok = ParseIntoDict(sr, isWide: false);
|
||||
}
|
||||
|
||||
m_bInit = ok;
|
||||
return ok;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"[CECStringTab] InitFromTextAsset failed: {e}");
|
||||
Release();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Init(string szFile, bool bUnicode)
|
||||
{
|
||||
Release();
|
||||
|
||||
Reference in New Issue
Block a user