This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [QUESTION]  Rage Degeneration & Combopoints (How to do?)  (Read 2371 times)

thesixth

  • Registred Member
  • Race Changer
  • *****
  • Posts: 36
    • View Profile
[QUESTION]  Rage Degeneration & Combopoints (How to do?)
« on: August 04, 2014, 10:08:45 am »
I'm experimenting with a custom wotlk 3.3.5a server based on the, at the time, latest version of ArcEmu.
The idea so far is to have a character with both Mana, Energy and Rage.
Mana and energy regenerates flawlessly. Rage Generates aswell. (The extra powerbars you can see on the attatched picture, is a modification of the Druid shapeshift extra bars, and they also work perfectly.)

So, I have two questions to anybody experienced with the ArcEmu source or likewise:

1. How do I get rage to degenerate?
 Here's my current code on Rage degeneration, and I can't see anything wrong with it. Perhaps a fresh set of eyes could spot flaws in my poor programming skills.. ;D

In "Unit.cpp" under the "void Unit::Update(uint32 p_time)" function:
 
Code: [Select]
if(p_time >= m_R_degenTimer)
TO< Player* >(this)->DegenerateRage();
else
m_R_degenTimer -= static_cast<uint16>(p_time);
In "Player.cpp"
 
Code: [Select]
void Player::DegenerateRage()
// Handles the Rage Degeneration and sends info further on to LooseRage.
{
if(!isAlive()) // Don't do anything if the player is dead
return; // just skip it all.

m_R_degenTimer = 1500; // Set the Rage Degen Timer just in case.
if(!CombatStatus.IsInCombat())
{
if(HasAura(12296))
LooseRage(20);
else
LooseRage(30);
}
else
{
if(HasAura(12296))
{
m_R_degenTimer = 1500;
TO< Player* >(this)->LooseRage(-10);
}
}
}
void Player::LooseRage(uint32 decayValue)
// Further handles the Degeneration of Rage.
{
uint32 cur = GetPower(POWER_TYPE_RAGE);
uint32 newrage = ((int)cur <= decayValue) ? 0 : cur - decayValue;
if( cur <= decayValue )
newrage = 0;
else
newrage = cur - decayValue;
if(newrage > 1000)
newrage = 1000;
SetPower(POWER_TYPE_RAGE, newrage);
}


2. How do I enable combopoints for classes other than Rogue and Druid?
I have no idea where this code is located... -.-

Anybody has any ideas?
Thanks, cheers! =D
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
0===];;;;;;;;::::> [size=50] I am a swedish. Please execute me, my english is no very, very good.[/size]

Kaev

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 308
    • View Profile
Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
« Reply #1 on: August 04, 2014, 02:08:40 pm »
Can't answer you, because i haven't done C++ things in ArcEmu for a long time, but why do you still use ArcEmu?
Project is dead and buggy as hell.
I suggest you to use TrinityCore.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Steff

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 4551
    • View Profile
Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
« Reply #2 on: August 05, 2014, 07:35:20 am »
Hey.  Nice to see you again around.  And kaev is right.  Use trinity.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Please mark as solved if solved.
Don't ask if you could ask a question... JUST ask the Question.
You can send me also offline messages. I will answer if I get online.
Skype: project.modcraft
Discord: steff#6954

thesixth

  • Registred Member
  • Race Changer
  • *****
  • Posts: 36
    • View Profile
Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
« Reply #3 on: August 05, 2014, 03:14:29 pm »
Thanks for the advice!
Well, I had some old ArcEmu sourcecodes laying about on the harddrive along with some pseudocode ideas and I just went from there. TrinityCore eh? Been a while, I guess.
Anyway, feels great to be back here =D

I'm eager to check Trinity out.

Uhm.. perhaps a bit silly and off-topic question, but.. Does Trinity really assume I run everything installed on my C: Drive? Because I have a tiny 64gb ssd drive with little to no free disc space so I'd rather not install anything more there.
I mean, am I really supposed to point towards Git and Boost via the 'FindGit.cmake' and 'FindBoost.cmake' files in the 'TrinityCore/cmake/macros'-folder before CMake can configure and generate?
I had no luck in pointing the environmental variables in the system settings to my BOOST_ROOT, it was pretty much ignored, and then I found that the 'findboost.cmake' seemed to look for boost in 'c:boost'.
So far I've pointed out my Boost directory and it seems to work, but I'm loosing my hair over the Git executables cause it's no laid out in a similar fashion...
I've never had to do this any time previously with CMake and I can't really find any info that makes sense to me.  :S
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
0===];;;;;;;;::::> [size=50] I am a swedish. Please execute me, my english is no very, very good.[/size]

Steff

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 4551
    • View Profile
Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
« Reply #4 on: August 05, 2014, 05:21:42 pm »
No i have all on d.but as we have a own fork i dont knownwhat they perhaps changed.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Please mark as solved if solved.
Don't ask if you could ask a question... JUST ask the Question.
You can send me also offline messages. I will answer if I get online.
Skype: project.modcraft
Discord: steff#6954

thesixth

  • Registred Member
  • Race Changer
  • *****
  • Posts: 36
    • View Profile
Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
« Reply #5 on: August 05, 2014, 05:31:35 pm »
Hmm.. strange... I'll check back later with a possible sollution, assuming I can find a way around it.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
0===];;;;;;;;::::> [size=50] I am a swedish. Please execute me, my english is no very, very good.[/size]

phantomx

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 615
    • View Profile
Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
« Reply #6 on: August 06, 2014, 04:56:47 am »
Check this is out and follow it step by step and all should work out fine.

http://collab.kpsn.org/display/tc/TrinityCore+Home
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
[wimg]http://i.imgur.com/6fxUQL1.gif[/wimg]

Kaev

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 308
    • View Profile
Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
« Reply #7 on: August 06, 2014, 07:36:50 am »
As far as i know it's only important that boost is installed in the standard path (C:/boost/ or something like that).
Everything else can be installed on your HDD. :)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

thesixth

  • Registred Member
  • Race Changer
  • *****
  • Posts: 36
    • View Profile
Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
« Reply #8 on: August 06, 2014, 10:35:22 am »
I do realize I'm taking this discussion way off-topic here, and I'm very sorry for that.

Kaev, I can attach a screenshot showing you how to deal with the boost installation path.
While doing so, I can point out that the same method didn't seem to apply to Git.

First off, the 'Findgit.cmake' file seems to look for a Git-version of 1.7 (or newer), which is nolonger avaliable.
It also looks for a file called 'git.cmd' https://github.com/msysgit/msysgit/blob ... md/git.cmd which was scrapped for a 'git.exe' wrapper  https://github.com/msysgit/msysgit/blob ... -wrapper.c in 1.8+ versions, which are, unfortunately, the only ones avaliable for download right now. Otherwise I could exclude that from my troubleshooting aswell.
Ofc, the wrapper 'git.exe' isn't to be misstaken by the actual 'git.exe' since the wrapper is located in "git/cmd/" while the other one in "git/bin".

But anyway, topping that off, the 'CMakeError.log' tells me:
Code: [Select]
 CheckIncludeFiles.c

CheckIncludeFiles.c(2): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory
Which is very weird since POSSIX-threads is a Unix library if I'm not misstaken.
I certainly didn't have that header on my pc and I don't remember seeing anything of the sort among the requirements on http://collab.kpsn.org/display/tc/TrinityCore+Home either (Thanks phantomx, I've read thrugh everything there already as I always do my homework on beforehand. But indeed, it's good to recommend others to do so aswell.).
I got the pthread from https://sourceware.org/pthreads-win32/#download but... at this time I think I've tried just about everything...

EDIT: Wait, Pthreads is a part of OpenSSL and I have that. I just have to figure out a way to get it working.

I'm not all that familiar with programming since I'm, more or less, the guy who does the paintjob...
I could quite possibly be an idiot because I am pretty much at loss here. I have no sollutions for this...
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
0===];;;;;;;;::::> [size=50] I am a swedish. Please execute me, my english is no very, very good.[/size]

thesixth

  • Registred Member
  • Race Changer
  • *****
  • Posts: 36
    • View Profile
Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
« Reply #9 on: August 06, 2014, 11:21:57 am »
Igonre my last post, I've reinstalled and cramped everything I could on my poor little C: Drive and it seems to be ok for now. ;D
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
0===];;;;;;;;::::> [size=50] I am a swedish. Please execute me, my english is no very, very good.[/size]

Kaev

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 308
    • View Profile
Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
« Reply #10 on: August 07, 2014, 11:59:36 am »
I haven't installed the newest version of TC atm (haven't done this since boost, need to do this soon), but i think you made a small thing wrong somewhere. I don't believe that everything has to be on C:, but maybe they changed something.
When i'm at home, i try to reproduce your error. Maybe there is a solution for this, you can install important stuff on C: then :P
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
« Reply #11 on: August 08, 2014, 05:42:36 pm »
By setting BOOST_PATH environment variable e.g. to D:, you do not have to fill up your C:.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Temptation_Town

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 64
    • View Profile
Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
« Reply #12 on: August 11, 2014, 02:16:14 am »
1. In TC rage degenerates fine.

Idk what wrong with your core but if I had that problem in my self-made core, I'd make a script for clearing rage, or settin to 0 when not in combat.

2. As I see in my core Combo points dont require Rogue or Druid class.

Then I watch here viewtopic.php?f=60&t=2037&hilit=combo+points

So, combo points should work from any spell that have SPELL_EFFECT_ADD_COMBO_POINT and right attributes. You can add it to any spell and that will work. But only serverside. Client will not display them until you fix this. Idk how, maybe some lua stuff or addon dev kits. Btw, how you made these extra power bars? Can you share this?

3. Yea, TC core installation is terrible. All these weird requirements ( last VS, and now this BOOST ). Nah.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »