Forums WoW Modding Tutorials Miscellaneous [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

[Archive] Adding a haste/parry/dodge/block cap to your core 3.3.5 trinitycore

rektbyfaith
Administrator
0
11-04-2025, 05:04 PM
#1
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]
rektbyfaith
11-04-2025, 05:04 PM #1

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]

rektbyfaith
Administrator
0
11-04-2025, 05:04 PM
#2
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!
rektbyfaith
11-04-2025, 05:04 PM #2

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!

rektbyfaith
Administrator
0
11-04-2025, 05:04 PM
#3
Archived author: cliffsmits • Posted: 2025-11-04T18:04:49.107911
Original source

youre welcome Pewz i am glad to help other people out
rektbyfaith
11-04-2025, 05:04 PM #3

Archived author: cliffsmits • Posted: 2025-11-04T18:04:49.107911
Original source

youre welcome Pewz i am glad to help other people out

rektbyfaith
Administrator
0
11-04-2025, 05:04 PM
#4
Archived author: cliffsmits • Posted: 2025-11-04T18:04:49.107911
Original source

Quote:darman said:

sssss"""""""""""""""""""

Click to expand...
Right... think somone want 5 posts
rektbyfaith
11-04-2025, 05:04 PM #4

Archived author: cliffsmits • Posted: 2025-11-04T18:04:49.107911
Original source

Quote:darman said:

sssss"""""""""""""""""""

Click to expand...
Right... think somone want 5 posts

rektbyfaith
Administrator
0
11-04-2025, 05:04 PM
#5
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
rektbyfaith
11-04-2025, 05:04 PM #5

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

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)