Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: thesixth on August 04, 2014, 10:08:45 am

Title: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
Post by: thesixth 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
Title: Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
Post by: Kaev 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.
Title: Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
Post by: Steff on August 05, 2014, 07:35:20 am
Hey.  Nice to see you again around.  And kaev is right.  Use trinity.
Title: Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
Post by: thesixth 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
Title: Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
Post by: Steff 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.
Title: Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
Post by: thesixth 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.
Title: Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
Post by: phantomx 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
Title: Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
Post by: Kaev 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. :)
Title: Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
Post by: thesixth 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 (https://github.com/msysgit/msysgit/blob/Git-1.7.9-preview20120201/cmd/git.cmd" onclick="window.open(this.href);return false;) which was scrapped for a 'git.exe' wrapper  https://github.com/msysgit/msysgit/blob ... -wrapper.c (https://github.com/msysgit/msysgit/blob/master/src/git-wrapper/git-wrapper.c" onclick="window.open(this.href);return false;) 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 (http://collab.kpsn.org/display/tc/TrinityCore+Home" onclick="window.open(this.href);return false;) 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 (https://sourceware.org/pthreads-win32/#download" onclick="window.open(this.href);return false;) 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...
Title: Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
Post by: thesixth 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
Title: Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
Post by: Kaev 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
Title: Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
Post by: Ascathos 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:.
Title: Re: [QUESTION]  Rage Degeneration & Combopoints (How to do?)
Post by: Temptation_Town 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 (http://modcraft.io/viewtopic.php?f=60&t=2037&hilit=combo+points" onclick="window.open(this.href);return false;)

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.