1
Serverside Modding / [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..
In "Unit.cpp" under the "void Unit::Update(uint32 p_time)" function:
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
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..
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