Compare commits

...

9 commits

29 changed files with 1198 additions and 613 deletions

View file

@ -12,7 +12,6 @@ axum = "0.7.4"
axum-server = "0.6.0" axum-server = "0.6.0"
byteorder = "1.5.0" byteorder = "1.5.0"
dirs = "5.0.1" dirs = "5.0.1"
dotenv = "0.15.0"
encoding = "0.2.33" encoding = "0.2.33"
env_logger = "0.11.3" env_logger = "0.11.3"
heck = "0.5.0" heck = "0.5.0"
@ -21,6 +20,7 @@ leb128 = "0.2.5"
paste = "1.0.14" paste = "1.0.14"
sysinfo = "0.30.7" sysinfo = "0.30.7"
rand = "0.8.5" rand = "0.8.5"
parking_lot = "0.12.3"
csv = "1.3.0" csv = "1.3.0"
serde = { version = "1.0.197", features = ["derive"] } serde = { version = "1.0.197", features = ["derive"] }

View file

@ -0,0 +1,443 @@
ID PositionX PositionY PositionZ RotationX RotationY RotationZ Section
Street_Teleport_ToGrocery -16.73 0.3 -5.624 0.0 180.0 0.0 1
Street_Teleport_ToRamenStore 5.41 0.32 -1.36 0.0 0.0 0.0 1
Street_Teleport_ToAudioVideoStore 18.23 0.36 -9.16 0.0 180.0 0.0 1
Street_PlayerPos_Default 29.125 0.0 -4.375 0.0 270.0 0.0 1
Street_PlayerPos_FromWorkshop 17.541 0.34003 5.481 0.0 193.27106 0.0 1
Street_PlayerPos_FromGarage 12.89 0.34 10.71725 0.0 179.08109 0.0 1
Street_PlayerPos_FromGrocery -17.177 0.0 0.0 0.0 0.0 0.0 1
Street_NPCPos_ToWorkshop 18.243 0.557 8.079 0.0 209.99998 0.0 1
Street_NPCPos_Smithy 18.208 0.95 -12.138 0.0 180.0 0.0 1
Street_NPCPos_ToGarage 12.83 0.39287 14.673 0.0 180.0 0.0 1
Street_NPCPos_Test 0.75 0.31757 -4.5 0.0 90.0 0.0 1
Street_NPCPos_Quest 7.875 0.5 -2.125 0.0 185.0 0.0 1
Street_NPCPos_RamenStore 5.678 0.9 1.753 0.0 185.0 0.0 1
Street_NPCPos_TestS 6.761 0.3 -2.028 0.0 185.0 0.0 1
Street_NPCPos_TestL 9.04 0.5 -2.227 0.0 185.0 0.0 1
Street_NPCPos_Billy_Quest10020005 37.245 0.35 -1.786 0.0 0.0 0.0 1
Street_NPCPos_Anbi_Quest10020005 -22.37 0.36 -7.05 0.0 180.0 0.0 1
Street_NPCPos_Car_Quest10020005 37.43 0.75 3.26 0.0 270.0 0.0 1
Street_NPCPos_Temp_Quest10020005 20.275 0.35 -10.2 0.0 326.98425 0.0 1
Street_NPCPos_Billy_Quest10020006 -28.05087 0.5 -4.7 0.0 52.99999 0.0 1
Street_NPCPos_Anbi_Quest10020006 -26.5 0.5 -5.98 0.0 0.0 0.0 1
Street_NPCPos_Nocha_Quest10020008 -1.042 0.393 -3.014 0.0 90.0 0.0 1
Street_NPCPos_Temp_Quest10020015 19.36 0.393 1.37 0.0 29.52794 0.0 1
Street_NPCPos_Bangboo_Quest10020018 11.3 0.393 -0.25 0.0 180.0 0.0 1
Street_NPCPos_Temp_Quest10020020 -9.17 0.393 -10.86 0.0 0.0 0.0 1
Street_NPCPos_Temp_Quest10020021 6.67203 0.393 -8.174 0.0 84.99999 0.0 1
Street_NPCPos_BangbooA_Quest10020006 -16.869 0.729 -8.124 0.0 0.0 0.0 1
Street_NPCPos_BangbooB_Quest10020006 -17.556 0.729 -8.124 0.0 0.0 0.0 1
Street_NPCPos_BangbooC_Quest10020006 -16.186 0.729 -8.097 0.0 0.0 0.0 1
Street_CameraPos_Grocery -16.866 0.98 -1.508 0.0 180.0 0.0 1
Street_CameraPos_RamenStore 2.48 2.45 -2.52 10.60003 45.5 0.0 1
Street_CameraPos_RamenStore_PC 2.67 2.4 -2.29 10.8 44.0 0.0 1
Street_CameraPos_Workshop 18.71 0.91 -9.14 10.60001 180.0 0.0 1
TriggerPos_1 35.5 0.31757 -4.5 0.0 270.0 0.0 1
Street_NPCPos_Grocery -18.928 0.95 -9.358 0.0 324.60001 0.0 1
Street_NPCPos_TestBear 10.929 0.5 -2.392 0.0 185.0 0.0 1
Street_PlayerPos_FromGarage2 4.15 0.0 19.17 0.0 270.0 0.0 1
Street_NPCPos_ToGarage2 8.618 0.39287 19.235 0.0 270.0 0.0 1
Street_Passerby_A1 6.168 0.35 0.017 0.0 0.0 0.0 1
Street_Passerby_A2 7.0 0.48 -0.027 0.0 0.0 0.0 1
Street_Passerby_B1 14.832 0.35 1.667 0.0 169.99998 0.0 1
Street_Passerby_B2 15.41 0.35 1.09 0.0 240.0 0.0 1
Street_Passerby_C1 -27.068 0.35 5.609 0.0 230.92207 0.0 1
Street_Passerby_C2 -26.701 0.35 6.222 0.0 298.08884 0.0 1
Street_Passerby_D1 -12.857 0.35 -11.668 0.0 32.81414 0.0 1
Street_Passerby_D2 -12.635 0.35 -10.965 0.0 189.98178 0.0 1
Street_ObjectPos_08 -14.573 -0.013 -12.512 0.0 0.0 0.0 1
Street_ObjectPos_10 -14.303 1.375 -11.119 0.0 0.0 0.0 1
Street_ObjectPos_09 -13.948 0.092 -18.786 0.0 0.0 0.0 1
Street_Passerby_09 -5.95 0.35 11.106 0.0 32.66373 0.0 1
Street_Passerby_10 -5.734 0.35 12.094 0.0 176.94084 0.0 1
Street_Passerby_11 2.162 0.4 -9.208 0.0 86.23466 0.0 1
Street_Passerby_12 2.898 0.4 -9.705 0.0 344.81543 0.0 1
Street_Passerby_13 16.917 0.35 -10.73 0.0 196.76297 0.0 1
Street_Passerby_14 16.337 0.35 -10.233 0.0 150.0 0.0 1
Street_Passerby_15 21.459 0.36 -8.39 0.0 231.98558 0.0 1
Street_Passerby_16 20.742 0.35 -8.932 0.0 48.55833 0.0 1
Street_Passerby_17 15.15 0.35 7.51 0.0 212.18704 0.0 1
Street_Passerby_18 14.808 0.35 6.799 0.0 29.95915 0.0 1
Street_Passerby_19 -9.383 0.35 -0.624 0.0 261.22681 0.0 1
Street_Passerby_20 -10.141 0.35 -1.371 0.0 64.0559 0.0 1
Street_Passerby_21 -17.508 0.35 -0.558 0.0 339.64786 0.0 1
Street_Passerby_22 -17.19 0.35 0.057 0.0 286.36243 0.0 1
Street_Passerby_23 -11.63 0.35 -18.32 0.0 291.77817 0.0 1
Street_Passerby_24 -12.63 0.35 -18.43 0.0 27.8 0.0 1
Street_Passerby_25 -11.539 0.35 -17.535 0.0 234.79996 0.0 1
Street_Passerby_26 -13.04 0.35 -18.03 0.0 66.79999 0.0 1
Street_Passerby_27 -26.85 0.569 12.797 0.0 20.89114 0.0 1
Street_Passerby_28 -27.431 0.38 13.319 0.0 223.54056 0.0 1
Street_Passerby_29 22.296 0.35 -8.766 0.0 151.64432 0.0 1
Street_Passerby_30 22.839 0.528 -9.841 0.0 332.39041 0.0 1
Street_Passerby_31 -34.693 0.373 12.751 0.0 324.8782 0.0 1
Street_Passerby_32 -35.538 0.3793 13.14 0.0 116.70426 0.0 1
Street_NPCPos_Quest10020151 -4.574 0.3346 1.6568 0.0 10.32042 0.0 1
Street_NPCPos_Quest10020152 14.23 0.35 -9.95 0.0 0.0 0.0 1
Street_NPCPos_Quest10020153 11.12 0.4 -8.17 0.0 0.0 0.0 1
Street_NPCPos_Quest10020154 24.721 0.348 4.248 0.0 289.53577 0.0 1
Street_NPCPos_Quest10020155 -1.79 0.395 -21.504 0.0 321.61935 0.0 1
Street_NPCPos_Quest10020156 27.16 0.35 -1.49 0.0 190.0 0.0 1
Street_NPCPos_Quest10020157 3.28 0.35 1.465 0.0 90.0 0.0 1
Street_NPCPos_Quest10020158 1.35 0.4 -1.38 0.0 180.0 0.0 1
Street_Passerby_33 -26.297 0.35 -8.271 0.0 123.11625 0.0 1
Street_Passerby_34 -25.442 0.35 -8.919 0.0 318.86185 0.0 1
Street_Passerby_35 10.662 0.37 1.331 0.0 233.42654 0.0 1
Street_Passerby_36 10.038 0.36 1.146 0.0 193.91667 0.0 1
Street_Passerby_37 1.222 0.35 17.124 0.0 73.19746 0.0 1
Street_Passerby_38 2.177 0.35 17.239 0.0 295.93552 0.0 1
Street_Passerby_39 -7.65 0.35 -11.34 0.0 317.07599 0.0 1
Street_Passerby_40 -8.56 0.35 -10.89 0.0 62.40825 0.0 1
Street_Passerby_41 -21.485 0.35 -7.556 0.0 231.75189 0.0 1
Street_Passerby_42 -22.217 0.36 -7.046 0.0 135.27699 0.0 1
Street_Passerby_43 -26.552 0.355 0.922 0.0 329.71353 0.0 1
Street_Passerby_44 -26.563 0.36 1.809 0.0 203.36967 0.0 1
Street_Passerby_45 -29.2 0.39 -5.888 0.0 61.42846 0.0 1
Street_Passerby_46 -14.932 0.35 -29.664 0.0 79.99999 0.0 1
Street_Passerby_47 11.51 0.35 -13.93 0.0 209.63834 0.0 1
Street_Passerby_48 -22.751 0.36 -7.545 0.0 109.76276 0.0 1
Street_Passerby_49 2.386 0.4 -9.954 0.0 19.77401 0.0 1
Street_Passerby_50 3.13 0.4 -9.31 0.0 245.81375 0.0 1
Street_Passerby_51 -2.53 0.35 -29.03 0.0 20.00001 0.0 1
Street_ObjectPos_11 -6.0202 1.62 -36.027 0.0 0.0 0.0 1
Street_Passerby_52 -1.89 0.35 -29.04 0.0 330.0 0.0 1
Street_Passerby_53 -5.976 0.35 -1.683 0.0 295.77307 0.0 1
Street_Passerby_54 -6.768 0.35 -1.331 0.0 119.76264 0.0 1
Street_Passerby_55 2.566 0.35 -1.384 0.0 65.57031 0.0 1
Street_Passerby_56 3.203 0.35 -1.407 0.0 340.54376 0.0 1
Street_Passerby_57 -19.31 0.35 -7.24 0.0 50.0 0.0 1
Street_Passerby_58 -18.45 0.35 -6.99 0.0 270.0 0.0 1
Street_Passerby_59 -2.315 0.35 -25.478 0.0 240.0 0.0 1
Street_Passerby_60 -2.538 0.35 -26.063 0.0 20.00001 0.0 1
Street_Passerby_61 -4.613 0.3373 0.009 0.0 171.87192 0.0 1
Street_Passerby_62 -4.637 0.357 1.647 0.0 184.25121 0.0 1
Street_Passerby_63 16.305 0.35 -10.866 0.0 69.14664 0.0 1
Street_Passerby_64 17.0 0.35 -10.3 0.0 212.32573 0.0 1
Street_Passerby_65 9.307 0.38 -28.054 0.0 205.75116 0.0 1
Street_Passerby_66 9.613 0.38 -29.102 0.0 332.5571 0.0 1
Street_Passerby_67 -7.099 0.4991 11.649 0.0 63.06116 0.0 1
Street_Passerby_68 -6.042 0.35 12.561 0.0 227.34982 0.0 1
Street_Passerby_69 22.433 0.35 6.054 0.0 317.61322 0.0 1
Street_Passerby_70 -19.002 0.35 -1.416 0.0 154.39163 0.0 1
Street_Passerby_71 -25.812 0.71 15.861 0.0 317.13211 0.0 1
Street_ObjectPos_06 -26.43 1.8 16.614 0.0 0.0 0.0 1
Street_ObjectPos_07 -24.915 0.996 12.736 0.0 0.0 0.0 1
Street_Passerby_72 32.834 0.35 -7.017 0.0 325.03073 0.0 1
Street_Passerby_73 -7.586 0.4 -0.346 0.0 136.72357 0.0 1
Street_Passerby_74 -26.168 0.5651 12.814 0.0 205.99687 0.0 1
Street_ObjectPos_05 -26.783 1.263 10.008 0.0 110.0 0.0 1
Street_Passerby_75 -26.378 0.35 6.141 0.0 288.5228 0.0 1
Street_Passerby_76 -6.893 0.64 15.257 0.0 50.22827 0.0 1
Street_Passerby_77 -11.306 0.35 -9.496 0.0 119.16231 0.0 1
Street_Passerby_78 -32.834 0.35 -2.719 0.0 50.0 0.0 1
Street_ObjectPos_02 -35.7 1.556 -6.62 0.0 0.0 0.0 1
Street_Passerby_79 -35.854 0.38 4.449 0.0 330.0 0.0 1
Street_Passerby_80 -0.168 0.388 21.145 0.0 247.54602 0.0 1
Street_ObjectPos_13 1.141 0.836 15.84 0.0 0.0 0.0 1
Street_Passerby_81 9.372 0.36 -8.746 0.0 319.89386 0.0 1
Street_NPCPos_Quest10020118 0.46 0.4 16.07 0.0 132.127 0.0 1
Street_NPCPos_Joe 14.487 0.344 7.658 0.0 117.47181 0.0 1
Street_Passerby_82 1.345 0.35 -29.269 0.0 318.21954 0.0 1
Street_Passerby_83 -29.28 0.36 -6.019 0.0 92.8725 0.0 1
Street_Passerby_84 -20.485 0.35 -8.332 0.0 218.35194 0.0 1
Street_Passerby_85 11.059 0.35 5.281 0.0 120.00001 0.0 1
Street_Passerby_86 12.09 0.36 -5.24 0.0 320.0 0.0 1
Street_Passerby_87 12.09 0.36 -5.24 0.0 320.0 0.0 1
Street_Passerby_88 12.09 0.36 -5.24 0.0 320.0 0.0 1
Street_Passerby_89 12.743 0.35 -10.13 0.0 52.06183 0.0 1
Street_Passerby_90 -26.65 0.36 6.866 0.0 260.0 0.0 1
Street_Passerby_91 -13.317 0.35 -1.324 0.0 154.53731 0.0 1
Street_Passerby_92 7.02 0.33 0.0589 0.0 0.0 0.0 1
Street_Passerby_93 12.09 0.36 -5.24 0.0 320.0 0.0 1
Street_Passerby_94 24.156 0.36 -0.589 0.0 258.23029 0.0 1
Street_Passerby_95 -8.074 0.35 -11.114 0.0 321.74228 0.0 1
Street_Passerby_96 32.996 0.35 -7.036 0.0 298.86584 0.0 1
Street_Passerby_97 -2.633 0.35 -25.815 0.0 294.18304 0.0 1
Street_Passerby_98 -14.06 0.36 -7.276 0.0 289.05328 0.0 1
Street_Passerby_99 -26.389 0.356 7.356 0.0 257.54462 0.0 1
Street_Passerby_100 28.999 0.36 -7.249 0.0 36.28022 0.0 1
Street_Passerby_101 4.87 0.36 -29.65 0.0 180.0 0.0 1
Street_Passerby_102 -26.387 0.35 7.338 0.0 249.63678 0.0 1
Street_Passerby_103 12.09 0.31 -5.24 0.0 320.0 0.0 1
Street_Passerby_104 14.6 0.36 8.1 0.0 210.0 0.0 1
Street_Passerby_105 2.127 0.4 -9.184 0.0 33.36407 0.0 1
Street_Passerby_106 12.09 0.36 -5.24 0.0 320.0 0.0 1
Street_Passerby_107 3.32 0.48 1.472 0.0 90.0 0.0 1
Street_Passerby_108 12.09 0.36 -5.24 0.0 320.0 0.0 1
Street_Passerby_109 -26.7 0.36 7.295 0.0 260.0 0.0 1
Street_Passerby_110 12.09 0.36 -5.24 0.0 320.0 0.0 1
Street_Passerby_111 -14.558 0.35 -8.069 0.0 288.58353 0.0 1
Street_Passerby_112 -4.577 0.353 1.663 0.0 194.16655 0.0 1
Street_Passerby_113 11.049 0.35 5.16 0.0 115.38074 0.0 1
Street_Passerby_114 12.09 0.36 -5.24 0.0 320.0 0.0 1
Street_NPCPos_Xiute 15.328 0.347 7.214 0.0 298.45078 0.0 1
Street_NPCPos_No11_01 5.784 0.35 -35.839 0.0 240.0 0.0 1
Street_NPCPos_Keli_01 5.12 0.36 -36.21 0.0 50.0 0.0 1
Street_NPCPos_No11_01End 6.64 0.35 -35.06 0.0 10.0 0.0 1
Street_Passerby_501 -26.61 0.69 16.044 0.0 28.75916 0.0 1
Street_Passerby_502 -22.804 0.36 -7.391 0.0 60.44901 0.0 1
Street_Passerby_503 -22.058 0.36 -7.339 0.0 324.42499 0.0 1
Street_Passerby_115 3.28 0.4537 1.464 0.0 90.0 0.0 1
Street_Passerby_116 8.16 0.48 2.362 0.0 270.0 0.0 1
Street_Passerby_117 -4.593 0.351 0.1033 0.0 343.36163 0.0 1
Street_Passerby_118 -4.43 0.49 1.48 0.0 180.0 0.0 1
Street_Passerby_119 -25.591 0.35 -6.895 0.0 315.20914 0.0 1
Street_Passerby_120 -4.667 0.337 1.677 0.0 345.07632 0.0 1
Street_NPCPos_Bangboo_Quest10020188 2.652 0.344 -0.622 0.0 74.99999 0.0 1
Street_NPCPos_Bangboo_Quest10020196 -3.648 0.353 -17.817 0.0 220.05724 0.0 1
Street_NPCPos_Bangboo_Quest10020140 21.47 0.344 5.908 0.0 0.0 0.0 1
Street_Passerby_121 -35.256 0.41 13.372 0.0 150.83507 0.0 1
Street_Passerby_122 -34.693 0.373 12.751 0.0 324.8782 0.0 1
Street_NPCPos_No11_02 -1.8 0.345 -29.986 0.0 310.0 0.0 1
Street_NPCPos_Keli_02 -2.26 0.36 -29.6 0.0 150.0 0.0 1
Street_NPCPos_Keli_02End 0.11 0.315 -29.62 0.0 79.99999 0.0 1
Street_NPCPos_Quest10020155_02 -1.763 0.8425 -21.017 0.0 237.17775 0.0 1
Street_NPCPos_No11_03End 14.81 0.349 0.54 0.0 120.00001 0.0 1
Street_NPCPos_Keli_03End 15.38 0.359 -0.28 0.0 20.00001 0.0 1
Street_NPCPos_Woof 11.26 1.15 -10.188 0.0 0.0 0.0 1
Street_ObjectPos_Newsstand 11.08 1.15 -9.372 0.0 0.0 0.0 1
Street_Passerby_123 4.504 0.329 -0.0001 0.0 0.0 0.0 1
Street_Passerby_124 8.166 0.329 1.463 0.0 270.0 0.0 1
Street_Passerby_125 5.36 0.35 -0.01 0.0 0.0 0.0 1
Street_Passerby_126 3.358 0.333 1.456 0.0 90.0 0.0 1
Street_Passerby_127 8.212 0.452 1.48 0.0 270.0 0.0 1
Street_NPCPos_Schroeder 1.752 0.342 -1.479 0.0 55.99999 0.0 1
Street_Passerby_128 5.38 0.334 0.064 0.0 0.0 0.0 1
Street_Passerby_129 3.287 0.35 1.452 0.0 90.0 0.0 1
Street_Passerby_130 -22.633 0.35 -7.275 0.0 53.62085 0.0 1
Street_Passerby_131 8.232 0.35 2.374 0.0 270.0 0.0 1
Street_Passerby_132 10.17 0.35 2.07 0.0 163.21513 0.0 1
Street_Passerby_139 -26.414 0.71 15.934 0.0 336.39316 0.0 1
Street_Passerby_140 -27.703 0.593 15.938 0.0 55.93431 0.0 1
Street_Passerby_141 10.968 0.4 6.067 0.0 120.00001 0.0 1
Street_Passerby_142 11.058 0.35 4.379 0.0 117.98868 0.0 1
Street_Passerby_143 10.678 0.36 -13.711 0.0 216.67374 0.0 1
Street_Passerby_144 -13.401 0.35 -12.446 0.0 333.78751 0.0 1
Street_Passerby_145 40.108 0.353 -0.147 0.0 154.59579 0.0 1
Street_ObjectPos_12 43.325 -0.015 -4.342 0.0 90.0 0.0 1
Street_Passerby_146 40.73 0.3506 -0.68 0.0 314.69949 0.0 1
Street_Passerby_147 2.594 0.35 -7.269 0.0 88.00859 0.0 1
Street_Passerby_148 3.52 0.4 -7.453 0.0 303.92548 0.0 1
Street_Passerby_149 4.667 0.4 -10.8 0.0 221.15468 0.0 1
Street_ObjectPos_04 0.763 1.038 -9.181 0.0 0.0 0.0 1
Street_Passerby_150 12.273 0.359 -8.928 0.0 238.31017 0.0 1
Street_NPCPos_Woof2 11.26 1.15 -10.188 0.0 0.0 0.0 1
Street_NPCPos_Woof3 11.26 1.15 -10.188 0.0 0.0 0.0 1
Street_Passerby_507 -26.592 0.36 -9.141 0.0 331.79459 0.0 1
Street_Passerby_508 -27.964 0.35 9.704 0.0 276.12378 0.0 1
Street_Passerby_509 5.012 0.35 -7.226 0.0 36.47496 0.0 1
Street_Passerby_510 -7.145 0.363 4.026 0.0 270.0 0.0 1
Street_Passerby_511 4.493 0.36 -35.899 0.0 20.00001 0.0 1
Street_Passerby_512 -4.592 0.355 0.073 0.0 343.46274 0.0 1
Street_Passerby_513 2.122 0.4 -10.398 0.0 32.57107 0.0 1
Street_Passerby_514 2.891 0.4 -10.705 0.0 0.0 0.0 1
Street_Passerby_515 14.095 0.36 -14.156 0.0 22.06978 0.0 1
Street_Passerby_516 15.321 0.35 7.58 0.0 123.66821 0.0 1
Street_Passerby_517 -4.305 0.4 -7.595 0.0 125.55424 0.0 1
Street_Passerby_518 -1.701 0.4 -23.751 0.0 310.0 0.0 1
Street_Passerby_519 -19.162 0.36 -8.18 0.0 37.20817 0.0 1
Street_ObjectPos_03 -21.194 0.171 -9.311 0.0 0.0 0.0 1
Street_Passerby_520 -3.812 0.347 -17.462 0.0 247.24823 0.0 1
Street_NPCPos_Susie -25.671 0.6214 14.104 0.0 268.89499 0.0 1
Street_NPCPos_TinMaster01 -10.191 0.36 -1.46 0.0 345.65805 0.0 1
Street_NPCPos_TinMaster02 -6.288 0.3505 -7.195 0.0 321.44672 0.0 1
Street_NPCPos_Gate 7.03 0.35 0.017 0.0 0.0 0.0 1
Street_NPCPos_Ben 2.233 0.36 2.478 0.0 133.82996 0.0 1
Street_PlayerPos_FromRamen 6.074 0.0 -0.758 0.0 0.0 0.0 1
Street_NPCPos_Anton -34.865 0.396 13.443 0.0 142.69867 0.0 1
Street_NPCPos_OokumaMari 11.921 0.347 -8.374 0.0 219.14148 0.0 1
Street_Passerby_151 -4.573 0.34 0.044 0.0 168.11601 1.0 1
Street_Passerby_152 9.423 0.352 -32.084 0.0 339.92599 0.0 1
Street_Passerby_153 -26.66462 0.3402 7.56905 359.60715 269.99854 0.65592 1
Street_NPCPos_Anbi02 -22.5 0.36 0.573 0.0 163.69124 0.0 1
Street_NPCPos_Enzo 27.243 0.35 -1.528 0.0 229.92622 0.0 1
Street_NPCPos_OokumaMari02 3.281 0.3965 -10.212 0.0 31.35417 0.0 1
Street_NPCPos_Billy02 -13.986 0.36 -7.091 0.0 113.60025 0.0 1
Street_NPCPos_Tsubaki 10.39 0.35 -8.91 0.0 137.00946 0.0 1
Street_NPCPos_Anton02 26.712 0.35 -6.986 0.0 305.87402 0.0 1
Street_NPCPos_Nocha02 9.577 0.348 -7.368 0.0 151.92999 0.0 1
Street_NPCPos_Tsubaki02 -18.173 0.35 -6.936 0.0 133.66385 0.0 1
Street_NPCPos_OokumaMari04 -25.138 0.7161 16.08 0.0 326.39648 0.0 1
Street_NPCPos_Ben02 20.665 0.35 -10.565 0.0 251.54306 0.0 1
Street_NPCPos_OokumaMari03 -22.553 0.36 -0.064 0.0 159.34224 0.0 1
Street_NPCPos_Ben03 -21.869 0.35 0.596 0.0 192.34038 0.0 1
Street_NPCPos_Billy03 22.297 0.36 5.854 0.0 340.17264 0.0 1
Street_NPCPos_Nocha03 6.929 0.395 -1.278 0.0 342.26456 0.0 1
Street_NPCPos_Tsubaki03 7.076 0.35 -0.706 0.0 312.97723 0.0 1
Street_NPCPos_Anbi03 10.312 0.35 2.109 0.0 240.46249 0.0 1
Street_NPCPos_Ben04 -32.609 0.342 -8.256 0.0 67.92832 0.0 1
Street_NPCPos_OokumaMari05 -1.27 0.3492 -29.178 0.0 305.29065 0.0 1
Street_NPCPos_Anton03 -2.058 0.35 -28.686 0.0 125.14816 0.0 1
Street_NPCPos_Nocha04 -22.595 0.395 -7.348 0.0 125.5207 0.0 1
Street_NPCPos_Billy04 -3.506 0.36 -17.778 0.0 251.33165 0.0 1
Street_NPCPos_Anbi04 -4.261 0.35 -17.505 0.0 264.7402 0.0 1
Street_NPCPos_Schroeder02 -5.053 0.342 4.863 0.0 70.83122 0.0 1
Street_NPCPos_Schroeder03 3.253 0.323 1.458 0.0 92.53754 0.0 1
Street_Passerby_521 -32.515 2.3 30.558 0.0 75.47579 0.0 1
Street_Passerby_522 -29.71 2.3 29.43 0.0 209.83707 0.0 1
Street_Passerby_523 -30.529 2.3 28.95 0.0 55.32315 0.0 1
Street_Passerby_524 -26.636 0.368 7.484 0.0 250.28363 0.0 1
Street_Passerby_525 21.991 0.35 -1.218 0.0 245.47432 0.0 1
Street_Passerby_526 -27.72 0.35 12.558 0.0 70.0 0.0 1
Street_Passerby_527 -2.147 0.35 -23.641 0.0 290.0 0.0 1
Street_Passerby_528 -3.553 0.395 -18.033 0.0 155.24419 0.0 1
Street_Passerby_529 -2.866 0.395 -19.195 0.0 327.30453 0.0 1
Street_Passerby_530 2.248 0.35 17.375 0.0 240.0 0.0 1
Street_Passerby_531 -30.195 2.3 29.303 0.0 316.19141 0.0 1
Street_Passerby_532 -15.625 0.35 -6.819 0.0 195.36263 0.0 1
Street_Passerby_533 -2.562 0.35 -23.881 0.0 312.95004 0.0 1
Street_Passerby_534 -12.646 0.35 -18.012 0.0 255.57466 0.0 1
Street_Passerby_535 -13.387 0.35 -16.812 0.0 152.59938 0.0 1
Street_NPCPos_Shepherd02 -4.574 0.3346 1.6568 0.0 10.32042 0.0 1
Street_NPCPos_No11_04 10.123 0.356 1.745 0.0 142.0 0.0 1
Street_NPCPos_PAFUMEI 15.973 0.35 7.416 0.0 334.46896 0.0 1
Street_NPCPos_MEIKE 15.483 0.35 7.766 0.0 120.00001 0.0 1
Street_Passerby_536 3.952 0.4 -11.297 0.0 48.38462 0.0 1
Garage_PlayerPos_Default 19.05 0.42063 21.43 0.0 0.0 0.0 3
Garage_PlayerPos_FromWorkshop 19.05 0.42063 22.744 0.0 0.0 0.0 3
Garage_PlayerPos_FromStreet 12.79 0.42063 18.82 0.0 0.0 0.0 3
Garage_PlayerPos_Quest10020003 20.701 0.42063 29.794 0.0 220.0 0.0 3
Garage_NPCPos_ToWorkshop 19.13 0.25 19.663 0.0 0.0 0.0 3
Garage_NPCPos_ToStreet 12.836 0.476 15.002 0.0 0.0 0.0 3
Garage_NPCPos_Nocha_Quest10020003 17.614 0.35 30.44 0.0 136.39999 0.0 3
Garage_NPCPos_Billy_Quest10020003 15.226 0.32 27.58 0.0 82.8 0.0 3
Garage_NPCPos_Anbi_Quest10020003 15.319 0.32 28.817 0.0 94.7 0.0 3
Garage_NPCPos_Nocha_Quest10020012 17.39999 0.34 27.69 0.0 158.30615 0.0 3
Garage_NPCPos_Billy_Quest10020012 18.56 0.31 32.58 0.0 250.0 0.0 3
Garage_NPCPos_Anbi_Quest10020012 18.58 0.31 31.46 0.0 320.0 0.0 3
ItemPos_1 17.0 0.42063 24.5 0.0 0.0 0.0 3
ItemPos_2 18.0 0.42063 24.5 0.0 0.0 0.0 3
ItemPos_3 19.0 0.42063 24.5 0.0 0.0 0.0 3
ItemPos_4 20.0 0.42063 24.5 0.0 0.0 0.0 3
ItemPos_5 21.0 0.42063 24.5 0.0 0.0 0.0 3
Garage_PlayerPos_FromStreet2 11.254 0.42063 19.31 0.0 90.0 0.0 3
Garage_NPCPos_ToStreet2 8.785 0.42063 19.238 0.0 270.0 0.0 3
Garage_PlayerPos_Quest10020010 19.81 0.42063 27.32 0.0 0.0 0.0 3
Garage_Object_Car_01 16.19 0.29 31.46 0.0 135.89999 0.0 3
Garage_ObjectPos_14 23.874 0.86 31.988 0.0 0.0 0.0 3
Garage_ObjectPos_15 22.254 0.82 22.982 0.0 0.0 0.0 3
Garage_ObjectPos_16 31.804 0.42063 28.509 0.0 0.0 0.0 3
Garage_ObjectPos_17 29.128 0.25 22.05 0.0 0.0 0.0 3
Garage_ObjectPos_18 29.941 0.0 32.857 0.0 0.0 0.0 3
Garage_NPCPos_Quest10020024 18.54 0.34 27.46 0.0 210.79999 0.0 3
Garage_PlayerPos_Quest10020120 17.75 0.42063 26.39 0.0 30.00001 0.0 3
Garage_NPCPos_No11 13.818 0.301 26.28 0.0 70.26791 0.0 3
Garage_NPCPos_No11_02 29.598 0.345 23.527 0.0 308.61368 0.0 3
Garage_NPCPos_No11_03 15.599 0.345 20.68 0.0 335.6268 0.0 3
Garage_NPCPos_No11_04 13.97 0.3 25.64 0.74837 128.50786 359.98956 3
Garage_NPCPos_Quest10020120 21.467 0.3 30.233 0.0 206.48201 0.0 3
Garage_PlayerPos_Chat01 20.545 0.42063 29.194 0.0 43.57 0.0 3
Workshop_PlayerPos_Default 23.75 0.58003 12.5 0.0 202.0 0.0 2
Workshop_PlayerPos_FromStreet 22.598 0.58003 7.611 0.0 30.00001 0.0 2
Workshop_PlayerPos_FromGarage 22.112 0.58002 14.386 0.0 180.0 0.0 2
Workshop_PlayerPos_Quest10020003 23.375 0.58002 11.406 0.0 0.0 0.0 2
Workshop_PlayerPos_Quest10020013 29.982 0.58002 15.418 0.0 120.00001 0.0 2
Workshop_PlayerPos_Quest10020011 29.867 0.58002 11.406 0.0 30.0 0.0 2
Workshop_PlayerPos_Quest10020012 29.587 0.58002 11.979 0.0 92.99999 0.0 2
Workshop_PlayerPos_Quest10020001 30.31 0.58002 11.18 0.0 40.0 0.0 2
Workshop_PlayerPos_Quest10020028 30.38 0.58002 12.826 0.0 80.0 0.0 2
Workshop_PlayerPos_Pos1 29.44 0.605 15.48 0.0 0.0 0.0 2
Workshop_PlayerPos_Pos2 30.729 0.584 15.3 0.0 0.0 0.0 2
Workshop_NPCPos_ToGarage 22.093 0.749 16.512 0.0 180.0 0.0 2
Workshop_NPCPos_ToStreet 21.529 0.666 5.786 0.0 28.1 0.0 2
Workshop_NPCPos_Hollow 33.19 0.86 11.482 0.0 270.0 0.0 2
Workshop_NPCPos_VHS 28.02 0.87 16.887 0.0 0.0 0.0 2
Workshop_NPCPos_Gacha 19.368 1.41 6.382 0.0 270.0 0.0 2
Workshop_NPCPos_TimeMachine 30.08 0.4 14.386 0.0 0.0 0.0 2
Workshop_NPCPos_Test 28.875 0.58384 9.625 0.0 312.68036 0.0 2
Workshop_NPCPos_SisterLing 24.476 0.5998 10.557 0.0 313.60257 0.0 2
Workshop_NPCPos_WorkTable 28.336 0.75 8.292 0.0 44.79997 0.0 2
Workshop_NPCPos_Noca 22.0 0.58003 8.5 0.0 50.0 0.0 2
WorkShop_NPCPos_Noca_Quest10020001 33.372 0.626 14.29 0.0 270.0 0.0 2
WorkShop_NPCPos_Billy_Quest10020003 22.0 0.58003 9.5 0.0 125.0 0.0 2
WorkShop_NPCPos_Anbi_Quest10020003 23.0 0.58003 9.0 0.0 295.0 0.0 2
WorkShop_NPCPos_Noca_Quest10020009 24.14684 0.58003 12.46807 0.0 207.99998 0.0 2
WorkShop_NPCPos_Billy_Quest10020009 24.211 0.58003 10.839 0.0 318.87799 0.0 2
WorkShop_NPCPos_Anbi_Quest10020009 22.779 0.58384 11.511 0.0 103.268 0.0 2
WorkShop_NPCPos_Salesman_Quest10020103 23.46 0.58003 12.533 0.0 206.96613 0.0 2
WorkShop_NPCPos_Tsubaki_Quest10020106 31.594 0.597 15.71 0.0 237.34885 0.0 2
Workshop_NpcPos_Quest10020151 19.5 0.58003 10.89 0.0 240.0 0.0 2
Workshop_NpcPos_Quest10020181 19.674 0.58003 12.272 0.0 4.53792 0.0 2
Workshop_NPCPos_BangbooA_VHS 25.03 0.58003 6.0 0.0 280.0 0.0 2
Workshop_NPCPos_guest01_VHS 19.845 0.58003 8.695 0.0 312.21448 0.0 2
Workshop_NPCPos_guest02_VHS 19.777 0.58003 10.577 0.0 169.99998 0.0 2
Workshop_NPCPos_guest03_VHS 19.84 0.58003 15.49 0.0 270.0 0.0 2
Workshop_NPCPos_guest04_VHS 19.152 0.58003 7.176 0.0 250.0 0.0 2
Workshop_NPCPos_guest05_VHS 19.256 0.58003 11.563 0.0 300.0 0.0 2
Workshop_NPCPos_guest06_VHS 19.27 0.58003 14.28 0.0 240.0 0.0 2
Workshop_NPCPos_Bangboo01_VHS 21.29 0.58003 13.62 0.0 199.99998 0.0 2
Workshop_NPCPos_Bangboo02_VHS 21.93 0.58003 11.36 0.0 150.0 0.0 2
Workshop_NPCPos_Bangboo03_VHS 21.13 0.58003 9.31 0.0 99.99999 0.0 2
Workshop_NPCPos_Bangboo04_VHS 20.5 0.58003 10.36 0.0 180.0 0.0 2
Workshop_NPCPos_Bangboo05_VHS 22.1 0.58003 9.9 0.0 120.00001 0.0 2
Workshop_CameraPos_Pos1 30.85 1.93 13.0 8.0 335.0 0.0 2
Workshop_CameraPos_Pos2 29.39 1.93 13.2 8.0 30.0 0.0 2
Workshop_NPCPos_Telephone 26.807 1.008 8.432 0.0 270.0 0.0 2
Workshop_NPCPos_HollowPause 32.61 0.59 11.58 0.0 90.0 0.0 2
Workshop_NPCPos_VHSBangboo 26.098 1.337 9.692 0.0 260.0 0.0 2
Workshop_PlayerPos_HollowQuest 32.37027 0.58384 11.5826 0.0 86.69299 0.0 2
WorkShop_CameraPos_VHSStore 22.53 1.855 10.8 0.0 115.38 0.0 2
Workshop_PlayerPos_FromHollow 32.37027 0.58384 11.5826 0.0 86.69299 0.0 2
Workshop_PlayerPos_FromVHS 28.0 0.58384 15.6 0.0 0.0 0.0 2
Workshop_PlayerPos_VHSStore 22.758 0.58384 9.921 0.0 86.69299 0.0 2
Workshop_NPCPos_ARole1 32.5 0.594 15.027 0.0 150.0 0.0 2
Workshop_NPCPos_ARole2 31.15 0.594 12.748 0.0 270.0 0.0 2
Workshop_NPCPos_ARole3 32.1 0.594 12.55 0.0 120.00001 0.0 2
Workshop_NPCPos_ARole4 25.555 0.594 6.693 0.0 306.96448 0.0 2
Workshop_NPCPos_ARole5 28.429 0.594 15.22 0.0 186.60002 0.0 2
Workshop_NPCPos_ARole6 28.74 0.594 13.821 0.0 131.39603 0.0 2
WorkShop_NPCPos_Tsubaki_Quest10020115 28.903 0.58003 16.034 0.0 154.11002 0.0 2
Workshop_PlayerPos_Quest10020106 31.701 0.594 13.423 0.0 255.0 0.0 2
Workshop_PlayerPos_Quest10020115 30.447 0.594 12.817 0.0 296.12622 0.0 2
Workshop_Teleport_ToWorkshop 23.69 0.6 9.698 0.0 60.0 0.0 2
Workshop_NPCPos_ARole7 27.35 0.59 16.0 0.0 45.0 0.0 2
Workshop_NPCPos_ARole8 29.952 0.594 14.702 0.0 0.0 0.0 2
Workshop_NPCPos_ARole8F 30.263 0.594 14.64 0.0 0.0 0.0 2
Workshop_NPCPos_ARole9 31.6 0.594 10.85 0.0 307.60001 0.0 2
Workshop_NPCPos_ARole10 33.19 0.594 15.438 0.0 260.0 0.0 2
Workshop_NPCPos_ARoleTest 30.05 0.594 14.858 0.0 0.0 0.0 2
Workshop_PlayerPos_Quest10020109 30.628 0.594 11.88 0.0 280.0 0.0 2
Workshop_PlayerPos_Quest10020113 30.628 0.594 11.88 0.0 280.0 0.0 2
Workshop_PlayerPos_Quest10020116 30.506 0.594 11.88 0.0 90.0 0.0 2
Workshop_PlayerPos_Quest10020010 30.208 0.594 12.092 0.0 348.5 0.0 2
Workshop_NPCPos_DrawingRoom 24.38 0.594 6.223 0.0 353.79999 0.0 2
Workshop_PlayerPos_Quest10020119 30.892 0.594 10.112 0.0 125.60002 0.0 2
Workshop_NPCPos_ARole11 31.605 0.594 9.471 0.0 300.0 0.0 2
Workshop_NPCPos_ARole12 30.402 0.6 9.8 0.0 44.15999 0.0 2
Workshop_NPCPos_ARole17 30.645 0.58 15.042 0.0 0.0 0.0 2
Workshop_NPCPos_ARole16 28.292 0.593 8.216 3.08252 316.2569 0.0 2
Workshop_NPCPos_ARole16F 25.559 0.578 7.945 0.0 204.72104 0.0 2
Workshop_NPCPos_ARole15 33.043 0.6 13.442 0.0 0.0 0.0 2
Workshop_NPCPos_ARole14 33.043 0.6 13.442 0.0 0.0 0.0 2
Workshop_NPCPos_ARole13 33.043 0.6 13.442 0.0 0.0 0.0 2
WorkShop_NPCPos_Tsubaki_Quest10020119 31.19 0.59 10.23 0.0 289.17999 0.0 2
Workshop_PlayerPos_Quest10020151 20.396 0.58003 11.186 0.0 270.0 0.0 2
Workshop_PlayerPos_Quest10020111 28.9 0.588 13.1 0.0 129.89999 0.0 2
Workshop_NpcPos_VHS31020002 25.688 0.58003 7.624 0.0 251.93011 0.0 2
Workshop_NpcPos_VHS31020001 23.12 0.58003 6.209 0.0 29.26875 0.0 2
Workshop_NpcPos_VHS31010001 21.59 0.58003 15.2 0.0 240.0 0.0 2
Workshop_NpcPos_Bangboo_Quest10020141 25.28177 0.588 6.47026 0.0 320.26306 0.0 2
Workshop_NpcPos_Bangboo_Quest10020195 19.567 0.588 15.244 0.0 120.5 0.0 2
Workshop_NpcPos_VHS31010002 21.9 0.58003 14.84 0.0 240.0 0.0 2
Workshop_PlayerPos_VHS31020002 21.924 0.58003 12.388 0.0 315.51761 0.0 2
Workshop_PlayerPos_VHS31020001 24.0 0.58003 9.36 0.0 150.0 0.0 2
Workshop_PlayerPos_VHS31010001 21.59 0.58003 14.46 0.0 0.0 0.0 2
Workshop_PlayerPos_VHS31010002 21.9 0.58003 14.46 0.0 0.0 0.0 2
Workshop_NPCPos_No11_03 25.3 0.587 13.56 0.0 240.0 0.0 2
Workshop_PlayerPos_Quest10020123 30.724 0.594 11.259 0.0 125.60002 0.0 2
WorkShop_NPCPos_Bangboo_Quest10020106 32.19 0.595 15.605 0.0 337.73215 0.0 2
Workshop_Passerby_133 19.237 0.58003 8.191 0.0 290.0 0.0 2
Workshop_Passerby_134 19.838 0.58003 10.448 0.0 199.99998 0.0 2
Workshop_Passerby_135 19.435 0.58003 15.141 0.0 270.0 0.0 2
Workshop_Passerby_136 19.403 0.58003 7.347 0.0 260.0 0.0 2
Workshop_Passerby_137 19.292 0.58003 11.969 0.0 270.0 0.0 2
Workshop_Passerby_138 20.347 0.58003 15.573 0.0 340.0 0.0 2
Workshop_PlayerPos_HollowPause 31.23 0.584 13.08 0.0 118.0 0.0 2
Workshop_NPCPos_ARole17F 31.0 0.58 15.15 0.0 311.0 0.0 2
Workshop_NpcPos_VHS31020001End 24.626 0.58003 8.681 0.0 311.76859 0.0 2
Workshop_NpcPos_VHS31020002_02 25.503 0.58003 7.032 0.0 306.8797 0.0 2
Workshop_NpcPos_VHS31020002End 21.218 0.58003 12.853 0.0 126.61777 0.0 2
Workshop_NpcPos_VHS31020002_02End 21.66 0.58003 13.136 0.0 152.39877 0.0 2
Workshop_NPCPos_ARole18 31.802 0.594 14.909 0.0 283.90863 0.0 2
Workshop_PlayerPos_ARole18 28.258 0.594 15.121 0.0 81.46976 0.0 2
Borderlands 0.0 0.0 0.0 0.0 0.0 0.0 0
1 ID PositionX PositionY PositionZ RotationX RotationY RotationZ Section
2 Street_Teleport_ToGrocery -16.73 0.3 -5.624 0.0 180.0 0.0 1
3 Street_Teleport_ToRamenStore 5.41 0.32 -1.36 0.0 0.0 0.0 1
4 Street_Teleport_ToAudioVideoStore 18.23 0.36 -9.16 0.0 180.0 0.0 1
5 Street_PlayerPos_Default 29.125 0.0 -4.375 0.0 270.0 0.0 1
6 Street_PlayerPos_FromWorkshop 17.541 0.34003 5.481 0.0 193.27106 0.0 1
7 Street_PlayerPos_FromGarage 12.89 0.34 10.71725 0.0 179.08109 0.0 1
8 Street_PlayerPos_FromGrocery -17.177 0.0 0.0 0.0 0.0 0.0 1
9 Street_NPCPos_ToWorkshop 18.243 0.557 8.079 0.0 209.99998 0.0 1
10 Street_NPCPos_Smithy 18.208 0.95 -12.138 0.0 180.0 0.0 1
11 Street_NPCPos_ToGarage 12.83 0.39287 14.673 0.0 180.0 0.0 1
12 Street_NPCPos_Test 0.75 0.31757 -4.5 0.0 90.0 0.0 1
13 Street_NPCPos_Quest 7.875 0.5 -2.125 0.0 185.0 0.0 1
14 Street_NPCPos_RamenStore 5.678 0.9 1.753 0.0 185.0 0.0 1
15 Street_NPCPos_TestS 6.761 0.3 -2.028 0.0 185.0 0.0 1
16 Street_NPCPos_TestL 9.04 0.5 -2.227 0.0 185.0 0.0 1
17 Street_NPCPos_Billy_Quest10020005 37.245 0.35 -1.786 0.0 0.0 0.0 1
18 Street_NPCPos_Anbi_Quest10020005 -22.37 0.36 -7.05 0.0 180.0 0.0 1
19 Street_NPCPos_Car_Quest10020005 37.43 0.75 3.26 0.0 270.0 0.0 1
20 Street_NPCPos_Temp_Quest10020005 20.275 0.35 -10.2 0.0 326.98425 0.0 1
21 Street_NPCPos_Billy_Quest10020006 -28.05087 0.5 -4.7 0.0 52.99999 0.0 1
22 Street_NPCPos_Anbi_Quest10020006 -26.5 0.5 -5.98 0.0 0.0 0.0 1
23 Street_NPCPos_Nocha_Quest10020008 -1.042 0.393 -3.014 0.0 90.0 0.0 1
24 Street_NPCPos_Temp_Quest10020015 19.36 0.393 1.37 0.0 29.52794 0.0 1
25 Street_NPCPos_Bangboo_Quest10020018 11.3 0.393 -0.25 0.0 180.0 0.0 1
26 Street_NPCPos_Temp_Quest10020020 -9.17 0.393 -10.86 0.0 0.0 0.0 1
27 Street_NPCPos_Temp_Quest10020021 6.67203 0.393 -8.174 0.0 84.99999 0.0 1
28 Street_NPCPos_BangbooA_Quest10020006 -16.869 0.729 -8.124 0.0 0.0 0.0 1
29 Street_NPCPos_BangbooB_Quest10020006 -17.556 0.729 -8.124 0.0 0.0 0.0 1
30 Street_NPCPos_BangbooC_Quest10020006 -16.186 0.729 -8.097 0.0 0.0 0.0 1
31 Street_CameraPos_Grocery -16.866 0.98 -1.508 0.0 180.0 0.0 1
32 Street_CameraPos_RamenStore 2.48 2.45 -2.52 10.60003 45.5 0.0 1
33 Street_CameraPos_RamenStore_PC 2.67 2.4 -2.29 10.8 44.0 0.0 1
34 Street_CameraPos_Workshop 18.71 0.91 -9.14 10.60001 180.0 0.0 1
35 TriggerPos_1 35.5 0.31757 -4.5 0.0 270.0 0.0 1
36 Street_NPCPos_Grocery -18.928 0.95 -9.358 0.0 324.60001 0.0 1
37 Street_NPCPos_TestBear 10.929 0.5 -2.392 0.0 185.0 0.0 1
38 Street_PlayerPos_FromGarage2 4.15 0.0 19.17 0.0 270.0 0.0 1
39 Street_NPCPos_ToGarage2 8.618 0.39287 19.235 0.0 270.0 0.0 1
40 Street_Passerby_A1 6.168 0.35 0.017 0.0 0.0 0.0 1
41 Street_Passerby_A2 7.0 0.48 -0.027 0.0 0.0 0.0 1
42 Street_Passerby_B1 14.832 0.35 1.667 0.0 169.99998 0.0 1
43 Street_Passerby_B2 15.41 0.35 1.09 0.0 240.0 0.0 1
44 Street_Passerby_C1 -27.068 0.35 5.609 0.0 230.92207 0.0 1
45 Street_Passerby_C2 -26.701 0.35 6.222 0.0 298.08884 0.0 1
46 Street_Passerby_D1 -12.857 0.35 -11.668 0.0 32.81414 0.0 1
47 Street_Passerby_D2 -12.635 0.35 -10.965 0.0 189.98178 0.0 1
48 Street_ObjectPos_08 -14.573 -0.013 -12.512 0.0 0.0 0.0 1
49 Street_ObjectPos_10 -14.303 1.375 -11.119 0.0 0.0 0.0 1
50 Street_ObjectPos_09 -13.948 0.092 -18.786 0.0 0.0 0.0 1
51 Street_Passerby_09 -5.95 0.35 11.106 0.0 32.66373 0.0 1
52 Street_Passerby_10 -5.734 0.35 12.094 0.0 176.94084 0.0 1
53 Street_Passerby_11 2.162 0.4 -9.208 0.0 86.23466 0.0 1
54 Street_Passerby_12 2.898 0.4 -9.705 0.0 344.81543 0.0 1
55 Street_Passerby_13 16.917 0.35 -10.73 0.0 196.76297 0.0 1
56 Street_Passerby_14 16.337 0.35 -10.233 0.0 150.0 0.0 1
57 Street_Passerby_15 21.459 0.36 -8.39 0.0 231.98558 0.0 1
58 Street_Passerby_16 20.742 0.35 -8.932 0.0 48.55833 0.0 1
59 Street_Passerby_17 15.15 0.35 7.51 0.0 212.18704 0.0 1
60 Street_Passerby_18 14.808 0.35 6.799 0.0 29.95915 0.0 1
61 Street_Passerby_19 -9.383 0.35 -0.624 0.0 261.22681 0.0 1
62 Street_Passerby_20 -10.141 0.35 -1.371 0.0 64.0559 0.0 1
63 Street_Passerby_21 -17.508 0.35 -0.558 0.0 339.64786 0.0 1
64 Street_Passerby_22 -17.19 0.35 0.057 0.0 286.36243 0.0 1
65 Street_Passerby_23 -11.63 0.35 -18.32 0.0 291.77817 0.0 1
66 Street_Passerby_24 -12.63 0.35 -18.43 0.0 27.8 0.0 1
67 Street_Passerby_25 -11.539 0.35 -17.535 0.0 234.79996 0.0 1
68 Street_Passerby_26 -13.04 0.35 -18.03 0.0 66.79999 0.0 1
69 Street_Passerby_27 -26.85 0.569 12.797 0.0 20.89114 0.0 1
70 Street_Passerby_28 -27.431 0.38 13.319 0.0 223.54056 0.0 1
71 Street_Passerby_29 22.296 0.35 -8.766 0.0 151.64432 0.0 1
72 Street_Passerby_30 22.839 0.528 -9.841 0.0 332.39041 0.0 1
73 Street_Passerby_31 -34.693 0.373 12.751 0.0 324.8782 0.0 1
74 Street_Passerby_32 -35.538 0.3793 13.14 0.0 116.70426 0.0 1
75 Street_NPCPos_Quest10020151 -4.574 0.3346 1.6568 0.0 10.32042 0.0 1
76 Street_NPCPos_Quest10020152 14.23 0.35 -9.95 0.0 0.0 0.0 1
77 Street_NPCPos_Quest10020153 11.12 0.4 -8.17 0.0 0.0 0.0 1
78 Street_NPCPos_Quest10020154 24.721 0.348 4.248 0.0 289.53577 0.0 1
79 Street_NPCPos_Quest10020155 -1.79 0.395 -21.504 0.0 321.61935 0.0 1
80 Street_NPCPos_Quest10020156 27.16 0.35 -1.49 0.0 190.0 0.0 1
81 Street_NPCPos_Quest10020157 3.28 0.35 1.465 0.0 90.0 0.0 1
82 Street_NPCPos_Quest10020158 1.35 0.4 -1.38 0.0 180.0 0.0 1
83 Street_Passerby_33 -26.297 0.35 -8.271 0.0 123.11625 0.0 1
84 Street_Passerby_34 -25.442 0.35 -8.919 0.0 318.86185 0.0 1
85 Street_Passerby_35 10.662 0.37 1.331 0.0 233.42654 0.0 1
86 Street_Passerby_36 10.038 0.36 1.146 0.0 193.91667 0.0 1
87 Street_Passerby_37 1.222 0.35 17.124 0.0 73.19746 0.0 1
88 Street_Passerby_38 2.177 0.35 17.239 0.0 295.93552 0.0 1
89 Street_Passerby_39 -7.65 0.35 -11.34 0.0 317.07599 0.0 1
90 Street_Passerby_40 -8.56 0.35 -10.89 0.0 62.40825 0.0 1
91 Street_Passerby_41 -21.485 0.35 -7.556 0.0 231.75189 0.0 1
92 Street_Passerby_42 -22.217 0.36 -7.046 0.0 135.27699 0.0 1
93 Street_Passerby_43 -26.552 0.355 0.922 0.0 329.71353 0.0 1
94 Street_Passerby_44 -26.563 0.36 1.809 0.0 203.36967 0.0 1
95 Street_Passerby_45 -29.2 0.39 -5.888 0.0 61.42846 0.0 1
96 Street_Passerby_46 -14.932 0.35 -29.664 0.0 79.99999 0.0 1
97 Street_Passerby_47 11.51 0.35 -13.93 0.0 209.63834 0.0 1
98 Street_Passerby_48 -22.751 0.36 -7.545 0.0 109.76276 0.0 1
99 Street_Passerby_49 2.386 0.4 -9.954 0.0 19.77401 0.0 1
100 Street_Passerby_50 3.13 0.4 -9.31 0.0 245.81375 0.0 1
101 Street_Passerby_51 -2.53 0.35 -29.03 0.0 20.00001 0.0 1
102 Street_ObjectPos_11 -6.0202 1.62 -36.027 0.0 0.0 0.0 1
103 Street_Passerby_52 -1.89 0.35 -29.04 0.0 330.0 0.0 1
104 Street_Passerby_53 -5.976 0.35 -1.683 0.0 295.77307 0.0 1
105 Street_Passerby_54 -6.768 0.35 -1.331 0.0 119.76264 0.0 1
106 Street_Passerby_55 2.566 0.35 -1.384 0.0 65.57031 0.0 1
107 Street_Passerby_56 3.203 0.35 -1.407 0.0 340.54376 0.0 1
108 Street_Passerby_57 -19.31 0.35 -7.24 0.0 50.0 0.0 1
109 Street_Passerby_58 -18.45 0.35 -6.99 0.0 270.0 0.0 1
110 Street_Passerby_59 -2.315 0.35 -25.478 0.0 240.0 0.0 1
111 Street_Passerby_60 -2.538 0.35 -26.063 0.0 20.00001 0.0 1
112 Street_Passerby_61 -4.613 0.3373 0.009 0.0 171.87192 0.0 1
113 Street_Passerby_62 -4.637 0.357 1.647 0.0 184.25121 0.0 1
114 Street_Passerby_63 16.305 0.35 -10.866 0.0 69.14664 0.0 1
115 Street_Passerby_64 17.0 0.35 -10.3 0.0 212.32573 0.0 1
116 Street_Passerby_65 9.307 0.38 -28.054 0.0 205.75116 0.0 1
117 Street_Passerby_66 9.613 0.38 -29.102 0.0 332.5571 0.0 1
118 Street_Passerby_67 -7.099 0.4991 11.649 0.0 63.06116 0.0 1
119 Street_Passerby_68 -6.042 0.35 12.561 0.0 227.34982 0.0 1
120 Street_Passerby_69 22.433 0.35 6.054 0.0 317.61322 0.0 1
121 Street_Passerby_70 -19.002 0.35 -1.416 0.0 154.39163 0.0 1
122 Street_Passerby_71 -25.812 0.71 15.861 0.0 317.13211 0.0 1
123 Street_ObjectPos_06 -26.43 1.8 16.614 0.0 0.0 0.0 1
124 Street_ObjectPos_07 -24.915 0.996 12.736 0.0 0.0 0.0 1
125 Street_Passerby_72 32.834 0.35 -7.017 0.0 325.03073 0.0 1
126 Street_Passerby_73 -7.586 0.4 -0.346 0.0 136.72357 0.0 1
127 Street_Passerby_74 -26.168 0.5651 12.814 0.0 205.99687 0.0 1
128 Street_ObjectPos_05 -26.783 1.263 10.008 0.0 110.0 0.0 1
129 Street_Passerby_75 -26.378 0.35 6.141 0.0 288.5228 0.0 1
130 Street_Passerby_76 -6.893 0.64 15.257 0.0 50.22827 0.0 1
131 Street_Passerby_77 -11.306 0.35 -9.496 0.0 119.16231 0.0 1
132 Street_Passerby_78 -32.834 0.35 -2.719 0.0 50.0 0.0 1
133 Street_ObjectPos_02 -35.7 1.556 -6.62 0.0 0.0 0.0 1
134 Street_Passerby_79 -35.854 0.38 4.449 0.0 330.0 0.0 1
135 Street_Passerby_80 -0.168 0.388 21.145 0.0 247.54602 0.0 1
136 Street_ObjectPos_13 1.141 0.836 15.84 0.0 0.0 0.0 1
137 Street_Passerby_81 9.372 0.36 -8.746 0.0 319.89386 0.0 1
138 Street_NPCPos_Quest10020118 0.46 0.4 16.07 0.0 132.127 0.0 1
139 Street_NPCPos_Joe 14.487 0.344 7.658 0.0 117.47181 0.0 1
140 Street_Passerby_82 1.345 0.35 -29.269 0.0 318.21954 0.0 1
141 Street_Passerby_83 -29.28 0.36 -6.019 0.0 92.8725 0.0 1
142 Street_Passerby_84 -20.485 0.35 -8.332 0.0 218.35194 0.0 1
143 Street_Passerby_85 11.059 0.35 5.281 0.0 120.00001 0.0 1
144 Street_Passerby_86 12.09 0.36 -5.24 0.0 320.0 0.0 1
145 Street_Passerby_87 12.09 0.36 -5.24 0.0 320.0 0.0 1
146 Street_Passerby_88 12.09 0.36 -5.24 0.0 320.0 0.0 1
147 Street_Passerby_89 12.743 0.35 -10.13 0.0 52.06183 0.0 1
148 Street_Passerby_90 -26.65 0.36 6.866 0.0 260.0 0.0 1
149 Street_Passerby_91 -13.317 0.35 -1.324 0.0 154.53731 0.0 1
150 Street_Passerby_92 7.02 0.33 0.0589 0.0 0.0 0.0 1
151 Street_Passerby_93 12.09 0.36 -5.24 0.0 320.0 0.0 1
152 Street_Passerby_94 24.156 0.36 -0.589 0.0 258.23029 0.0 1
153 Street_Passerby_95 -8.074 0.35 -11.114 0.0 321.74228 0.0 1
154 Street_Passerby_96 32.996 0.35 -7.036 0.0 298.86584 0.0 1
155 Street_Passerby_97 -2.633 0.35 -25.815 0.0 294.18304 0.0 1
156 Street_Passerby_98 -14.06 0.36 -7.276 0.0 289.05328 0.0 1
157 Street_Passerby_99 -26.389 0.356 7.356 0.0 257.54462 0.0 1
158 Street_Passerby_100 28.999 0.36 -7.249 0.0 36.28022 0.0 1
159 Street_Passerby_101 4.87 0.36 -29.65 0.0 180.0 0.0 1
160 Street_Passerby_102 -26.387 0.35 7.338 0.0 249.63678 0.0 1
161 Street_Passerby_103 12.09 0.31 -5.24 0.0 320.0 0.0 1
162 Street_Passerby_104 14.6 0.36 8.1 0.0 210.0 0.0 1
163 Street_Passerby_105 2.127 0.4 -9.184 0.0 33.36407 0.0 1
164 Street_Passerby_106 12.09 0.36 -5.24 0.0 320.0 0.0 1
165 Street_Passerby_107 3.32 0.48 1.472 0.0 90.0 0.0 1
166 Street_Passerby_108 12.09 0.36 -5.24 0.0 320.0 0.0 1
167 Street_Passerby_109 -26.7 0.36 7.295 0.0 260.0 0.0 1
168 Street_Passerby_110 12.09 0.36 -5.24 0.0 320.0 0.0 1
169 Street_Passerby_111 -14.558 0.35 -8.069 0.0 288.58353 0.0 1
170 Street_Passerby_112 -4.577 0.353 1.663 0.0 194.16655 0.0 1
171 Street_Passerby_113 11.049 0.35 5.16 0.0 115.38074 0.0 1
172 Street_Passerby_114 12.09 0.36 -5.24 0.0 320.0 0.0 1
173 Street_NPCPos_Xiute 15.328 0.347 7.214 0.0 298.45078 0.0 1
174 Street_NPCPos_No11_01 5.784 0.35 -35.839 0.0 240.0 0.0 1
175 Street_NPCPos_Keli_01 5.12 0.36 -36.21 0.0 50.0 0.0 1
176 Street_NPCPos_No11_01End 6.64 0.35 -35.06 0.0 10.0 0.0 1
177 Street_Passerby_501 -26.61 0.69 16.044 0.0 28.75916 0.0 1
178 Street_Passerby_502 -22.804 0.36 -7.391 0.0 60.44901 0.0 1
179 Street_Passerby_503 -22.058 0.36 -7.339 0.0 324.42499 0.0 1
180 Street_Passerby_115 3.28 0.4537 1.464 0.0 90.0 0.0 1
181 Street_Passerby_116 8.16 0.48 2.362 0.0 270.0 0.0 1
182 Street_Passerby_117 -4.593 0.351 0.1033 0.0 343.36163 0.0 1
183 Street_Passerby_118 -4.43 0.49 1.48 0.0 180.0 0.0 1
184 Street_Passerby_119 -25.591 0.35 -6.895 0.0 315.20914 0.0 1
185 Street_Passerby_120 -4.667 0.337 1.677 0.0 345.07632 0.0 1
186 Street_NPCPos_Bangboo_Quest10020188 2.652 0.344 -0.622 0.0 74.99999 0.0 1
187 Street_NPCPos_Bangboo_Quest10020196 -3.648 0.353 -17.817 0.0 220.05724 0.0 1
188 Street_NPCPos_Bangboo_Quest10020140 21.47 0.344 5.908 0.0 0.0 0.0 1
189 Street_Passerby_121 -35.256 0.41 13.372 0.0 150.83507 0.0 1
190 Street_Passerby_122 -34.693 0.373 12.751 0.0 324.8782 0.0 1
191 Street_NPCPos_No11_02 -1.8 0.345 -29.986 0.0 310.0 0.0 1
192 Street_NPCPos_Keli_02 -2.26 0.36 -29.6 0.0 150.0 0.0 1
193 Street_NPCPos_Keli_02End 0.11 0.315 -29.62 0.0 79.99999 0.0 1
194 Street_NPCPos_Quest10020155_02 -1.763 0.8425 -21.017 0.0 237.17775 0.0 1
195 Street_NPCPos_No11_03End 14.81 0.349 0.54 0.0 120.00001 0.0 1
196 Street_NPCPos_Keli_03End 15.38 0.359 -0.28 0.0 20.00001 0.0 1
197 Street_NPCPos_Woof 11.26 1.15 -10.188 0.0 0.0 0.0 1
198 Street_ObjectPos_Newsstand 11.08 1.15 -9.372 0.0 0.0 0.0 1
199 Street_Passerby_123 4.504 0.329 -0.0001 0.0 0.0 0.0 1
200 Street_Passerby_124 8.166 0.329 1.463 0.0 270.0 0.0 1
201 Street_Passerby_125 5.36 0.35 -0.01 0.0 0.0 0.0 1
202 Street_Passerby_126 3.358 0.333 1.456 0.0 90.0 0.0 1
203 Street_Passerby_127 8.212 0.452 1.48 0.0 270.0 0.0 1
204 Street_NPCPos_Schroeder 1.752 0.342 -1.479 0.0 55.99999 0.0 1
205 Street_Passerby_128 5.38 0.334 0.064 0.0 0.0 0.0 1
206 Street_Passerby_129 3.287 0.35 1.452 0.0 90.0 0.0 1
207 Street_Passerby_130 -22.633 0.35 -7.275 0.0 53.62085 0.0 1
208 Street_Passerby_131 8.232 0.35 2.374 0.0 270.0 0.0 1
209 Street_Passerby_132 10.17 0.35 2.07 0.0 163.21513 0.0 1
210 Street_Passerby_139 -26.414 0.71 15.934 0.0 336.39316 0.0 1
211 Street_Passerby_140 -27.703 0.593 15.938 0.0 55.93431 0.0 1
212 Street_Passerby_141 10.968 0.4 6.067 0.0 120.00001 0.0 1
213 Street_Passerby_142 11.058 0.35 4.379 0.0 117.98868 0.0 1
214 Street_Passerby_143 10.678 0.36 -13.711 0.0 216.67374 0.0 1
215 Street_Passerby_144 -13.401 0.35 -12.446 0.0 333.78751 0.0 1
216 Street_Passerby_145 40.108 0.353 -0.147 0.0 154.59579 0.0 1
217 Street_ObjectPos_12 43.325 -0.015 -4.342 0.0 90.0 0.0 1
218 Street_Passerby_146 40.73 0.3506 -0.68 0.0 314.69949 0.0 1
219 Street_Passerby_147 2.594 0.35 -7.269 0.0 88.00859 0.0 1
220 Street_Passerby_148 3.52 0.4 -7.453 0.0 303.92548 0.0 1
221 Street_Passerby_149 4.667 0.4 -10.8 0.0 221.15468 0.0 1
222 Street_ObjectPos_04 0.763 1.038 -9.181 0.0 0.0 0.0 1
223 Street_Passerby_150 12.273 0.359 -8.928 0.0 238.31017 0.0 1
224 Street_NPCPos_Woof2 11.26 1.15 -10.188 0.0 0.0 0.0 1
225 Street_NPCPos_Woof3 11.26 1.15 -10.188 0.0 0.0 0.0 1
226 Street_Passerby_507 -26.592 0.36 -9.141 0.0 331.79459 0.0 1
227 Street_Passerby_508 -27.964 0.35 9.704 0.0 276.12378 0.0 1
228 Street_Passerby_509 5.012 0.35 -7.226 0.0 36.47496 0.0 1
229 Street_Passerby_510 -7.145 0.363 4.026 0.0 270.0 0.0 1
230 Street_Passerby_511 4.493 0.36 -35.899 0.0 20.00001 0.0 1
231 Street_Passerby_512 -4.592 0.355 0.073 0.0 343.46274 0.0 1
232 Street_Passerby_513 2.122 0.4 -10.398 0.0 32.57107 0.0 1
233 Street_Passerby_514 2.891 0.4 -10.705 0.0 0.0 0.0 1
234 Street_Passerby_515 14.095 0.36 -14.156 0.0 22.06978 0.0 1
235 Street_Passerby_516 15.321 0.35 7.58 0.0 123.66821 0.0 1
236 Street_Passerby_517 -4.305 0.4 -7.595 0.0 125.55424 0.0 1
237 Street_Passerby_518 -1.701 0.4 -23.751 0.0 310.0 0.0 1
238 Street_Passerby_519 -19.162 0.36 -8.18 0.0 37.20817 0.0 1
239 Street_ObjectPos_03 -21.194 0.171 -9.311 0.0 0.0 0.0 1
240 Street_Passerby_520 -3.812 0.347 -17.462 0.0 247.24823 0.0 1
241 Street_NPCPos_Susie -25.671 0.6214 14.104 0.0 268.89499 0.0 1
242 Street_NPCPos_TinMaster01 -10.191 0.36 -1.46 0.0 345.65805 0.0 1
243 Street_NPCPos_TinMaster02 -6.288 0.3505 -7.195 0.0 321.44672 0.0 1
244 Street_NPCPos_Gate 7.03 0.35 0.017 0.0 0.0 0.0 1
245 Street_NPCPos_Ben 2.233 0.36 2.478 0.0 133.82996 0.0 1
246 Street_PlayerPos_FromRamen 6.074 0.0 -0.758 0.0 0.0 0.0 1
247 Street_NPCPos_Anton -34.865 0.396 13.443 0.0 142.69867 0.0 1
248 Street_NPCPos_OokumaMari 11.921 0.347 -8.374 0.0 219.14148 0.0 1
249 Street_Passerby_151 -4.573 0.34 0.044 0.0 168.11601 1.0 1
250 Street_Passerby_152 9.423 0.352 -32.084 0.0 339.92599 0.0 1
251 Street_Passerby_153 -26.66462 0.3402 7.56905 359.60715 269.99854 0.65592 1
252 Street_NPCPos_Anbi02 -22.5 0.36 0.573 0.0 163.69124 0.0 1
253 Street_NPCPos_Enzo 27.243 0.35 -1.528 0.0 229.92622 0.0 1
254 Street_NPCPos_OokumaMari02 3.281 0.3965 -10.212 0.0 31.35417 0.0 1
255 Street_NPCPos_Billy02 -13.986 0.36 -7.091 0.0 113.60025 0.0 1
256 Street_NPCPos_Tsubaki 10.39 0.35 -8.91 0.0 137.00946 0.0 1
257 Street_NPCPos_Anton02 26.712 0.35 -6.986 0.0 305.87402 0.0 1
258 Street_NPCPos_Nocha02 9.577 0.348 -7.368 0.0 151.92999 0.0 1
259 Street_NPCPos_Tsubaki02 -18.173 0.35 -6.936 0.0 133.66385 0.0 1
260 Street_NPCPos_OokumaMari04 -25.138 0.7161 16.08 0.0 326.39648 0.0 1
261 Street_NPCPos_Ben02 20.665 0.35 -10.565 0.0 251.54306 0.0 1
262 Street_NPCPos_OokumaMari03 -22.553 0.36 -0.064 0.0 159.34224 0.0 1
263 Street_NPCPos_Ben03 -21.869 0.35 0.596 0.0 192.34038 0.0 1
264 Street_NPCPos_Billy03 22.297 0.36 5.854 0.0 340.17264 0.0 1
265 Street_NPCPos_Nocha03 6.929 0.395 -1.278 0.0 342.26456 0.0 1
266 Street_NPCPos_Tsubaki03 7.076 0.35 -0.706 0.0 312.97723 0.0 1
267 Street_NPCPos_Anbi03 10.312 0.35 2.109 0.0 240.46249 0.0 1
268 Street_NPCPos_Ben04 -32.609 0.342 -8.256 0.0 67.92832 0.0 1
269 Street_NPCPos_OokumaMari05 -1.27 0.3492 -29.178 0.0 305.29065 0.0 1
270 Street_NPCPos_Anton03 -2.058 0.35 -28.686 0.0 125.14816 0.0 1
271 Street_NPCPos_Nocha04 -22.595 0.395 -7.348 0.0 125.5207 0.0 1
272 Street_NPCPos_Billy04 -3.506 0.36 -17.778 0.0 251.33165 0.0 1
273 Street_NPCPos_Anbi04 -4.261 0.35 -17.505 0.0 264.7402 0.0 1
274 Street_NPCPos_Schroeder02 -5.053 0.342 4.863 0.0 70.83122 0.0 1
275 Street_NPCPos_Schroeder03 3.253 0.323 1.458 0.0 92.53754 0.0 1
276 Street_Passerby_521 -32.515 2.3 30.558 0.0 75.47579 0.0 1
277 Street_Passerby_522 -29.71 2.3 29.43 0.0 209.83707 0.0 1
278 Street_Passerby_523 -30.529 2.3 28.95 0.0 55.32315 0.0 1
279 Street_Passerby_524 -26.636 0.368 7.484 0.0 250.28363 0.0 1
280 Street_Passerby_525 21.991 0.35 -1.218 0.0 245.47432 0.0 1
281 Street_Passerby_526 -27.72 0.35 12.558 0.0 70.0 0.0 1
282 Street_Passerby_527 -2.147 0.35 -23.641 0.0 290.0 0.0 1
283 Street_Passerby_528 -3.553 0.395 -18.033 0.0 155.24419 0.0 1
284 Street_Passerby_529 -2.866 0.395 -19.195 0.0 327.30453 0.0 1
285 Street_Passerby_530 2.248 0.35 17.375 0.0 240.0 0.0 1
286 Street_Passerby_531 -30.195 2.3 29.303 0.0 316.19141 0.0 1
287 Street_Passerby_532 -15.625 0.35 -6.819 0.0 195.36263 0.0 1
288 Street_Passerby_533 -2.562 0.35 -23.881 0.0 312.95004 0.0 1
289 Street_Passerby_534 -12.646 0.35 -18.012 0.0 255.57466 0.0 1
290 Street_Passerby_535 -13.387 0.35 -16.812 0.0 152.59938 0.0 1
291 Street_NPCPos_Shepherd02 -4.574 0.3346 1.6568 0.0 10.32042 0.0 1
292 Street_NPCPos_No11_04 10.123 0.356 1.745 0.0 142.0 0.0 1
293 Street_NPCPos_PAFUMEI 15.973 0.35 7.416 0.0 334.46896 0.0 1
294 Street_NPCPos_MEIKE 15.483 0.35 7.766 0.0 120.00001 0.0 1
295 Street_Passerby_536 3.952 0.4 -11.297 0.0 48.38462 0.0 1
296 Garage_PlayerPos_Default 19.05 0.42063 21.43 0.0 0.0 0.0 3
297 Garage_PlayerPos_FromWorkshop 19.05 0.42063 22.744 0.0 0.0 0.0 3
298 Garage_PlayerPos_FromStreet 12.79 0.42063 18.82 0.0 0.0 0.0 3
299 Garage_PlayerPos_Quest10020003 20.701 0.42063 29.794 0.0 220.0 0.0 3
300 Garage_NPCPos_ToWorkshop 19.13 0.25 19.663 0.0 0.0 0.0 3
301 Garage_NPCPos_ToStreet 12.836 0.476 15.002 0.0 0.0 0.0 3
302 Garage_NPCPos_Nocha_Quest10020003 17.614 0.35 30.44 0.0 136.39999 0.0 3
303 Garage_NPCPos_Billy_Quest10020003 15.226 0.32 27.58 0.0 82.8 0.0 3
304 Garage_NPCPos_Anbi_Quest10020003 15.319 0.32 28.817 0.0 94.7 0.0 3
305 Garage_NPCPos_Nocha_Quest10020012 17.39999 0.34 27.69 0.0 158.30615 0.0 3
306 Garage_NPCPos_Billy_Quest10020012 18.56 0.31 32.58 0.0 250.0 0.0 3
307 Garage_NPCPos_Anbi_Quest10020012 18.58 0.31 31.46 0.0 320.0 0.0 3
308 ItemPos_1 17.0 0.42063 24.5 0.0 0.0 0.0 3
309 ItemPos_2 18.0 0.42063 24.5 0.0 0.0 0.0 3
310 ItemPos_3 19.0 0.42063 24.5 0.0 0.0 0.0 3
311 ItemPos_4 20.0 0.42063 24.5 0.0 0.0 0.0 3
312 ItemPos_5 21.0 0.42063 24.5 0.0 0.0 0.0 3
313 Garage_PlayerPos_FromStreet2 11.254 0.42063 19.31 0.0 90.0 0.0 3
314 Garage_NPCPos_ToStreet2 8.785 0.42063 19.238 0.0 270.0 0.0 3
315 Garage_PlayerPos_Quest10020010 19.81 0.42063 27.32 0.0 0.0 0.0 3
316 Garage_Object_Car_01 16.19 0.29 31.46 0.0 135.89999 0.0 3
317 Garage_ObjectPos_14 23.874 0.86 31.988 0.0 0.0 0.0 3
318 Garage_ObjectPos_15 22.254 0.82 22.982 0.0 0.0 0.0 3
319 Garage_ObjectPos_16 31.804 0.42063 28.509 0.0 0.0 0.0 3
320 Garage_ObjectPos_17 29.128 0.25 22.05 0.0 0.0 0.0 3
321 Garage_ObjectPos_18 29.941 0.0 32.857 0.0 0.0 0.0 3
322 Garage_NPCPos_Quest10020024 18.54 0.34 27.46 0.0 210.79999 0.0 3
323 Garage_PlayerPos_Quest10020120 17.75 0.42063 26.39 0.0 30.00001 0.0 3
324 Garage_NPCPos_No11 13.818 0.301 26.28 0.0 70.26791 0.0 3
325 Garage_NPCPos_No11_02 29.598 0.345 23.527 0.0 308.61368 0.0 3
326 Garage_NPCPos_No11_03 15.599 0.345 20.68 0.0 335.6268 0.0 3
327 Garage_NPCPos_No11_04 13.97 0.3 25.64 0.74837 128.50786 359.98956 3
328 Garage_NPCPos_Quest10020120 21.467 0.3 30.233 0.0 206.48201 0.0 3
329 Garage_PlayerPos_Chat01 20.545 0.42063 29.194 0.0 43.57 0.0 3
330 Workshop_PlayerPos_Default 23.75 0.58003 12.5 0.0 202.0 0.0 2
331 Workshop_PlayerPos_FromStreet 22.598 0.58003 7.611 0.0 30.00001 0.0 2
332 Workshop_PlayerPos_FromGarage 22.112 0.58002 14.386 0.0 180.0 0.0 2
333 Workshop_PlayerPos_Quest10020003 23.375 0.58002 11.406 0.0 0.0 0.0 2
334 Workshop_PlayerPos_Quest10020013 29.982 0.58002 15.418 0.0 120.00001 0.0 2
335 Workshop_PlayerPos_Quest10020011 29.867 0.58002 11.406 0.0 30.0 0.0 2
336 Workshop_PlayerPos_Quest10020012 29.587 0.58002 11.979 0.0 92.99999 0.0 2
337 Workshop_PlayerPos_Quest10020001 30.31 0.58002 11.18 0.0 40.0 0.0 2
338 Workshop_PlayerPos_Quest10020028 30.38 0.58002 12.826 0.0 80.0 0.0 2
339 Workshop_PlayerPos_Pos1 29.44 0.605 15.48 0.0 0.0 0.0 2
340 Workshop_PlayerPos_Pos2 30.729 0.584 15.3 0.0 0.0 0.0 2
341 Workshop_NPCPos_ToGarage 22.093 0.749 16.512 0.0 180.0 0.0 2
342 Workshop_NPCPos_ToStreet 21.529 0.666 5.786 0.0 28.1 0.0 2
343 Workshop_NPCPos_Hollow 33.19 0.86 11.482 0.0 270.0 0.0 2
344 Workshop_NPCPos_VHS 28.02 0.87 16.887 0.0 0.0 0.0 2
345 Workshop_NPCPos_Gacha 19.368 1.41 6.382 0.0 270.0 0.0 2
346 Workshop_NPCPos_TimeMachine 30.08 0.4 14.386 0.0 0.0 0.0 2
347 Workshop_NPCPos_Test 28.875 0.58384 9.625 0.0 312.68036 0.0 2
348 Workshop_NPCPos_SisterLing 24.476 0.5998 10.557 0.0 313.60257 0.0 2
349 Workshop_NPCPos_WorkTable 28.336 0.75 8.292 0.0 44.79997 0.0 2
350 Workshop_NPCPos_Noca 22.0 0.58003 8.5 0.0 50.0 0.0 2
351 WorkShop_NPCPos_Noca_Quest10020001 33.372 0.626 14.29 0.0 270.0 0.0 2
352 WorkShop_NPCPos_Billy_Quest10020003 22.0 0.58003 9.5 0.0 125.0 0.0 2
353 WorkShop_NPCPos_Anbi_Quest10020003 23.0 0.58003 9.0 0.0 295.0 0.0 2
354 WorkShop_NPCPos_Noca_Quest10020009 24.14684 0.58003 12.46807 0.0 207.99998 0.0 2
355 WorkShop_NPCPos_Billy_Quest10020009 24.211 0.58003 10.839 0.0 318.87799 0.0 2
356 WorkShop_NPCPos_Anbi_Quest10020009 22.779 0.58384 11.511 0.0 103.268 0.0 2
357 WorkShop_NPCPos_Salesman_Quest10020103 23.46 0.58003 12.533 0.0 206.96613 0.0 2
358 WorkShop_NPCPos_Tsubaki_Quest10020106 31.594 0.597 15.71 0.0 237.34885 0.0 2
359 Workshop_NpcPos_Quest10020151 19.5 0.58003 10.89 0.0 240.0 0.0 2
360 Workshop_NpcPos_Quest10020181 19.674 0.58003 12.272 0.0 4.53792 0.0 2
361 Workshop_NPCPos_BangbooA_VHS 25.03 0.58003 6.0 0.0 280.0 0.0 2
362 Workshop_NPCPos_guest01_VHS 19.845 0.58003 8.695 0.0 312.21448 0.0 2
363 Workshop_NPCPos_guest02_VHS 19.777 0.58003 10.577 0.0 169.99998 0.0 2
364 Workshop_NPCPos_guest03_VHS 19.84 0.58003 15.49 0.0 270.0 0.0 2
365 Workshop_NPCPos_guest04_VHS 19.152 0.58003 7.176 0.0 250.0 0.0 2
366 Workshop_NPCPos_guest05_VHS 19.256 0.58003 11.563 0.0 300.0 0.0 2
367 Workshop_NPCPos_guest06_VHS 19.27 0.58003 14.28 0.0 240.0 0.0 2
368 Workshop_NPCPos_Bangboo01_VHS 21.29 0.58003 13.62 0.0 199.99998 0.0 2
369 Workshop_NPCPos_Bangboo02_VHS 21.93 0.58003 11.36 0.0 150.0 0.0 2
370 Workshop_NPCPos_Bangboo03_VHS 21.13 0.58003 9.31 0.0 99.99999 0.0 2
371 Workshop_NPCPos_Bangboo04_VHS 20.5 0.58003 10.36 0.0 180.0 0.0 2
372 Workshop_NPCPos_Bangboo05_VHS 22.1 0.58003 9.9 0.0 120.00001 0.0 2
373 Workshop_CameraPos_Pos1 30.85 1.93 13.0 8.0 335.0 0.0 2
374 Workshop_CameraPos_Pos2 29.39 1.93 13.2 8.0 30.0 0.0 2
375 Workshop_NPCPos_Telephone 26.807 1.008 8.432 0.0 270.0 0.0 2
376 Workshop_NPCPos_HollowPause 32.61 0.59 11.58 0.0 90.0 0.0 2
377 Workshop_NPCPos_VHSBangboo 26.098 1.337 9.692 0.0 260.0 0.0 2
378 Workshop_PlayerPos_HollowQuest 32.37027 0.58384 11.5826 0.0 86.69299 0.0 2
379 WorkShop_CameraPos_VHSStore 22.53 1.855 10.8 0.0 115.38 0.0 2
380 Workshop_PlayerPos_FromHollow 32.37027 0.58384 11.5826 0.0 86.69299 0.0 2
381 Workshop_PlayerPos_FromVHS 28.0 0.58384 15.6 0.0 0.0 0.0 2
382 Workshop_PlayerPos_VHSStore 22.758 0.58384 9.921 0.0 86.69299 0.0 2
383 Workshop_NPCPos_ARole1 32.5 0.594 15.027 0.0 150.0 0.0 2
384 Workshop_NPCPos_ARole2 31.15 0.594 12.748 0.0 270.0 0.0 2
385 Workshop_NPCPos_ARole3 32.1 0.594 12.55 0.0 120.00001 0.0 2
386 Workshop_NPCPos_ARole4 25.555 0.594 6.693 0.0 306.96448 0.0 2
387 Workshop_NPCPos_ARole5 28.429 0.594 15.22 0.0 186.60002 0.0 2
388 Workshop_NPCPos_ARole6 28.74 0.594 13.821 0.0 131.39603 0.0 2
389 WorkShop_NPCPos_Tsubaki_Quest10020115 28.903 0.58003 16.034 0.0 154.11002 0.0 2
390 Workshop_PlayerPos_Quest10020106 31.701 0.594 13.423 0.0 255.0 0.0 2
391 Workshop_PlayerPos_Quest10020115 30.447 0.594 12.817 0.0 296.12622 0.0 2
392 Workshop_Teleport_ToWorkshop 23.69 0.6 9.698 0.0 60.0 0.0 2
393 Workshop_NPCPos_ARole7 27.35 0.59 16.0 0.0 45.0 0.0 2
394 Workshop_NPCPos_ARole8 29.952 0.594 14.702 0.0 0.0 0.0 2
395 Workshop_NPCPos_ARole8F 30.263 0.594 14.64 0.0 0.0 0.0 2
396 Workshop_NPCPos_ARole9 31.6 0.594 10.85 0.0 307.60001 0.0 2
397 Workshop_NPCPos_ARole10 33.19 0.594 15.438 0.0 260.0 0.0 2
398 Workshop_NPCPos_ARoleTest 30.05 0.594 14.858 0.0 0.0 0.0 2
399 Workshop_PlayerPos_Quest10020109 30.628 0.594 11.88 0.0 280.0 0.0 2
400 Workshop_PlayerPos_Quest10020113 30.628 0.594 11.88 0.0 280.0 0.0 2
401 Workshop_PlayerPos_Quest10020116 30.506 0.594 11.88 0.0 90.0 0.0 2
402 Workshop_PlayerPos_Quest10020010 30.208 0.594 12.092 0.0 348.5 0.0 2
403 Workshop_NPCPos_DrawingRoom 24.38 0.594 6.223 0.0 353.79999 0.0 2
404 Workshop_PlayerPos_Quest10020119 30.892 0.594 10.112 0.0 125.60002 0.0 2
405 Workshop_NPCPos_ARole11 31.605 0.594 9.471 0.0 300.0 0.0 2
406 Workshop_NPCPos_ARole12 30.402 0.6 9.8 0.0 44.15999 0.0 2
407 Workshop_NPCPos_ARole17 30.645 0.58 15.042 0.0 0.0 0.0 2
408 Workshop_NPCPos_ARole16 28.292 0.593 8.216 3.08252 316.2569 0.0 2
409 Workshop_NPCPos_ARole16F 25.559 0.578 7.945 0.0 204.72104 0.0 2
410 Workshop_NPCPos_ARole15 33.043 0.6 13.442 0.0 0.0 0.0 2
411 Workshop_NPCPos_ARole14 33.043 0.6 13.442 0.0 0.0 0.0 2
412 Workshop_NPCPos_ARole13 33.043 0.6 13.442 0.0 0.0 0.0 2
413 WorkShop_NPCPos_Tsubaki_Quest10020119 31.19 0.59 10.23 0.0 289.17999 0.0 2
414 Workshop_PlayerPos_Quest10020151 20.396 0.58003 11.186 0.0 270.0 0.0 2
415 Workshop_PlayerPos_Quest10020111 28.9 0.588 13.1 0.0 129.89999 0.0 2
416 Workshop_NpcPos_VHS31020002 25.688 0.58003 7.624 0.0 251.93011 0.0 2
417 Workshop_NpcPos_VHS31020001 23.12 0.58003 6.209 0.0 29.26875 0.0 2
418 Workshop_NpcPos_VHS31010001 21.59 0.58003 15.2 0.0 240.0 0.0 2
419 Workshop_NpcPos_Bangboo_Quest10020141 25.28177 0.588 6.47026 0.0 320.26306 0.0 2
420 Workshop_NpcPos_Bangboo_Quest10020195 19.567 0.588 15.244 0.0 120.5 0.0 2
421 Workshop_NpcPos_VHS31010002 21.9 0.58003 14.84 0.0 240.0 0.0 2
422 Workshop_PlayerPos_VHS31020002 21.924 0.58003 12.388 0.0 315.51761 0.0 2
423 Workshop_PlayerPos_VHS31020001 24.0 0.58003 9.36 0.0 150.0 0.0 2
424 Workshop_PlayerPos_VHS31010001 21.59 0.58003 14.46 0.0 0.0 0.0 2
425 Workshop_PlayerPos_VHS31010002 21.9 0.58003 14.46 0.0 0.0 0.0 2
426 Workshop_NPCPos_No11_03 25.3 0.587 13.56 0.0 240.0 0.0 2
427 Workshop_PlayerPos_Quest10020123 30.724 0.594 11.259 0.0 125.60002 0.0 2
428 WorkShop_NPCPos_Bangboo_Quest10020106 32.19 0.595 15.605 0.0 337.73215 0.0 2
429 Workshop_Passerby_133 19.237 0.58003 8.191 0.0 290.0 0.0 2
430 Workshop_Passerby_134 19.838 0.58003 10.448 0.0 199.99998 0.0 2
431 Workshop_Passerby_135 19.435 0.58003 15.141 0.0 270.0 0.0 2
432 Workshop_Passerby_136 19.403 0.58003 7.347 0.0 260.0 0.0 2
433 Workshop_Passerby_137 19.292 0.58003 11.969 0.0 270.0 0.0 2
434 Workshop_Passerby_138 20.347 0.58003 15.573 0.0 340.0 0.0 2
435 Workshop_PlayerPos_HollowPause 31.23 0.584 13.08 0.0 118.0 0.0 2
436 Workshop_NPCPos_ARole17F 31.0 0.58 15.15 0.0 311.0 0.0 2
437 Workshop_NpcPos_VHS31020001End 24.626 0.58003 8.681 0.0 311.76859 0.0 2
438 Workshop_NpcPos_VHS31020002_02 25.503 0.58003 7.032 0.0 306.8797 0.0 2
439 Workshop_NpcPos_VHS31020002End 21.218 0.58003 12.853 0.0 126.61777 0.0 2
440 Workshop_NpcPos_VHS31020002_02End 21.66 0.58003 13.136 0.0 152.39877 0.0 2
441 Workshop_NPCPos_ARole18 31.802 0.594 14.909 0.0 283.90863 0.0 2
442 Workshop_PlayerPos_ARole18 28.258 0.594 15.121 0.0 81.46976 0.0 2
443 Borderlands 0.0 0.0 0.0 0.0 0.0 0.0 0

View file

@ -29,6 +29,7 @@ tracing-bunyan-formatter.workspace = true
common.workspace = true common.workspace = true
protocol.workspace = true protocol.workspace = true
qwer.workspace = true qwer.workspace = true
parking_lot.workspace = true
[[bin]] [[bin]]
name = "nap-gameserver" name = "nap-gameserver"

View file

@ -0,0 +1,102 @@
#![allow(unused)]
use std::collections::{BTreeMap, HashSet};
use protocol::{HollowEventType, NodeState, NodeVisible};
use serde::{Deserialize, Deserializer};
#[derive(Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ConfigEventGraph {
#[serde(rename = "ID")]
pub id: i32,
pub events: BTreeMap<ConfigEventType, ConfigEvent>,
}
#[derive(Deserialize, Default)]
#[serde(untagged)]
pub enum ConfigValue {
Constant(i32),
Expression(String),
#[default]
Empty,
}
#[derive(Deserialize, Ord, PartialOrd, Eq, PartialEq)]
#[serde(rename_all = "PascalCase")]
pub enum ConfigEventType {
OnStart,
OnEnd,
OnBro,
OnSis,
#[serde(other)]
Unknown,
}
#[derive(Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ConfigEvent {
#[serde(default)]
pub actions: Vec<ConfigAction>,
}
#[derive(Deserialize, Default)]
pub enum HollowPositionOffsetType {
#[default]
Relative = 0,
Absolute = 1,
EventPos = 2,
}
#[derive(Deserialize, Default)]
#[serde(tag = "$type")]
pub enum ConfigAction {
#[serde(rename = "Share.CConfigEmpty")]
ConfigEmpty,
#[serde(rename = "Share.CConfigSetMapState")]
#[serde(rename_all = "PascalCase")]
ConfigSetMapState {
#[serde(default)]
x: ConfigValue,
#[serde(default)]
y: ConfigValue,
#[serde(default)]
position: HollowPositionOffsetType,
radius: Option<ConfigValue>,
count: Option<ConfigValue>,
#[serde(default)]
r#type: HashSet<HollowEventType>,
event_type_tag: Option<String>,
#[serde(default)]
from_visible_state: HashSet<NodeVisible>,
#[serde(default)]
to_visible_state: Vec<NodeVisible>,
#[serde(default)]
from_state: HashSet<NodeState>,
#[serde(default)]
to_state: Vec<NodeState>,
#[serde(default)]
exclude_player_pos: bool,
#[serde(default)]
index_list: Vec<ConfigValue>,
#[serde(default)]
use_perform: bool,
},
#[serde(rename = "Share.CConfigTriggerBattle")]
#[serde(rename_all = "PascalCase")]
ConfigTriggerBattle {
#[serde(rename = "BattleID")]
battle_id: ConfigValue,
on_success: Option<String>,
on_failure: Option<String>,
#[serde(default)]
end_hollow: bool,
#[serde(default)]
goto_next_hollow: bool,
},
#[serde(rename = "Share.CConfigFinishHollow")]
ConfigFinishHollow,
#[default]
#[serde(other)]
ConfigUnknown,
}

View file

@ -1,9 +1,11 @@
mod event_graph;
mod templates; mod templates;
mod tsv_util; mod tsv_util;
use std::path::Path; use std::{collections::HashMap, path::Path};
use anyhow::{bail, Result}; use anyhow::{bail, Result};
pub use event_graph::*;
use paste::paste; use paste::paste;
pub use templates::*; pub use templates::*;
use tokio::sync::OnceCell; use tokio::sync::OnceCell;
@ -36,6 +38,16 @@ template_collections! {
AvatarConfig; AvatarConfig;
UnlockConfig; UnlockConfig;
MainCityObject; MainCityObject;
NPCTransform;
}
static EVENT_GRAPH_COLLECTION: OnceCell<HashMap<i32, ConfigEventGraph>> = OnceCell::const_new();
fn init_binoutput() -> Result<()> {
let _ = EVENT_GRAPH_COLLECTION.set(serde_json::from_str(
std::fs::read_to_string("assets/BinOutput/EventGraphCollection.json")?.as_str(),
)?);
Ok(())
} }
pub fn init_assets() -> Result<()> { pub fn init_assets() -> Result<()> {
@ -46,9 +58,19 @@ pub fn init_assets() -> Result<()> {
} }
init_template_collections()?; init_template_collections()?;
Ok(()) init_binoutput()
} }
pub fn get_main_city_object(tag_id: i32, npc_id: i32) -> Option<&'static MainCityObjectTemplate> { pub fn get_main_city_object(tag_id: i32, npc_id: i32) -> Option<&'static MainCityObjectTemplate> {
iter_main_city_object_collection().find(|o| o.tag_id == tag_id && o.npc_id == npc_id) iter_main_city_object_collection().find(|o| o.tag_id == tag_id && o.npc_id == npc_id)
} }
pub fn is_transform_in_section(transform_id: &str, section_id: i32) -> bool {
iter_n_p_c_transform_collection()
.find(|t| t.id == transform_id)
.map_or(false, |t| t.section == section_id)
}
pub fn get_event_graph(id: i32) -> Option<&'static ConfigEventGraph> {
EVENT_GRAPH_COLLECTION.get().unwrap().get(&id)
}

View file

@ -16,7 +16,8 @@ pub struct MainCityObjectTemplate {
pub default_interact_ids: Vec<i32>, pub default_interact_ids: Vec<i32>,
pub interact_name: Option<String>, pub interact_name: Option<String>,
pub interact_shape: i32, pub interact_shape: i32,
pub interact_scale: String, #[serde(deserialize_with = "from_sequence")]
pub interact_scale: Vec<f64>,
pub fan_interact_param: Option<String>, pub fan_interact_param: Option<String>,
pub focus_interact_scale: f64, pub focus_interact_scale: f64,
pub ignore_collider: bool, pub ignore_collider: bool,
@ -44,6 +45,20 @@ pub struct MainCityObjectTemplate {
pub action_switch: Option<String>, pub action_switch: Option<String>,
} }
#[derive(Deserialize, Debug)]
#[serde(rename_all = "PascalCase")]
pub struct NPCTransformTemplate {
#[serde(rename = "ID")]
pub id: String,
pub position_x: f64,
pub position_y: f64,
pub position_z: f64,
pub rotation_x: f64,
pub rotation_y: f64,
pub rotation_z: f64,
pub section: i32,
}
#[derive(Deserialize, Debug)] #[derive(Deserialize, Debug)]
#[serde(rename_all = "PascalCase")] #[serde(rename_all = "PascalCase")]
pub struct UnlockConfigTemplate { pub struct UnlockConfigTemplate {

View file

@ -1,8 +1,8 @@
use std::sync::Arc; use std::sync::Arc;
use anyhow::Result; use anyhow::Result;
use parking_lot::RwLock;
use protocol::{PlayerInfo, PtcPlayerInfoChangedArg}; use protocol::{PlayerInfo, PtcPlayerInfoChangedArg};
use tokio::sync::RwLock;
use crate::net::NetworkSession; use crate::net::NetworkSession;
@ -52,21 +52,21 @@ impl<T> PlayerOperationResult<T>
where where
T: Send + Sync, T: Send + Sync,
{ {
pub const fn unwrap(&self) -> &T { pub fn take(self) -> T {
&self.result self.result
} }
pub async fn send_changes(&mut self, session: &NetworkSession) -> Result<&T> { pub async fn send_changes(mut self, session: &NetworkSession) -> Result<T> {
if self.player_info_changes.is_some() { if self.player_info_changes.is_some() {
let ptc_player_info_changed = PtcPlayerInfoChangedArg { let ptc_player_info_changed = PtcPlayerInfoChangedArg {
player_uid: session.get_player_uid().await, player_uid: session.player_uid().raw(),
player_info: self.player_info_changes.take().unwrap(), player_info: self.player_info_changes.take().unwrap(),
}; };
session.send_rpc_arg(101, &ptc_player_info_changed).await?; session.push_rpc_arg(101, ptc_player_info_changed).await?;
} }
Ok(self.unwrap()) Ok(self.take())
} }
pub const fn ret(result: T) -> Self { pub const fn ret(result: T) -> Self {

View file

@ -1,17 +0,0 @@
use std::sync::LazyLock;
use serde_json::{Map, Value};
pub const EVENT_GRAPH_COLLECTION: &str = include_str!("../../EventGraphCollection.json");
static EVENT_MAP: LazyLock<Map<String, Value>> = LazyLock::new(|| {
serde_json::from_str::<Value>(EVENT_GRAPH_COLLECTION)
.unwrap()
.as_object()
.unwrap()
.clone()
});
pub fn get_event_config_json(id: i32) -> &'static Value {
EVENT_MAP.get(&id.to_string()).unwrap()
}

View file

@ -1,7 +1,7 @@
use anyhow::{anyhow, bail, Result}; use anyhow::{anyhow, bail, Result};
use parking_lot::RwLock;
use protocol::*; use protocol::*;
use std::sync::Arc; use std::sync::Arc;
use tokio::sync::RwLock;
use crate::game::{manager::UniqueIDManager, util, PlayerOperationResult}; use crate::game::{manager::UniqueIDManager, util, PlayerOperationResult};
use qwer::{ use qwer::{
@ -23,9 +23,9 @@ impl DungeonManager {
} }
} }
pub async fn enter_main_city(&self) -> Result<PlayerOperationResult<PtcEnterSceneArg>> { pub fn enter_main_city(&self) -> Result<PlayerOperationResult<PtcEnterSceneArg>> {
let (player_uid, scene_position, scene_rotation) = { let (player_uid, scene_position, scene_rotation) = {
let player = self.player.read().await; let player = self.player.read();
let pos_in_main_city = player.pos_in_main_city.as_ref().unwrap(); let pos_in_main_city = player.pos_in_main_city.as_ref().unwrap();
( (
@ -35,7 +35,7 @@ impl DungeonManager {
) )
}; };
let mut player = self.player.write().await; let mut player = self.player.write();
let default_scene_uid = player let default_scene_uid = player
.dungeon_collection .dungeon_collection
.as_ref() .as_ref()
@ -113,12 +113,12 @@ impl DungeonManager {
)) ))
} }
pub async fn enter_scene_section( pub fn enter_scene_section(
&self, &self,
scene_uid: u64, scene_uid: u64,
section_id: i32, section_id: i32,
) -> PlayerOperationResult<PtcEnterSectionArg> { ) -> PlayerOperationResult<PtcEnterSectionArg> {
let mut player = self.player.write().await; let mut player = self.player.write();
let scene_info = player let scene_info = player
.dungeon_collection .dungeon_collection
.as_mut() .as_mut()
@ -145,12 +145,9 @@ impl DungeonManager {
) )
} }
pub async fn enter_scene( pub fn enter_scene(&self, scene_uid: u64) -> Result<PlayerOperationResult<PtcEnterSceneArg>> {
&self,
scene_uid: u64,
) -> Result<PlayerOperationResult<PtcEnterSceneArg>> {
let (player_uid, prev_scene_uid) = { let (player_uid, prev_scene_uid) = {
let player = self.player.read().await; let player = self.player.read();
( (
*player.uid.as_ref().unwrap(), *player.uid.as_ref().unwrap(),
@ -158,7 +155,7 @@ impl DungeonManager {
) )
}; };
let mut player = self.player.write().await; let mut player = self.player.write();
player.scene_uid.replace(scene_uid); player.scene_uid.replace(scene_uid);
player.prev_scene_uid.replace(prev_scene_uid); player.prev_scene_uid.replace(prev_scene_uid);
let dungeon_collection = player.dungeon_collection.as_mut().unwrap(); let dungeon_collection = player.dungeon_collection.as_mut().unwrap();
@ -248,10 +245,10 @@ impl DungeonManager {
)) ))
} }
pub async fn hollow_finished(&self) -> PlayerOperationResult<u64> { pub fn hollow_finished(&self) -> PlayerOperationResult<u64> {
let cur_scene_uid = self.get_cur_scene_uid().await; let cur_scene_uid = self.get_cur_scene_uid();
let mut player = self.player.write().await; let mut player = self.player.write();
let hollow_scene = player let hollow_scene = player
.dungeon_collection .dungeon_collection
@ -313,10 +310,9 @@ impl DungeonManager {
) )
} }
pub async fn get_default_scene_uid(&self) -> u64 { pub fn get_default_scene_uid(&self) -> u64 {
self.player self.player
.read() .read()
.await
.dungeon_collection .dungeon_collection
.as_ref() .as_ref()
.unwrap() .unwrap()
@ -325,10 +321,9 @@ impl DungeonManager {
} }
#[allow(dead_code)] #[allow(dead_code)]
pub async fn get_default_scene_uid_for_dungeon(&self, dungeon_uid: u64) -> u64 { pub fn get_default_scene_uid_for_dungeon(&self, dungeon_uid: u64) -> u64 {
self.player self.player
.read() .read()
.await
.dungeon_collection .dungeon_collection
.as_ref() .as_ref()
.unwrap() .unwrap()
@ -340,12 +335,12 @@ impl DungeonManager {
.default_scene_uid .default_scene_uid
} }
pub async fn get_cur_scene_uid(&self) -> u64 { pub fn get_cur_scene_uid(&self) -> u64 {
self.player.read().await.scene_uid.unwrap() self.player.read().scene_uid.unwrap()
} }
async fn add_default_hollow_properties(&self, scene_uid: u64) { fn add_default_hollow_properties(&self, scene_uid: u64) {
let mut props = self.scene_properties.write().await; let mut props = self.scene_properties.write();
for (sub_key, value) in &[ for (sub_key, value) in &[
(1001, 0), (1001, 0),
@ -380,11 +375,11 @@ impl DungeonManager {
} }
} }
pub async fn leave_battle(&self) -> Result<PlayerOperationResult<PtcEnterSceneArg>> { pub fn leave_battle(&self) -> Result<PlayerOperationResult<PtcEnterSceneArg>> {
let back_scene_uid = self.get_back_scene_uid().await; let back_scene_uid = self.get_back_scene_uid();
{ {
let mut player = self.player.write().await; let mut player = self.player.write();
let hollow_scene = player let hollow_scene = player
.dungeon_collection .dungeon_collection
@ -404,11 +399,11 @@ impl DungeonManager {
} }
} }
self.enter_scene(back_scene_uid).await self.enter_scene(back_scene_uid)
} }
async fn get_back_scene_uid(&self) -> u64 { fn get_back_scene_uid(&self) -> u64 {
let player = self.player.read().await; let player = self.player.read();
let fight_scene_uid = player.scene_uid.as_ref().unwrap(); let fight_scene_uid = player.scene_uid.as_ref().unwrap();
let fight_scene = player let fight_scene = player
.dungeon_collection .dungeon_collection
@ -423,14 +418,12 @@ impl DungeonManager {
fight_scene.get_back_scene_uid() fight_scene.get_back_scene_uid()
} }
pub async fn enter_battle(&self, scene_uid: u64) -> PlayerOperationResult<PtcEnterSceneArg> { pub fn enter_battle(&self, scene_uid: u64) -> PlayerOperationResult<PtcEnterSceneArg> {
let hollow_scene_uid = *self.player.read().await.scene_uid.as_ref().unwrap(); let hollow_scene_uid = *self.player.read().scene_uid.as_ref().unwrap();
let hollow_scene = self let hollow_scene = self.set_cur_hollow_battle(scene_uid, hollow_scene_uid);
.set_cur_hollow_battle(scene_uid, hollow_scene_uid) let ptc_enter_scene = self.enter_scene(scene_uid).unwrap().take().clone();
.await;
let ptc_enter_scene = self.enter_scene(scene_uid).await.unwrap().unwrap().clone();
let player = self.player.read().await; let player = self.player.read();
let dungeon_collection = player.dungeon_collection.as_ref().unwrap(); let dungeon_collection = player.dungeon_collection.as_ref().unwrap();
let fight_scene = dungeon_collection let fight_scene = dungeon_collection
.scenes .scenes
@ -459,8 +452,8 @@ impl DungeonManager {
) )
} }
async fn set_cur_hollow_battle(&self, scene_uid: u64, hollow_scene_uid: u64) -> SceneInfo { fn set_cur_hollow_battle(&self, scene_uid: u64, hollow_scene_uid: u64) -> SceneInfo {
let mut player = self.player.write().await; let mut player = self.player.write();
let hollow_scene = player let hollow_scene = player
.dungeon_collection .dungeon_collection
.as_mut() .as_mut()
@ -485,8 +478,8 @@ impl DungeonManager {
hollow_scene.clone() hollow_scene.clone()
} }
pub async fn create_fight(&self, id: i32, hollow_scene_uid: u64) -> PlayerOperationResult<u64> { pub fn create_fight(&self, id: i32, hollow_scene_uid: u64) -> PlayerOperationResult<u64> {
let mut player = self.player.write().await; let mut player = self.player.write();
let dungeon_collection = player.dungeon_collection.as_mut().unwrap(); let dungeon_collection = player.dungeon_collection.as_mut().unwrap();
let scenes = dungeon_collection.scenes.as_mut().unwrap(); let scenes = dungeon_collection.scenes.as_mut().unwrap();
let hollow_scene = scenes.get_mut(&hollow_scene_uid).unwrap(); let hollow_scene = scenes.get_mut(&hollow_scene_uid).unwrap();
@ -526,10 +519,10 @@ impl DungeonManager {
} }
#[allow(dead_code)] #[allow(dead_code)]
pub async fn is_in_tutorial(&self) -> bool { pub fn is_in_tutorial(&self) -> bool {
let cur_scene_uid = self.get_cur_scene_uid().await; let cur_scene_uid = self.get_cur_scene_uid();
let player = self.player.read().await; let player = self.player.read();
let cur_scene = player let cur_scene = player
.dungeon_collection .dungeon_collection
.as_ref() .as_ref()
@ -543,24 +536,22 @@ impl DungeonManager {
matches!(cur_scene, SceneInfo::Fresh { .. }) matches!(cur_scene, SceneInfo::Fresh { .. })
} }
pub async fn create_hollow( pub fn create_hollow(
&self, &self,
id: i32, id: i32,
world_quest_id: i32, world_quest_id: i32,
avatar_uids: &[u64], avatar_uids: &[u64],
) -> PlayerOperationResult<(u64, u64)> { ) -> PlayerOperationResult<(u64, u64)> {
let back_scene_uid = self.get_default_scene_uid().await; let back_scene_uid = self.get_default_scene_uid();
let mut dungeon = self let mut dungeon = self.create_base_dungeon(id, back_scene_uid, world_quest_id);
.create_base_dungeon(id, back_scene_uid, world_quest_id)
.await;
dungeon.hollow_event_version = 526; dungeon.hollow_event_version = 526;
let scene_uid = self.uid_mgr.next(); let scene_uid = self.uid_mgr.next();
dungeon.default_scene_uid = scene_uid; dungeon.default_scene_uid = scene_uid;
dungeon.scene_properties_uid = scene_uid; dungeon.scene_properties_uid = scene_uid;
self.add_default_hollow_properties(scene_uid).await; self.add_default_hollow_properties(scene_uid);
for (index, avatar_uid) in avatar_uids.iter().enumerate() { for (index, avatar_uid) in avatar_uids.iter().enumerate() {
dungeon.avatar_map.insert( dungeon.avatar_map.insert(
@ -642,10 +633,10 @@ impl DungeonManager {
}; };
{ {
let mut player = self.player.write().await; let mut player = self.player.write();
player player
.scene_properties .scene_properties
.replace(self.scene_properties.read().await.clone()); .replace(self.scene_properties.read().clone());
let dungeon_collection = player.dungeon_collection.as_mut().unwrap(); let dungeon_collection = player.dungeon_collection.as_mut().unwrap();
@ -660,7 +651,7 @@ impl DungeonManager {
.unwrap() .unwrap()
.insert(scene_uid, scene.clone()); .insert(scene_uid, scene.clone());
} }
let mut player = self.player.write().await; let mut player = self.player.write();
let items = player.items.as_mut().unwrap(); let items = player.items.as_mut().unwrap();
let mut updated_items = Vec::new(); let mut updated_items = Vec::new();
@ -674,7 +665,7 @@ impl DungeonManager {
} }
let mut prop_changes = Vec::new(); let mut prop_changes = Vec::new();
for (key, sub_key, value) in &*self.scene_properties.write().await { for (key, sub_key, value) in &*self.scene_properties.write() {
prop_changes.push((*key, *sub_key, *value)); prop_changes.push((*key, *sub_key, *value));
} }
@ -705,8 +696,8 @@ impl DungeonManager {
) )
} }
pub async fn create_hall(&self, id: i32) -> PlayerOperationResult<u64> { pub fn create_hall(&self, id: i32) -> PlayerOperationResult<u64> {
let mut dungeon = self.create_base_dungeon(id, 0, 0).await; let mut dungeon = self.create_base_dungeon(id, 0, 0);
let dungeon_uid = dungeon.uid; let dungeon_uid = dungeon.uid;
let scene_uid = self.uid_mgr.next(); let scene_uid = self.uid_mgr.next();
@ -726,7 +717,7 @@ impl DungeonManager {
dungeon.default_scene_uid = scene_uid; dungeon.default_scene_uid = scene_uid;
let mut player = self.player.write().await; let mut player = self.player.write();
let dungeon_collection = player.dungeon_collection.as_mut().unwrap(); let dungeon_collection = player.dungeon_collection.as_mut().unwrap();
dungeon_collection dungeon_collection
@ -762,8 +753,8 @@ impl DungeonManager {
) )
} }
pub async fn create_fresh(&self) -> PlayerOperationResult<u64> { pub fn create_fresh(&self) -> PlayerOperationResult<u64> {
let mut dungeon = self.create_base_dungeon(2, 0, 0).await; let mut dungeon = self.create_base_dungeon(2, 0, 0);
let dungeon_uid = dungeon.uid; let dungeon_uid = dungeon.uid;
let scene_uid = self.uid_mgr.next(); let scene_uid = self.uid_mgr.next();
@ -783,7 +774,7 @@ impl DungeonManager {
dungeon.default_scene_uid = scene_uid; dungeon.default_scene_uid = scene_uid;
let mut player = self.player.write().await; let mut player = self.player.write();
let dungeon_collection = player.dungeon_collection.as_mut().unwrap(); let dungeon_collection = player.dungeon_collection.as_mut().unwrap();
dungeon_collection dungeon_collection
@ -817,13 +808,13 @@ impl DungeonManager {
) )
} }
async fn create_base_dungeon( fn create_base_dungeon(
&self, &self,
id: i32, id: i32,
back_scene_uid: u64, back_scene_uid: u64,
world_quest_id: i32, world_quest_id: i32,
) -> DungeonInfo { ) -> DungeonInfo {
let player = self.player.read().await; let player = self.player.read();
let uid = self.uid_mgr.next(); let uid = self.uid_mgr.next();
DungeonInfo { DungeonInfo {

View file

@ -3,10 +3,11 @@ use std::{
sync::Arc, sync::Arc,
}; };
use crate::game::data; use parking_lot::RwLock;
use protocol::*; use protocol::*;
use qwer::{phashmap, phashset, PropertyHashMap, PropertyHashSet}; use qwer::{phashmap, phashset, PropertyHashMap, PropertyHashSet};
use tokio::sync::RwLock;
use crate::data::{self, ConfigAction, ConfigEventType, ConfigValue};
pub struct HollowGridManager { pub struct HollowGridManager {
player: Arc<RwLock<PlayerInfo>>, player: Arc<RwLock<PlayerInfo>>,
@ -23,25 +24,24 @@ impl HollowGridManager {
} }
} }
pub async fn get_cur_position_in_hollow(&self) -> u16 { pub fn get_cur_position_in_hollow(&self) -> u16 {
self.map.read().await.as_ref().unwrap().start_grid self.map.read().as_ref().unwrap().start_grid
} }
pub async fn move_to( pub fn move_to(
&self, &self,
destination_grid: u16, destination_grid: u16,
scene_uid: u64, scene_uid: u64,
) -> (PtcHollowGridArg, Option<PtcSyncHollowEventInfoArg>) { ) -> (PtcHollowGridArg, Option<PtcSyncHollowEventInfoArg>) {
let mut map = self.map.write().await; let mut map = self.map.write();
let map = map.as_mut().unwrap(); let map = map.as_mut().unwrap();
map.start_grid = destination_grid; map.start_grid = destination_grid;
let grid = map.grids.get_mut(&destination_grid).unwrap(); let grid = map.grids.get_mut(&destination_grid).unwrap();
self.update_position_to_scene(scene_uid, destination_grid) self.update_position_to_scene(scene_uid, destination_grid);
.await;
let mut events = self.events.write().await; let mut events = self.events.write();
let sync_event_info = let sync_event_info =
if let Entry::Vacant(entry) = events.entry(u64::from(destination_grid)) { if let Entry::Vacant(entry) = events.entry(u64::from(destination_grid)) {
let event_info = EventInfo { let event_info = EventInfo {
@ -82,7 +82,7 @@ impl HollowGridManager {
( (
PtcHollowGridArg { PtcHollowGridArg {
player_uid: self.player.read().await.uid.unwrap(), player_uid: self.player.read().uid.unwrap(),
is_partial: true, is_partial: true,
scene_uid, scene_uid,
hollow_level: 1, hollow_level: 1,
@ -92,20 +92,19 @@ impl HollowGridManager {
) )
} }
pub async fn battle_finished(&self) -> (PtcSyncHollowEventInfoArg, bool) { pub fn battle_finished(&self) -> (PtcSyncHollowEventInfoArg, bool) {
let map = self.map.read().await; let map = self.map.read();
let map = map.as_ref().unwrap(); let map = map.as_ref().unwrap();
let cur_grid = map.grids.get(&map.start_grid).unwrap(); let cur_grid = map.grids.get(&map.start_grid).unwrap();
let event_config = let graph =
data::get_event_config_json(cur_grid.grid.event_graph_info.hollow_event_template_id); data::get_event_graph(cur_grid.grid.event_graph_info.hollow_event_template_id).unwrap();
let mut hollow_finished = false; let mut hollow_finished = false;
let actions = event_config["Events"]["OnEnd"]["Actions"] if let Some(event) = graph.events.get(&ConfigEventType::OnEnd) {
.as_array() if let Some(ConfigAction::ConfigFinishHollow) = event.actions.first() {
.unwrap(); hollow_finished = true;
if let Some(action) = actions.first() { }
hollow_finished = action["$type"].as_str().unwrap() == "Share.CConfigFinishHollow";
} }
( (
@ -130,16 +129,16 @@ impl HollowGridManager {
) )
} }
pub async fn get_cur_event_template_id(&self) -> i32 { pub fn get_cur_event_template_id(&self) -> i32 {
let map = self.map.read().await; let map = self.map.read();
let map = map.as_ref().unwrap(); let map = map.as_ref().unwrap();
let cur_grid = map.grids.get(&map.start_grid).unwrap(); let cur_grid = map.grids.get(&map.start_grid).unwrap();
cur_grid.grid.event_graph_info.hollow_event_template_id cur_grid.grid.event_graph_info.hollow_event_template_id
} }
async fn update_position_to_scene(&self, scene_uid: u64, pos: u16) { fn update_position_to_scene(&self, scene_uid: u64, pos: u16) {
let mut player = self.player.write().await; let mut player = self.player.write();
let scene = player let scene = player
.dungeon_collection .dungeon_collection
.as_mut() .as_mut()
@ -166,7 +165,7 @@ impl HollowGridManager {
} }
} }
pub async fn run_event_graph( pub fn run_event_graph(
&self, &self,
event_graph_uid: u64, event_graph_uid: u64,
_event_id: i32, _event_id: i32,
@ -178,12 +177,12 @@ impl HollowGridManager {
bool, bool,
) { ) {
let (player_uid, scene_uid) = { let (player_uid, scene_uid) = {
let player = self.player.read().await; let player = self.player.read();
(player.uid.unwrap(), player.scene_uid.unwrap()) (player.uid.unwrap(), player.scene_uid.unwrap())
}; };
let mut map = self.map.write().await; let mut map = self.map.write();
let map = map.as_mut().unwrap(); let map = map.as_mut().unwrap();
let mut trigger_battle_id = None; let mut trigger_battle_id = None;
@ -199,31 +198,29 @@ impl HollowGridManager {
let sync_hollow_event = { let sync_hollow_event = {
let info = map.grids.get(&(event_graph_uid as u16)).unwrap().clone(); let info = map.grids.get(&(event_graph_uid as u16)).unwrap().clone();
let event_config = let graph =
data::get_event_config_json(info.grid.event_graph_info.hollow_event_template_id); data::get_event_graph(info.grid.event_graph_info.hollow_event_template_id).unwrap();
let mut last_action = &ConfigAction::ConfigEmpty;
let mut last_exec_type = "";
for id in &move_path { for id in &move_path {
let index = (id % 1000) - 1; let index = (id % 1000) - 1;
let actions = if id / 1000 == 1 { let event = if id / 1000 == 1 {
event_config["Events"]["OnStart"]["Actions"] graph.events.get(&ConfigEventType::OnStart)
.as_array()
.unwrap()
} else { } else {
event_config["Events"]["OnEnd"]["Actions"] graph.events.get(&ConfigEventType::OnEnd)
.as_array()
.unwrap()
}; };
if let Some(action) = actions.get(index as usize) { if let Some(action) = event.unwrap().actions.get(index as usize) {
last_exec_type = action["$type"].as_str().unwrap(); last_action = action;
// ugly, we have to parse these configs properly match action {
match action["$type"].as_str().unwrap() { ConfigAction::ConfigSetMapState { x, y, .. } => {
"Share.CConfigSetMapState" => { let (ConfigValue::Constant(x), ConfigValue::Constant(y)) = (x, y)
let x = action["X"].as_i64().unwrap() as u16; else {
let y = action["Y"].as_i64().unwrap() as u16; panic!("ConfigSetMapState: only constant values are supported");
};
let uid = (y * 11) + x; let uid = ((y * 11) + x) as u16;
if let Some(info) = map.grids.get_mut(&uid) { if let Some(info) = map.grids.get_mut(&uid) {
info.grid.flag |= HollowGridFlag::Visible as i32 info.grid.flag |= HollowGridFlag::Visible as i32
| HollowGridFlag::CanMove as i32 | HollowGridFlag::CanMove as i32
@ -232,14 +229,14 @@ impl HollowGridManager {
grid_update.grids.insert(uid, info.clone()); grid_update.grids.insert(uid, info.clone());
} }
} }
"Share.CConfigTriggerBattle" => { ConfigAction::ConfigTriggerBattle { .. } => {
trigger_battle_id = trigger_battle_id =
Some(match info.grid.event_graph_info.hollow_event_template_id { Some(match info.grid.event_graph_info.hollow_event_template_id {
1000107 => 10101002, 1000107 => 10101002,
_ => 10101001, _ => 10101001,
}); });
} }
"Share.CConfigFinishHollow" => { ConfigAction::ConfigFinishHollow => {
hollow_finished = true; hollow_finished = true;
} }
_ => {} _ => {}
@ -251,13 +248,9 @@ impl HollowGridManager {
let last_client_action = *action_move_path.last().unwrap(); let last_client_action = *action_move_path.last().unwrap();
let actions = if last_client_action / 1000 == 1 { let actions = if last_client_action / 1000 == 1 {
event_config["Events"]["OnStart"]["Actions"] &graph.events.get(&ConfigEventType::OnStart).unwrap().actions
.as_array()
.unwrap()
} else { } else {
event_config["Events"]["OnEnd"]["Actions"] &graph.events.get(&ConfigEventType::OnEnd).unwrap().actions
.as_array()
.unwrap()
}; };
let state = if last_client_action == -1 { let state = if last_client_action == -1 {
EventState::Finished EventState::Finished
@ -265,24 +258,24 @@ impl HollowGridManager {
action_move_path.push(-1); action_move_path.push(-1);
EventState::Finished EventState::Finished
} else { } else {
if last_exec_type != "Share.CConfigEmpty" { if !matches!(last_action, ConfigAction::ConfigEmpty) {
action_move_path.push(last_client_action + 1); action_move_path.push(last_client_action + 1);
} }
EventState::WaitingClient EventState::WaitingClient
}; };
let finish_event = if last_exec_type != "Share.CConfigTriggerBattle" { let finish_event = if let ConfigAction::ConfigTriggerBattle { .. } = last_action {
PtcSyncHollowEventInfoArg { PtcSyncHollowEventInfoArg {
event_graph_uid, event_graph_uid,
hollow_event_template_id: info.grid.event_graph_info.hollow_event_template_id, hollow_event_template_id: info.grid.event_graph_info.hollow_event_template_id,
event_graph_id: info.grid.event_graph_info.hollow_event_template_id, event_graph_id: info.grid.event_graph_info.hollow_event_template_id,
updated_event: EventInfo { updated_event: EventInfo {
id: 1000, id: 0,
cur_action_id: *action_move_path.last().unwrap(), cur_action_id: 0,
action_move_path, action_move_path: vec![],
state, state: EventState::Initing,
prev_state: EventState::Running, prev_state: EventState::Initing,
cur_action_info: ActionInfo::None {}, cur_action_info: ActionInfo::None {},
cur_action_state: ActionState::Init, cur_action_state: ActionState::Init,
predicated_failed_actions: phashset![], predicated_failed_actions: phashset![],
@ -296,11 +289,11 @@ impl HollowGridManager {
hollow_event_template_id: info.grid.event_graph_info.hollow_event_template_id, hollow_event_template_id: info.grid.event_graph_info.hollow_event_template_id,
event_graph_id: info.grid.event_graph_info.hollow_event_template_id, event_graph_id: info.grid.event_graph_info.hollow_event_template_id,
updated_event: EventInfo { updated_event: EventInfo {
id: 0, id: 1000,
cur_action_id: 0, cur_action_id: *action_move_path.last().unwrap(),
action_move_path: vec![], action_move_path,
state: EventState::Initing, state,
prev_state: EventState::Initing, prev_state: EventState::Running,
cur_action_info: ActionInfo::None {}, cur_action_info: ActionInfo::None {},
cur_action_state: ActionState::Init, cur_action_state: ActionState::Init,
predicated_failed_actions: phashset![], predicated_failed_actions: phashset![],
@ -322,23 +315,19 @@ impl HollowGridManager {
) )
} }
pub async fn sync_hollow_maps( pub fn sync_hollow_maps(&self, player_uid: u64, scene_uid: u64) -> PtcSyncHollowGridMapsArg {
&self,
player_uid: u64,
scene_uid: u64,
) -> PtcSyncHollowGridMapsArg {
PtcSyncHollowGridMapsArg { PtcSyncHollowGridMapsArg {
player_uid, player_uid,
scene_uid, scene_uid,
hollow_level: 1, hollow_level: 1,
main_map: self.map.read().await.clone().unwrap(), main_map: self.map.read().clone().unwrap(),
time_period: TimePeriodType::Random, time_period: TimePeriodType::Random,
weather: WeatherType::Random, weather: WeatherType::Random,
} }
} }
pub async fn init_default_map(&self) { pub fn init_default_map(&self) {
*self.map.write().await = Some(HollowGridMapProtocolInfo { *self.map.write() = Some(HollowGridMapProtocolInfo {
row: 5, row: 5,
col: 11, col: 11,
start_grid: 22, start_grid: 22,

View file

@ -1,7 +1,7 @@
use parking_lot::RwLock;
use protocol::{ItemInfo, PlayerInfo}; use protocol::{ItemInfo, PlayerInfo};
use qwer::{phashmap, PropertyHashMap}; use qwer::{phashmap, PropertyHashMap};
use std::sync::Arc; use std::sync::Arc;
use tokio::sync::RwLock;
use crate::game::{util, PlayerOperationResult}; use crate::game::{util, PlayerOperationResult};
@ -20,8 +20,8 @@ impl ItemManager {
} }
} }
pub async fn add_resource(&self, currency_id: i32, amount: i32) -> PlayerOperationResult<i32> { pub fn add_resource(&self, currency_id: i32, amount: i32) -> PlayerOperationResult<i32> {
let mut player_info = self.player_info.write().await; let mut player_info = self.player_info.write();
for (uid, item) in player_info.items.as_mut().unwrap() { for (uid, item) in player_info.items.as_mut().unwrap() {
if let ItemInfo::Resource { id, count, .. } = item { if let ItemInfo::Resource { id, count, .. } = item {
@ -66,7 +66,7 @@ impl ItemManager {
) )
} }
pub async fn unlock_avatar(&self, id: i32) -> PlayerOperationResult<u64> { pub fn unlock_avatar(&self, id: i32) -> PlayerOperationResult<u64> {
let uid = self.uid_mgr.next(); let uid = self.uid_mgr.next();
let avatar = ItemInfo::Avatar { let avatar = ItemInfo::Avatar {
@ -86,10 +86,10 @@ impl ItemManager {
}; };
// Unlock & equip default weapon // Unlock & equip default weapon
let weapon_uid = *self.unlock_weapon(10012).await.unwrap(); let weapon_uid = self.unlock_weapon(10012).take();
self.equip_weapon(weapon_uid, uid).await; self.equip_weapon(weapon_uid, uid);
let mut player_info = self.player_info.write().await; let mut player_info = self.player_info.write();
let items = player_info.items.as_mut().unwrap(); let items = player_info.items.as_mut().unwrap();
items.insert(uid, avatar.clone()); items.insert(uid, avatar.clone());
@ -108,8 +108,8 @@ impl ItemManager {
) )
} }
pub async fn unlock_weapon(&self, id: i32) -> PlayerOperationResult<u64> { pub fn unlock_weapon(&self, id: i32) -> PlayerOperationResult<u64> {
let mut player_info = self.player_info.write().await; let mut player_info = self.player_info.write();
let items = player_info.items.as_mut().unwrap(); let items = player_info.items.as_mut().unwrap();
let uid = self.uid_mgr.next(); let uid = self.uid_mgr.next();
@ -141,12 +141,12 @@ impl ItemManager {
) )
} }
pub async fn equip_weapon( pub fn equip_weapon(
&self, &self,
weapon_uid: u64, weapon_uid: u64,
equip_avatar_uid: u64, equip_avatar_uid: u64,
) -> PlayerOperationResult<bool> { ) -> PlayerOperationResult<bool> {
let mut player_info = self.player_info.write().await; let mut player_info = self.player_info.write();
let items = player_info.items.as_mut().unwrap(); let items = player_info.items.as_mut().unwrap();
let Some(ItemInfo::Weapon { avatar_uid, .. }) = items.get_mut(&weapon_uid) else { let Some(ItemInfo::Weapon { avatar_uid, .. }) = items.get_mut(&weapon_uid) else {

View file

@ -1,7 +1,7 @@
use parking_lot::RwLock;
use protocol::{AccountInfo, PlayerInfo, PropertyBlob}; use protocol::{AccountInfo, PlayerInfo, PropertyBlob};
use qwer::OctData; use qwer::OctData;
use std::sync::Arc; use std::sync::Arc;
use tokio::sync::RwLock;
const CLIENT_PROP_FLAG: u16 = 1; const CLIENT_PROP_FLAG: u16 = 1;
@ -12,12 +12,12 @@ pub struct PropertyManager {
} }
impl PropertyManager { impl PropertyManager {
pub async fn serialize_account_info(&self) -> PropertyBlob { pub fn serialize_account_info(&self) -> PropertyBlob {
Self::serialize_property(&*self.account_info.read().await).unwrap() Self::serialize_property(&*self.account_info.read()).unwrap()
} }
pub async fn serialize_player_info(&self) -> PropertyBlob { pub fn serialize_player_info(&self) -> PropertyBlob {
Self::serialize_property(&*self.player_info.read().await).unwrap() Self::serialize_property(&*self.player_info.read()).unwrap()
} }
pub fn serialize_property(prop: &impl OctData) -> Result<PropertyBlob, std::io::Error> { pub fn serialize_property(prop: &impl OctData) -> Result<PropertyBlob, std::io::Error> {

View file

@ -1,7 +1,7 @@
use std::sync::Arc; use std::sync::Arc;
use parking_lot::RwLock;
use qwer::PropertyDoubleKeyHashMap; use qwer::PropertyDoubleKeyHashMap;
use tokio::sync::RwLock;
use crate::game::PlayerOperationResult; use crate::game::PlayerOperationResult;
@ -18,11 +18,10 @@ impl QuestManager {
Self { uid_mgr, player } Self { uid_mgr, player }
} }
pub async fn add_world_quest(&self, quest: QuestInfo) -> PlayerOperationResult<u64> { pub fn add_world_quest(&self, quest: QuestInfo) -> PlayerOperationResult<u64> {
let mut world_quest_collection_uid = self let mut world_quest_collection_uid = self
.player .player
.read() .read()
.await
.quest_data .quest_data
.as_ref() .as_ref()
.unwrap() .unwrap()
@ -33,7 +32,6 @@ impl QuestManager {
world_quest_collection_uid = self.uid_mgr.next(); world_quest_collection_uid = self.uid_mgr.next();
self.player self.player
.write() .write()
.await
.quest_data .quest_data
.as_mut() .as_mut()
.unwrap() .unwrap()
@ -42,15 +40,14 @@ impl QuestManager {
} }
self.add_quest_to_collection(world_quest_collection_uid, quest) self.add_quest_to_collection(world_quest_collection_uid, quest)
.await
} }
pub async fn add_quest_to_collection( pub fn add_quest_to_collection(
&self, &self,
collection_uid: u64, collection_uid: u64,
mut quest: QuestInfo, mut quest: QuestInfo,
) -> PlayerOperationResult<u64> { ) -> PlayerOperationResult<u64> {
let mut player = self.player.write().await; let mut player = self.player.write();
let quest_data = player.quest_data.as_mut().unwrap(); let quest_data = player.quest_data.as_mut().unwrap();
quest.set_collection_uid(collection_uid); quest.set_collection_uid(collection_uid);

View file

@ -1,8 +1,11 @@
use std::{collections::HashMap, sync::Arc}; use std::{collections::HashMap, sync::Arc};
use anyhow::{bail, Result};
use parking_lot::RwLock;
use protocol::*; use protocol::*;
use qwer::{phashmap, PropertyHashMap}; use qwer::{phashmap, PropertyHashMap};
use tokio::sync::RwLock;
use crate::data;
use super::UniqueIDManager; use super::UniqueIDManager;
@ -19,7 +22,7 @@ impl SceneUnitManager {
} }
} }
pub async fn create_npc( pub fn create_npc(
&self, &self,
id: i32, id: i32,
tag: i32, tag: i32,
@ -28,7 +31,7 @@ impl SceneUnitManager {
) -> u64 { ) -> u64 {
let uid = self.uid_mgr.next(); let uid = self.uid_mgr.next();
self.units.write().await.insert( self.units.write().insert(
uid, uid,
SceneUnitProtocolInfo::NpcProtocolInfo { SceneUnitProtocolInfo::NpcProtocolInfo {
uid, uid,
@ -42,11 +45,11 @@ impl SceneUnitManager {
uid uid
} }
pub async fn get(&self, uid: u64) -> SceneUnitProtocolInfo { pub fn get(&self, uid: u64) -> Option<SceneUnitProtocolInfo> {
self.units.read().await.get(&uid).unwrap().clone() self.units.read().get(&uid).map(|u| u.clone())
} }
pub async fn sync(&self, scene_uid: u64, section_id: i32) -> PtcSyncSceneUnitArg { pub fn sync(&self, scene_uid: u64, section_id: i32) -> PtcSyncSceneUnitArg {
PtcSyncSceneUnitArg { PtcSyncSceneUnitArg {
scene_uid, scene_uid,
section_id, section_id,
@ -55,188 +58,73 @@ impl SceneUnitManager {
scene_units: self scene_units: self
.units .units
.read() .read()
.await
.iter() .iter()
.map(|(_, unit)| unit.clone()) .map(|(_, unit)| unit.clone())
.collect(), .collect(),
} }
} }
pub fn add_scene_units(&self, section_id: i32) {
for o in data::iter_main_city_object_collection().filter(|o| {
o.create_type == 0
&& data::is_transform_in_section(&o.create_position, section_id)
&& o.default_interact_ids.len() != 0
&& !o.create_position.ends_with("_Test")
}) {
self.create_npc(
o.npc_id,
o.tag_id,
0,
PropertyHashMap::Base(
o.default_interact_ids
.iter()
.map(|id| {
(
*id,
create_interact(
*id,
o.interact_shape as u16,
InteractScale::from_slice(&o.interact_scale).unwrap(),
&o.interact_name.clone().unwrap_or_default(),
phashmap![],
),
)
})
.collect(),
),
);
}
}
// TODO: partial_sync for newly added/removed units // TODO: partial_sync for newly added/removed units
}
// currently hardcoded for Main City section 2 struct InteractScale(pub f64, pub f64, pub f64, pub f64, pub f64);
pub async fn add_default_units(&self) { impl InteractScale {
self.create_npc( pub fn from_slice(v: &[f64]) -> Result<Self> {
100171011, if v.len() != 5 {
3, bail!("InteractScale slice should contain 5 values");
0, }
phashmap![(
19900006,
create_interact(
0,
1,
2.0,
0.0,
0.0,
0.0,
0.0,
"",
phashmap![(0, String::new())]
)
)],
)
.await;
self.create_npc( Ok(Self(v[0], v[1], v[2], v[3], v[4]))
100171011,
4,
0,
phashmap![(
19900006,
create_interact(
0,
1,
2.0,
0.0,
0.0,
0.0,
0.0,
"",
phashmap![(0, String::new())]
)
)],
)
.await;
self.create_npc(
100171011,
1002,
0,
phashmap![(
19900062,
create_interact(
0,
1,
2.0,
0.0,
0.0,
0.0,
0.0,
"",
phashmap![(0, String::new())]
)
)],
)
.await;
self.create_npc(
100171011,
1001,
0,
phashmap![(
10000010,
create_interact(
10000010,
1,
1.0,
0.0,
0.0,
0.0,
0.0,
"A",
phashmap![(1001, String::from("A"))]
)
)],
)
.await;
self.create_npc(
100171011,
1005,
0,
phashmap![(
10000014,
create_interact(
10000014,
1,
1.0,
0.0,
0.0,
0.0,
0.0,
"A",
phashmap![(1005, String::from("A"))]
)
)],
)
.await;
self.create_npc(
100173001,
2028,
0,
phashmap![(
19900052,
create_interact(
19900052,
2,
9.0,
2.0,
2.0,
90.0,
10.0,
"A",
phashmap![(2028, String::from("A"))]
)
)],
)
.await;
self.create_npc(
100172011,
2000,
0,
phashmap![(
19900030,
create_interact(
0,
1,
2.0,
0.0,
0.0,
0.0,
0.0,
"",
phashmap![(2000, String::from("A")), (2052, String::from("B"))]
)
)],
)
.await;
self.create_npc(100172081, 2052, 0, phashmap![]).await;
} }
} }
#[allow(clippy::too_many_arguments)]
fn create_interact( fn create_interact(
interact_id: i32, interact_id: i32,
interact_shape: u16, interact_shape: u16,
scale_x: f64, scale: InteractScale,
scale_y: f64,
scale_z: f64,
scale_w: f64,
scale_r: f64,
name: &str, name: &str,
participators: PropertyHashMap<i32, String>, participators: PropertyHashMap<i32, String>,
) -> InteractInfo { ) -> InteractInfo {
InteractInfo { InteractInfo {
interact_id, interact_id,
interact_shape, interact_shape,
scale_x, scale_x: scale.0,
scale_y, scale_y: scale.1,
scale_z, scale_z: scale.2,
scale_w, scale_w: scale.3,
scale_r, scale_r: scale.4,
name: name.to_string(), name: name.to_string(),
participators, participators,
} }

View file

@ -1,8 +1,8 @@
use std::sync::Arc; use std::sync::Arc;
use parking_lot::RwLock;
use protocol::*; use protocol::*;
use qwer::PropertyHashSet; use qwer::PropertyHashSet;
use tokio::sync::RwLock;
use crate::game::PlayerOperationResult; use crate::game::PlayerOperationResult;
@ -15,8 +15,8 @@ impl UnlockManager {
Self { player } Self { player }
} }
pub async fn unlock(&self, unlock_id: i32) -> PlayerOperationResult<PtcUnlockArg> { pub fn unlock(&self, unlock_id: i32) -> PlayerOperationResult<PtcUnlockArg> {
let mut player = self.player.write().await; let mut player = self.player.write();
let unlock_info = player.unlock_info.as_mut().unwrap(); let unlock_info = player.unlock_info.as_mut().unwrap();
unlock_info unlock_info

View file

@ -1,8 +1,8 @@
use std::collections::HashSet; use std::collections::HashSet;
use std::sync::Arc; use std::sync::Arc;
use parking_lot::RwLock;
use qwer::{PropertyDoubleKeyHashMap, PropertyHashSet}; use qwer::{PropertyDoubleKeyHashMap, PropertyHashSet};
use tokio::sync::RwLock;
use crate::game::PlayerOperationResult; use crate::game::PlayerOperationResult;
@ -17,13 +17,13 @@ impl YorozuyaQuestManager {
Self { player } Self { player }
} }
pub async fn add_hollow_quest( pub fn add_hollow_quest(
&self, &self,
yorozuya_collection_id: i32, yorozuya_collection_id: i32,
hollow_quest_type: HollowQuestType, hollow_quest_type: HollowQuestType,
id: i32, id: i32,
) -> PlayerOperationResult<i32> { ) -> PlayerOperationResult<i32> {
let mut player = self.player.write().await; let mut player = self.player.write();
let yorozuya = player.yorozuya_info.as_mut().unwrap(); let yorozuya = player.yorozuya_info.as_mut().unwrap();
let hollow_quests = yorozuya.hollow_quests.as_mut().unwrap(); let hollow_quests = yorozuya.hollow_quests.as_mut().unwrap();

View file

@ -1,5 +1,4 @@
mod context; mod context;
pub mod data;
pub mod manager; pub mod manager;
pub mod util; pub mod util;

View file

@ -14,7 +14,7 @@ pub fn cur_timestamp_ms() -> u64 {
pub fn create_default_account(id: u64) -> AccountInfo { pub fn create_default_account(id: u64) -> AccountInfo {
AccountInfo { AccountInfo {
account_name: Some(format!("1_{id}")), account_name: Some(format!("1_{id}")),
players: Some(vec![id]), players: Some(Vec::new()),
gm_level: Some(10), gm_level: Some(10),
account_type: Some(1), account_type: Some(1),
register_cps: Some(String::new()), register_cps: Some(String::new()),

View file

@ -1,3 +1,5 @@
use std::io::{stdin, Read};
use anyhow::Result; use anyhow::Result;
use tracing::Level; use tracing::Level;
@ -15,7 +17,10 @@ use logging::{init_logging, init_system_logging};
async fn main() -> Result<()> { async fn main() -> Result<()> {
init_logging(); init_logging();
init_config(); init_config();
init_assets()?; if let Err(err) = init_assets() {
tracing::error!("Error occurred during assets initialization: {err}");
on_critical_fault();
}
let span = tracing::span!(Level::DEBUG, "main"); let span = tracing::span!(Level::DEBUG, "main");
let _enter = span.enter(); let _enter = span.enter();
@ -26,3 +31,10 @@ async fn main() -> Result<()> {
net::gateway::listen(&CONFIGURATION.gateway_endpoint).await net::gateway::listen(&CONFIGURATION.gateway_endpoint).await
} }
fn on_critical_fault() {
eprintln!("Critical error occurred, press any key to exit...");
let _ = stdin().read(&mut [0u8]).unwrap();
std::process::exit(1);
}

View file

@ -13,37 +13,31 @@ pub async fn on_rpc_hollow_move(
tracing::info!("Hollow movement {:?}", &arg); tracing::info!("Hollow movement {:?}", &arg);
let destination_pos = *arg.positions.last().unwrap(); let destination_pos = *arg.positions.last().unwrap();
let scene_uid = session let scene_uid = session.ns_prop_mgr.player_info.read().scene_uid.unwrap();
.ns_prop_mgr
.player_info
.read()
.await
.scene_uid
.unwrap();
let (ptc_hollow_grid, ptc_sync_hollow_event) = session let (ptc_hollow_grid, ptc_sync_hollow_event) = session
.context .context
.hollow_grid_manager .hollow_grid_manager
.move_to(destination_pos, scene_uid) .move_to(destination_pos, scene_uid);
.await;
session session
.send_rpc_arg(PTC_HOLLOW_GRID_ID, &ptc_hollow_grid) .push_rpc_arg(PTC_HOLLOW_GRID_ID, ptc_hollow_grid)
.await?; .await?;
if let Some(ptc_sync_hollow_event) = ptc_sync_hollow_event { if let Some(ptc_sync_hollow_event) = ptc_sync_hollow_event {
session session
.send_rpc_arg(PTC_SYNC_HOLLOW_EVENT_INFO_ID, &ptc_sync_hollow_event) .push_rpc_arg(PTC_SYNC_HOLLOW_EVENT_INFO_ID, ptc_sync_hollow_event)
.await?; .await?;
} }
let pos = PtcPositionInHollowChangedArg { let pos = PtcPositionInHollowChangedArg {
player_uid: 1337, player_uid: session.player_uid().raw(),
hollow_level: arg.hollow_level, hollow_level: arg.hollow_level,
position: destination_pos, position: destination_pos,
}; };
session session
.send_rpc_arg(PTC_POSITION_IN_HOLLOW_CHANGED_ID, &pos) .push_rpc_arg(PTC_POSITION_IN_HOLLOW_CHANGED_ID, pos)
.await?; .await?;
Ok(RpcHollowMoveRet::new( Ok(RpcHollowMoveRet::new(
@ -58,24 +52,23 @@ pub async fn on_rpc_end_battle(
) -> Result<RpcEndBattleRet> { ) -> Result<RpcEndBattleRet> {
tracing::info!("RpcEndBattle: {:?}", &arg); tracing::info!("RpcEndBattle: {:?}", &arg);
let player_uid = session.get_player_uid().await; let player_uid = session.player_uid().raw();
let (sync_event, hollow_finished) = session.context.hollow_grid_manager.battle_finished().await; let (sync_event, hollow_finished) = session.context.hollow_grid_manager.battle_finished();
if !hollow_finished { if !hollow_finished {
session session
.send_rpc_arg(PTC_SYNC_HOLLOW_EVENT_INFO_ID, &sync_event) .push_rpc_arg(PTC_SYNC_HOLLOW_EVENT_INFO_ID, sync_event)
.await?; .await?;
} else { } else {
let _ = *session let _ = session
.context .context
.dungeon_manager .dungeon_manager
.hollow_finished() .hollow_finished()
.await
.send_changes(session) .send_changes(session)
.await?; .await?;
let ptc_dungeon_quest_finished = PtcDungeonQuestFinishedArg { let ptc_dungeon_quest_finished = PtcDungeonQuestFinishedArg {
player_uid: 1337, player_uid,
quest_id: 1001000101, quest_id: 1001000101,
success: true, success: true,
reward_items: phashmap![], reward_items: phashmap![],
@ -83,7 +76,7 @@ pub async fn on_rpc_end_battle(
}; };
session session
.send_rpc_arg(PTC_DUNGEON_QUEST_FINISHED_ID, &ptc_dungeon_quest_finished) .push_rpc_arg(PTC_DUNGEON_QUEST_FINISHED_ID, ptc_dungeon_quest_finished)
.await?; .await?;
} }
@ -91,23 +84,18 @@ pub async fn on_rpc_end_battle(
.context .context
.dungeon_manager .dungeon_manager
.leave_battle() .leave_battle()
.await
.unwrap() .unwrap()
.send_changes(session) .send_changes(session)
.await? .await?
.clone(); .clone();
session session
.send_rpc_arg( .push_rpc_arg(
PTC_SYNC_HOLLOW_GRID_MAPS_ID, PTC_SYNC_HOLLOW_GRID_MAPS_ID,
&session session.context.hollow_grid_manager.sync_hollow_maps(
.context player_uid,
.hollow_grid_manager session.context.dungeon_manager.get_cur_scene_uid(),
.sync_hollow_maps( ),
player_uid,
session.context.dungeon_manager.get_cur_scene_uid().await,
)
.await,
) )
.await?; .await?;
@ -117,27 +105,25 @@ pub async fn on_rpc_end_battle(
position: session position: session
.context .context
.hollow_grid_manager .hollow_grid_manager
.get_cur_position_in_hollow() .get_cur_position_in_hollow(),
.await,
}; };
session session
.send_rpc_arg( .push_rpc_arg(
PTC_POSITION_IN_HOLLOW_CHANGED_ID, PTC_POSITION_IN_HOLLOW_CHANGED_ID,
&ptc_position_in_hollow_changed, ptc_position_in_hollow_changed,
) )
.await?; .await?;
session session
.send_rpc_arg(PTC_ENTER_SCENE_ID, &ptc_enter_scene) .push_rpc_arg(PTC_ENTER_SCENE_ID, ptc_enter_scene)
.await?; .await?;
Ok(RpcEndBattleRet::new( Ok(RpcEndBattleRet::new(
session session
.context .context
.hollow_grid_manager .hollow_grid_manager
.get_cur_event_template_id() .get_cur_event_template_id(),
.await,
HashMap::new(), HashMap::new(),
)) ))
} }
@ -148,13 +134,7 @@ pub async fn on_rpc_run_hollow_event_graph(
) -> Result<RpcRunHollowEventGraphRet> { ) -> Result<RpcRunHollowEventGraphRet> {
tracing::info!("Run hollow event graph {:?}", arg); tracing::info!("Run hollow event graph {:?}", arg);
let scene_uid = session let scene_uid = session.ns_prop_mgr.player_info.read().scene_uid.unwrap();
.ns_prop_mgr
.player_info
.read()
.await
.scene_uid
.unwrap();
if arg.event_graph_uid == 3405096459205834 { if arg.event_graph_uid == 3405096459205834 {
// Perform (cutscene) // Perform (cutscene)
@ -176,50 +156,45 @@ pub async fn on_rpc_run_hollow_event_graph(
specials: phashmap![], specials: phashmap![],
}; };
session session
.send_rpc_arg(PTC_SYNC_HOLLOW_EVENT_INFO_ID, &finish_perform) .push_rpc_arg(PTC_SYNC_HOLLOW_EVENT_INFO_ID, finish_perform)
.await?; .await?;
let (ptc_hollow_grid, ptc_sync_hollow_event) = session let (ptc_hollow_grid, ptc_sync_hollow_event) =
.context session.context.hollow_grid_manager.move_to(22, scene_uid);
.hollow_grid_manager
.move_to(22, scene_uid)
.await;
session session
.send_rpc_arg(PTC_HOLLOW_GRID_ID, &ptc_hollow_grid) .push_rpc_arg(PTC_HOLLOW_GRID_ID, ptc_hollow_grid)
.await?; .await?;
if let Some(ptc_sync_hollow_event) = ptc_sync_hollow_event { if let Some(ptc_sync_hollow_event) = ptc_sync_hollow_event {
session session
.send_rpc_arg(PTC_SYNC_HOLLOW_EVENT_INFO_ID, &ptc_sync_hollow_event) .push_rpc_arg(PTC_SYNC_HOLLOW_EVENT_INFO_ID, ptc_sync_hollow_event)
.await?; .await?;
} }
} else { } else {
let (sync_hollow_event, hollow_grid, trigger_battle_id, hollow_finished) = session let (sync_hollow_event, hollow_grid, trigger_battle_id, hollow_finished) = session
.context .context
.hollow_grid_manager .hollow_grid_manager
.run_event_graph(arg.event_graph_uid, arg.event_id, arg.move_path.clone()) .run_event_graph(arg.event_graph_uid, arg.event_id, arg.move_path.clone());
.await;
if !hollow_finished { if !hollow_finished {
session session
.send_rpc_arg(PTC_SYNC_HOLLOW_EVENT_INFO_ID, &sync_hollow_event) .push_rpc_arg(PTC_SYNC_HOLLOW_EVENT_INFO_ID, sync_hollow_event)
.await?; .await?;
} }
session session
.send_rpc_arg(PTC_HOLLOW_GRID_ID, &hollow_grid) .push_rpc_arg(PTC_HOLLOW_GRID_ID, hollow_grid)
.await?; .await?;
if hollow_finished { if hollow_finished {
let _ = *session let _ = session
.context .context
.dungeon_manager .dungeon_manager
.hollow_finished() .hollow_finished()
.await
.send_changes(session) .send_changes(session)
.await?; .await?;
let ptc_dungeon_quest_finished = PtcDungeonQuestFinishedArg { let ptc_dungeon_quest_finished = PtcDungeonQuestFinishedArg {
player_uid: 1337, player_uid: session.player_uid().raw(),
quest_id: 1001000101, quest_id: 1001000101,
success: true, success: true,
reward_items: phashmap![], reward_items: phashmap![],
@ -227,7 +202,7 @@ pub async fn on_rpc_run_hollow_event_graph(
}; };
session session
.send_rpc_arg(PTC_DUNGEON_QUEST_FINISHED_ID, &ptc_dungeon_quest_finished) .push_rpc_arg(PTC_DUNGEON_QUEST_FINISHED_ID, ptc_dungeon_quest_finished)
.await?; .await?;
} }
@ -236,43 +211,39 @@ pub async fn on_rpc_run_hollow_event_graph(
.ns_prop_mgr .ns_prop_mgr
.player_info .player_info
.read() .read()
.await
.scene_uid .scene_uid
.as_ref() .as_ref()
.unwrap(); .unwrap();
let battle_scene_uid = *session let battle_scene_uid = session
.context .context
.dungeon_manager .dungeon_manager
.create_fight(trigger_battle_id, hollow_uid) .create_fight(trigger_battle_id, hollow_uid)
.await
.send_changes(session) .send_changes(session)
.await?; .await?;
let ptc_position_in_hollow_changed = PtcPositionInHollowChangedArg { let ptc_position_in_hollow_changed = PtcPositionInHollowChangedArg {
player_uid: 1337, player_uid: session.player_uid().raw(),
hollow_level: 1, hollow_level: 1,
position: session position: session
.context .context
.hollow_grid_manager .hollow_grid_manager
.get_cur_position_in_hollow() .get_cur_position_in_hollow(),
.await,
}; };
session session
.send_rpc_arg( .push_rpc_arg(
PTC_POSITION_IN_HOLLOW_CHANGED_ID, PTC_POSITION_IN_HOLLOW_CHANGED_ID,
&ptc_position_in_hollow_changed, ptc_position_in_hollow_changed,
) )
.await?; .await?;
session session
.send_rpc_arg( .push_rpc_arg(
PTC_ENTER_SCENE_ID, PTC_ENTER_SCENE_ID,
session session
.context .context
.dungeon_manager .dungeon_manager
.enter_battle(battle_scene_uid) .enter_battle(battle_scene_uid)
.await
.send_changes(session) .send_changes(session)
.await?, .await?,
) )
@ -291,31 +262,33 @@ pub async fn on_rpc_start_hollow_quest(
// Set avatar HP properties // Set avatar HP properties
for (_idx, avatar_uid) in &arg.avatar_map { for (_idx, avatar_uid) in &arg.avatar_map {
let player_info = session.ns_prop_mgr.player_info.read().await; let update_properties = {
let items = player_info.items.as_ref().unwrap(); let player_info = session.ns_prop_mgr.player_info.read();
let Some(ItemInfo::Avatar { id, .. }) = items let items = player_info.items.as_ref().unwrap();
.iter() let Some(ItemInfo::Avatar { id, .. }) = items
.find(|(uid, _)| **uid == *avatar_uid) .iter()
.map(|(_, item)| item) .find(|(uid, _)| **uid == *avatar_uid)
else { .map(|(_, item)| item)
return Ok(RpcStartHollowQuestRet::error( else {
ErrorCode::ObjectNotExist, return Ok(RpcStartHollowQuestRet::error(
Vec::new(), ErrorCode::ObjectNotExist,
)); Vec::new(),
}; ));
};
let avatar_config = data::iter_avatar_config_collection() let avatar_config = data::iter_avatar_config_collection()
.find(|c| c.id == *id) .find(|c| c.id == *id)
.unwrap(); .unwrap();
let update_properties = PtcPropertyChangedArg { PtcPropertyChangedArg {
scene_unit_uid: *avatar_uid, scene_unit_uid: *avatar_uid,
is_partial: true, is_partial: true,
changed_properties: phashmap![(1, avatar_config.hp), (111, avatar_config.hp)], changed_properties: phashmap![(1, avatar_config.hp), (111, avatar_config.hp)],
}
}; };
session session
.send_rpc_arg(PTC_PROPERTY_CHANGED_ID, &update_properties) .push_rpc_arg(PTC_PROPERTY_CHANGED_ID, update_properties)
.await?; .await?;
} }
@ -325,11 +298,10 @@ pub async fn on_rpc_start_hollow_quest(
.sorted_by_key(|kv| kv.0) .sorted_by_key(|kv| kv.0)
.map(|(_idx, uid)| *uid) .map(|(_idx, uid)| *uid)
.collect::<Vec<_>>(); .collect::<Vec<_>>();
let (dungeon_uid, scene_uid) = *session let (dungeon_uid, scene_uid) = session
.context .context
.dungeon_manager .dungeon_manager
.create_hollow(10001, 10010001, &avatars) .create_hollow(10001, 10010001, &avatars)
.await
.send_changes(session) .send_changes(session)
.await?; .await?;
@ -350,46 +322,42 @@ pub async fn on_rpc_start_hollow_quest(
sort_id: 2000, sort_id: 2000,
}, },
) )
.await
.send_changes(session) .send_changes(session)
.await?; .await?;
let ptc_enter_scene = session let ptc_enter_scene = session
.context .context
.dungeon_manager .dungeon_manager
.enter_scene(scene_uid) .enter_scene(scene_uid)?
.await?
.send_changes(session) .send_changes(session)
.await? .await?
.clone(); .clone();
session.context.hollow_grid_manager.init_default_map().await; session.context.hollow_grid_manager.init_default_map();
session session
.send_rpc_arg( .push_rpc_arg(
PTC_SYNC_HOLLOW_GRID_MAPS_ID, PTC_SYNC_HOLLOW_GRID_MAPS_ID,
&session session
.context .context
.hollow_grid_manager .hollow_grid_manager
.sync_hollow_maps(session.get_player_uid().await, scene_uid) .sync_hollow_maps(session.player_uid().raw(), scene_uid),
.await,
) )
.await?; .await?;
let ptc_position_in_hollow_changed = PtcPositionInHollowChangedArg { let ptc_position_in_hollow_changed = PtcPositionInHollowChangedArg {
player_uid: 1337, player_uid: session.player_uid().raw(),
hollow_level: 1, hollow_level: 1,
position: session position: session
.context .context
.hollow_grid_manager .hollow_grid_manager
.get_cur_position_in_hollow() .get_cur_position_in_hollow(),
.await,
}; };
session session
.send_rpc_arg( .push_rpc_arg(
PTC_POSITION_IN_HOLLOW_CHANGED_ID, PTC_POSITION_IN_HOLLOW_CHANGED_ID,
&ptc_position_in_hollow_changed, ptc_position_in_hollow_changed,
) )
.await?; .await?;
@ -412,11 +380,11 @@ pub async fn on_rpc_start_hollow_quest(
}; };
session session
.send_rpc_arg(PTC_SYNC_HOLLOW_EVENT_INFO_ID, &ptc_sync_hollow_event_info) .push_rpc_arg(PTC_SYNC_HOLLOW_EVENT_INFO_ID, ptc_sync_hollow_event_info)
.await?; .await?;
session session
.send_rpc_arg(PTC_ENTER_SCENE_ID, &ptc_enter_scene) .push_rpc_arg(PTC_ENTER_SCENE_ID, ptc_enter_scene)
.await?; .await?;
Ok(RpcStartHollowQuestRet::new()) Ok(RpcStartHollowQuestRet::new())
} }

View file

@ -1,18 +1,52 @@
use std::time::{SystemTime, UNIX_EPOCH}; use std::time::{SystemTime, UNIX_EPOCH};
use super::*; use super::*;
use crate::game::util; use crate::{
game::util,
net::session::{AccountUID, PlayerUID},
};
const DEFAULT_ACCOUNT_ID: u64 = 1337; const DEFAULT_ACCOUNT_ID: u64 = 1;
pub async fn on_rpc_login(session: &NetworkSession, arg: &RpcLoginArg) -> Result<RpcLoginRet> { pub async fn on_rpc_login(session: &NetworkSession, arg: &RpcLoginArg) -> Result<RpcLoginRet> {
tracing::info!("Received rpc login arg: {}", arg.account_name); tracing::info!("Received rpc login arg: {}", arg.account_name);
*session.ns_prop_mgr.account_info.write().await =
util::create_default_account(DEFAULT_ACCOUNT_ID);
Ok(RpcLoginRet::new( match session.logged_in(
session.ns_prop_mgr.serialize_account_info().await, AccountUID(DEFAULT_ACCOUNT_ID),
)) util::create_default_account(DEFAULT_ACCOUNT_ID),
) {
Ok(()) => Ok(RpcLoginRet::new(
session.ns_prop_mgr.serialize_account_info(),
)),
Err(_) => Ok(RpcLoginRet::error(ErrorCode::RepeatedLogin, Vec::new())),
}
}
pub async fn on_rpc_create_player(
session: &NetworkSession,
_arg: &RpcCreatePlayerArg,
) -> Result<RpcCreatePlayerRet> {
let account_uid = session.account_uid();
let player_count = session
.ns_prop_mgr
.account_info
.read()
.players
.as_ref()
.unwrap()
.len();
let player_uid = PlayerUID::new(account_uid, player_count + 1);
session
.ns_prop_mgr
.account_info
.write()
.players
.as_mut()
.unwrap()
.push(player_uid.raw());
Ok(RpcCreatePlayerRet::new(player_uid.raw()))
} }
pub async fn on_ptc_get_server_timestamp( pub async fn on_ptc_get_server_timestamp(

View file

@ -39,6 +39,7 @@ macro_rules! protocol_handlers {
.instrument(tracing::info_span!(stringify!([<on_$name:snake>]), protocol_id = protocol_id)) .instrument(tracing::info_span!(stringify!([<on_$name:snake>]), protocol_id = protocol_id))
.await?; .await?;
session.flush_rpc_queue().await?;
session.send_rpc_ret(ret).await session.send_rpc_ret(ret).await
} }
)* )*
@ -57,6 +58,7 @@ macro_rules! protocol_handlers {
protocol_handlers! { protocol_handlers! {
RpcLogin; RpcLogin;
RpcCreatePlayer;
PtcGetServerTimestamp; PtcGetServerTimestamp;
PtcPlayerOperation; PtcPlayerOperation;
RpcAdvanceBeginnerProcedure; RpcAdvanceBeginnerProcedure;
@ -68,6 +70,7 @@ protocol_handlers! {
RpcDelNewMap; RpcDelNewMap;
RpcEndBattle; RpcEndBattle;
RpcEnterWorld; RpcEnterWorld;
RpcReenterWorld;
RpcFinishActPerformShow; RpcFinishActPerformShow;
RpcFinishEventGraphPerformShow; RpcFinishEventGraphPerformShow;
RpcGetPlayerMails; RpcGetPlayerMails;

View file

@ -6,21 +6,23 @@ pub async fn on_rpc_mod_nick_name(
) -> Result<RpcModNickNameRet> { ) -> Result<RpcModNickNameRet> {
tracing::info!("creating character"); tracing::info!("creating character");
let mut player = session.ns_prop_mgr.player_info.write().await; let player_info_changed = {
player.nick_name.replace(arg.nick_name.clone()); let mut player = session.ns_prop_mgr.player_info.write();
player.avatar_id.replace(arg.avatar_id); player.nick_name.replace(arg.nick_name.clone());
player.avatar_id.replace(arg.avatar_id);
let player_info_changed = PtcPlayerInfoChangedArg { PtcPlayerInfoChangedArg {
player_uid: player.uid.unwrap(), player_uid: player.uid.unwrap(),
player_info: PlayerInfo { player_info: PlayerInfo {
nick_name: Some(arg.nick_name.clone()), nick_name: Some(arg.nick_name.clone()),
avatar_id: Some(arg.avatar_id), avatar_id: Some(arg.avatar_id),
..Default::default() ..Default::default()
}, },
}
}; };
session session
.send_rpc_arg(PTC_PLAYER_INFO_CHANGED_ID, &player_info_changed) .push_rpc_arg(PTC_PLAYER_INFO_CHANGED_ID, player_info_changed)
.await?; .await?;
Ok(RpcModNickNameRet::new()) Ok(RpcModNickNameRet::new())
} }

View file

@ -5,6 +5,7 @@ use qwer::{
use crate::config::CONFIGURATION; use crate::config::CONFIGURATION;
use crate::data; use crate::data;
use crate::game::util; use crate::game::util;
use crate::net::session::PlayerUID;
use super::*; use super::*;
@ -12,21 +13,34 @@ pub async fn on_rpc_run_event_graph(
session: &NetworkSession, session: &NetworkSession,
arg: &RpcRunEventGraphArg, arg: &RpcRunEventGraphArg,
) -> Result<RpcRunEventGraphRet> { ) -> Result<RpcRunEventGraphRet> {
tracing::info!("RunEventGraph requested"); let unit = session.context.scene_unit_manager.get(arg.owner_uid);
let unit = session.context.scene_unit_manager.get(arg.owner_uid).await; let interact_id = match unit {
Some(SceneUnitProtocolInfo::NpcProtocolInfo { interacts_info, .. })
let SceneUnitProtocolInfo::NpcProtocolInfo { tag, id, .. } = unit; if interacts_info.len() != 0 =>
let main_city_object = data::get_main_city_object(tag, id).unwrap(); {
*interacts_info.iter().next().unwrap().0
}
Some(SceneUnitProtocolInfo::NpcProtocolInfo { tag, id, .. }) => {
let main_city_object = data::get_main_city_object(tag, id).unwrap();
*main_city_object.default_interact_ids.first().unwrap()
}
None => {
return Ok(RpcRunEventGraphRet::error(
ErrorCode::EntityNotExist,
Vec::new(),
))
}
};
let mut ptc_sync_event_info = PtcSyncEventInfoArg { let mut ptc_sync_event_info = PtcSyncEventInfoArg {
owner_type: EventGraphOwnerType::SceneUnit, owner_type: arg.owner_type,
owner_uid: arg.owner_uid, owner_uid: arg.owner_uid,
updated_events: pdkhashmap![], updated_events: pdkhashmap![],
}; };
ptc_sync_event_info.updated_events.insert( ptc_sync_event_info.updated_events.insert(
*main_city_object.default_interact_ids.first().unwrap(), interact_id,
100, 100,
EventInfo { EventInfo {
id: 100, id: 100,
@ -42,7 +56,7 @@ pub async fn on_rpc_run_event_graph(
); );
session session
.send_rpc_arg(PTC_SYNC_EVENT_INFO_ID, &ptc_sync_event_info) .push_rpc_arg(PTC_SYNC_EVENT_INFO_ID, ptc_sync_event_info)
.await?; .await?;
Ok(RpcRunEventGraphRet::new()) Ok(RpcRunEventGraphRet::new())
@ -52,8 +66,6 @@ pub async fn on_rpc_finish_event_graph_perform_show(
session: &NetworkSession, session: &NetworkSession,
arg: &RpcFinishEventGraphPerformShowArg, arg: &RpcFinishEventGraphPerformShowArg,
) -> Result<RpcFinishEventGraphPerformShowRet> { ) -> Result<RpcFinishEventGraphPerformShowRet> {
tracing::info!("FinishEventGraphPerformShow");
let mut ptc_sync_event_info = PtcSyncEventInfoArg { let mut ptc_sync_event_info = PtcSyncEventInfoArg {
owner_type: EventGraphOwnerType::SceneUnit, owner_type: EventGraphOwnerType::SceneUnit,
owner_uid: arg.owner_uid, owner_uid: arg.owner_uid,
@ -77,7 +89,7 @@ pub async fn on_rpc_finish_event_graph_perform_show(
); );
session session
.send_rpc_arg(PTC_SYNC_EVENT_INFO_ID, &ptc_sync_event_info) .push_rpc_arg(PTC_SYNC_EVENT_INFO_ID, ptc_sync_event_info)
.await?; .await?;
Ok(RpcFinishEventGraphPerformShowRet::new()) Ok(RpcFinishEventGraphPerformShowRet::new())
@ -87,38 +99,63 @@ pub async fn on_rpc_interact_with_unit(
session: &NetworkSession, session: &NetworkSession,
arg: &RpcInteractWithUnitArg, arg: &RpcInteractWithUnitArg,
) -> Result<RpcInteractWithUnitRet> { ) -> Result<RpcInteractWithUnitRet> {
tracing::info!("InteractWithUnit"); tracing::info!(
"InteractWithUnit: unit_uid: {}, interaction: {}",
let unit = session.context.scene_unit_manager.get(arg.unit_uid).await; arg.unit_uid,
arg.interaction
let SceneUnitProtocolInfo::NpcProtocolInfo { tag, id, .. } = unit;
let main_city_object = data::get_main_city_object(tag, id).unwrap();
let mut ptc_sync_event_info = PtcSyncEventInfoArg {
owner_type: EventGraphOwnerType::SceneUnit,
owner_uid: arg.unit_uid,
updated_events: pdkhashmap![],
};
ptc_sync_event_info.updated_events.insert(
*main_city_object.default_interact_ids.first().unwrap(),
100,
EventInfo {
id: 100,
cur_action_id: 101,
action_move_path: Vec::from([101]),
state: EventState::WaitingClient,
prev_state: EventState::Running,
cur_action_info: ActionInfo::None {},
cur_action_state: ActionState::Init,
predicated_failed_actions: phashset![],
stack_frames: Vec::new(),
},
); );
session let unit = session.context.scene_unit_manager.get(arg.unit_uid);
.send_rpc_arg(PTC_SYNC_EVENT_INFO_ID, &ptc_sync_event_info)
.await?; let interact_id = match unit {
Some(SceneUnitProtocolInfo::NpcProtocolInfo { interacts_info, .. })
if interacts_info.len() != 0 =>
{
*interacts_info.iter().next().unwrap().0
}
Some(SceneUnitProtocolInfo::NpcProtocolInfo { tag, id, .. }) => {
let main_city_object = data::get_main_city_object(tag, id).unwrap();
*main_city_object.default_interact_ids.first().unwrap()
}
None => {
return Ok(RpcInteractWithUnitRet::error(
ErrorCode::EntityNotExist,
Vec::new(),
))
}
};
// 0 - ServerInteractiveSystem::TriggerEnterEvent
// 1 - ServerInteractiveSystem::TriggerExitEvent
// 2 - ServerInteractiveSystem::TriggerInteractDirectly
if arg.interaction == 2 {
let mut ptc_sync_event_info = PtcSyncEventInfoArg {
owner_type: EventGraphOwnerType::SceneUnit,
owner_uid: arg.unit_uid,
updated_events: pdkhashmap![],
};
ptc_sync_event_info.updated_events.insert(
interact_id,
100,
EventInfo {
id: 100,
cur_action_id: 101,
action_move_path: Vec::from([101]),
state: EventState::WaitingClient,
prev_state: EventState::Running,
cur_action_info: ActionInfo::None {},
cur_action_state: ActionState::Init,
predicated_failed_actions: phashset![],
stack_frames: Vec::new(),
},
);
session
.push_rpc_arg(PTC_SYNC_EVENT_INFO_ID, ptc_sync_event_info)
.await?;
}
Ok(RpcInteractWithUnitRet::new()) Ok(RpcInteractWithUnitRet::new())
} }
@ -141,8 +178,6 @@ pub async fn on_rpc_save_pos_in_main_city(
_session: &NetworkSession, _session: &NetworkSession,
_arg: &RpcSavePosInMainCityArg, _arg: &RpcSavePosInMainCityArg,
) -> Result<RpcSavePosInMainCityRet> { ) -> Result<RpcSavePosInMainCityRet> {
tracing::info!("MainCity pos updated");
Ok(RpcSavePosInMainCityRet::new()) Ok(RpcSavePosInMainCityRet::new())
} }
@ -168,43 +203,33 @@ fn create_player(id: u64) -> PlayerInfo {
} }
pub async fn enter_main_city(session: &NetworkSession) -> Result<()> { pub async fn enter_main_city(session: &NetworkSession) -> Result<()> {
let hall_scene_uid = session let hall_scene_uid = session.context.dungeon_manager.get_default_scene_uid();
.context
.dungeon_manager
.get_default_scene_uid()
.await;
session session
.send_rpc_arg( .push_rpc_arg(
PTC_ENTER_SECTION_ID, PTC_ENTER_SECTION_ID,
session session
.context .context
.dungeon_manager .dungeon_manager
.enter_scene_section(hall_scene_uid, 2) .enter_scene_section(hall_scene_uid, 2)
.await .take(),
.unwrap(),
) )
.await?; .await?;
session session
.send_rpc_arg( .push_rpc_arg(
PTC_SYNC_SCENE_UNIT_ID, PTC_SYNC_SCENE_UNIT_ID,
&session session.context.scene_unit_manager.sync(hall_scene_uid, 2),
.context
.scene_unit_manager
.sync(hall_scene_uid, 2)
.await,
) )
.await?; .await?;
session session
.send_rpc_arg( .push_rpc_arg(
PTC_ENTER_SCENE_ID, PTC_ENTER_SCENE_ID,
session session
.context .context
.dungeon_manager .dungeon_manager
.enter_main_city() .enter_main_city()?
.await?
.send_changes(session) .send_changes(session)
.await?, .await?,
) )
@ -215,97 +240,89 @@ pub async fn on_rpc_enter_world(
session: &NetworkSession, session: &NetworkSession,
_arg: &RpcEnterWorldArg, _arg: &RpcEnterWorldArg,
) -> Result<RpcEnterWorldRet> { ) -> Result<RpcEnterWorldRet> {
let account = session.ns_prop_mgr.account_info.read().await; {
let account = session.ns_prop_mgr.account_info.read();
let id = *account.players.as_ref().unwrap().first().unwrap(); // get first id from list let player_uid = *account.players.as_ref().unwrap().first().unwrap(); // get first id from list
*session.ns_prop_mgr.player_info.write().await = create_player(id); session.set_cur_player(PlayerUID::from(player_uid), create_player(player_uid))?;
}
let item_manager = &session.context.item_manager; let item_manager = &session.context.item_manager;
item_manager.add_resource(501, 120).await; item_manager.add_resource(501, 120);
item_manager.add_resource(10, 228).await; item_manager.add_resource(10, 228);
item_manager.add_resource(100, 1337).await; item_manager.add_resource(100, 1337);
for avatar_id in data::iter_avatar_config_collection() for avatar_id in data::iter_avatar_config_collection()
.filter(|c| c.camp != 0) .filter(|c| c.camp != 0)
.map(|c| c.id) .map(|c| c.id)
{ {
item_manager.unlock_avatar(avatar_id).await; item_manager.unlock_avatar(avatar_id);
} }
for unlock_id in data::iter_unlock_config_collection().map(|c| c.id) { for unlock_id in data::iter_unlock_config_collection().map(|c| c.id) {
session.context.unlock_manager.unlock(unlock_id).await; session.context.unlock_manager.unlock(unlock_id);
} }
session.context.dungeon_manager.create_hall(1).await; session.context.dungeon_manager.create_hall(1);
session.context.scene_unit_manager.add_default_units().await; session.context.scene_unit_manager.add_scene_units(2);
let quest_manager = session.context.quest_manager.clone(); let quest_manager = session.context.quest_manager.clone();
quest_manager quest_manager.add_world_quest(QuestInfo::MainCity {
.add_world_quest(QuestInfo::MainCity { id: 10020002,
id: 10020002, finished_count: 0,
finished_count: 0, collection_uid: 0,
collection_uid: 0, progress: 0,
progress: 0, parent_quest_id: 0,
parent_quest_id: 0, state: QuestState::InProgress,
state: QuestState::InProgress, finish_condition_progress: phashmap![],
finish_condition_progress: phashmap![], progress_time: 2111012,
progress_time: 2111012, sort_id: 1000,
sort_id: 1000, bound_npc_and_interact: phashmap![],
bound_npc_and_interact: phashmap![], });
})
.await;
quest_manager quest_manager.add_world_quest(QuestInfo::Hollow {
.add_world_quest(QuestInfo::Hollow { id: 10010002,
id: 10010002, finished_count: 0,
finished_count: 0, collection_uid: 3405096459205774,
collection_uid: 3405096459205774, progress: 0,
progress: 0, parent_quest_id: 0,
parent_quest_id: 0, state: QuestState::Ready,
state: QuestState::Ready, sort_id: 1001,
sort_id: 1001, statistics: phashmap![],
statistics: phashmap![], statistics_ext: pdkhashmap![],
statistics_ext: pdkhashmap![], acquired_hollow_challenge_reward: 0,
acquired_hollow_challenge_reward: 0, progress_time: 0,
progress_time: 0, finish_condition_progress: phashmap![],
finish_condition_progress: phashmap![], dungeon_uid: 0,
dungeon_uid: 0, });
})
.await;
session session.context.yorozuya_quest_manager.add_hollow_quest(
.context 102,
.yorozuya_quest_manager HollowQuestType::SideQuest,
.add_hollow_quest(102, HollowQuestType::SideQuest, 10010002) 10010002,
.await; );
if CONFIGURATION.skip_tutorial { if CONFIGURATION.skip_tutorial {
Box::pin(enter_main_city(session)).await?; Box::pin(enter_main_city(session)).await?;
} else { } else {
let fresh_scene_uid = *session let fresh_scene_uid = session.context.dungeon_manager.create_fresh().take();
.context
.dungeon_manager
.create_fresh()
.await
.unwrap();
session session
.send_rpc_arg( .push_rpc_arg(
PTC_ENTER_SCENE_ID, PTC_ENTER_SCENE_ID,
session session
.context .context
.dungeon_manager .dungeon_manager
.enter_scene(fresh_scene_uid) .enter_scene(fresh_scene_uid)
.await
.unwrap() .unwrap()
.unwrap(), .take(),
) )
.await?; .await?;
} }
session session
.send_rpc_arg( .push_rpc_arg(
PTC_SYNC_SCENE_TIME_ID, PTC_SYNC_SCENE_TIME_ID,
&PtcSyncSceneTimeArg { PtcSyncSceneTimeArg {
timestamp: 3600 * 8 * 1000, timestamp: 3600 * 8 * 1000,
last_timestamp: 0, last_timestamp: 0,
}, },
@ -313,6 +330,25 @@ pub async fn on_rpc_enter_world(
.await?; .await?;
Ok(RpcEnterWorldRet::new( Ok(RpcEnterWorldRet::new(
session.ns_prop_mgr.serialize_player_info().await, session.ns_prop_mgr.serialize_player_info(),
)) ))
} }
pub async fn on_rpc_reenter_world(
session: &NetworkSession,
_arg: &RpcReenterWorldArg,
) -> Result<RpcReenterWorldRet> {
tracing::warn!("OnRpcReenterWorld: world re-entrance is not implemented yet, kicking player!");
session
.push_rpc_arg(
PTC_KICK_PLAYER_ID,
PtcKickPlayerArg {
reason_id: 2,
reason_str: String::new(),
},
)
.await?;
Ok(RpcReenterWorldRet::error(ErrorCode::Fail, Vec::new()))
}

View file

@ -1,10 +1,12 @@
use anyhow::Result; use anyhow::Result;
use protocol::{AccountInfo, PlayerInfo};
use qwer::{OctData, ProtocolHeader}; use qwer::{OctData, ProtocolHeader};
use std::collections::VecDeque;
use std::io::Cursor; use std::io::Cursor;
use std::sync::Arc; use std::sync::Arc;
use tokio::io::{AsyncReadExt, AsyncWriteExt}; use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::net::TcpStream; use tokio::net::TcpStream;
use tokio::sync::{Mutex, MutexGuard}; use tokio::sync::{Mutex, MutexGuard, OnceCell};
use crate::game::manager::net_stream; use crate::game::manager::net_stream;
use crate::game::GameContext; use crate::game::GameContext;
@ -12,11 +14,36 @@ use crate::game::GameContext;
use super::handlers::ProtocolHandler; use super::handlers::ProtocolHandler;
use super::{Packet, RequestBody, ResponseBody}; use super::{Packet, RequestBody, ResponseBody};
#[derive(Clone, Copy, Debug)]
pub struct AccountUID(pub u64);
#[derive(Clone, Copy, Debug)]
pub struct PlayerUID(u64);
impl PlayerUID {
pub const fn new(account_uid: AccountUID, index: usize) -> Self {
Self(account_uid.0 * 100 + index as u64)
}
pub const fn from(raw: u64) -> Self {
Self(raw)
}
pub const fn raw(&self) -> u64 {
self.0
}
}
struct QueueItem(pub u16, pub Vec<u8>);
pub struct NetworkSession { pub struct NetworkSession {
client_socket: Arc<Mutex<TcpStream>>, client_socket: Arc<Mutex<TcpStream>>,
cur_rpc_uid: u64, cur_rpc_uid: u64,
outgoing_rpc_queue: Mutex<VecDeque<QueueItem>>,
pub ns_prop_mgr: net_stream::PropertyManager, pub ns_prop_mgr: net_stream::PropertyManager,
pub context: GameContext, pub context: GameContext,
account_uid: OnceCell<AccountUID>,
player_uid: OnceCell<PlayerUID>,
} }
impl NetworkSession { impl NetworkSession {
@ -26,8 +53,11 @@ impl NetworkSession {
Self { Self {
client_socket: Arc::new(Mutex::new(client_socket)), client_socket: Arc::new(Mutex::new(client_socket)),
cur_rpc_uid: 0, cur_rpc_uid: 0,
outgoing_rpc_queue: Mutex::new(VecDeque::new()),
context: GameContext::new(ns_prop_mgr.player_info.clone()), context: GameContext::new(ns_prop_mgr.player_info.clone()),
ns_prop_mgr, ns_prop_mgr,
account_uid: OnceCell::new(),
player_uid: OnceCell::new(),
} }
} }
@ -35,8 +65,26 @@ impl NetworkSession {
self.client_socket.lock().await self.client_socket.lock().await
} }
pub async fn get_player_uid(&self) -> u64 { pub fn logged_in(&self, uid: AccountUID, account: AccountInfo) -> Result<()> {
self.ns_prop_mgr.player_info.read().await.uid.unwrap() self.account_uid.set(uid)?;
*self.ns_prop_mgr.account_info.write() = account;
Ok(())
}
pub fn set_cur_player(&self, uid: PlayerUID, player: PlayerInfo) -> Result<()> {
self.player_uid.set(uid)?;
*self.ns_prop_mgr.player_info.write() = player;
Ok(())
}
pub fn account_uid(&self) -> AccountUID {
*self.account_uid.get().unwrap()
}
pub fn player_uid(&self) -> PlayerUID {
*self.player_uid.get().unwrap()
} }
pub async fn run(&mut self) -> Result<()> { pub async fn run(&mut self) -> Result<()> {
@ -65,13 +113,32 @@ impl NetworkSession {
} }
} }
pub async fn send_rpc_arg(&self, protocol_id: u16, data: &impl OctData) -> Result<()> { pub async fn push_rpc_arg(&self, protocol_id: u16, data: impl OctData) -> Result<()> {
let header: Vec<u8> = ProtocolHeader::default().into();
let mut payload = Vec::new(); let mut payload = Vec::new();
let mut cursor = Cursor::new(&mut payload); let mut cursor = Cursor::new(&mut payload);
data.marshal_to(&mut cursor, 0)?; data.marshal_to(&mut cursor, 0)?;
self.outgoing_rpc_queue
.lock()
.await
.push_back(QueueItem(protocol_id, payload));
Ok(())
}
pub async fn flush_rpc_queue(&self) -> Result<()> {
let mut queue = self.outgoing_rpc_queue.lock().await;
while let Some(QueueItem(protocol_id, payload)) = queue.pop_front() {
self.send_rpc_arg(protocol_id, payload).await?;
}
Ok(())
}
async fn send_rpc_arg(&self, protocol_id: u16, payload: Vec<u8>) -> Result<()> {
let header: Vec<u8> = ProtocolHeader::default().into();
let body: Vec<u8> = RequestBody { let body: Vec<u8> = RequestBody {
protocol_id, protocol_id,
payload, payload,

View file

@ -7,3 +7,4 @@ version.workspace = true
byteorder.workspace = true byteorder.workspace = true
hex.workspace = true hex.workspace = true
qwer.workspace = true qwer.workspace = true
serde.workspace = true

View file

@ -1,3 +1,5 @@
use serde::Deserialize;
use super::*; use super::*;
#[derive(OctData, Clone, Debug, PartialEq, Eq)] #[derive(OctData, Clone, Debug, PartialEq, Eq)]
@ -560,7 +562,7 @@ flag! {
} }
} }
#[derive(OctData, Clone, Debug)] #[derive(OctData, Clone, Debug, Hash, PartialEq, Eq, Deserialize)]
#[repr(i16)] #[repr(i16)]
pub enum NodeState { pub enum NodeState {
All = 0, All = 0,
@ -577,7 +579,7 @@ pub enum NodeState {
EnumCount = 11, EnumCount = 11,
} }
#[derive(OctData, Clone, Debug)] #[derive(OctData, Clone, Debug, Hash, PartialEq, Eq, Deserialize)]
#[repr(i16)] #[repr(i16)]
pub enum NodeVisible { pub enum NodeVisible {
All = 0, All = 0,
@ -588,24 +590,34 @@ pub enum NodeVisible {
EnumCount = 5, EnumCount = 5,
} }
#[derive(OctData, Clone, Debug)] #[derive(OctData, Clone, Debug, Hash, PartialEq, Eq, Deserialize)]
#[repr(i16)] #[repr(i16)]
pub enum HollowEventType { pub enum HollowEventType {
None = 0, None = 0,
All = 1, All = 1,
Begin = 10, Begin = 10,
End = 20, End = 20,
#[serde(rename = "Interact_End")]
InteractEnd = 21, InteractEnd = 21,
#[serde(rename = "Battle_End")]
BattleEnd = 22, BattleEnd = 22,
#[serde(rename = "Change_Level_Interact")]
ChangeLevelInteract = 23, ChangeLevelInteract = 23,
#[serde(rename = "Change_Level_Fight")]
ChangeLevelFight = 24, ChangeLevelFight = 24,
Battle = 30, Battle = 30,
#[serde(rename = "Battle_Normal")]
BattleNormal = 31, BattleNormal = 31,
#[serde(rename = "Battle_Elite")]
BattleElite = 32, BattleElite = 32,
#[serde(rename = "Battle_Boss")]
BattleBoss = 33, BattleBoss = 33,
Dialog = 40, Dialog = 40,
#[serde(rename = "Dialog_Positive")]
DialogPositive = 41, DialogPositive = 41,
#[serde(rename = "Dialog_Negative")]
DialogNegative = 42, DialogNegative = 42,
#[serde(rename = "Dialog_Special")]
DialogSpecial = 43, DialogSpecial = 43,
} }
@ -671,7 +683,7 @@ pub enum InteractTarget {
TriggerBox = 1, TriggerBox = 1,
} }
#[derive(OctData, Clone, Debug)] #[derive(OctData, Clone, Copy, Debug)]
#[repr(i16)] #[repr(i16)]
pub enum EventGraphOwnerType { pub enum EventGraphOwnerType {
Scene = 0, Scene = 0,

View file

@ -61,6 +61,9 @@ pub struct RpcLoginArg {
pub config_sign: String, pub config_sign: String,
} }
#[derive(OctData, Debug)]
pub struct RpcCreatePlayerArg {}
#[derive(OctData, Clone, Debug)] #[derive(OctData, Clone, Debug)]
pub struct PtcEnterSceneArg { pub struct PtcEnterSceneArg {
pub player_uid: u64, pub player_uid: u64,
@ -76,6 +79,9 @@ pub struct PtcEnterSceneArg {
pub camera_y: u32, pub camera_y: u32,
} }
#[derive(OctData, Clone, Debug)]
pub struct RpcReenterWorldArg {}
#[derive(OctData, Clone, Debug)] #[derive(OctData, Clone, Debug)]
pub struct RpcEnterWorldArg {} pub struct RpcEnterWorldArg {}
@ -343,15 +349,29 @@ pub struct PtcSyncSceneTimeArg {
pub last_timestamp: u64, pub last_timestamp: u64,
} }
#[derive(OctData, Debug)]
pub struct PtcKickPlayerArg {
pub reason_id: i32,
pub reason_str: String,
}
ret! { ret! {
struct RpcLoginRet { struct RpcLoginRet {
account_info: PropertyBlob, account_info: PropertyBlob,
} }
struct RpcCreatePlayerRet {
player_uid: u64,
}
struct RpcEnterWorldRet { struct RpcEnterWorldRet {
player_info: PropertyBlob, player_info: PropertyBlob,
} }
struct RpcReenterWorldRet {
player_info: PropertyBlob,
}
struct RpcGetPlayerMailsRet { struct RpcGetPlayerMailsRet {
mail_count: u32, // Actually List<CPlayerMailInfo>, TODO! mail_count: u32, // Actually List<CPlayerMailInfo>, TODO!
} }