Changeset 910
- Timestamp:
- 11/06/08 23:28:50 (8 months ago)
- Files:
-
- core3/trunk/MMOCoreORB/build/unix/Makefile (modified) (4 diffs)
- core3/trunk/MMOCoreORB/build/unix/config.log (deleted)
- core3/trunk/MMOCoreORB/build/unix/config.status (deleted)
- core3/trunk/MMOCoreORB/src/server/zone/managers/creature/CreatureManager.cpp (modified) (20 diffs)
- core3/trunk/MMOCoreORB/src/server/zone/managers/creature/CreatureManager.h (modified) (5 diffs)
- core3/trunk/MMOCoreORB/src/server/zone/managers/creature/CreatureManager.idl (modified) (3 diffs)
- core3/trunk/MMOCoreORB/src/server/zone/managers/creature/CreatureManagerImplementation.cpp (modified) (4 diffs)
- core3/trunk/MMOCoreORB/src/server/zone/managers/creature/CreatureManagerImplementation.h (modified) (3 diffs)
- core3/trunk/MMOCoreORB/src/server/zone/managers/mission/MissionManager.cpp (modified) (5 diffs)
- core3/trunk/MMOCoreORB/src/server/zone/managers/mission/MissionManager.h (modified) (4 diffs)
- core3/trunk/MMOCoreORB/src/server/zone/managers/mission/MissionManager.idl (modified) (2 diffs)
- core3/trunk/MMOCoreORB/src/server/zone/managers/mission/MissionManagerImplementation.cpp (modified) (10 diffs)
- core3/trunk/MMOCoreORB/src/server/zone/managers/mission/MissionManagerImplementation.h (modified) (2 diffs)
- core3/trunk/MMOCoreORB/src/server/zone/objects/creature/action/Action.cpp (modified) (1 diff)
- core3/trunk/MMOCoreORB/src/server/zone/objects/creature/action/Action.h (modified) (1 diff)
- core3/trunk/MMOCoreORB/src/server/zone/objects/creature/action/Action.idl (modified) (1 diff)
- core3/trunk/MMOCoreORB/src/server/zone/objects/creature/action/ActionCreature.cpp (modified) (7 diffs)
- core3/trunk/MMOCoreORB/src/server/zone/objects/creature/action/ActionCreature.h (modified) (4 diffs)
- core3/trunk/MMOCoreORB/src/server/zone/objects/creature/action/ActionCreature.idl (modified) (3 diffs)
- core3/trunk/MMOCoreORB/src/server/zone/objects/creature/action/ActionCreatureImplementation.cpp (modified) (4 diffs)
- core3/trunk/MMOCoreORB/src/server/zone/objects/creature/action/ActionCreatureImplementation.h (modified) (5 diffs)
- core3/trunk/MMOCoreORB/src/server/zone/objects/creature/action/ActionImplementation.cpp (modified) (9 diffs)
- core3/trunk/MMOCoreORB/src/server/zone/objects/mission/MissionObjectImplementation.cpp (modified) (2 diffs)
- core3/trunk/MMOCoreORB/src/server/zone/objects/player/PlayerImplementation.cpp (modified) (1 diff)
- core3/trunk/MMOCoreORB/src/server/zone/objects/player/PlayerImplementation.h (modified) (1 diff)
- core3/trunk/MMOCoreORB/src/server/zone/objects/tangible/InventoryImplementation.h (modified) (1 diff)
- core3/trunk/MMOCoreORB/src/server/zone/packets/mission/MissionObjectDeltaMessage3.h (modified) (1 diff)
- core3/trunk/MMOCoreORB/src/server/zone/packets/mission/MissionObjectMessage3.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
core3/trunk/MMOCoreORB/build/unix/Makefile
r904 r910 117 117 distuninstallcheck_listfiles = find . -type f -print 118 118 distcleancheck_listfiles = find . -type f -print 119 ACLOCAL = ${SHELL} /cygdrive/c/ SWGEmu/workspace/MMOCoreORB/build/unix/config/missing --run aclocal-1.10120 AMTAR = ${SHELL} /cygdrive/c/ SWGEmu/workspace/MMOCoreORB/build/unix/config/missing --run tar121 AUTOCONF = ${SHELL} /cygdrive/c/ SWGEmu/workspace/MMOCoreORB/build/unix/config/missing --run autoconf122 AUTOHEADER = ${SHELL} /cygdrive/c/ SWGEmu/workspace/MMOCoreORB/build/unix/config/missing --run autoheader123 AUTOMAKE = ${SHELL} /cygdrive/c/ SWGEmu/workspace/MMOCoreORB/build/unix/config/missing --run automake-1.10119 ACLOCAL = ${SHELL} /cygdrive/c/Work/SWGEmu/liveWorkspace/MMOCoreORB/build/unix/config/missing --run aclocal-1.10 120 AMTAR = ${SHELL} /cygdrive/c/Work/SWGEmu/liveWorkspace/MMOCoreORB/build/unix/config/missing --run tar 121 AUTOCONF = ${SHELL} /cygdrive/c/Work/SWGEmu/liveWorkspace/MMOCoreORB/build/unix/config/missing --run autoconf 122 AUTOHEADER = ${SHELL} /cygdrive/c/Work/SWGEmu/liveWorkspace/MMOCoreORB/build/unix/config/missing --run autoheader 123 AUTOMAKE = ${SHELL} /cygdrive/c/Work/SWGEmu/liveWorkspace/MMOCoreORB/build/unix/config/missing --run automake-1.10 124 124 AWK = gawk 125 125 CC = gcc … … 146 146 LIBS = 147 147 LTLIBOBJS = 148 MAKEINFO = ${SHELL} /cygdrive/c/ SWGEmu/workspace/MMOCoreORB/build/unix/config/missing --run makeinfo148 MAKEINFO = ${SHELL} /cygdrive/c/Work/SWGEmu/liveWorkspace/MMOCoreORB/build/unix/config/missing --run makeinfo 149 149 MKDIR_P = /usr/bin/mkdir -p 150 150 OBJEXT = o … … 165 165 USER_LIBS_PATH = /usr/local/lib 166 166 VERSION = 1.0 167 abs_builddir = /cygdrive/c/ SWGEmu/workspace/MMOCoreORB/build/unix168 abs_srcdir = /cygdrive/c/ SWGEmu/workspace/MMOCoreORB/build/unix/../..169 abs_top_builddir = /cygdrive/c/ SWGEmu/workspace/MMOCoreORB/build/unix170 abs_top_srcdir = /cygdrive/c/ SWGEmu/workspace/MMOCoreORB/build/unix/../..167 abs_builddir = /cygdrive/c/Work/SWGEmu/liveWorkspace/MMOCoreORB/build/unix 168 abs_srcdir = /cygdrive/c/Work/SWGEmu/liveWorkspace/MMOCoreORB/build/unix/../.. 169 abs_top_builddir = /cygdrive/c/Work/SWGEmu/liveWorkspace/MMOCoreORB/build/unix 170 abs_top_srcdir = /cygdrive/c/Work/SWGEmu/liveWorkspace/MMOCoreORB/build/unix/../.. 171 171 ac_ct_CC = gcc 172 172 ac_ct_CXX = g++ … … 196 196 includedir = ${prefix}/include 197 197 infodir = ${datarootdir}/info 198 install_sh = $(SHELL) /cygdrive/c/ SWGEmu/workspace/MMOCoreORB/build/unix/config/install-sh198 install_sh = $(SHELL) /cygdrive/c/Work/SWGEmu/liveWorkspace/MMOCoreORB/build/unix/config/install-sh 199 199 libdir = ${exec_prefix}/lib 200 200 libexecdir = ${exec_prefix}/libexec core3/trunk/MMOCoreORB/src/server/zone/managers/creature/CreatureManager.cpp
r764 r910 19 19 #include "../../objects/creature/action/ActionCreature.h" 20 20 21 #include "../../objects/creature/action/Action.h"22 23 21 #include "../../objects/creature/trainer/TrainerCreature.h" 24 22 … … 127 125 } 128 126 129 void CreatureManager::load MissionCreatures() {127 void CreatureManager::load(Creature* creature) { 130 128 if (_impl == NULL) { 131 129 if (!deployed) … … 133 131 134 132 DistributedMethod method(this, 13); 135 136 method.executeWithVoidReturn(); 137 } else 138 ((CreatureManagerImplementation*) _impl)->loadMissionCreatures(); 139 } 140 141 void CreatureManager::load(Creature* creature) { 133 method.addObjectParameter(creature); 134 135 method.executeWithVoidReturn(); 136 } else 137 ((CreatureManagerImplementation*) _impl)->load(creature); 138 } 139 140 void CreatureManager::unloadCreature(Creature* creature) { 142 141 if (_impl == NULL) { 143 142 if (!deployed) … … 149 148 method.executeWithVoidReturn(); 150 149 } else 151 ((CreatureManagerImplementation*) _impl)-> load(creature);152 } 153 154 void CreatureManager::unloadCreature(Creature* creature) {150 ((CreatureManagerImplementation*) _impl)->unloadCreature(creature); 151 } 152 153 bool CreatureManager::verifyCreatureSpawn(string& name) { 155 154 if (_impl == NULL) { 156 155 if (!deployed) … … 158 157 159 158 DistributedMethod method(this, 15); 160 method.add ObjectParameter(creature);161 162 method.executeWithVoidReturn();163 } else 164 ((CreatureManagerImplementation*) _impl)->unloadCreature(creature);165 } 166 167 bool CreatureManager::verifyCreatureSpawn(string& name) {159 method.addAsciiParameter(name); 160 161 return method.executeWithBooleanReturn(); 162 } else 163 return ((CreatureManagerImplementation*) _impl)->verifyCreatureSpawn(name); 164 } 165 166 Creature* CreatureManager::spawnCreature(unsigned int objcrc, unsigned long long cellid, float x, float y, int bitmask, bool baby, bool doLock, float height) { 168 167 if (_impl == NULL) { 169 168 if (!deployed) … … 171 170 172 171 DistributedMethod method(this, 16); 173 method.addAsciiParameter(name);174 175 return method.executeWithBooleanReturn();176 } else177 return ((CreatureManagerImplementation*) _impl)->verifyCreatureSpawn(name);178 }179 180 Creature* CreatureManager::spawnCreature(unsigned int objcrc, unsigned long long cellid, float x, float y, int bitmask, bool baby, bool doLock, float height) {181 if (_impl == NULL) {182 if (!deployed)183 throw ObjectNotDeployedException(this);184 185 DistributedMethod method(this, 17);186 172 method.addUnsignedIntParameter(objcrc); 187 173 method.addUnsignedLongParameter(cellid); … … 203 189 throw ObjectNotDeployedException(this); 204 190 205 DistributedMethod method(this, 1 8);191 DistributedMethod method(this, 17); 206 192 method.addAsciiParameter(profession); 207 193 method.addAsciiParameter(stfname); … … 226 212 throw ObjectNotDeployedException(this); 227 213 228 DistributedMethod method(this, 1 9);214 DistributedMethod method(this, 18); 229 215 method.addAsciiParameter(Planet); 230 216 method.addAsciiParameter(City); … … 248 234 throw ObjectNotDeployedException(this); 249 235 250 DistributedMethod method(this, 20);236 DistributedMethod method(this, 19); 251 237 method.addFloatParameter(x); 252 238 method.addFloatParameter(y); … … 267 253 throw ObjectNotDeployedException(this); 268 254 269 DistributedMethod method(this, 2 1);255 DistributedMethod method(this, 20); 270 256 method.addAsciiParameter(type); 271 257 method.addFloatParameter(x); … … 279 265 } 280 266 281 ActionCreature* CreatureManager::spawnActionCreature(string& name, string& stfname, unsigned int objCrc, string& misoKey, float x, float y, float oY, float oW, unsigned long long cellid, bool doLock) {282 if (_impl == NULL) { 283 if (!deployed) 284 throw ObjectNotDeployedException(this); 285 286 DistributedMethod method(this, 2 2);267 ActionCreature* CreatureManager::spawnActionCreature(string& name, string& stfname, unsigned int objCrc, const string& misoKey, float x, float y, float oY, float oW, unsigned long long cellid, bool doLock) { 268 if (_impl == NULL) { 269 if (!deployed) 270 throw ObjectNotDeployedException(this); 271 272 DistributedMethod method(this, 21); 287 273 method.addAsciiParameter(name); 288 274 method.addAsciiParameter(stfname); … … 306 292 throw ObjectNotDeployedException(this); 307 293 294 DistributedMethod method(this, 22); 295 method.addAsciiParameter(name); 296 297 return method.executeWithUnsignedIntReturn(); 298 } else 299 return ((CreatureManagerImplementation*) _impl)->getCreatureCrc(name); 300 } 301 302 bool CreatureManager::hotLoadCreature(string& name) { 303 if (_impl == NULL) { 304 if (!deployed) 305 throw ObjectNotDeployedException(this); 306 308 307 DistributedMethod method(this, 23); 309 308 method.addAsciiParameter(name); 310 309 311 return method.executeWith UnsignedIntReturn();312 } else 313 return ((CreatureManagerImplementation*) _impl)-> getCreatureCrc(name);314 } 315 316 bool CreatureManager::hotLoadCreature(string& name) {310 return method.executeWithBooleanReturn(); 311 } else 312 return ((CreatureManagerImplementation*) _impl)->hotLoadCreature(name); 313 } 314 315 void CreatureManager::registerFunctions() { 317 316 if (_impl == NULL) { 318 317 if (!deployed) … … 320 319 321 320 DistributedMethod method(this, 24); 322 method.addAsciiParameter(name); 323 324 return method.executeWithBooleanReturn(); 325 } else 326 return ((CreatureManagerImplementation*) _impl)->hotLoadCreature(name); 327 } 328 329 void CreatureManager::registerFunctions() { 321 322 method.executeWithVoidReturn(); 323 } else 324 ((CreatureManagerImplementation*) _impl)->registerFunctions(); 325 } 326 327 void CreatureManager::registerGlobals() { 330 328 if (_impl == NULL) { 331 329 if (!deployed) … … 336 334 method.executeWithVoidReturn(); 337 335 } else 338 ((CreatureManagerImplementation*) _impl)->register Functions();339 } 340 341 void CreatureManager:: registerGlobals() {336 ((CreatureManagerImplementation*) _impl)->registerGlobals(); 337 } 338 339 void CreatureManager::loadCreatureFile() { 342 340 if (_impl == NULL) { 343 341 if (!deployed) … … 348 346 method.executeWithVoidReturn(); 349 347 } else 350 ((CreatureManagerImplementation*) _impl)-> registerGlobals();351 } 352 353 void CreatureManager::loadCreatureFile() {348 ((CreatureManagerImplementation*) _impl)->loadCreatureFile(); 349 } 350 351 Creature* CreatureManager::getCreature(unsigned long long oid) { 354 352 if (_impl == NULL) { 355 353 if (!deployed) … … 357 355 358 356 DistributedMethod method(this, 27); 359 360 method.executeWithVoidReturn(); 361 } else 362 ((CreatureManagerImplementation*) _impl)->loadCreatureFile(); 363 } 364 365 Creature* CreatureManager::getCreature(unsigned long long oid) { 357 method.addUnsignedLongParameter(oid); 358 359 return (Creature*) method.executeWithObjectReturn(); 360 } else 361 return ((CreatureManagerImplementation*) _impl)->getCreature(oid); 362 } 363 364 void CreatureManager::addCreature(Creature* creature) { 366 365 if (_impl == NULL) { 367 366 if (!deployed) … … 369 368 370 369 DistributedMethod method(this, 28); 371 method.addUnsignedLongParameter(oid);372 373 return (Creature*) method.executeWithObjectReturn();374 } else375 return ((CreatureManagerImplementation*) _impl)->getCreature(oid);376 }377 378 void CreatureManager::addCreature(Creature* creature) {379 if (_impl == NULL) {380 if (!deployed)381 throw ObjectNotDeployedException(this);382 383 DistributedMethod method(this, 29);384 370 method.addObjectParameter(creature); 385 371 … … 422 408 break; 423 409 case 13: 424 load MissionCreatures();410 load((Creature*) inv->getObjectParameter()); 425 411 break; 426 412 case 14: 427 load((Creature*) inv->getObjectParameter());413 unloadCreature((Creature*) inv->getObjectParameter()); 428 414 break; 429 415 case 15: 430 unloadCreature((Creature*) inv->getObjectParameter());416 resp->insertBoolean(verifyCreatureSpawn(inv->getAsciiParameter(_param0_verifyCreatureSpawn__string_))); 431 417 break; 432 418 case 16: 433 resp->insert Boolean(verifyCreatureSpawn(inv->getAsciiParameter(_param0_verifyCreatureSpawn__string_)));419 resp->insertLong(spawnCreature(inv->getUnsignedIntParameter(), inv->getUnsignedLongParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getSignedIntParameter(), inv->getBooleanParameter(), inv->getBooleanParameter(), inv->getFloatParameter())->_getObjectID()); 434 420 break; 435 421 case 17: 436 resp->insertLong(spawn Creature(inv->getUnsignedIntParameter(), inv->getUnsignedLongParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getSignedIntParameter(), inv->getBooleanParameter(), inv->getBooleanParameter(), inv->getFloatParameter())->_getObjectID());422 resp->insertLong(spawnTrainer(inv->getAsciiParameter(_param0_spawnTrainer__string_string_string_int_long_float_float_float_float_float_bool_), inv->getAsciiParameter(_param1_spawnTrainer__string_string_string_int_long_float_float_float_float_float_bool_), inv->getAsciiParameter(_param2_spawnTrainer__string_string_string_int_long_float_float_float_float_float_bool_), inv->getSignedIntParameter(), inv->getUnsignedLongParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getBooleanParameter())->_getObjectID()); 437 423 break; 438 424 case 18: 439 resp->insertLong(spawn Trainer(inv->getAsciiParameter(_param0_spawnTrainer__string_string_string_int_long_float_float_float_float_float_bool_), inv->getAsciiParameter(_param1_spawnTrainer__string_string_string_int_long_float_float_float_float_float_bool_), inv->getAsciiParameter(_param2_spawnTrainer__string_string_string_int_long_float_float_float_float_float_bool_), inv->getSignedIntParameter(), inv->getUnsignedLongParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getBooleanParameter())->_getObjectID());425 resp->insertLong(spawnShuttle(inv->getAsciiParameter(_param0_spawnShuttle__string_string_Coordinate_long_float_float_float_int_bool_bool_), inv->getAsciiParameter(_param1_spawnShuttle__string_string_Coordinate_long_float_float_float_int_bool_bool_), (Coordinate*) inv->getObjectParameter(), inv->getUnsignedLongParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getSignedIntParameter(), inv->getBooleanParameter(), inv->getBooleanParameter())->_getObjectID()); 440 426 break; 441 427 case 19: 442 resp->insertLong(spawn Shuttle(inv->getAsciiParameter(_param0_spawnShuttle__string_string_Coordinate_long_float_float_float_int_bool_bool_), inv->getAsciiParameter(_param1_spawnShuttle__string_string_Coordinate_long_float_float_float_int_bool_bool_), (Coordinate*) inv->getObjectParameter(), inv->getUnsignedLongParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getSignedIntParameter(), inv->getBooleanParameter(), inv->getBooleanParameter())->_getObjectID());428 resp->insertLong(spawnRecruiter(inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getUnsignedCharParameter(), inv->getUnsignedLongParameter(), inv->getBooleanParameter())->_getObjectID()); 443 429 break; 444 430 case 20: 445 resp->insertLong(spawn Recruiter(inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getUnsignedCharParameter(), inv->getUnsignedLongParameter(), inv->getBooleanParameter())->_getObjectID());431 resp->insertLong(spawnLair(inv->getAsciiParameter(_param0_spawnLair__string_float_float_float_bool_), inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getBooleanParameter())->_getObjectID()); 446 432 break; 447 433 case 21: 448 resp->insertLong(spawn Lair(inv->getAsciiParameter(_param0_spawnLair__string_float_float_float_bool_), inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getBooleanParameter())->_getObjectID());434 resp->insertLong(spawnActionCreature(inv->getAsciiParameter(_param0_spawnActionCreature__string_string_int_string_float_float_float_float_long_bool_), inv->getAsciiParameter(_param1_spawnActionCreature__string_string_int_string_float_float_float_float_long_bool_), inv->getUnsignedIntParameter(), inv->getAsciiParameter(_param3_spawnActionCreature__string_string_int_string_float_float_float_float_long_bool_), inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getUnsignedLongParameter(), inv->getBooleanParameter())->_getObjectID()); 449 435 break; 450 436 case 22: 451 resp->insert Long(spawnActionCreature(inv->getAsciiParameter(_param0_spawnActionCreature__string_string_int_string_float_float_float_float_long_bool_), inv->getAsciiParameter(_param1_spawnActionCreature__string_string_int_string_float_float_float_float_long_bool_), inv->getUnsignedIntParameter(), inv->getAsciiParameter(_param3_spawnActionCreature__string_string_int_string_float_float_float_float_long_bool_), inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getUnsignedLongParameter(), inv->getBooleanParameter())->_getObjectID());437 resp->insertInt(getCreatureCrc(inv->getAsciiParameter(_param0_getCreatureCrc__string_))); 452 438 break; 453 439 case 23: 454 resp->insert Int(getCreatureCrc(inv->getAsciiParameter(_param0_getCreatureCrc__string_)));440 resp->insertBoolean(hotLoadCreature(inv->getAsciiParameter(_param0_hotLoadCreature__string_))); 455 441 break; 456 442 case 24: 457 re sp->insertBoolean(hotLoadCreature(inv->getAsciiParameter(_param0_hotLoadCreature__string_)));443 registerFunctions(); 458 444 break; 459 445 case 25: 460 register Functions();446 registerGlobals(); 461 447 break; 462 448 case 26: 463 registerGlobals();449 loadCreatureFile(); 464 450 break; 465 451 case 27: 466 loadCreatureFile();452 resp->insertLong(getCreature(inv->getUnsignedLongParameter())->_getObjectID()); 467 453 break; 468 454 case 28: 469 resp->insertLong(getCreature(inv->getUnsignedLongParameter())->_getObjectID());470 break;471 case 29:472 455 addCreature((Creature*) inv->getObjectParameter()); 473 456 break; … … 507 490 } 508 491 509 void CreatureManagerAdapter::loadMissionCreatures() {510 return ((CreatureManagerImplementation*) impl)->loadMissionCreatures();511 }512 513 492 void CreatureManagerAdapter::load(Creature* creature) { 514 493 return ((CreatureManagerImplementation*) impl)->load(creature); … … 543 522 } 544 523 545 ActionCreature* CreatureManagerAdapter::spawnActionCreature(string& name, string& stfname, unsigned int objCrc, string& misoKey, float x, float y, float oY, float oW, unsigned long long cellid, bool doLock) {524 ActionCreature* CreatureManagerAdapter::spawnActionCreature(string& name, string& stfname, unsigned int objCrc, const string& misoKey, float x, float y, float oY, float oW, unsigned long long cellid, bool doLock) { 546 525 return ((CreatureManagerImplementation*) impl)->spawnActionCreature(name, stfname, objCrc, misoKey, x, y, oY, oW, cellid, doLock); 547 526 } core3/trunk/MMOCoreORB/src/server/zone/managers/creature/CreatureManager.h
r764 r910 24 24 class ActionCreature; 25 25 26 class Action;27 28 26 class TrainerCreature; 29 27 … … 50 48 void loadBlueFrogs(); 51 49 52 void loadMissionCreatures();53 54 50 void load(Creature* creature); 55 51 … … 68 64 LairObject* spawnLair(const string& type, float x, float y, float z, bool doLock = true); 69 65 70 ActionCreature* spawnActionCreature(string& name, string& stfname, unsigned int objCrc, string& misoKey, float x, float y, float oY, float oW, unsigned long long cellid = 0, bool doLock = true);66 ActionCreature* spawnActionCreature(string& name, string& stfname, unsigned int objCrc, const string& misoKey, float x, float y, float oY, float oW, unsigned long long cellid = 0, bool doLock = true); 71 67 72 68 unsigned int getCreatureCrc(string& name); … … 114 110 void loadBlueFrogs(); 115 111 116 void loadMissionCreatures();117 118 112 void load(Creature* creature); 119 113 … … 132 126 LairObject* spawnLair(const string& type, float x, float y, float z, bool doLock); 133 127 134 ActionCreature* spawnActionCreature(string& name, string& stfname, unsigned int objCrc, string& misoKey, float x, float y, float oY, float oW, unsigned long long cellid, bool doLock);128 ActionCreature* spawnActionCreature(string& name, string& stfname, unsigned int objCrc, const string& misoKey, float x, float y, float oY, float oW, unsigned long long cellid, bool doLock); 135 129 136 130 unsigned int getCreatureCrc(string& name); core3/trunk/MMOCoreORB/src/server/zone/managers/creature/CreatureManager.idl
r764 r910 54 54 55 55 import "../../objects/creature/action/ActionCreature"; 56 import "../../objects/creature/action/Action";57 56 import "../../objects/creature/trainer/TrainerCreature"; 58 57 import "../../objects/creature/recruiter/RecruiterCreature"; … … 76 75 void loadRecruiters(); 77 76 void loadBlueFrogs(); 78 void loadMissionCreatures();79 77 80 78 void load(Creature creature); … … 89 87 RecruiterCreature spawnRecruiter(float x, float y, float oY, float oW, unsigned char type = 1, unsigned long cellid = 0, boolean doLock = true); 90 88 LairObject spawnLair(const string type, float x, float y, float z, boolean doLock = true); 91 ActionCreature spawnActionCreature(string name, string stfname, unsigned int objCrc, string misoKey, float x, float y, float oY, float oW, unsigned long cellid = 0, boolean doLock = true);89 ActionCreature spawnActionCreature(string name, string stfname, unsigned int objCrc, const string misoKey, float x, float y, float oY, float oW, unsigned long cellid = 0, boolean doLock = true); 92 90 //CreatureGroup spawnCreatureGroup(int count, const string stfname, const string name, int objCrc, float x, float y, int bitmask = 0x00, int layout = 1); 93 91 core3/trunk/MMOCoreORB/src/server/zone/managers/creature/CreatureManagerImplementation.cpp
r884 r910 60 60 #include "../../objects/creature/shuttle/ShuttleCreature.h" 61 61 #include "../../objects/creature/action/ActionCreature.h" 62 #include "../../objects/creature/action/Action.h"63 62 64 63 #include "../../objects/creature/CreatureGroup.h" … … 143 142 loadStaticCreatures(); 144 143 loadBlueFrogs(); 145 //loadMissionCreatures();146 144 } 147 145 … … 273 271 TrainerCreature* trainer = spawnTrainer(prof->getName(), "", prof->getName(), 0x8C73B91, 0, -4967 - (i*1), 4043, 6, 0, 0); 274 272 } 275 }276 }277 278 void CreatureManagerImplementation::loadMissionCreatures() {279 //temporary to work with hardcode missions280 if (zone->getZoneID() == 5) {281 string name = "MAN O' ACTION";282 string stf = "";283 ActionCreature* tac;284 tac = spawnActionCreature(name, stf, 0x8C73B91, "testM27", -4844.0f, 4155.0f, -.0339502, .999424);285 286 int actmsk = 0;287 actmsk |= ActionImplementation::TYPE_CONVERSE;288 Action* act = new Action((SceneObject*)tac, actmsk, 0);289 string scrnId = "0";290 string leftBox = "Do you have...it?";291 string Options = "Yes, here.|The weather is quite nice!|No, sorry I forgot."; //separate by |292 string optLink = "1,none|2,none|ENDCNV,none"; //separate by | (nextScreenID,actionKey)293 act->addConvoScreen(scrnId, leftBox, 3, Options, optLink);294 295 //Converstaion window in response to Yes, Here:296 scrnId = "1";297 leftBox = "Cool you have it? Give it to me!";298 Options = "Here|No, bye.";299 optLink = "EXECACTION,finm27|ENDCNV,none";300 act->addConvoScreen(scrnId, leftBox, 1, Options, optLink);301 302 //Conversation window in response to weather:303 scrnId = "2";304 leftBox = "Yea the weather is pretty nice..";305 Options = "Bye.";306 optLink = "ENDCNV,none";307 act->addConvoScreen(scrnId, leftBox, 1, Options, optLink);308 309 string actionKey = "KEYA";310 tac->addAction(actionKey, act);311 tac->onConverse(actionKey); //link onConverse to action "KEYA"312 313 //Complete Mission Key:314 actmsk = 0;315 actmsk |= ActionImplementation::TYPE_TAKEITEM;316 actmsk |= ActionImplementation::TYPE_COMPMISSION;317 Action* act2 = new Action((SceneObject*)tac, actmsk, 0);318 319 actionKey = "finm27";320 tac->addAction(actionKey, act2);321 273 } 322 274 } … … 368 320 lock(doLock); 369 321 370 ActionCreature* actCr = new ActionCreature(getNextCreatureID(), objCrc, name, stfname, misoKey , server->getMissionManager());322 ActionCreature* actCr = new ActionCreature(getNextCreatureID(), objCrc, name, stfname, misoKey); 371 323 372 324 actCr->setTerrainName(Terrain::getTerrainName(zone->getZoneID())); core3/trunk/MMOCoreORB/src/server/zone/managers/creature/CreatureManagerImplementation.h
r764 r910 61 61 #include "../../objects/creature/action/ActionCreature.h" 62 62 #include "../../objects/creature/action/ActionCreatureImplementation.h" 63 #include "../../objects/creature/action/Action.h"64 #include "../../objects/creature/action/ActionImplementation.h"65 63 66 64 #include "CreatureMap.h" … … 110 108 void loadStaticCreatures(); 111 109 void loadBlueFrogs(); 112 void loadMissionCreatures();113 110 114 111 void load(Creature* creature); … … 125 122 RecruiterCreature* spawnRecruiter(float x, float y, float oY, float oW, uint8 type = 1, uint64 cellid = 0, bool doLock = true); 126 123 BlueFrogCreature* spawnBlueFrog(float x, float y, float oY, float oW, int type = 0, uint64 cellid = 0, bool doLock = true); 127 ActionCreature* spawnActionCreature(string& name, string& stfname, uint32 objCrc, string misoKey, float x, float y, float oY, float oW, uint64 cellid = 0, bool doLock = true);124 ActionCreature* spawnActionCreature(string& name, string& stfname, uint32 objCrc, const string misoKey, float x, float y, float oY, float oW, uint64 cellid = 0, bool doLock = true); 128 125 //CreatureGroup* spawnCreatureGroup(int count, const string& stfname, const string& name, int objCrc, float x, float y, int bitmask = 0x00, int layout = LINE_LAYOUT); 129 126 LairObject* spawnLair(const string& type, float x, float y, float z, bool doLock = true); core3/trunk/MMOCoreORB/src/server/zone/managers/mission/MissionManager.cpp
r842 r910 12 12 13 13 #include "../../objects/tangible/TangibleObject.h" 14 15 #include "../../objects/creature/action/ActionCreature.h" 16 17 #include "../../objects/creature/action/Action.h" 14 18 15 19 #include "server/zone/ZoneServer.h" … … 156 160 } 157 161 158 void MissionManager::doMissionComplete(Player* player, string& tKey ) {162 void MissionManager::doMissionComplete(Player* player, string& tKey, bool doLock) { 159 163 if (_impl == NULL) { 160 164 if (!deployed) … … 164 168 method.addObjectParameter(player); 165 169 method.addAsciiParameter(tKey); 166 167 method.executeWithVoidReturn(); 168 } else 169 ((MissionManagerImplementation*) _impl)->doMissionComplete(player, tKey); 170 method.addBooleanParameter(doLock); 171 172 method.executeWithVoidReturn(); 173 } else 174 ((MissionManagerImplementation*) _impl)->doMissionComplete(player, tKey, doLock); 170 175 } 171 176 … … 300 305 break; 301 306 case 14: 302 doMissionComplete((Player*) inv->getObjectParameter(), inv->getAsciiParameter(_param1_doMissionComplete__Player_string_ ));307 doMissionComplete((Player*) inv->getObjectParameter(), inv->getAsciiParameter(_param1_doMissionComplete__Player_string_bool_), inv->getBooleanParameter()); 303 308 break; 304 309 case 15: … … 362 367 } 363 368 364 void MissionManagerAdapter::doMissionComplete(Player* player, string& tKey ) {365 return ((MissionManagerImplementation*) impl)->doMissionComplete(player, tKey );369 void MissionManagerAdapter::doMissionComplete(Player* player, string& tKey, bool doLock) { 370 return ((MissionManagerImplementation*) impl)->doMissionComplete(player, tKey, doLock); 366 371 } 367 372 core3/trunk/MMOCoreORB/src/server/zone/managers/mission/MissionManager.h
r842 r910 13 13 14 14 class TangibleObject; 15 16 class ActionCreature; 17 18 class Action; 15 19 16 20 class ZoneServer; … … 38 42 void doMissionAccept(Player* player, unsigned long long oid, bool doLock = true); 39 43 40 void doMissionComplete(Player* player, string& tKey );44 void doMissionComplete(Player* player, string& tKey, bool doLock = true); 41 45 42 46 void doMissionAbort(Player* player, unsigned long long oid, bool doLock = true); … … 86 90 void doMissionAccept(Player* player, unsigned long long oid, bool doLock); 87 91 88 void doMissionComplete(Player* player, string& tKey );92 void doMissionComplete(Player* player, string& tKey, bool doLock); 89 93 90 94 void doMissionAbort(Player* player, unsigned long long oid, bool doLock); … … 109 113 string _param16_poolMission__string_int_string_int_int_int_float_float_int_string_int_float_float_int_int_string_string_int_TangibleObject_bool_; 110 114 string _param1_sendMission__Player_string_bool_; 111 string _param1_doMissionComplete__Player_string_ ;115 string _param1_doMissionComplete__Player_string_bool_; 112 116 string _param1_doMissionAbort__Player_string_bool_; 113 117 string _param0_getMissionItemCrc__string_bool_; core3/trunk/MMOCoreORB/src/server/zone/managers/mission/MissionManager.idl
r842 r910 46 46 import "../../objects/mission/MissionObject"; 47 47 import "../../objects/tangible/TangibleObject"; 48 import "../../objects/creature/action/ActionCreature"; 49 import "../../objects/creature/action/Action"; 48 50 49 51 import "server/zone/ZoneServer"; … … 73 75 //events 74 76 void doMissionAccept(Player player, unsigned long oid, boolean doLock = true); 75 void doMissionComplete(Player player, string tKey );77 void doMissionComplete(Player player, string tKey, boolean doLock = true); 76 78 void doMissionAbort(Player player, unsigned long oid, boolean doLock = true); 77 79 void doMissionAbort(Player player, string tKey, boolean doLock = true); core3/trunk/MMOCoreORB/src/server/zone/managers/mission/MissionManagerImplementation.cpp
r842 r910 48 48 49 49 #include "../../objects/player/Player.h" 50 #include "../../objects/creature/action/ActionCreature.h" 51 #include "../../objects/creature/action/Action.h" 50 52 51 53 #include "../../packets.h" … … 158 160 159 161 void MissionManagerImplementation::setupHardcodeMissions() { 160 /*161 stringdbKey = "testM27";162 string dbKey = ""; 163 dbKey = "testM27"; 162 164 int tmask = TMASK_GENERAL; //terminal mask (GENERAL) 163 165 string typeStr = "mission_deliver"; … … 170 172 171 173 uint32 diffLv = 1; 172 float destX = 1337.0f;173 float destY = 1337.0f;174 float destX = -5049.0f; 175 float destY = 4225.0f; 174 176 uint32 destPlanetCrc = Planet::getPlanetCRC("naboo"); 175 177 string creatorName = "Ramsey"; 176 178 uint32 rewardAmount = 50; 177 float targetX = 1234.0f;178 float targetY = 1234.0f;179 float targetX = -4844.0f; 180 float targetY = 4155.0f; 179 181 uint32 targetPlanetCrc = Planet::getPlanetCRC("naboo"); 180 uint32 depictedObjCrc = 0x 2D589F5B; //0x5B, 0x9F, 0x58, 0x2D, butterfly182 uint32 depictedObjCrc = 0x9BA06548; //holocron/secret box crc 181 183 182 184 //string descriptionStf = "mission/mission_deliver_neutral_easy"; 183 185 //string titleStf = "mission/mission_deliver_neutral_easy"; 184 186 //For custom missions: 185 string descriptionStf = "Deliver this secret box to MAN O' Action. ";187 string descriptionStf = "Deliver this secret box to MAN O' Action. The last time I checked he was at -5049, 4225."; 186 188 string titleStf = "The Box"; 187 189 … … 195 197 descriptionStf, titleStf, typeCrc, dvli, true); 196 198 197 //test 2nd mission: 198 dbKey = "testM28"; 199 titleStf = "The Box 2"; 200 201 poolMission(dbKey, tmask, typeStr, descKey, titleKey, diffLv, destX, destY, destPlanetCrc, 202 creatorName, rewardAmount, targetX, targetY, targetPlanetCrc, depictedObjCrc, 203 descriptionStf, titleStf, typeCrc, NULL, true); 204 */ 199 //Setup NPC: 200 CreatureManager* cm = zoneServer->getCreatureManager(5); 201 202 string name = "MAN O' ACTION"; 203 string stf = ""; 204 ActionCreature* tac; 205 tac = cm->spawnActionCreature(name, stf, 0x8C73B91, "testM27", -5049.0f, 4225.0f, -0.0339502f, 0.999424f); 206 tac->setMisoMgr(this); 207 208 int actmsk = 0; 209 actmsk |= ActionImplementation::TYPE_CONVERSE; 210 Action* act = new Action((SceneObject*)tac, actmsk, 0); 211 string scrnId = "0"; 212 string leftBox = "Do you have...it?"; 213 string Options = "Yes, here.|The weather is quite nice!|No, sorry I forgot."; //separate by | 214 string optLink = "1,none|2,none|ENDCNV,none"; //separate by | (nextScreenID,actionKey) 215 act->addConvoScreen(scrnId, leftBox, 3, Options, optLink); 216 217 //Converstaion window in response to Yes, Here: 218 scrnId = "1"; 219 leftBox = "Cool you have it? Give it to me!"; 220 Options = "Here|No, bye."; 221 optLink = "EXECACTION,finm27|ENDCNV,none"; 222 act->addConvoScreen(scrnId, leftBox, 1, Options, optLink); 223 224 //Conversation window in response to weather: 225 scrnId = "2"; 226 leftBox = "Yea the weather is pretty nice.."; 227 Options = "Bye."; 228 optLink = "ENDCNV,none"; 229 act->addConvoScreen(scrnId, leftBox, 1, Options, optLink); 230 231 string actionKey = "KEYA"; 232 tac->addAction(actionKey, act); 233 tac->onConverse(actionKey); //link onConverse to action "KEYA" 234 235 //Complete Mission Key: 236 actmsk = 0; 237 actmsk |= ActionImplementation::TYPE_TAKEITEM; 238 actmsk |= ActionImplementation::TYPE_COMPMISSION; 239 Action* act2 = new Action((SceneObject*)tac, actmsk, 0); 240 241 actionKey = "finm27"; 242 tac->addAction(actionKey, act2); 205 243 } 206 244 … … 339 377 //Check if player is already on mission: 340 378 if(player->isOnCurMisoKey(miso->getDBKey())) { 341 error("Player is already on mission!");379 //error("Player is already on mission!"); 342 380 return; 343 381 } … … 371 409 } 372 410 373 void MissionManagerImplementation::doMissionComplete(Player* player, string& tKey) { 374 //system msg: "Mission Complete. You have been awarded: <rewards>" 375 player->sendSystemMessage("Mission Complete."); 376 377 PlayMusicMessage* pmm = new PlayMusicMessage("sound/music_mission_complete.snd"); 378 player->sendMessage(pmm); 379 380 removeMisoFromPlayer(player, tKey, true); 381 382 player->addToFinMisoKeys(tKey); 383 player->removeFromCurMisoKeys(tKey); 411 void MissionManagerImplementation::doMissionComplete(Player* player, string& tKey, bool doLock) { 412 try { 413 lock(doLock); 414 415 removeMisoFromPlayer(player, tKey, false); 416 417 //system msg: "Mission Complete. You have been awarded: <rewards>" 418 player->sendSystemMessage("Mission Complete."); 419 //PlayMusicMessage* pmm = new PlayMusicMessage("sound/music_mission_complete.snd"); 420 //player->sendMessage(pmm); 421 player->addToFinMisoKeys(tKey); 422 player->removeFromCurMisoKeys(tKey); 423 424 unlock(doLock); 425 } catch (...) { 426 error("unreported Exception caught on doMissionComplete()\n"); 427 428 unlock(doLock); 429 } 384 430 } 385 431 … … 533 579 534 580 void MissionManagerImplementation::removeMisoFromPlayer(Player* player, string& tKey, bool doLock) { 535 MissionObject* miso = NULL;536 537 try { 538 lock(doLock); 539 581 MissionObject* miso; 582 583 try { 584 lock(doLock); 585 540 586 miso = misoMap->get(tKey); 541 587 … … 569 615 570 616 void MissionManagerImplementation::removeMisoFromPlayer(Player* player, uint64& oid, bool doLock) { 571 MissionObject* miso = NULL;617 MissionObject* miso; 572 618 573 619 try { … … 605 651 606 652 void MissionManagerImplementation::removeMisoFromPlayer(MissionObject* miso, Player* player) { 653 miso->sendDestroyTo(player); 654 607 655 if(miso->getTypeStr() == "mission_deliver" && (miso->getDeliverItem() != NULL)) { 608 656 TangibleObject* tmpi = (TangibleObject*)player->getMissionItem(miso->getDBKey()); … … 610 658 return; 611 659 } 612 613 660 player->removeInventoryItem(tmpi->getObjectID()); 614 661 tmpi->sendDestroyTo(player); 615 662 tmpi->finalize(); 616 663 } 617 618 miso->sendDestroyTo(player);619 664 } 620 665 core3/trunk/MMOCoreORB/src/server/zone/managers/mission/MissionManagerImplementation.h
r842 r910 61 61 #include "../../objects/tangible/TangibleObjectImplementation.h" 62 62 63 #include "../../objects/creature/action/ActionCreature.h" 64 #include "../../objects/creature/action/ActionCreatureImplementation.h" 65 #include "../../objects/creature/action/Action.h" 66 #include "../../objects/creature/action/ActionImplementation.h" 67 63 68 #include "MissionMap.h" 64 69 … … 97 102 //events 98 103 void doMissionAccept(Player* player, uint64& oid, bool doLock = true); 99 void doMissionComplete(Player* player, string& tKey );104 void doMissionComplete(Player* player, string& tKey, bool doLock = true); 100 105 void doMissionAbort(Player* player, uint64& oid, bool doLock = true); 101 106 void doMissionAbort(Player* player, string& tKey, bool doLock = true); core3/trunk/MMOCoreORB/src/server/zone/objects/creature/action/Action.cpp
r688 r910 9 9 #include "ActionCreature.h" 10 10 11 #include "../../../managers/mission/MissionManager .h"11 #include "../../../managers/mission/MissionManagerImplementation.h" 12 12 13 13 #include "../../scene/SceneObject.h" core3/trunk/MMOCoreORB/src/server/zone/objects/creature/action/Action.h
r688 r910 10 10 class ActionCreature; 11 11 12 class MissionManager ;12 class MissionManagerImplementation; 13 13 14 14 class SceneObject; core3/trunk/MMOCoreORB/src/server/zone/objects/creature/action/Action.idl
r686 r910 45 45 import "ActionCreature"; 46 46 47 import "../../../managers/mission/MissionManager ";47 import "../../../managers/mission/MissionManagerImplementation"; 48 48 49 49 import "../../scene/SceneObject"; core3/trunk/MMOCoreORB/src/server/zone/objects/creature/action/ActionCreature.cpp
r688 r910 9 9 #include "Action.h" 10 10 11 #include "../../../managers/mission/MissionManager .h"11 #include "../../../managers/mission/MissionManagerImplementation.h" 12 12 13 13 #include "../../scene/SceneObject.h" … … 21 21 */ 22 22 23 ActionCreature::ActionCreature(unsigned long long oid, unsigned int objCrc, string& creName, string& stf, string& missionKey , MissionManager* mMgr) : Creature(DummyConstructorParameter::instance()) {24 _impl = new ActionCreatureImplementation(oid, objCrc, creName, stf, missionKey , mMgr);23 ActionCreature::ActionCreature(unsigned long long oid, unsigned int objCrc, string& creName, string& stf, string& missionKey) : Creature(DummyConstructorParameter::instance()) { 24 _impl = new ActionCreatureImplementation(oid, objCrc, creName, stf, missionKey); 25 25 _impl->_setStub(this); 26 26 } … … 137 137 } 138 138 139 MissionManager* ActionCreature::getMisoMgr() { 139 MissionManagerImplementation* ActionCreature::getMisoMgr() { 140 if (_impl == NULL) { 141 throw ObjectNotLocalException(this); 142 143 } else 144 return ((ActionCreatureImplementation*) _impl)->getMisoMgr(); 145 } 146 147 void ActionCreature::setMisoMgr(MissionManagerImplementation* tmgr) { 148 if (_impl == NULL) { 149 throw ObjectNotLocalException(this); 150 151 } else 152 ((ActionCreatureImplementation*) _impl)->setMisoMgr(tmgr); 153 } 154 155 void ActionCreature::sendConversationStartTo(SceneObject* obj) { 140 156 if (_impl == NULL) { 141 157 if (!deployed) … … 143 159 144 160 DistributedMethod method(this, 14); 145 146 return (MissionManager*) method.executeWithObjectReturn(); 147 } else 148 return ((ActionCreatureImplementation*) _impl)->getMisoMgr(); 149 } 150 151 void ActionCreature::sendConversationStartTo(SceneObject* obj) { 161 method.addObjectParameter(obj); 162 163 method.executeWithVoidReturn(); 164 } else 165 ((ActionCreatureImplementation*) _impl)->sendConversationStartTo(obj); 166 } 167 168 void ActionCreature::selectConversationOption(int option, SceneObject* obj) { 152 169 if (_impl == NULL) { 153 170 if (!deployed) … … 155 172 156 173 DistributedMethod method(this, 15); 157 method.addObjectParameter(obj);158 159 method.executeWithVoidReturn();160 } else161 ((ActionCreatureImplementation*) _impl)->sendConversationStartTo(obj);162 }163 164 void ActionCreature::selectConversationOption(int option, SceneObject* obj) {165 if (_impl == NULL) {166 if (!deployed)167 throw ObjectNotDeployedException(this);168 169 DistributedMethod method(this, 16);170 174 method.addSignedIntParameter(option); 171 175 method.addObjectParameter(obj); … … 212 216 break; 213 217 case 14: 214 resp->insertLong(getMisoMgr()->_getObjectID());218 sendConversationStartTo((SceneObject*) inv->getObjectParameter()); 215 219 break; 216 220 case 15: 217 sendConversationStartTo((SceneObject*) inv->getObjectParameter());218 break;219 case 16:220 221 selectConversationOption(inv->getSignedIntParameter(), (SceneObject*) inv->getObjectParameter()); 221 222 break; … … 259 260 } 260 261 261 MissionManager* ActionCreatureAdapter::getMisoMgr() {262 return ((ActionCreatureImplementation*) impl)->getMisoMgr();263 }264 265 262 void ActionCreatureAdapter::sendConversationStartTo(SceneObject* obj) { 266 263 return ((ActionCreatureImplementation*) impl)->sendConversationStartTo(obj); core3/trunk/MMOCoreORB/src/server/zone/objects/creature/action/ActionCreature.h
r688 r910 10 10 class Action; 11 11 12 class MissionManager ;12 class MissionManagerImplementation; 13 13 14 14 class SceneObject; … … 22 22 class ActionCreature : public Creature { 23 23 public: 24 ActionCreature(unsigned long long oid, unsigned int objCrc, string& creName, string& stf, string& missionKey , MissionManager* mMgr = NULL);24 ActionCreature(unsigned long long oid, unsigned int objCrc, string& creName, string& stf, string& missionKey); 25 25 26 26 void addAction(string& key, Action* act); … … 40 40 string& getMissionKey(); 41 41 42 MissionManager* getMisoMgr(); 42 MissionManagerImplementation* getMisoMgr(); 43 44 void setMisoMgr(MissionManagerImplementation* tmgr); 43 45 44 46 void sendConversationStartTo(SceneObject* obj); … … 79 81 80 82 string& getMissionKey(); 81 82 MissionManager* getMisoMgr();83 83 84 84 void sendConversationStartTo(SceneObject* obj); core3/trunk/MMOCoreORB/src/server/zone/objects/creature/action/ActionCreature.idl
r686 r910 45 45 import "Action"; 46 46 47 import "../../../managers/mission/MissionManager ";47 import "../../../managers/mission/MissionManagerImplementation"; 48 48 49 49 import "../../scene/SceneObject"; … … 55 55 interface ActionCreature implements Creature { 56 56 57 ActionCreature(unsigned long oid, unsigned int objCrc, string creName, string stf, string missionKey , MissionManager mMgr = NULL) {57 ActionCreature(unsigned long oid, unsigned int objCrc, string creName, string stf, string missionKey) { 58 58 super(oid); 59 59 } … … 72 72 boolean isMissionNpc(); //Returns true if NPC has a mission assigned to it. 73 73 string getMissionKey(); 74 MissionManager getMisoMgr(); 74 local MissionManagerImplementation getMisoMgr(); 75 local void setMisoMgr(MissionManagerImplementation tmgr); 75 76 76 77 //Conversation Specific: core3/trunk/MMOCoreORB/src/server/zone/objects/creature/action/ActionCreatureImplementation.cpp
r687 r910 49 49 #include "../../player/Player.h" 50 50 51 #include "../../../managers/mission/MissionManager .h"51 #include "../../../managers/mission/MissionManagerImplementation.h" 52 52 53 53 #include "../../../packets.h" … … 56 56 57 57 ActionCreatureImplementation::ActionCreatureImplementation(uint64 oid, uint32 objCrc, string& creName, string& stf, 58 string& missionKey , MissionManager* mMgr) : ActionCreatureServant(oid) {58 string& missionKey) : ActionCreatureServant(oid) { 59 59 60 60 // General NPC: … … 75 75 // Mission: 76 76 misoKey = missionKey; 77 misoMgr = mMgr;78 77 79 78 stringstream loggingname; … … 184 183 } 185 184 186 MissionManager* ActionCreatureImplementation::getMisoMgr() {187 if(misoMgr == NULL) {188 misoMgr = server->getMissionManager();189 }190 return misoMgr;191 }192 185 core3/trunk/MMOCoreORB/src/server/zone/objects/creature/action/ActionCreatureImplementation.h
r687 r910 46 46 #define ACTIONCREATUREIMPLEMENTATION_H_ 47 47 48 class MissionManagerImplementation; 49 48 50 class Player; 49 51 class SceneObject; 52 53 #include "engine/engine.h" 50 54 51 55 #include "ActionCreature.h" … … 57 61 58 62 string misoKey; //Mission Key 59 MissionManager * misoMgr;63 MissionManagerImplementation* misoMgr; 60 64 61 65 //Trigger Action Keys: … … 66 70 67 71 public: 68 ActionCreatureImplementation(uint64 oid, uint32 objCrc, string& creName, string& stf, 69 string& missionKey, MissionManager* mMgr = NULL); 72 ActionCreatureImplementation(uint64 oid, uint32 objCrc, string& creName, string& stf, string& missionKey); 70 73 ~ActionCreatureImplementation(); 71 74 … … 92 95 } 93 96 94 MissionManager* getMisoMgr(); 97 //Mission Manager: 98 inline MissionManagerImplementation* getMisoMgr() { 99 return misoMgr; 100 } 101 102 inline void setMisoMgr(MissionManagerImplementation* tmgr) { 103 misoMgr = tmgr; 104 } 95 105 96 106 //Conversation Specific: … … 108 118 actionList.removeAll(); 109 119 } 120 121 friend class MissionManagerImplementation; 110 122 111 123 }; core3/trunk/MMOCoreORB/src/server/zone/objects/creature/action/ActionImplementation.cpp
r842 r910 46 46 #include "ActionImplementation.h" 47 47 48 #include "../../../managers/mission/MissionManager .h"48 #include "../../../managers/mission/MissionManagerImplementation.h" 49 49 50 50 #include "../../../packets.h" … … 66 66 if(!prereqCheck(player)) 67 67 return; 68 68 69 69 if((actionMask & TYPE_MOVE)) { 70 70 } … … 97 97 98 98 pItem = player->getMissionItem(misoKey); 99 99 100 if(pItem == NULL) { 100 101 //Elaborate with NPC dialogue later. 101 StopNpcConversation* scv = new StopNpcConversation(player, parentCreature->getObjectID()); 102 player->sendMessage(scv); 103 player->setLastNpcConvStr(""); 104 player->setLastNpcConvMessStr(""); 102 //printf("Cannot get mission item from player, it is NULL\n"); 105 103 return; 106 104 } … … 115 113 if((actionMask & TYPE_COMPMISSION)) { 116 114 string misoKey; 117 MissionManager* mMgr; 118 119 printf("comp mission 1\n"); 115 MissionManagerImplementation* mMgr; 120 116 121 117 if(parentObject->isNonPlayerCreature()) { … … 127 123 return; 128 124 129 printf("comp mission 2\n");130 131 125 misoKey = parentCreature->getMissionKey(); 132 126 mMgr = parentCreature->getMisoMgr(); 133 127 134 128 if(mMgr == NULL) { 135 //printf("Cannot complete mission, mission manager is null in parent creature\n");129 printf("Cannot complete mission, mission manager is null in parent creature\n"); 136 130 return; 137 131 } 138 132 139 printf("comp mission 3\n"); 140 141 mMgr->doMissionComplete(player, misoKey); 142 printf("comp mission 4\n"); 133 if(misoKey.size() == 0) { 134 return; 135 } 136 137 mMgr->doMissionComplete(player, misoKey, false); 143 138 } /*else if(parentObject->isAttackableObject()) { 144 139 //For lairs … … 149 144 if((actionMask & TYPE_FAILMISSION)) { 150 145 string misoKey; 151 MissionManager * mMgr;146 MissionManagerImplementation* mMgr; 152 147 153 148 if(parentObject->isNonPlayerCreature()) { … … 162 157 mMgr = parentCreature->getMisoMgr(); 163 158 164 mMgr->doMissionAbort(player, misoKey); 159 if(mMgr == NULL) { 160 //printf("Cannot abort mission, mission manager is null in parent creature\n"); 161 return; 162 } 163 164 mMgr->doMissionAbort(player, misoKey, false); 165 165 166 166 } /*else if(parentObject->isAttackableObject()) { … … 227 227 return; 228 228 } 229 230 //printf("Got screen/Option pair: %s . Used convMessStr: %s \n", tns.c_str(), player->getLastNpcConvMessStr().c_str()); 231 229 232 230 string newScreenID; 233 231 string actKey; … … 312 310 } 313 311 } 314 //315 312 316 313 return false; core3/trunk/MMOCoreORB/src/server/zone/objects/mission/MissionObjectImplementation.cpp
r686 r910 125 125 126 126 MissionObjectDeltaMessage3* dmiso3 = new MissionObjectDeltaMessage3((MissionObject*) _this); 127 128 dmiso3->updateDescriptionStf(); //11 (0B) 129 dmiso3->updateDescKey(); //4 127 size_t posD; 128 size_t posT; 129 130 posD = descriptionStf.find("mission/"); 131 posT = titleStf.find("mission/"); 132 133 if(posD == string::npos) { 134 dmiso3->updateDescriptionStf(false); //11 (0B) 135 } else { 136 dmiso3->updateDescriptionStf(true); //11 (0B) 137 dmiso3->updateDescKey(); //4 138 } 130 139 dmiso3->updateDifficultyLv(); //5 131 140 dmiso3->updateDestination(); //6 … … 135 144 dmiso3->updateTarget(); //9 136 145 dmiso3->updateDepictedObject(); //10 (0A) 137 dmiso3->updateTitleStf(); //12 (0C) 138 dmiso3->updateTitleKey(); //4 146 if(posD == string::npos) { 147 dmiso3->updateTitleStf(false); //12 (0C) 148 } else { 149 dmiso3->updateTitleStf(true); //12 (0C) 150 dmiso3->updateTitleKey(); //4 151 } 139 152 dmiso3->updateRefreshCount(player->nextMisoRFC()); //13 (0D) 140 153 core3/trunk/MMOCoreORB/src/server/zone/objects/player/PlayerImplementation.cpp
r907 r910 3628 3628 // Mission Functions 3629 3629 3630 bool PlayerImplementation::isOnCurMisoKey(string &tmk) {3630 bool PlayerImplementation::isOnCurMisoKey(string tmk) { 3631 3631 tmk += ","; 3632 3632 core3/trunk/MMOCoreORB/src/server/zone/objects/player/PlayerImplementation.h
r901 r910 775 775 curMisoKeys += (tck + ","); 776 776 } 777 bool isOnCurMisoKey(string &tmk); //player is currently on the mission key777 bool isOnCurMisoKey(string tmk); //player is currently on the mission key 778 778 void removeFromCurMisoKeys(string tck); 779 779 core3/trunk/MMOCoreORB/src/server/zone/objects/tangible/InventoryImplementation.h
r842 r910 81 81 tano = (TangibleObject*)obj; 82 82 83 if(( tano->getMisoAsocKey() == misKey) && (!tano->isEquipped())) {83 if((!strcmp(tano->getMisoAsocKey().c_str(), misKey.c_str())) && (!tano->isEquipped())) { 84 84 break; 85 } else { 86 tano = NULL; 85 87 } 86 87 tano = NULL;88 88 } 89 89 } core3/trunk/MMOCoreORB/src/server/zone/packets/mission/MissionObjectDeltaMessage3.h
r493 r910 118 118 } 119 119 120 void updateDescriptionStf( ) {120 void updateDescriptionStf(bool isStf) { 121 121 startUpdate(0x0B); 122 123 insertAscii(miso->getDescriptionStf()); 122 123 if (!isStf) { 124 insertShort(0); //No stf string 125 insertInt(0); 126 insertAscii(miso->getDescriptionStf()); 127 } else { 128 insertAscii(miso->getDescriptionStf()); 129 insertInt(0); 130 } 124 131 } 125 132 126 void updateTitleStf( ) {133 void updateTitleStf(bool isStf) { 127 134 startUpdate(0x0C); 128 129 insertAscii(miso->getTitleStf()); 135 136 if (!isStf) { 137 insertShort(0); //No stf string 138 insertInt(0); 139 insertAscii(miso->getTitleStf()); 140 } else { 141 insertAscii(miso->getTitleStf()); 142 insertInt(0); 143 } 130 144 } 131 145 core3/trunk/MMOCoreORB/src/server/zone/packets/mission/MissionObjectMessage3.h
r686 r910 66 66 67 67 insertFloat(1.0f); 68 68 69 69 if(mi->getTitleKey() != 0) { 70 70 insertAscii("mission/mission_object"); 71 } else { 72 insertAscii(mi->getTitleStf()); 73 } 74 insertInt(0); 75 76 if(mi->getTitleKey() != 0) { 71 insertInt(0); 77 72 insertAscii(mi->getTypeStr()); 78 73 } else { 79 74 insertAscii(""); 75 insertInt(0); 76 insertAscii(mi->getTitleStf()); 80 77 } 81 78