Changeset 918
- Timestamp:
- 11/10/08 04:57:38 (8 months ago)
- Files:
-
- core3/branches/CombatTest/src/server/zone/objects/creature/CreatureObjectImplementation.cpp (modified) (5 diffs)
- core3/branches/CombatTest/src/server/zone/objects/player/Player.cpp (modified) (34 diffs)
- core3/branches/CombatTest/src/server/zone/objects/player/Player.h (modified) (4 diffs)
- core3/branches/CombatTest/src/server/zone/objects/player/Player.idl (modified) (2 diffs)
- core3/branches/CombatTest/src/server/zone/objects/player/PlayerImplementation.cpp (modified) (2 diffs)
- core3/branches/CombatTest/src/server/zone/objects/player/PlayerImplementation.h (modified) (3 diffs)
- core3/branches/CombatTest/src/server/zone/objects/player/PlayerObjectImplementation.cpp (modified) (1 diff)
- core3/branches/CombatTest/src/server/zone/objects/player/events/EntertainerEvent.h (modified) (2 diffs)
- core3/branches/CombatTest/src/server/zone/packets/object/ObjectControllerMessage.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
core3/branches/CombatTest/src/server/zone/objects/creature/CreatureObjectImplementation.cpp
r889 r918 3737 3737 addEntertainerFlourishBuff(); 3738 3738 } 3739 3740 // Grant Experience 3741 if (isPlayer()) { 3742 Player* player = (Player*)_this; 3743 3744 player->addEntertainerFlourishXp(performance->getBaseXp() + performance->getFlourishXpMod()); 3745 } 3739 3746 3740 3747 sendSystemMessage("performance", "flourish_perform"); … … 3814 3821 info("CreatureObjectImplementation::doEntertainerPatronEffects() begin"); 3815 3822 ManagedSortedVector<CreatureObject>* patrons = NULL; 3823 int healingXp = 0; 3816 3824 3817 3825 //cout << "CreatureObjectImplementation::doEntertainerPatronEffects()" << endl; … … 3853 3861 changeFocusWoundsBar(woundHeal, false); 3854 3862 changeWillpowerWoundsBar(woundHeal, false); 3855 } 3856 3857 if (healShock) 3863 3864 healingXp += -1 * woundHeal; 3865 } 3866 3867 if (healShock) { 3858 3868 changeShockWounds(shockHeal); 3869 healingXp += -1 * shockHeal; 3870 } 3859 3871 3860 3872 … … 3885 3897 obj->changeFocusWoundsBar(woundHeal, false); 3886 3898 obj->changeWillpowerWoundsBar(woundHeal, false); 3899 3900 healingXp += -1 * woundHeal; 3887 3901 } 3888 3902 3889 if (healShock) 3903 if (healShock) { 3890 3904 obj->changeShockWounds(shockHeal); 3905 3906 healingXp += -1 * woundHeal; 3907 } 3891 3908 3892 3909 // Handle Passive Buff … … 3923 3940 } /*else 3924 3941 cout << "no patrons";*/ 3942 3943 // Add Experience 3944 if (healingXp > 0 && isPlayer()) { 3945 Player* player = (Player*)_this; 3946 3947 player->addEntertainerHealingXp(healingXp); 3948 } 3925 3949 3926 3950 info("CreatureObjectImplementation::doEntertainerPatronEffects() end"); core3/branches/CombatTest/src/server/zone/objects/player/Player.cpp
r916 r918 4152 4152 } 4153 4153 4154 void Player::addEntertainerFlourishXp(int xp) { 4155 if (_impl == NULL) { 4156 if (!deployed) 4157 throw ObjectNotDeployedException(this); 4158 4159 DistributedMethod method(this, 326); 4160 method.addSignedIntParameter(xp); 4161 4162 method.executeWithVoidReturn(); 4163 } else 4164 ((PlayerImplementation*) _impl)->addEntertainerFlourishXp(xp); 4165 } 4166 4167 void Player::addEntertainerHealingXp(int xp) { 4168 if (_impl == NULL) { 4169 if (!deployed) 4170 throw ObjectNotDeployedException(this); 4171 4172 DistributedMethod method(this, 327); 4173 method.addSignedIntParameter(xp); 4174 4175 method.executeWithVoidReturn(); 4176 } else 4177 ((PlayerImplementation*) _impl)->addEntertainerHealingXp(xp); 4178 } 4179 4154 4180 void Player::setLastNpcConvStr(const string& conv) { 4155 4181 if (_impl == NULL) { … … 4157 4183 throw ObjectNotDeployedException(this); 4158 4184 4159 DistributedMethod method(this, 32 6);4185 DistributedMethod method(this, 328); 4160 4186 method.addAsciiParameter(conv); 4161 4187 … … 4170 4196 throw ObjectNotDeployedException(this); 4171 4197 4172 DistributedMethod method(this, 32 7);4198 DistributedMethod method(this, 329); 4173 4199 method.addAsciiParameter(mess); 4174 4200 … … 4183 4209 throw ObjectNotDeployedException(this); 4184 4210 4185 DistributedMethod method(this, 3 28);4211 DistributedMethod method(this, 330); 4186 4212 4187 4213 method.executeWithAsciiReturn(_return_getLastNpcConvStr); … … 4196 4222 throw ObjectNotDeployedException(this); 4197 4223 4198 DistributedMethod method(this, 3 29);4224 DistributedMethod method(this, 331); 4199 4225 4200 4226 method.executeWithAsciiReturn(_return_getLastNpcConvMessStr); … … 4209 4235 throw ObjectNotDeployedException(this); 4210 4236 4211 DistributedMethod method(this, 33 0);4237 DistributedMethod method(this, 332); 4212 4238 method.addSignedIntParameter(idx); 4213 4239 … … 4223 4249 throw ObjectNotDeployedException(this); 4224 4250 4225 DistributedMethod method(this, 33 1);4251 DistributedMethod method(this, 333); 4226 4252 method.addAsciiParameter(option); 4227 4253 … … 4236 4262 throw ObjectNotDeployedException(this); 4237 4263 4238 DistributedMethod method(this, 33 2);4264 DistributedMethod method(this, 334); 4239 4265 4240 4266 method.executeWithVoidReturn(); … … 4248 4274 throw ObjectNotDeployedException(this); 4249 4275 4250 DistributedMethod method(this, 33 3);4276 DistributedMethod method(this, 335); 4251 4277 4252 4278 return method.executeWithSignedIntReturn(); … … 4260 4286 throw ObjectNotDeployedException(this); 4261 4287 4262 DistributedMethod method(this, 33 4);4288 DistributedMethod method(this, 336); 4263 4289 method.addAsciiParameter(message); 4264 4290 … … 4273 4299 throw ObjectNotDeployedException(this); 4274 4300 4275 DistributedMethod method(this, 33 5);4301 DistributedMethod method(this, 337); 4276 4302 method.addBooleanParameter(guildLeader); 4277 4303 … … 4286 4312 throw ObjectNotDeployedException(this); 4287 4313 4288 DistributedMethod method(this, 33 6);4314 DistributedMethod method(this, 338); 4289 4315 4290 4316 method.executeWithVoidReturn(); … … 4294 4320 4295 4321 void Player::setGuildPermissions(unsigned int bit) { 4296 if (_impl == NULL) {4297 if (!deployed)4298 throw ObjectNotDeployedException(this);4299 4300 DistributedMethod method(this, 337);4301 method.addUnsignedIntParameter(bit);4302 4303 method.executeWithVoidReturn();4304 } else4305 ((PlayerImplementation*) _impl)->setGuildPermissions(bit);4306 }4307 4308 unsigned int Player::getGuildPermissions() {4309 if (_impl == NULL) {4310 if (!deployed)4311 throw ObjectNotDeployedException(this);4312 4313 DistributedMethod method(this, 338);4314 4315 return method.executeWithUnsignedIntReturn();4316 } else4317 return ((PlayerImplementation*) _impl)->getGuildPermissions();4318 }4319 4320 bool Player::setGuildPermissionsBit(unsigned int bit, bool updateClient) {4321 4322 if (_impl == NULL) { 4322 4323 if (!deployed) … … 4325 4326 DistributedMethod method(this, 339); 4326 4327 method.addUnsignedIntParameter(bit); 4327 method.addBooleanParameter(updateClient); 4328 4329 return method.executeWithBooleanReturn(); 4330 } else 4331 return ((PlayerImplementation*) _impl)->setGuildPermissionsBit(bit, updateClient); 4332 } 4333 4334 void Player::toggleGuildPermissionsBit(unsigned int bit) { 4328 4329 method.executeWithVoidReturn(); 4330 } else 4331 ((PlayerImplementation*) _impl)->setGuildPermissions(bit); 4332 } 4333 4334 unsigned int Player::getGuildPermissions() { 4335 4335 if (_impl == NULL) { 4336 4336 if (!deployed) … … 4338 4338 4339 4339 DistributedMethod method(this, 340); 4340 method.addUnsignedIntParameter(bit); 4341 4342 method.executeWithVoidReturn(); 4343 } else 4344 ((PlayerImplementation*) _impl)->toggleGuildPermissionsBit(bit); 4345 } 4346 4347 bool Player::clearGuildPermissionsBit(unsigned int bit, bool updateClient) { 4340 4341 return method.executeWithUnsignedIntReturn(); 4342 } else 4343 return ((PlayerImplementation*) _impl)->getGuildPermissions(); 4344 } 4345 4346 bool Player::setGuildPermissionsBit(unsigned int bit, bool updateClient) { 4348 4347 if (_impl == NULL) { 4349 4348 if (!deployed) … … 4356 4355 return method.executeWithBooleanReturn(); 4357 4356 } else 4357 return ((PlayerImplementation*) _impl)->setGuildPermissionsBit(bit, updateClient); 4358 } 4359 4360 void Player::toggleGuildPermissionsBit(unsigned int bit) { 4361 if (_impl == NULL) { 4362 if (!deployed) 4363 throw ObjectNotDeployedException(this); 4364 4365 DistributedMethod method(this, 342); 4366 method.addUnsignedIntParameter(bit); 4367 4368 method.executeWithVoidReturn(); 4369 } else 4370 ((PlayerImplementation*) _impl)->toggleGuildPermissionsBit(bit); 4371 } 4372 4373 bool Player::clearGuildPermissionsBit(unsigned int bit, bool updateClient) { 4374 if (_impl == NULL) { 4375 if (!deployed) 4376 throw ObjectNotDeployedException(this); 4377 4378 DistributedMethod method(this, 343); 4379 method.addUnsignedIntParameter(bit); 4380 method.addBooleanParameter(updateClient); 4381 4382 return method.executeWithBooleanReturn(); 4383 } else 4358 4384 return ((PlayerImplementation*) _impl)->clearGuildPermissionsBit(bit, updateClient); 4359 4385 } … … 4364 4390 throw ObjectNotDeployedException(this); 4365 4391 4366 DistributedMethod method(this, 34 2);4392 DistributedMethod method(this, 344); 4367 4393 method.addAsciiParameter(faction); 4368 4394 … … 4377 4403 throw ObjectNotDeployedException(this); 4378 4404 4379 DistributedMethod method(this, 34 3);4405 DistributedMethod method(this, 345); 4380 4406 method.addAsciiParameter(faction); 4381 4407 method.addUnsignedIntParameter(points); … … 4391 4417 throw ObjectNotDeployedException(this); 4392 4418 4393 DistributedMethod method(this, 34 4);4419 DistributedMethod method(this, 346); 4394 4420 method.addAsciiParameter(faction); 4395 4421 method.addUnsignedIntParameter(points); … … 4405 4431 throw ObjectNotDeployedException(this); 4406 4432 4407 DistributedMethod method(this, 34 5);4433 DistributedMethod method(this, 347); 4408 4434 4409 4435 return method.executeWithSignedIntReturn(); … … 4417 4443 throw ObjectNotDeployedException(this); 4418 4444 4419 DistributedMethod method(this, 34 6);4445 DistributedMethod method(this, 348); 4420 4446 method.addSignedIntParameter(status); 4421 4447 … … 4430 4456 throw ObjectNotDeployedException(this); 4431 4457 4432 DistributedMethod method(this, 34 7);4458 DistributedMethod method(this, 349); 4433 4459 4434 4460 return (FactionPointList*) method.executeWithObjectReturn(); … … 4442 4468 throw ObjectNotDeployedException(this); 4443 4469 4444 DistributedMethod method(this, 3 48);4470 DistributedMethod method(this, 350); 4445 4471 method.addAsciiParameter(faction); 4446 4472 … … 4455 4481 throw ObjectNotDeployedException(this); 4456 4482 4457 DistributedMethod method(this, 3 49);4483 DistributedMethod method(this, 351); 4458 4484 method.addObjectParameter(player); 4459 4485 method.addUnsignedIntParameter(amount); … … 4469 4495 throw ObjectNotDeployedException(this); 4470 4496 4471 DistributedMethod method(this, 35 0);4497 DistributedMethod method(this, 352); 4472 4498 method.addAsciiParameter(choice); 4473 4499 … … 4482 4508 throw ObjectNotDeployedException(this); 4483 4509 4484 DistributedMethod method(this, 35 1);4510 DistributedMethod method(this, 353); 4485 4511 4486 4512 method.executeWithVoidReturn(); … … 4494 4520 throw ObjectNotDeployedException(this); 4495 4521 4496 DistributedMethod method(this, 35 2);4522 DistributedMethod method(this, 354); 4497 4523 method.addObjectParameter(choicesList); 4498 4524 … … 4507 4533 throw ObjectNotDeployedException(this); 4508 4534 4509 DistributedMethod method(this, 35 3);4535 DistributedMethod method(this, 355); 4510 4536 4511 4537 return (SuiListBoxVector*) method.executeWithObjectReturn(); … … 4519 4545 throw ObjectNotDeployedException(this); 4520 4546 4521 DistributedMethod method(this, 35 4);4547 DistributedMethod method(this, 356); 4522 4548 4523 4549 method.executeWithVoidReturn(); … … 4531 4557 throw ObjectNotDeployedException(this); 4532 4558 4533 DistributedMethod method(this, 35 5);4559 DistributedMethod method(this, 357); 4534 4560 method.addUnsignedLongParameter(objectID); 4535 4561 … … 4544 4570 throw ObjectNotDeployedException(this); 4545 4571 4546 DistributedMethod method(this, 35 6);4572 DistributedMethod method(this, 358); 4547 4573 4548 4574 return method.executeWithUnsignedLongReturn(); 4549 4575 } else 4550 4576 return ((PlayerImplementation*) _impl)->getResourceDeedID(); 4577 } 4578 4579 void Player::setImagedesignXpGiven(bool given) { 4580 if (_impl == NULL) { 4581 if (!deployed) 4582 throw ObjectNotDeployedException(this); 4583 4584 DistributedMethod method(this, 359); 4585 method.addBooleanParameter(given); 4586 4587 method.executeWithVoidReturn(); 4588 } else 4589 ((PlayerImplementation*) _impl)->setImagedesignXpGiven(given); 4590 } 4591 4592 bool Player::getImagedesignXpGiven() { 4593 if (_impl == NULL) { 4594 if (!deployed) 4595 throw ObjectNotDeployedException(this); 4596 4597 DistributedMethod method(this, 360); 4598 4599 return method.executeWithBooleanReturn(); 4600 } else 4601 return ((PlayerImplementation*) _impl)->getImagedesignXpGiven(); 4551 4602 } 4552 4603 … … 5523 5574 break; 5524 5575 case 326: 5576 addEntertainerFlourishXp(inv->getSignedIntParameter()); 5577 break; 5578 case 327: 5579 addEntertainerHealingXp(inv->getSignedIntParameter()); 5580 break; 5581 case 328: 5525 5582 setLastNpcConvStr(inv->getAsciiParameter(_param0_setLastNpcConvStr__string_)); 5526 5583 break; 5527 case 32 7:5584 case 329: 5528 5585 setLastNpcConvMessStr(inv->getAsciiParameter(_param0_setLastNpcConvMessStr__string_)); 5529 5586 break; 5530 case 3 28:5587 case 330: 5531 5588 resp->insertAscii(getLastNpcConvStr()); 5532 5589 break; 5533 case 3 29:5590 case 331: 5534 5591 resp->insertAscii(getLastNpcConvMessStr()); 5535 5592 break; 5536 case 33 0:5593 case 332: 5537 5594 resp->insertAscii(getLastNpcConvOption(inv->getSignedIntParameter())); 5538 5595 break; 5539 case 33 1:5596 case 333: 5540 5597 addLastNpcConvOptions(inv->getAsciiParameter(_param0_addLastNpcConvOptions__string_)); 5541 5598 break; 5542 case 33 2:5599 case 334: 5543 5600 clearLastNpcConvOptions(); 5544 5601 break; 5545 case 33 3:5602 case 335: 5546 5603 resp->insertSignedInt(countLastNpcConvOptions()); 5547 5604 break; 5548 case 33 4:5605 case 336: 5549 5606 setInputBoxReturnBuffer(inv->getAsciiParameter(_param0_setInputBoxReturnBuffer__string_)); 5550 5607 break; 5551 case 33 5:5608 case 337: 5552 5609 setGuildLeader(inv->getBooleanParameter()); 5553 5610 break; 5554 case 33 6:5611 case 338: 5555 5612 loadGuildChat(); 5556 5613 break; 5557 case 33 7:5614 case 339: 5558 5615 setGuildPermissions(inv->getUnsignedIntParameter()); 5559 5616 break; 5560 case 3 38:5617 case 340: 5561 5618 resp->insertInt(getGuildPermissions()); 5562 5619 break; 5563 case 3 39:5620 case 341: 5564 5621 resp->insertBoolean(setGuildPermissionsBit(inv->getUnsignedIntParameter(), inv->getBooleanParameter())); 5565 5622 break; 5566 case 34 0:5623 case 342: 5567 5624 toggleGuildPermissionsBit(inv->getUnsignedIntParameter()); 5568 5625 break; 5569 case 34 1:5626 case 343: 5570 5627 resp->insertBoolean(clearGuildPermissionsBit(inv->getUnsignedIntParameter(), inv->getBooleanParameter())); 5571 5628 break; 5572 case 34 2:5629 case 344: 5573 5630 resp->insertSignedInt(getFactionPoints(inv->getAsciiParameter(_param0_getFactionPoints__string_))); 5574 5631 break; 5575 case 34 3:5632 case 345: 5576 5633 addFactionPoints(inv->getAsciiParameter(_param0_addFactionPoints__string_int_), inv->getUnsignedIntParameter()); 5577 5634 break; 5578 case 34 4:5635 case 346: 5579 5636 subtractFactionPoints(inv->getAsciiParameter(_param0_subtractFactionPoints__string_int_), inv->getUnsignedIntParameter()); 5580 5637 break; 5581 case 34 5:5638 case 347: 5582 5639 resp->insertSignedInt(getFactionStatus()); 5583 5640 break; 5584 case 34 6:5641 case 348: 5585 5642 setFactionStatus(inv->getSignedIntParameter()); 5586 5643 break; 5587 case 34 7:5644 case 349: 5588 5645 resp->insertLong(getFactionList()->_getObjectID()); 5589 5646 break; 5590 case 3 48:5647 case 350: 5591 5648 resp->insertInt(getMaxFactionPoints(inv->getAsciiParameter(_param0_getMaxFactionPoints__string_))); 5592 5649 break; 5593 case 3 49:5650 case 351: 5594 5651 delFactionPoints((Player*) inv->getObjectParameter(), inv->getUnsignedIntParameter()); 5595 5652 break; 5596 case 35 0:5653 case 352: 5597 5654 addSuiBoxChoice(inv->getAsciiParameter(_param0_addSuiBoxChoice__string_)); 5598 5655 break; 5599 case 35 1:5656 case 353: 5600 5657 removeLastSuiBoxChoice(); 5601 5658 break; 5602 case 35 2:5659 case 354: 5603 5660 setSuiBoxChoices((SuiListBoxVector*) inv->getObjectParameter()); 5604 5661 break; 5605 case 35 3:5662 case 355: 5606 5663 resp->insertLong(getSuiBoxChoices()->_getObjectID()); 5607 5664 break; 5608 case 35 4:5665 case 356: 5609 5666 clearSuiBoxChoices(); 5610 5667 break; 5611 case 35 5:5668 case 357: 5612 5669 setResourceDeedID(inv->getUnsignedLongParameter()); 5613 5670 break; 5614 case 35 6:5671 case 358: 5615 5672 resp->insertLong(getResourceDeedID()); 5673 break; 5674 case 359: 5675 setImagedesignXpGiven(inv->getBooleanParameter()); 5676 break; 5677 case 360: 5678 resp->insertBoolean(getImagedesignXpGiven()); 5616 5679 break; 5617 5680 default: … … 6902 6965 } 6903 6966 6967 void PlayerAdapter::addEntertainerFlourishXp(int xp) { 6968 return ((PlayerImplementation*) impl)->addEntertainerFlourishXp(xp); 6969 } 6970 6971 void PlayerAdapter::addEntertainerHealingXp(int xp) { 6972 return ((PlayerImplementation*) impl)->addEntertainerHealingXp(xp); 6973 } 6974 6904 6975 void PlayerAdapter::setLastNpcConvStr(const string& conv) { 6905 6976 return ((PlayerImplementation*) impl)->setLastNpcConvStr(conv); … … 7024 7095 unsigned long long PlayerAdapter::getResourceDeedID() { 7025 7096 return ((PlayerImplementation*) impl)->getResourceDeedID(); 7097 } 7098 7099 void PlayerAdapter::setImagedesignXpGiven(bool given) { 7100 return ((PlayerImplementation*) impl)->setImagedesignXpGiven(given); 7101 } 7102 7103 bool PlayerAdapter::getImagedesignXpGiven() { 7104 return ((PlayerImplementation*) impl)->getImagedesignXpGiven(); 7026 7105 } 7027 7106 core3/branches/CombatTest/src/server/zone/objects/player/Player.h
r916 r918 708 708 void clearEntertainerEvent(); 709 709 710 void addEntertainerFlourishXp(int xp); 711 712 void addEntertainerHealingXp(int xp); 713 710 714 void setLastNpcConvStr(const string& conv); 711 715 … … 769 773 770 774 unsigned long long getResourceDeedID(); 775 776 void setImagedesignXpGiven(bool given); 777 778 bool getImagedesignXpGiven(); 771 779 772 780 protected: … … 1443 1451 void clearEntertainerEvent(); 1444 1452 1453 void addEntertainerFlourishXp(int xp); 1454 1455 void addEntertainerHealingXp(int xp); 1456 1445 1457 void setLastNpcConvStr(const string& conv); 1446 1458 … … 1504 1516 1505 1517 unsigned long long getResourceDeedID(); 1518 1519 void setImagedesignXpGiven(bool given); 1520 1521 bool getImagedesignXpGiven(); 1506 1522 1507 1523 protected: core3/branches/CombatTest/src/server/zone/objects/player/Player.idl
r916 r918 598 598 void setEntertainerEvent(); 599 599 void clearEntertainerEvent(); 600 void addEntertainerFlourishXp(int xp); 601 void addEntertainerHealingXp(int xp); 600 602 601 603 void setLastNpcConvStr(const string conv); … … 648 650 649 651 unsigned long getResourceDeedID(); 652 653 void setImagedesignXpGiven(boolean given); 654 boolean getImagedesignXpGiven(); 650 655 651 656 } core3/branches/CombatTest/src/server/zone/objects/player/PlayerImplementation.cpp
r908 r918 106 106 107 107 setHeight(1.0f); 108 imagedesignXpGiven = false; 108 109 } 109 110 110 111 PlayerImplementation::PlayerImplementation(uint64 cid) : PlayerServant(baseID = cid << 32) { 111 112 characterID = cid; 113 imagedesignXpGiven = false; 112 114 } 113 115 … … 4086 4088 //server->addEvent(entertainerEvent, (uint64) performance->getLoopDuration() * 1000); 4087 4089 server->addEvent(entertainerEvent, 10000); 4090 } 4091 4092 void PlayerImplementation::addEntertainerFlourishXp(int xp) { 4093 EntertainerEvent* entEvent = (EntertainerEvent*)entertainerEvent; 4094 4095 entEvent->addFlourishXp(xp); 4096 } 4097 4098 void PlayerImplementation::addEntertainerHealingXp(int xp) { 4099 EntertainerEvent* entEvent = (EntertainerEvent*)entertainerEvent; 4100 4101 entEvent->addHealingXp(xp); 4088 4102 } 4089 4103 core3/branches/CombatTest/src/server/zone/objects/player/PlayerImplementation.h
r916 r918 264 264 265 265 uint16 characterMask; 266 267 bool imagedesignXpGiven; 266 268 267 269 public: … … 1587 1589 // Entertainer tick 1588 1590 void setEntertainerEvent(); 1591 void addEntertainerFlourishXp(int xp); 1592 void addEntertainerHealingXp(int xp); 1589 1593 1590 1594 //NPC Conversation Methods … … 1655 1659 1656 1660 void delFactionPoints(Player * player, uint32 amount); 1661 1662 inline void setImagedesignXpGiven(bool given) { 1663 imagedesignXpGiven = given; 1664 } 1665 1666 inline bool getImagedesignXpGiven() { 1667 return imagedesignXpGiven; 1668 } 1657 1669 1658 1670 friend class PlayerManager; core3/branches/CombatTest/src/server/zone/objects/player/PlayerObjectImplementation.cpp
r916 r918 193 193 194 194 dplay8->startExperienceUpdate(1); 195 dplay8->addExperience(xpType, gained);195 dplay8->addExperience(xpType, xp); 196 196 dplay8->close(); 197 197 core3/branches/CombatTest/src/server/zone/objects/player/events/EntertainerEvent.h
r610 r918 50 50 class EntertainerEvent : public Event { 51 51 Player* player; 52 int flourishXp, healingXp; 53 int flourishCount; 52 54 53 55 public: 54 56 EntertainerEvent(Player* pl) : Event() { 55 57 player = pl; 58 59 flourishXp = 0; 60 healingXp = 0; 61 flourishCount = 0; 56 62 } 63 64 void addFlourishXp(int xp) { 65 if (flourishCount > 2) 66 return; 67 68 flourishXp += xp; 69 70 if (flourishXp > 2 * xp) 71 flourishXp = 2 * xp; 72 73 flourishCount++; 74 } 75 76 void addHealingXp(int xp) { 77 healingXp += xp; 78 } 57 79 58 80 bool activate() { … … 88 110 // Tick Action 89 111 player->doPerformanceAction(); 112 113 if (flourishXp > 0) { 114 string xptype; 115 if (player->isDancing()) 116 xptype = "dance"; 117 else if (player->isPlayingMusic()) 118 xptype = "music"; 119 120 player->addXp(xptype, flourishXp, true); 121 flourishXp--; 122 } 123 124 if (healingXp > 0) { 125 string healxptype("entertainer_healing"); 126 player->addXp(healxptype, healingXp, true); 127 128 healingXp = 0; 129 } 90 130 91 131 player->setEntertainerEvent(); // Renew tick core3/branches/CombatTest/src/server/zone/packets/object/ObjectControllerMessage.cpp
r888 r918 1416 1416 1417 1417 void ObjectControllerMessage::parseImageDesignChange(Player* player, Message* pack, ZoneProcessServerImplementation* serv) { 1418 int xpval = 0; 1419 1418 1420 try { 1419 1421 /*player->sendSystemMessage("Image Designer Update"); … … 1560 1562 customization->updateCustomization(attr, val); 1561 1563 } 1564 1565 if (xpval < 300) 1566 xpval = 300; 1562 1567 } 1563 1568 … … 1588 1593 customization->updateCustomization(attr, val); 1589 1594 } 1590 } 1595 1596 if (xpval < 100) 1597 xpval = 100; 1598 } 1591 1599 1592 1600 if (target_object != NULL && player != target_object) … … 1640 1648 1641 1649 } 1650 1651 if (xpval < 100) 1652 xpval = 100; 1642 1653 } 1643 1654 … … 1675 1686 if(playerManager != NULL) 1676 1687 playerManager->updatePlayerBaseHAMToDatabase(player); 1688 1689 xpval = 2000; 1690 } 1691 1692 // Add Experience 1693 string xptype("imagedesigner"); 1694 if(designer == target) { 1695 if (!player->getImagedesignXpGiven()) { 1696 xpval /= 2; 1697 player->addXp(xptype, xpval, true); 1698 player->setImagedesignXpGiven(true); 1699 } else 1700 player->setImagedesignXpGiven(false); 1701 } else if(player->getObjectID() == target) { 1702 if (designer_object->isPlayer()) { 1703 Player* designer_player = (Player*)designer_object; 1704 designer_player->addXp(xptype, xpval, true); 1705 } 1677 1706 } 1678 1707