[Archive] Adding a haste/parry/dodge/block cap to your core 3.3.5 trinitycore
[Archive] Adding a haste/parry/dodge/block cap to your core 3.3.5 trinitycore
Archived author: cliffsmits • Posted: 2025-11-04T18:04:49.107911
Original source
How to make a cap on the haste percentage ( spell haste ofc ) :
1. Open up Object.h
2. go to line 28.
3. You'll see :
Code:
#include "Map.h"
replace it with:
#include "Map.h"
#include "Unit.h"
4. then go to line 212.
5. You'll see :
Code:
void ApplyPercentModFloatValue(uint16 index, float val, bool apply)
{
float value = GetFloatValue(index);
ApplyPercentModFloatVar(value, val, apply);
SetFloatValue(index, value);
}
Edit it like I did :
Code:
void ApplyPercentModFloatValue(uint16 index, float val, bool apply)
{
float value = GetFloatValue(index);
ApplyPercentModFloatVar(value, val, apply);
if(apply && index == CR_HASTE_SPELL && value > /*the haste cap, 50 for example*/ 50)
value = 50;
SetFloatValue(index, value);
}
So, that little if makes the difference, let me explain how it works:
Code:
if(apply && index == CR_HASTE_SPELL && value > /*the haste cap, [COLOR="#FF0000"]50 [/COLOR]for example*/ [COLOR="#FF0000"]50[/COLOR])
value = 50;
Change the numbers in red to your desired haste cap, in percentages.
6. Recompile ( skip this if you want to add more caps).
How to make a cap on the parry percentage :
1. Open up Statsystem.cpp
2. Go to line 702.
3. You'll see :
Code:
SetStatFloatValue(PLAYER_PARRY_PERCENTAGE, value);
}
Replace it with :
Code:
if(value > 50)
value = 50;
SetStatFloatValue(PLAYER_PARRY_PERCENTAGE, value);
}
Again, change the red numbers to your desired parry cap.
4. Recompile ( skip this if you want to add more caps).
How to make a cap on the dodge percentage :
1. Open up Statsytem.cpp
2. Go to line : 738
3. You'll see:
Code:
SetStatFloatValue(PLAYER_DODGE_PERCENTAGE, value);
}
Replace with :
Code:
if(value > 50)
value = 50;
SetStatFloatValue(PLAYER_DODGE_PERCENTAGE, value);
}
Again, change the red numbers to your desired dodge cap.
4. Recompile ( skip this if you want to add more caps).
How to make a cap on the block percentage :
1. Open up Statsystem.cpp
2. go to line : 577
3. You'll see:
Code:
SetStatFloatValue(PLAYER_BLOCK_PERCENTAGE, value);
}
Replace it with :
Code:
if(value > 50)
value = 50;
SetStatFloatValue(PLAYER_BLOCK_PERCENTAGE, value);
}
Again, change the red numbers to your desired block ( percentage ) cap.
4. Recompile ( Now you will NEED to since this is the last cap).
i didnt had time to test the haste
The parry/dodge/block caps work as intended.
![[Image: sc6vpv.jpg]](http://i59.tinypic.com/sc6vpv.jpg)
Archived author: cliffsmits • Posted: 2025-11-04T18:04:49.107911
Original source
Good one, I know a lot of people have been asking for this, thank you!
Archived author: cliffsmits • Posted: 2025-11-04T18:04:49.107911
Original source
youre welcome Pewz i am glad to help other people out
Quote:darman said:Right... think somone want 5 posts
sssss"""""""""""""""""""
Click to expand...
Archived author: cliffsmits • Posted: 2025-11-04T18:04:49.107911
Original source
Quote:darman said:Right... think somone want 5 posts
sssss"""""""""""""""""""
Click to expand...
Archived author: cliffsmits • Posted: 2025-11-04T18:04:49.107911
Original source
in the haste cap part the number 50 means 50 haste = cap??
and when I recompile do I have to use Microsoft visual c++ again because when I rebuild using Microsoft visual it error at object.h