Assembla home | Assembla project page
 

Changeset 918

Show
Ignore:
Timestamp:
11/10/08 04:57:38 (8 months ago)
Author:
dannuic
Message:

*This is a CombatTest? update*
[added] entertainer xp types
[fixed] proper xp client updates

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • core3/branches/CombatTest/src/server/zone/objects/creature/CreatureObjectImplementation.cpp

    r889 r918  
    37373737                        addEntertainerFlourishBuff(); 
    37383738                } 
     3739                 
     3740                // Grant Experience 
     3741                if (isPlayer()) { 
     3742                        Player* player = (Player*)_this; 
     3743                         
     3744                        player->addEntertainerFlourishXp(performance->getBaseXp() + performance->getFlourishXpMod()); 
     3745                } 
    37393746 
    37403747                sendSystemMessage("performance", "flourish_perform"); 
     
    38143821        info("CreatureObjectImplementation::doEntertainerPatronEffects() begin"); 
    38153822        ManagedSortedVector<CreatureObject>* patrons = NULL; 
     3823        int healingXp = 0; 
    38163824 
    38173825        //cout << "CreatureObjectImplementation::doEntertainerPatronEffects()" << endl; 
     
    38533861                changeFocusWoundsBar(woundHeal, false); 
    38543862                changeWillpowerWoundsBar(woundHeal, false); 
    3855         } 
    3856  
    3857         if (healShock) 
     3863                 
     3864                healingXp += -1 * woundHeal; 
     3865        } 
     3866 
     3867        if (healShock) { 
    38583868                changeShockWounds(shockHeal); 
     3869                healingXp += -1 * shockHeal; 
     3870        } 
    38593871 
    38603872 
     
    38853897                                                obj->changeFocusWoundsBar(woundHeal, false); 
    38863898                                                obj->changeWillpowerWoundsBar(woundHeal, false); 
     3899                                                 
     3900                                                healingXp += -1 * woundHeal; 
    38873901                                        } 
    38883902 
    3889                                         if (healShock) 
     3903                                        if (healShock) { 
    38903904                                                obj->changeShockWounds(shockHeal); 
     3905                                                 
     3906                                                healingXp += -1 * woundHeal; 
     3907                                        } 
    38913908 
    38923909                                        // Handle Passive Buff 
     
    39233940        } /*else 
    39243941                cout << "no patrons";*/ 
     3942                 
     3943        // Add Experience 
     3944        if (healingXp > 0 && isPlayer()) { 
     3945                Player* player = (Player*)_this; 
     3946                 
     3947                player->addEntertainerHealingXp(healingXp); 
     3948        } 
    39253949 
    39263950        info("CreatureObjectImplementation::doEntertainerPatronEffects() end"); 
  • core3/branches/CombatTest/src/server/zone/objects/player/Player.cpp

    r916 r918  
    41524152} 
    41534153 
     4154void 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 
     4167void 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 
    41544180void Player::setLastNpcConvStr(const string& conv) { 
    41554181        if (_impl == NULL) { 
     
    41574183                        throw ObjectNotDeployedException(this); 
    41584184 
    4159                 DistributedMethod method(this, 326); 
     4185                DistributedMethod method(this, 328); 
    41604186                method.addAsciiParameter(conv); 
    41614187 
     
    41704196                        throw ObjectNotDeployedException(this); 
    41714197 
    4172                 DistributedMethod method(this, 327); 
     4198                DistributedMethod method(this, 329); 
    41734199                method.addAsciiParameter(mess); 
    41744200 
     
    41834209                        throw ObjectNotDeployedException(this); 
    41844210 
    4185                 DistributedMethod method(this, 328); 
     4211                DistributedMethod method(this, 330); 
    41864212 
    41874213                method.executeWithAsciiReturn(_return_getLastNpcConvStr); 
     
    41964222                        throw ObjectNotDeployedException(this); 
    41974223 
    4198                 DistributedMethod method(this, 329); 
     4224                DistributedMethod method(this, 331); 
    41994225 
    42004226                method.executeWithAsciiReturn(_return_getLastNpcConvMessStr); 
     
    42094235                        throw ObjectNotDeployedException(this); 
    42104236 
    4211                 DistributedMethod method(this, 330); 
     4237                DistributedMethod method(this, 332); 
    42124238                method.addSignedIntParameter(idx); 
    42134239 
     
    42234249                        throw ObjectNotDeployedException(this); 
    42244250 
    4225                 DistributedMethod method(this, 331); 
     4251                DistributedMethod method(this, 333); 
    42264252                method.addAsciiParameter(option); 
    42274253 
     
    42364262                        throw ObjectNotDeployedException(this); 
    42374263 
    4238                 DistributedMethod method(this, 332); 
     4264                DistributedMethod method(this, 334); 
    42394265 
    42404266                method.executeWithVoidReturn(); 
     
    42484274                        throw ObjectNotDeployedException(this); 
    42494275 
    4250                 DistributedMethod method(this, 333); 
     4276                DistributedMethod method(this, 335); 
    42514277 
    42524278                return method.executeWithSignedIntReturn(); 
     
    42604286                        throw ObjectNotDeployedException(this); 
    42614287 
    4262                 DistributedMethod method(this, 334); 
     4288                DistributedMethod method(this, 336); 
    42634289                method.addAsciiParameter(message); 
    42644290 
     
    42734299                        throw ObjectNotDeployedException(this); 
    42744300 
    4275                 DistributedMethod method(this, 335); 
     4301                DistributedMethod method(this, 337); 
    42764302                method.addBooleanParameter(guildLeader); 
    42774303 
     
    42864312                        throw ObjectNotDeployedException(this); 
    42874313 
    4288                 DistributedMethod method(this, 336); 
     4314                DistributedMethod method(this, 338); 
    42894315 
    42904316                method.executeWithVoidReturn(); 
     
    42944320 
    42954321void 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         } else 
    4305                 ((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         } else 
    4317                 return ((PlayerImplementation*) _impl)->getGuildPermissions(); 
    4318 } 
    4319  
    4320 bool Player::setGuildPermissionsBit(unsigned int bit, bool updateClient) { 
    43214322        if (_impl == NULL) { 
    43224323                if (!deployed) 
     
    43254326                DistributedMethod method(this, 339); 
    43264327                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 
     4334unsigned int Player::getGuildPermissions() { 
    43354335        if (_impl == NULL) { 
    43364336                if (!deployed) 
     
    43384338 
    43394339                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 
     4346bool Player::setGuildPermissionsBit(unsigned int bit, bool updateClient) { 
    43484347        if (_impl == NULL) { 
    43494348                if (!deployed) 
     
    43564355                return method.executeWithBooleanReturn(); 
    43574356        } else 
     4357                return ((PlayerImplementation*) _impl)->setGuildPermissionsBit(bit, updateClient); 
     4358} 
     4359 
     4360void 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 
     4373bool 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 
    43584384                return ((PlayerImplementation*) _impl)->clearGuildPermissionsBit(bit, updateClient); 
    43594385} 
     
    43644390                        throw ObjectNotDeployedException(this); 
    43654391 
    4366                 DistributedMethod method(this, 342); 
     4392                DistributedMethod method(this, 344); 
    43674393                method.addAsciiParameter(faction); 
    43684394 
     
    43774403                        throw ObjectNotDeployedException(this); 
    43784404 
    4379                 DistributedMethod method(this, 343); 
     4405                DistributedMethod method(this, 345); 
    43804406                method.addAsciiParameter(faction); 
    43814407                method.addUnsignedIntParameter(points); 
     
    43914417                        throw ObjectNotDeployedException(this); 
    43924418 
    4393                 DistributedMethod method(this, 344); 
     4419                DistributedMethod method(this, 346); 
    43944420                method.addAsciiParameter(faction); 
    43954421                method.addUnsignedIntParameter(points); 
     
    44054431                        throw ObjectNotDeployedException(this); 
    44064432 
    4407                 DistributedMethod method(this, 345); 
     4433                DistributedMethod method(this, 347); 
    44084434 
    44094435                return method.executeWithSignedIntReturn(); 
     
    44174443                        throw ObjectNotDeployedException(this); 
    44184444 
    4419                 DistributedMethod method(this, 346); 
     4445                DistributedMethod method(this, 348); 
    44204446                method.addSignedIntParameter(status); 
    44214447 
     
    44304456                        throw ObjectNotDeployedException(this); 
    44314457 
    4432                 DistributedMethod method(this, 347); 
     4458                DistributedMethod method(this, 349); 
    44334459 
    44344460                return (FactionPointList*) method.executeWithObjectReturn(); 
     
    44424468                        throw ObjectNotDeployedException(this); 
    44434469 
    4444                 DistributedMethod method(this, 348); 
     4470                DistributedMethod method(this, 350); 
    44454471                method.addAsciiParameter(faction); 
    44464472 
     
    44554481                        throw ObjectNotDeployedException(this); 
    44564482 
    4457                 DistributedMethod method(this, 349); 
     4483                DistributedMethod method(this, 351); 
    44584484                method.addObjectParameter(player); 
    44594485                method.addUnsignedIntParameter(amount); 
     
    44694495                        throw ObjectNotDeployedException(this); 
    44704496 
    4471                 DistributedMethod method(this, 350); 
     4497                DistributedMethod method(this, 352); 
    44724498                method.addAsciiParameter(choice); 
    44734499 
     
    44824508                        throw ObjectNotDeployedException(this); 
    44834509 
    4484                 DistributedMethod method(this, 351); 
     4510                DistributedMethod method(this, 353); 
    44854511 
    44864512                method.executeWithVoidReturn(); 
     
    44944520                        throw ObjectNotDeployedException(this); 
    44954521 
    4496                 DistributedMethod method(this, 352); 
     4522                DistributedMethod method(this, 354); 
    44974523                method.addObjectParameter(choicesList); 
    44984524 
     
    45074533                        throw ObjectNotDeployedException(this); 
    45084534 
    4509                 DistributedMethod method(this, 353); 
     4535                DistributedMethod method(this, 355); 
    45104536 
    45114537                return (SuiListBoxVector*) method.executeWithObjectReturn(); 
     
    45194545                        throw ObjectNotDeployedException(this); 
    45204546 
    4521                 DistributedMethod method(this, 354); 
     4547                DistributedMethod method(this, 356); 
    45224548 
    45234549                method.executeWithVoidReturn(); 
     
    45314557                        throw ObjectNotDeployedException(this); 
    45324558 
    4533                 DistributedMethod method(this, 355); 
     4559                DistributedMethod method(this, 357); 
    45344560                method.addUnsignedLongParameter(objectID); 
    45354561 
     
    45444570                        throw ObjectNotDeployedException(this); 
    45454571 
    4546                 DistributedMethod method(this, 356); 
     4572                DistributedMethod method(this, 358); 
    45474573 
    45484574                return method.executeWithUnsignedLongReturn(); 
    45494575        } else 
    45504576                return ((PlayerImplementation*) _impl)->getResourceDeedID(); 
     4577} 
     4578 
     4579void 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 
     4592bool 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(); 
    45514602} 
    45524603 
     
    55235574                break; 
    55245575        case 326: 
     5576                addEntertainerFlourishXp(inv->getSignedIntParameter()); 
     5577                break; 
     5578        case 327: 
     5579                addEntertainerHealingXp(inv->getSignedIntParameter()); 
     5580                break; 
     5581        case 328: 
    55255582                setLastNpcConvStr(inv->getAsciiParameter(_param0_setLastNpcConvStr__string_)); 
    55265583                break; 
    5527         case 327
     5584        case 329
    55285585                setLastNpcConvMessStr(inv->getAsciiParameter(_param0_setLastNpcConvMessStr__string_)); 
    55295586                break; 
    5530         case 328
     5587        case 330
    55315588                resp->insertAscii(getLastNpcConvStr()); 
    55325589                break; 
    5533         case 329
     5590        case 331
    55345591                resp->insertAscii(getLastNpcConvMessStr()); 
    55355592                break; 
    5536         case 330
     5593        case 332
    55375594                resp->insertAscii(getLastNpcConvOption(inv->getSignedIntParameter())); 
    55385595                break; 
    5539         case 331
     5596        case 333
    55405597                addLastNpcConvOptions(inv->getAsciiParameter(_param0_addLastNpcConvOptions__string_)); 
    55415598                break; 
    5542         case 332
     5599        case 334
    55435600                clearLastNpcConvOptions(); 
    55445601                break; 
    5545         case 333
     5602        case 335
    55465603                resp->insertSignedInt(countLastNpcConvOptions()); 
    55475604                break; 
    5548         case 334
     5605        case 336
    55495606                setInputBoxReturnBuffer(inv->getAsciiParameter(_param0_setInputBoxReturnBuffer__string_)); 
    55505607                break; 
    5551         case 335
     5608        case 337
    55525609                setGuildLeader(inv->getBooleanParameter()); 
    55535610                break; 
    5554         case 336
     5611        case 338
    55555612                loadGuildChat(); 
    55565613                break; 
    5557         case 337
     5614        case 339
    55585615                setGuildPermissions(inv->getUnsignedIntParameter()); 
    55595616                break; 
    5560         case 338
     5617        case 340
    55615618                resp->insertInt(getGuildPermissions()); 
    55625619                break; 
    5563         case 339
     5620        case 341
    55645621                resp->insertBoolean(setGuildPermissionsBit(inv->getUnsignedIntParameter(), inv->getBooleanParameter())); 
    55655622                break; 
    5566         case 340
     5623        case 342
    55675624                toggleGuildPermissionsBit(inv->getUnsignedIntParameter()); 
    55685625                break; 
    5569         case 341
     5626        case 343
    55705627                resp->insertBoolean(clearGuildPermissionsBit(inv->getUnsignedIntParameter(), inv->getBooleanParameter())); 
    55715628                break; 
    5572         case 342
     5629        case 344
    55735630                resp->insertSignedInt(getFactionPoints(inv->getAsciiParameter(_param0_getFactionPoints__string_))); 
    55745631                break; 
    5575         case 343
     5632        case 345
    55765633                addFactionPoints(inv->getAsciiParameter(_param0_addFactionPoints__string_int_), inv->getUnsignedIntParameter()); 
    55775634                break; 
    5578         case 344
     5635        case 346
    55795636                subtractFactionPoints(inv->getAsciiParameter(_param0_subtractFactionPoints__string_int_), inv->getUnsignedIntParameter()); 
    55805637                break; 
    5581         case 345
     5638        case 347
    55825639                resp->insertSignedInt(getFactionStatus()); 
    55835640                break; 
    5584         case 346
     5641        case 348
    55855642                setFactionStatus(inv->getSignedIntParameter()); 
    55865643                break; 
    5587         case 347
     5644        case 349
    55885645                resp->insertLong(getFactionList()->_getObjectID()); 
    55895646                break; 
    5590         case 348
     5647        case 350
    55915648                resp->insertInt(getMaxFactionPoints(inv->getAsciiParameter(_param0_getMaxFactionPoints__string_))); 
    55925649                break; 
    5593         case 349
     5650        case 351
    55945651                delFactionPoints((Player*) inv->getObjectParameter(), inv->getUnsignedIntParameter()); 
    55955652                break; 
    5596         case 350
     5653        case 352
    55975654                addSuiBoxChoice(inv->getAsciiParameter(_param0_addSuiBoxChoice__string_)); 
    55985655                break; 
    5599         case 351
     5656        case 353
    56005657                removeLastSuiBoxChoice(); 
    56015658                break; 
    5602         case 352
     5659        case 354
    56035660                setSuiBoxChoices((SuiListBoxVector*) inv->getObjectParameter()); 
    56045661                break; 
    5605         case 353
     5662        case 355
    56065663                resp->insertLong(getSuiBoxChoices()->_getObjectID()); 
    56075664                break; 
    5608         case 354
     5665        case 356
    56095666                clearSuiBoxChoices(); 
    56105667                break; 
    5611         case 355
     5668        case 357
    56125669                setResourceDeedID(inv->getUnsignedLongParameter()); 
    56135670                break; 
    5614         case 356
     5671        case 358
    56155672                resp->insertLong(getResourceDeedID()); 
     5673                break; 
     5674        case 359: 
     5675                setImagedesignXpGiven(inv->getBooleanParameter()); 
     5676                break; 
     5677        case 360: 
     5678                resp->insertBoolean(getImagedesignXpGiven()); 
    56165679                break; 
    56175680        default: 
     
    69026965} 
    69036966 
     6967void PlayerAdapter::addEntertainerFlourishXp(int xp) { 
     6968        return ((PlayerImplementation*) impl)->addEntertainerFlourishXp(xp); 
     6969} 
     6970 
     6971void PlayerAdapter::addEntertainerHealingXp(int xp) { 
     6972        return ((PlayerImplementation*) impl)->addEntertainerHealingXp(xp); 
     6973} 
     6974 
    69046975void PlayerAdapter::setLastNpcConvStr(const string& conv) { 
    69056976        return ((PlayerImplementation*) impl)->setLastNpcConvStr(conv); 
     
    70247095unsigned long long PlayerAdapter::getResourceDeedID() { 
    70257096        return ((PlayerImplementation*) impl)->getResourceDeedID(); 
     7097} 
     7098 
     7099void PlayerAdapter::setImagedesignXpGiven(bool given) { 
     7100        return ((PlayerImplementation*) impl)->setImagedesignXpGiven(given); 
     7101} 
     7102 
     7103bool PlayerAdapter::getImagedesignXpGiven() { 
     7104        return ((PlayerImplementation*) impl)->getImagedesignXpGiven(); 
    70267105} 
    70277106 
  • core3/branches/CombatTest/src/server/zone/objects/player/Player.h

    r916 r918  
    708708        void clearEntertainerEvent(); 
    709709 
     710        void addEntertainerFlourishXp(int xp); 
     711 
     712        void addEntertainerHealingXp(int xp); 
     713 
    710714        void setLastNpcConvStr(const string& conv); 
    711715 
     
    769773 
    770774        unsigned long long getResourceDeedID(); 
     775 
     776        void setImagedesignXpGiven(bool given); 
     777 
     778        bool getImagedesignXpGiven(); 
    771779 
    772780protected: 
     
    14431451        void clearEntertainerEvent(); 
    14441452 
     1453        void addEntertainerFlourishXp(int xp); 
     1454 
     1455        void addEntertainerHealingXp(int xp); 
     1456 
    14451457        void setLastNpcConvStr(const string& conv); 
    14461458 
     
    15041516 
    15051517        unsigned long long getResourceDeedID(); 
     1518 
     1519        void setImagedesignXpGiven(bool given); 
     1520 
     1521        bool getImagedesignXpGiven(); 
    15061522 
    15071523protected: 
  • core3/branches/CombatTest/src/server/zone/objects/player/Player.idl

    r916 r918  
    598598        void setEntertainerEvent(); 
    599599        void clearEntertainerEvent(); 
     600        void addEntertainerFlourishXp(int xp); 
     601        void addEntertainerHealingXp(int xp); 
    600602 
    601603        void setLastNpcConvStr(const string conv); 
     
    648650         
    649651        unsigned long getResourceDeedID(); 
     652 
     653        void setImagedesignXpGiven(boolean given); 
     654        boolean getImagedesignXpGiven(); 
    650655         
    651656} 
  • core3/branches/CombatTest/src/server/zone/objects/player/PlayerImplementation.cpp

    r908 r918  
    106106 
    107107        setHeight(1.0f); 
     108        imagedesignXpGiven = false; 
    108109} 
    109110 
    110111PlayerImplementation::PlayerImplementation(uint64 cid) : PlayerServant(baseID = cid << 32) { 
    111112        characterID = cid; 
     113        imagedesignXpGiven = false; 
    112114} 
    113115 
     
    40864088        //server->addEvent(entertainerEvent, (uint64) performance->getLoopDuration() * 1000); 
    40874089        server->addEvent(entertainerEvent, 10000); 
     4090} 
     4091 
     4092void PlayerImplementation::addEntertainerFlourishXp(int xp) { 
     4093        EntertainerEvent* entEvent = (EntertainerEvent*)entertainerEvent; 
     4094         
     4095        entEvent->addFlourishXp(xp); 
     4096} 
     4097         
     4098void PlayerImplementation::addEntertainerHealingXp(int xp) { 
     4099        EntertainerEvent* entEvent = (EntertainerEvent*)entertainerEvent; 
     4100         
     4101        entEvent->addHealingXp(xp); 
    40884102} 
    40894103 
  • core3/branches/CombatTest/src/server/zone/objects/player/PlayerImplementation.h

    r916 r918  
    264264 
    265265        uint16 characterMask; 
     266         
     267        bool imagedesignXpGiven; 
    266268 
    267269public: 
     
    15871589        // Entertainer tick 
    15881590        void setEntertainerEvent(); 
     1591        void addEntertainerFlourishXp(int xp); 
     1592        void addEntertainerHealingXp(int xp); 
    15891593 
    15901594        //NPC Conversation Methods 
     
    16551659 
    16561660        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        } 
    16571669 
    16581670        friend class PlayerManager; 
  • core3/branches/CombatTest/src/server/zone/objects/player/PlayerObjectImplementation.cpp

    r916 r918  
    193193 
    194194                dplay8->startExperienceUpdate(1); 
    195                 dplay8->addExperience(xpType, gained); 
     195                dplay8->addExperience(xpType, xp); 
    196196                dplay8->close(); 
    197197 
  • core3/branches/CombatTest/src/server/zone/objects/player/events/EntertainerEvent.h

    r610 r918  
    5050class EntertainerEvent : public Event { 
    5151        Player* player; 
     52        int flourishXp, healingXp; 
     53        int flourishCount; 
    5254 
    5355public: 
    5456        EntertainerEvent(Player* pl) : Event() { 
    5557                player = pl; 
     58                 
     59                flourishXp = 0; 
     60                healingXp = 0; 
     61                flourishCount = 0; 
    5662        } 
     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        }        
    5779 
    5880        bool activate() { 
     
    88110                        // Tick Action 
    89111                        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                        } 
    90130 
    91131                        player->setEntertainerEvent(); // Renew tick 
  • core3/branches/CombatTest/src/server/zone/packets/object/ObjectControllerMessage.cpp

    r888 r918  
    14161416 
    14171417void ObjectControllerMessage::parseImageDesignChange(Player* player, Message* pack, ZoneProcessServerImplementation* serv) { 
     1418        int xpval = 0; 
     1419         
    14181420        try { 
    14191421                /*player->sendSystemMessage("Image Designer Update"); 
     
    15601562                                                customization->updateCustomization(attr, val); 
    15611563                                } 
     1564                                 
     1565                                if (xpval < 300) 
     1566                                        xpval = 300; 
    15621567                        } 
    15631568 
     
    15881593                                                customization->updateCustomization(attr, val); 
    15891594                                } 
    1590                         } 
     1595                                 
     1596                                if (xpval < 100) 
     1597                                        xpval = 100; 
     1598                        }        
    15911599 
    15921600                        if (target_object != NULL && player != target_object) 
     
    16401648 
    16411649                                } 
     1650                                 
     1651                                if (xpval < 100) 
     1652                                        xpval = 100; 
    16421653                        } 
    16431654 
     
    16751686                                if(playerManager != NULL) 
    16761687                                        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                                } 
    16771706                        } 
    16781707