Jump to content

[help] Add honor points on arena


Recommended Posts

Posted

Hi all!

Plz help me, the player after a match on arena should receive honor points. I tried to do so:

BattleGround.cpp -> EndBattleGround()

       if (team == winner)
       {
           RewardMark(plr,ITEM_WINNER_COUNT);
           RewardQuestComplete(plr);
           [b]plr->RewardHonor(NULL,1,75);[/b]
       }
       else
           RewardMark(plr,ITEM_LOSER_COUNT);
           [b]plr->RewardHonor(NULL,1,30);[/b]

75 - win

30 - lose

but it doesn't work. How correctly to make?

Thanks!

P.S. sorry for my english :(

Posted

Thanks! I used

       if (team == winner)
       {
           RewardMark(plr,ITEM_WINNER_COUNT);
           RewardQuestComplete(plr);
           [b]plr->ModifiyHonorPoints(75);[/b]
       }
       else
           RewardMark(plr,ITEM_LOSER_COUNT);
           [b]plr->ModifiyHonorPoints(30);[/b]

All works.

But, for a victory give 105.

ModifyHonorPoints() to 75 adds 30 :confused:

Posted

That's because

plr->ModifiyHonorPoints(30);

is being executed AFTER the if/else statement, not as part of it. Change it to

        if (team == winner)
       {
           RewardMark(plr,ITEM_WINNER_COUNT);
           RewardQuestComplete(plr);
           plr->ModifiyHonorPoints(75);
       }
       else
       {
           RewardMark(plr,ITEM_LOSER_COUNT);
           plr->ModifiyHonorPoints(30);
       }

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use