Warrior Berserk bonus
i noticed that warriors do not recieve the +10 Strength bonus when going into berserk frenzy (when going below 30% health).
i'm not sure if this would be considered a "invisible buff" (one that doesnt have generate a effect icon) or if it would be some form of temporary stat modification. on Live, going berserk would give the warrior +10 strength, which would disappear when they were healed back to 30% or more health. == sfisque |
this should fix it:
in bool Client::Process() // client_process.cpp change Code:
if (GetClass() == WARRIOR || GetClass() == BERSERKER) { to this: Code:
if (GetClass() == WARRIOR || GetClass() == BERSERKER) { sint16 Client::CalcSTR() // client_mods.cpp change: Code:
sint16 val = m_pp.STR + itembonuses.STR + spellbonuses.STR; Code:
sint16 val = m_pp.STR + itembonuses.STR + spellbonuses.STR; == sfisque |
Moved to a better place :)
|
this isnt done, though. i'm investigating on getting the server to update the client. when my warrior goes berserk, his strength isnt updated in the client. so, more code snippets OTW when i find out how to do that.
== sfisque |
I know this really lies with the dev team and is more of a general commit.
In concern to magic numbers / strings embedded in the code. using the example below: Quote:
Defiantly not a dig at sfisque at all.! (so don’t take it at that!) Its great work sfisque has helped and developed the code for this. Just my 2cp :) - froglok |
I did some gooling, because of this thread and of course my own interests being a software dev by carer.
Its a lot of content, but this article on Wikipedia can explain things like using "magic numbers and strings" a hell of a lot better than i can, plus provides explains and documentation to fit. Really good read if you’re looking at getting into Software Development either has a hobbyist and/or professional URL: http://en.wikipedia.org/wiki/Anti-pattern URL About Magic Numbers: http://en.wikipedia.org/wiki/Magic_n...rical_Constant - froglok |
yah, i should have used a constant for that. as for using a configurable parameter, maybe. its always been 30% on Live since day zero, so i dont foresee it changing.
also, in my defense, the if line was cut and pasted from elsewhere in the code base :P now, back to figuring out how to update the client so they see the modified strength value. == sfisque ps: this made me chuckle Quote:
|
Hmm an C++ IDE which doesnt suck? hmm That would be good!
- froglok |
I'll examine this code for possible integration into the server code sometime after the weekend.
|
sfisque,
Have you added any more code to complete this enhancement? Quote:
|
All times are GMT -4. The time now is 12:05 PM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.