mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 14:37:44 +00:00
Questbattle instances can be created and joined.
This commit is contained in:
parent
e63aec1986
commit
8d1b25eaa1
14 changed files with 475 additions and 183 deletions
|
@ -4987,155 +4987,156 @@ Sapphire::Data::QuestBattle::QuestBattle( uint32_t row_id, Sapphire::Data::ExdDa
|
|||
scriptInstruction.push_back( exdData->getField< std::string >( row, 150 ) );
|
||||
scriptInstruction.push_back( exdData->getField< std::string >( row, 151 ) );
|
||||
scriptInstruction.push_back( exdData->getField< std::string >( row, 152 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 153 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 154 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 155 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 156 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 157 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 158 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 159 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 160 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 161 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 162 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 163 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 164 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 165 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 166 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 167 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 168 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 169 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 170 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 171 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 172 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 173 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 174 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 175 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 176 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 177 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 178 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 179 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 180 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 181 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 182 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 183 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 184 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 185 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 186 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 187 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 188 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 189 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 190 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 191 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 192 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 193 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 194 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 195 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 196 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 197 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 198 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 199 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 200 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 201 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 202 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 203 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 204 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 205 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 206 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 207 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 208 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 209 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 210 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 211 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 212 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 213 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 214 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 215 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 216 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 217 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 218 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 219 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 220 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 221 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 222 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 223 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 224 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 225 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 226 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 227 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 228 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 229 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 230 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 231 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 232 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 233 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 234 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 235 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 236 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 237 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 238 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 239 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 240 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 241 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 242 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 243 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 244 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 245 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 246 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 247 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 248 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 249 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 250 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 251 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 252 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 253 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 254 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 255 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 256 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 257 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 258 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 259 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 260 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 261 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 262 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 263 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 264 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 265 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 266 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 267 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 268 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 269 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 270 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 271 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 272 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 273 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 274 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 275 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 276 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 277 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 278 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 279 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 280 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 281 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 282 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 283 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 284 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 285 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 286 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 287 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 288 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 289 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 290 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 291 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 292 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 293 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 294 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 295 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 296 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 297 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 298 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 299 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 300 ) );
|
||||
scriptValue.push_back( exdData->getField< std::string >( row, 301 ) );
|
||||
scriptInstruction.push_back( exdData->getField< std::string >( row, 153 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 154 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 155 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 156 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 157 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 158 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 159 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 160 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 161 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 162 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 163 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 164 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 165 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 166 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 167 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 168 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 169 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 170 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 171 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 172 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 173 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 174 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 175 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 176 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 177 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 178 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 179 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 180 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 181 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 182 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 183 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 184 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 185 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 186 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 187 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 188 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 189 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 190 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 191 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 192 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 193 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 194 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 195 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 196 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 197 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 198 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 199 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 200 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 201 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 202 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 203 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 204 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 205 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 206 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 207 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 208 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 209 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 210 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 211 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 212 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 213 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 214 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 215 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 216 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 217 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 218 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 219 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 220 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 221 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 222 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 223 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 224 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 225 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 226 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 227 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 228 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 229 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 230 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 231 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 232 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 233 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 234 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 235 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 236 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 237 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 238 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 239 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 240 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 241 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 242 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 243 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 244 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 245 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 246 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 247 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 248 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 249 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 250 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 251 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 252 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 253 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 254 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 255 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 256 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 257 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 258 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 259 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 260 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 261 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 262 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 263 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 264 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 265 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 266 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 267 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 268 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 269 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 270 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 271 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 272 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 273 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 274 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 275 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 276 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 277 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 278 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 279 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 280 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 281 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 282 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 283 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 284 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 285 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 286 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 287 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 288 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 289 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 290 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 291 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 292 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 293 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 294 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 295 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 296 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 297 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 298 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 299 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 300 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 301 ) );
|
||||
scriptValue.push_back( exdData->getField< uint32_t >( row, 302 ) );
|
||||
}
|
||||
|
||||
Sapphire::Data::QuestClassJobReward::QuestClassJobReward( uint32_t row_id, uint32_t subRow, Sapphire::Data::ExdDataGenerated* exdData )
|
||||
|
|
|
@ -4431,7 +4431,7 @@ struct QuestBattle
|
|||
uint16_t timeLimit;
|
||||
uint16_t levelSync;
|
||||
std::vector< std::string > scriptInstruction;
|
||||
std::vector< std::string > scriptValue;
|
||||
std::vector< uint32_t > scriptValue;
|
||||
|
||||
QuestBattle( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
|
||||
};
|
||||
|
|
|
@ -346,6 +346,15 @@ Sapphire::InstanceContentPtr Sapphire::Entity::Actor::getCurrentInstance() const
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
/*! \return QuestBattlePtr to the current instance, nullptr if not an instance or not set */
|
||||
Sapphire::QuestBattlePtr Sapphire::Entity::Actor::getCurrentQuestBattle() const
|
||||
{
|
||||
if( m_pCurrentZone )
|
||||
return m_pCurrentZone->getAsQuestBattle();
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/*!
|
||||
Get the current cell of a region the actor is in
|
||||
|
||||
|
|
|
@ -127,6 +127,8 @@ namespace Sapphire::Entity
|
|||
|
||||
InstanceContentPtr getCurrentInstance() const;
|
||||
|
||||
QuestBattlePtr getCurrentQuestBattle() const;
|
||||
|
||||
// get the current cell of a region the actor is in
|
||||
Cell* getCellPtr();
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "Network/PacketWrappers/ActorControlPacket142.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket143.h"
|
||||
#include <Logging/Logger.h>
|
||||
|
||||
|
||||
using namespace Sapphire::Common;
|
||||
|
@ -58,6 +59,7 @@ void Sapphire::Event::Director::sendDirectorVars( Sapphire::Entity::Player& play
|
|||
|
||||
void Sapphire::Event::Director::sendDirectorInit( Sapphire::Entity::Player& player ) const
|
||||
{
|
||||
Logger::debug( "DirectorID#{}, QuestBattleID#{}", m_directorId, m_contentId );
|
||||
player.queuePacket( makeActorControl143( player.getId(), DirectorInit, m_directorId, m_contentId ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ namespace Sapphire::Event
|
|||
HousingAethernet = 0x001E,
|
||||
FcTalk = 0x001F,
|
||||
ICDirector = 0x8003,
|
||||
QuestBattleDirector = 0x8006,
|
||||
};
|
||||
|
||||
using SceneReturnCallback = std::function< void( Entity::Player&, const SceneResult& ) >;
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "Territory/Zone.h"
|
||||
#include "Territory/HousingZone.h"
|
||||
#include "Territory/InstanceContent.h"
|
||||
#include "Territory/QuestBattle.h"
|
||||
#include "Manager/TerritoryMgr.h"
|
||||
#include "Event/EventDefs.h"
|
||||
|
||||
|
@ -58,6 +59,7 @@ Sapphire::World::Manager::DebugCommandMgr::DebugCommandMgr( FrameworkPtr pFw ) :
|
|||
registerCommand( "help", &DebugCommandMgr::help, "Shows registered commands.", 0 );
|
||||
registerCommand( "script", &DebugCommandMgr::script, "Server script utilities.", 1 );
|
||||
registerCommand( "instance", &DebugCommandMgr::instance, "Instance utilities", 1 );
|
||||
registerCommand( "questbattle", &DebugCommandMgr::questBattle, "Quest battle utilities", 1 );
|
||||
registerCommand( "housing", &DebugCommandMgr::housing, "Housing utilities", 1 );
|
||||
}
|
||||
|
||||
|
@ -781,9 +783,8 @@ void Sapphire::World::Manager::DebugCommandMgr::script( char* data, Entity::Play
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Sapphire::World::Manager::DebugCommandMgr::instance( char* data, Entity::Player& player,
|
||||
std::shared_ptr< DebugCommand > command )
|
||||
void Sapphire::World::Manager::DebugCommandMgr::instance( char* data, Entity::Player& player,
|
||||
std::shared_ptr< DebugCommand > command )
|
||||
{
|
||||
auto pTeriMgr = framework()->get< TerritoryMgr >();
|
||||
std::string cmd( data ), params, subCommand;
|
||||
|
@ -996,6 +997,220 @@ Sapphire::World::Manager::DebugCommandMgr::instance( char* data, Entity::Player&
|
|||
}
|
||||
}
|
||||
|
||||
void Sapphire::World::Manager::DebugCommandMgr::questBattle( char* data, Entity::Player& player,
|
||||
std::shared_ptr< DebugCommand > command )
|
||||
{
|
||||
auto pTeriMgr = framework()->get< TerritoryMgr >();
|
||||
std::string cmd( data ), params, subCommand;
|
||||
auto cmdPos = cmd.find_first_of( ' ' );
|
||||
|
||||
if( cmdPos != std::string::npos )
|
||||
{
|
||||
params = cmd.substr( cmdPos + 1 );
|
||||
|
||||
auto p = params.find_first_of( ' ' );
|
||||
|
||||
if( p != std::string::npos )
|
||||
{
|
||||
subCommand = params.substr( 0, p );
|
||||
params = params.substr( subCommand.length() + 1 );
|
||||
}
|
||||
else
|
||||
subCommand = params;
|
||||
}
|
||||
|
||||
if( subCommand == "create" || subCommand == "cr" )
|
||||
{
|
||||
uint32_t contentFinderConditionId;
|
||||
sscanf( params.c_str(), "%d", &contentFinderConditionId );
|
||||
|
||||
auto instance = pTeriMgr->createQuestBattle( contentFinderConditionId );
|
||||
if( instance )
|
||||
player.sendDebug( "Created instance with id#{0} -> {1}", instance->getGuId(), instance->getName() );
|
||||
else
|
||||
player.sendDebug( "Failed to create instance with id#{0}", contentFinderConditionId );
|
||||
}
|
||||
else if( subCommand == "bind" )
|
||||
{
|
||||
uint32_t instanceId;
|
||||
sscanf( params.c_str(), "%d", &instanceId );
|
||||
|
||||
auto instance = pTeriMgr->getInstanceZonePtr( instanceId );
|
||||
if( instance )
|
||||
{
|
||||
auto pInstanceContent = instance->getAsQuestBattle();
|
||||
pInstanceContent->bindPlayer( player.getId() );
|
||||
player.sendDebug(
|
||||
"Now bound to instance with id: " + std::to_string( pInstanceContent->getGuId() ) +
|
||||
" -> " + pInstanceContent->getName() );
|
||||
}
|
||||
else
|
||||
player.sendDebug( "Unknown instance with id#{0}", instanceId );
|
||||
}
|
||||
else if( subCommand == "unbind" )
|
||||
{
|
||||
uint32_t instanceId;
|
||||
sscanf( params.c_str(), "%d", &instanceId );
|
||||
|
||||
auto instance = pTeriMgr->getInstanceZonePtr( instanceId );
|
||||
if( !instance )
|
||||
{
|
||||
player.sendDebug( "Unknown instance with id#{0} ", instanceId );
|
||||
return;
|
||||
}
|
||||
|
||||
auto pInstanceContent = instance->getAsQuestBattle();
|
||||
if( pInstanceContent->isPlayerBound( player.getId() ) )
|
||||
{
|
||||
pInstanceContent->unbindPlayer( player.getId() );
|
||||
player.sendDebug( "Now unbound from instance with id#{0} -> {1}", pInstanceContent->getGuId(), pInstanceContent->getName() );
|
||||
}
|
||||
else
|
||||
player.sendDebug( "Player not bound to instance with id#{0}", instanceId );
|
||||
|
||||
}
|
||||
else if( subCommand == "createzone" || subCommand == "crz" )
|
||||
{
|
||||
uint32_t zoneId;
|
||||
sscanf( params.c_str(), "%d", &zoneId );
|
||||
|
||||
auto instance = pTeriMgr->createTerritoryInstance( zoneId );
|
||||
if( instance )
|
||||
player.sendDebug(
|
||||
"Created instance with id: " + std::to_string( instance->getGuId() ) + " -> " + instance->getName() );
|
||||
else
|
||||
player.sendDebug( "Failed to create instance with id#{0}", zoneId );
|
||||
}
|
||||
else if( subCommand == "remove" || subCommand == "rm" )
|
||||
{
|
||||
uint32_t terriId;
|
||||
sscanf( params.c_str(), "%d", &terriId );
|
||||
|
||||
if( pTeriMgr->removeTerritoryInstance( terriId ) )
|
||||
player.sendDebug( "Removed instance with id#{0}", terriId );
|
||||
else
|
||||
player.sendDebug( "Failed to remove instance with id#{0}", terriId );
|
||||
}
|
||||
else if( subCommand == "return" || subCommand == "ret" )
|
||||
{
|
||||
player.exitInstance();
|
||||
}
|
||||
else if( subCommand == "set" )
|
||||
{
|
||||
uint32_t index;
|
||||
uint32_t value;
|
||||
sscanf( params.c_str(), "%d %d", &index, &value );
|
||||
|
||||
|
||||
auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() );
|
||||
if( !instance )
|
||||
return;
|
||||
|
||||
instance->setVar( static_cast< uint8_t >( index ), static_cast< uint8_t >( value ) );
|
||||
}
|
||||
else if( subCommand == "objstate" )
|
||||
{
|
||||
char objName[128];
|
||||
uint8_t state;
|
||||
|
||||
sscanf( params.c_str(), "%s %hhu", objName, &state );
|
||||
|
||||
auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() );
|
||||
if( !instance )
|
||||
return;
|
||||
|
||||
auto obj = instance->getEObjByName( objName );
|
||||
if( !obj )
|
||||
return;
|
||||
|
||||
obj->setState( state );
|
||||
}
|
||||
else if( subCommand == "objflag" )
|
||||
{
|
||||
char objName[256];
|
||||
uint32_t state1;
|
||||
uint32_t state2;
|
||||
|
||||
sscanf( params.c_str(), "%s %i %i", objName, &state1, &state2 );
|
||||
|
||||
auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() );
|
||||
if( !instance )
|
||||
return;
|
||||
|
||||
auto obj = instance->getEObjByName( objName );
|
||||
if( !obj )
|
||||
{
|
||||
player.sendDebug( "No eobj found." );
|
||||
return;
|
||||
}
|
||||
|
||||
obj->setAnimationFlag( state1, state2 );
|
||||
}
|
||||
else if( subCommand == "seq" )
|
||||
{
|
||||
uint8_t seq;
|
||||
|
||||
sscanf( params.c_str(), "%hhu", &seq );
|
||||
|
||||
auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() );
|
||||
if( !instance )
|
||||
return;
|
||||
|
||||
instance->setSequence( seq );
|
||||
}
|
||||
else if( subCommand == "branch" )
|
||||
{
|
||||
uint8_t branch;
|
||||
|
||||
sscanf( params.c_str(), "%hhu", &branch );
|
||||
|
||||
auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() );
|
||||
if( !instance )
|
||||
return;
|
||||
|
||||
instance->setBranch( branch );
|
||||
}
|
||||
else if( subCommand == "qte_start" )
|
||||
{
|
||||
auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() );
|
||||
if( !instance )
|
||||
return;
|
||||
|
||||
player.sendDebug( "qte start" );
|
||||
instance->startQte();
|
||||
}
|
||||
else if( subCommand == "event_start" )
|
||||
{
|
||||
auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() );
|
||||
if( !instance )
|
||||
return;
|
||||
|
||||
player.sendDebug( "evt start" );
|
||||
instance->startEventCutscene();
|
||||
}
|
||||
else if( subCommand == "event_end" )
|
||||
{
|
||||
auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() );
|
||||
if( !instance )
|
||||
return;
|
||||
|
||||
player.sendDebug( "evt end" );
|
||||
instance->endEventCutscene();
|
||||
}
|
||||
else if( subCommand == "bgm" )
|
||||
{
|
||||
uint16_t bgmId;
|
||||
sscanf( params.c_str(), "%hd", &bgmId );
|
||||
|
||||
if( auto instance = player.getCurrentInstance() )
|
||||
instance->setCurrentBGM( bgmId );
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendDebug( "Unknown sub command." );
|
||||
}
|
||||
}
|
||||
|
||||
void Sapphire::World::Manager::DebugCommandMgr::housing( char* data, Entity::Player& player,
|
||||
std::shared_ptr< DebugCommand > command )
|
||||
{
|
||||
|
|
|
@ -53,6 +53,7 @@ namespace Sapphire::World::Manager
|
|||
void unlockCharacter( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command );
|
||||
|
||||
void instance( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command );
|
||||
void questBattle( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command );
|
||||
|
||||
void housing( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command) ;
|
||||
|
||||
|
|
|
@ -63,11 +63,28 @@ std::string Sapphire::World::Manager::EventMgr::getEventName( uint32_t eventId )
|
|||
{
|
||||
auto contentInfo = pExdData->get< Sapphire::Data::InstanceContent >( eventId & 0xFFFF );
|
||||
std::string name = contentInfo->name;
|
||||
std::string remove( "★_ '()[]-\x1a\x1\x2\x1f\x1\x3.:" );
|
||||
std::string remove( ",★_ '()[]-\x1a\x1\x2\x1f\x1\x3.:" );
|
||||
Util::eraseAllIn( name, remove );
|
||||
name[ 0 ] = toupper( name[ 0 ] );
|
||||
return name;
|
||||
}
|
||||
case Event::EventHandler::EventHandlerType::QuestBattleDirector:
|
||||
{
|
||||
|
||||
auto qbInfo = pExdData->get< Sapphire::Data::QuestBattle >( eventId & 0xFFFF );
|
||||
if( !qbInfo )
|
||||
return "unknown";
|
||||
auto questInfo = pExdData->get< Sapphire::Data::Quest >( qbInfo->quest );
|
||||
if( !questInfo )
|
||||
return "unknown";
|
||||
|
||||
std::string name = questInfo->name;
|
||||
std::string remove( ",★_ '()[]-\x1a\x1\x2\x1f\x1\x3.:" );
|
||||
Util::eraseAllIn( name, remove );
|
||||
name[ 0 ] = toupper( name[ 0 ] );
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
case Event::EventHandler::EventHandlerType::Warp:
|
||||
{
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "Territory/Zone.h"
|
||||
#include "Territory/ZonePosition.h"
|
||||
#include "Territory/InstanceContent.h"
|
||||
#include "Territory/QuestBattle.h"
|
||||
#include "TerritoryMgr.h"
|
||||
#include "HousingMgr.h"
|
||||
#include "Framework.h"
|
||||
|
@ -272,6 +273,45 @@ Sapphire::ZonePtr Sapphire::World::Manager::TerritoryMgr::createTerritoryInstanc
|
|||
return pZone;
|
||||
}
|
||||
|
||||
Sapphire::ZonePtr Sapphire::World::Manager::TerritoryMgr::createQuestBattle( uint32_t contentFinderConditionId )
|
||||
{
|
||||
|
||||
auto pExdData = framework()->get< Data::ExdDataGenerated >();
|
||||
auto pContentFinderCondition = pExdData->get< Sapphire::Data::ContentFinderCondition >( contentFinderConditionId );
|
||||
if( !pContentFinderCondition )
|
||||
return nullptr;
|
||||
|
||||
auto questBattleId = pContentFinderCondition->content;
|
||||
|
||||
auto pQuestBattleInfo = pExdData->get< Sapphire::Data::QuestBattle >( questBattleId );
|
||||
if( !pQuestBattleInfo )
|
||||
return nullptr;
|
||||
|
||||
auto pQuestInfo = pExdData->get< Sapphire::Data::Quest >( pQuestBattleInfo->quest );
|
||||
if( !pQuestInfo )
|
||||
return nullptr;
|
||||
|
||||
if( !isInstanceContentTerritory( pContentFinderCondition->territoryType ) )
|
||||
return nullptr;
|
||||
|
||||
auto pTeri = getTerritoryDetail( pContentFinderCondition->territoryType );
|
||||
|
||||
if( !pTeri || pQuestInfo->name.empty() )
|
||||
return nullptr;
|
||||
|
||||
Logger::debug( "Starting instance for InstanceContent id: {0} ({1})", questBattleId, pQuestInfo->name );
|
||||
|
||||
auto pZone = make_QuestBattle( pQuestBattleInfo, pContentFinderCondition->territoryType, getNextInstanceId(),
|
||||
pTeri->name, pQuestInfo->name, questBattleId, framework() );
|
||||
pZone->init();
|
||||
|
||||
m_instanceContentIdToInstanceMap[ questBattleId ][ pZone->getGuId() ] = pZone;
|
||||
m_instanceIdToZonePtrMap[ pZone->getGuId() ] = pZone;
|
||||
m_instanceZoneSet.insert( pZone );
|
||||
|
||||
return pZone;
|
||||
}
|
||||
|
||||
Sapphire::ZonePtr Sapphire::World::Manager::TerritoryMgr::createInstanceContent( uint32_t contentFinderConditionId )
|
||||
{
|
||||
|
||||
|
|
|
@ -106,6 +106,8 @@ namespace Sapphire::World::Manager
|
|||
|
||||
ZonePtr createInstanceContent( uint32_t contentFinderConditionId );
|
||||
|
||||
ZonePtr createQuestBattle( uint32_t contentFinderConditionId );
|
||||
|
||||
ZonePtr findOrCreateHousingInterior( const Common::LandIdent landIdent );
|
||||
|
||||
/*! removes instance by instanceId, return true if successful */
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "Manager/EventMgr.h"
|
||||
|
||||
#include "Territory/InstanceContent.h"
|
||||
#include "Territory/QuestBattle.h"
|
||||
|
||||
#include "Session.h"
|
||||
|
||||
|
@ -173,13 +174,18 @@ void Sapphire::Network::GameConnection::eventHandlerEnterTerritory( FrameworkPtr
|
|||
|
||||
std::string objName = pEventMgr->getEventName( eventId );
|
||||
|
||||
player.sendDebug( "Calling: {0}.{1} - {2}", objName, eventName, eventId );
|
||||
player.sendDebug( "Calling: {0}.{1} - {2}", objName, eventName, eventId && 0xFFFF );
|
||||
|
||||
if( auto instance = player.getCurrentInstance() )
|
||||
{
|
||||
player.eventStart( player.getId(), eventId, Event::EventHandler::EnterTerritory, 1, player.getZoneId() );
|
||||
instance->onEnterTerritory( player, eventId, param1, param2 );
|
||||
}
|
||||
else if( auto instance = player.getCurrentQuestBattle() )
|
||||
{
|
||||
player.eventStart( player.getId(), eventId, Event::EventHandler::EnterTerritory, 1, player.getZoneId() );
|
||||
instance->onEnterTerritory( player, eventId, param1, param2 );
|
||||
}
|
||||
else
|
||||
{
|
||||
player.eventStart( player.getId(), eventId, Event::EventHandler::EnterTerritory, 0, player.getZoneId() );
|
||||
|
|
|
@ -98,22 +98,19 @@ void Sapphire::QuestBattle::onUpdate( uint32_t currTime )
|
|||
{
|
||||
case Created:
|
||||
{
|
||||
if( m_boundPlayerIds.size() == 0 )
|
||||
if( m_boundPlayerId == 0 )
|
||||
return;
|
||||
|
||||
for( auto playerId : m_boundPlayerIds )
|
||||
{
|
||||
auto it = m_playerMap.find( playerId );
|
||||
if( it == m_playerMap.end() )
|
||||
return;
|
||||
auto it = m_playerMap.find( m_boundPlayerId );
|
||||
if( it == m_playerMap.end() )
|
||||
return;
|
||||
|
||||
auto player = it->second;
|
||||
if( !player->isLoadingComplete() ||
|
||||
!player->isDirectorInitialized() ||
|
||||
!player->isOnEnterEventDone() ||
|
||||
player->hasStateFlag( PlayerStateFlag::WatchingCutscene ) )
|
||||
return;
|
||||
}
|
||||
auto player = it->second;
|
||||
if( !player->isLoadingComplete() ||
|
||||
!player->isDirectorInitialized() ||
|
||||
!player->isOnEnterEventDone() ||
|
||||
player->hasStateFlag( PlayerStateFlag::WatchingCutscene ) )
|
||||
return;
|
||||
|
||||
if( m_instanceCommenceTime == 0 )
|
||||
{
|
||||
|
@ -127,9 +124,7 @@ void Sapphire::QuestBattle::onUpdate( uint32_t currTime )
|
|||
for( const auto& playerIt : m_playerMap )
|
||||
{
|
||||
auto pPlayer = playerIt.second;
|
||||
pPlayer->queuePacket( makeActorControl143( pPlayer->getId(), DirectorUpdate,
|
||||
getDirectorId(), 0x40000001,
|
||||
m_pBattleDetails->timeLimit * 60u ) );
|
||||
pPlayer->sendDebug( " ALL DONE LOADING " );
|
||||
}
|
||||
|
||||
m_state = DutyInProgress;
|
||||
|
@ -157,11 +152,12 @@ void Sapphire::QuestBattle::onUpdate( uint32_t currTime )
|
|||
|
||||
void Sapphire::QuestBattle::onFinishLoading( Entity::Player& player )
|
||||
{
|
||||
sendDirectorInit( player );
|
||||
|
||||
}
|
||||
|
||||
void Sapphire::QuestBattle::onInitDirector( Entity::Player& player )
|
||||
{
|
||||
player.sendQuestMessage( getDirectorId(), 0, 2, Util::getTimeSeconds(), 0x0708 );
|
||||
sendDirectorVars( player );
|
||||
player.setDirectorInitialized( true );
|
||||
}
|
||||
|
@ -362,11 +358,11 @@ Sapphire::QuestBattle::onEnterTerritory( Entity::Player& player, uint32_t eventI
|
|||
pScriptMgr->onInstanceEnterTerritory( getAsQuestBattle(), player, eventId, param1, param2 );
|
||||
|
||||
// TODO: this may or may not be correct for questbattles
|
||||
player.directorPlayScene( getDirectorId(), 1, NO_DEFAULT_CAMERA | CONDITION_CUTSCENE | SILENT_ENTER_TERRI_ENV |
|
||||
HIDE_HOTBAR | SILENT_ENTER_TERRI_BGM | SILENT_ENTER_TERRI_SE |
|
||||
DISABLE_STEALTH | 0x00100000 | LOCK_HUD | LOCK_HOTBAR |
|
||||
// todo: wtf is 0x00100000
|
||||
DISABLE_CANCEL_EMOTE, 0, 0x9, getCurrentBGM() );
|
||||
player.playScene( getDirectorId(), 1, NO_DEFAULT_CAMERA | CONDITION_CUTSCENE | SILENT_ENTER_TERRI_ENV |
|
||||
HIDE_HOTBAR | SILENT_ENTER_TERRI_BGM | SILENT_ENTER_TERRI_SE |
|
||||
DISABLE_STEALTH | 0x00100000 | LOCK_HUD | LOCK_HOTBAR |
|
||||
// todo: wtf is 0x00100000
|
||||
DISABLE_CANCEL_EMOTE, 0 );
|
||||
|
||||
}
|
||||
|
||||
|
@ -398,21 +394,22 @@ uint16_t Sapphire::QuestBattle::getCurrentBGM() const
|
|||
bool Sapphire::QuestBattle::bindPlayer( uint32_t playerId )
|
||||
{
|
||||
// if player already bound, return false
|
||||
if( m_boundPlayerIds.count( playerId ) )
|
||||
if( m_boundPlayerId != 0)
|
||||
return false;
|
||||
|
||||
m_boundPlayerIds.insert( playerId );
|
||||
m_boundPlayerId = playerId;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Sapphire::QuestBattle::isPlayerBound( uint32_t playerId ) const
|
||||
{
|
||||
return m_boundPlayerIds.count( playerId ) > 0;
|
||||
return m_boundPlayerId == playerId;
|
||||
}
|
||||
|
||||
void Sapphire::QuestBattle::unbindPlayer( uint32_t playerId )
|
||||
{
|
||||
m_boundPlayerIds.erase( playerId );
|
||||
if( m_boundPlayerId != playerId )
|
||||
return;
|
||||
|
||||
auto it = m_playerMap.find( playerId );
|
||||
if( it != m_playerMap.end() )
|
||||
|
|
|
@ -103,8 +103,7 @@ namespace Sapphire
|
|||
std::unordered_map< uint32_t, Entity::EventObjectPtr > m_eventIdToObjectMap;
|
||||
std::set< uint32_t > m_spawnedPlayers;
|
||||
|
||||
// the players which are bound to the instance, regardless of inside or offline
|
||||
std::set< uint32_t > m_boundPlayerIds;
|
||||
uint32_t m_boundPlayerId;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue