Forums WoW Modding Support Archives WoWModding Threads [DiscordArchive] Hi there

[DiscordArchive] Hi there

[DiscordArchive] Hi there

rektbyfaith
Administrator
0
12-12-2024, 10:03 AM
#1
Archived author: skytia.hizashi • Posted: 2024-12-12T10:03:08.026000+00:00
Original source

Hi there
I'm trying to change backstab-like abilities to how they work in retail:
Bonus Damage from the back, normal damage everywhere else (in my case, decrease damage if not from back).

I already removed the "you need to be behind" requirement from those abilities (SpellMgr.cpp - Commenting them out where `SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET`is given to them).
Now i'd need to somehow add a damage modifier to them if you attack from the front (let's say 0.65).

Does anyone have an idea how to do that (if even possible)?
rektbyfaith
12-12-2024, 10:03 AM #1

Archived author: skytia.hizashi • Posted: 2024-12-12T10:03:08.026000+00:00
Original source

Hi there
I'm trying to change backstab-like abilities to how they work in retail:
Bonus Damage from the back, normal damage everywhere else (in my case, decrease damage if not from back).

I already removed the "you need to be behind" requirement from those abilities (SpellMgr.cpp - Commenting them out where `SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET`is given to them).
Now i'd need to somehow add a damage modifier to them if you attack from the front (let's say 0.65).

Does anyone have an idea how to do that (if even possible)?

rektbyfaith
Administrator
0
12-12-2024, 10:21 AM
#2
Archived author: skytia.hizashi • Posted: 2024-12-12T10:21:53.392000+00:00
Original source

Backstab-like like Retail
rektbyfaith
12-12-2024, 10:21 AM #2

Archived author: skytia.hizashi • Posted: 2024-12-12T10:21:53.392000+00:00
Original source

Backstab-like like Retail

rektbyfaith
Administrator
0
12-12-2024, 10:22 AM
#3
Archived author: skytia.hizashi • Posted: 2024-12-12T10:22:05.240000+00:00
Original source

Backstab-Abilities like Retail
rektbyfaith
12-12-2024, 10:22 AM #3

Archived author: skytia.hizashi • Posted: 2024-12-12T10:22:05.240000+00:00
Original source

Backstab-Abilities like Retail

rektbyfaith
Administrator
0
12-12-2024, 10:22 AM
#4
Archived author: skytia.hizashi • Posted: 2024-12-12T10:22:46.982000+00:00
Original source


[Image: image.png?ex=690c76f6&is=690b2576&hm=647...01ac09e1a&]
rektbyfaith
12-12-2024, 10:22 AM #4

Archived author: skytia.hizashi • Posted: 2024-12-12T10:22:46.982000+00:00
Original source


[Image: image.png?ex=690c76f6&is=690b2576&hm=647...01ac09e1a&]

rektbyfaith
Administrator
0
12-12-2024, 11:33 AM
#5
Archived author: Aleist3r • Posted: 2024-12-12T11:33:45.761000+00:00
Original source

what are you looking for is `isInBack` function used in spell scripts
rektbyfaith
12-12-2024, 11:33 AM #5

Archived author: Aleist3r • Posted: 2024-12-12T11:33:45.761000+00:00
Original source

what are you looking for is `isInBack` function used in spell scripts

rektbyfaith
Administrator
0
12-12-2024, 11:35 AM
#6
Archived author: Aleist3r • Posted: 2024-12-12T11:35:01.275000+00:00
Original source

or, `isInFront`, doesn't really matter i think
rektbyfaith
12-12-2024, 11:35 AM #6

Archived author: Aleist3r • Posted: 2024-12-12T11:35:01.275000+00:00
Original source

or, `isInFront`, doesn't really matter i think

rektbyfaith
Administrator
0
12-12-2024, 11:08 PM
#7
Archived author: skytia.hizashi • Posted: 2024-12-12T23:08:09.405000+00:00
Original source

Working script if anyone wants it too (save as `azerothcore-wotlk/src/server/scripts/Custom/BackstabFront/BackstabFront.cpp` - too lazy to check on how to create a module atm):
https://pastebin.com/Ds9mvLJv
*it's currently at 80% of normal damage if not attacking from the back.*

`azerothcore-wotlk/src/server/scripts/Custom/custom_script_loader.cpp`:
https://pastebin.com/4njtdH00

Don't forget to remove all the entries in `spell_custom_attr` table (remove "need to be behind target"-flag - all class spells that use backstab-mechanic: Backstab, Garrote, Shred, Ambush and Ravage)
> DELETE FROM `spell_custom_attr` WHERE `spell_id` IN ( '53', '2589', '2590', '2591', '7159', '8627', '8721', '11279', '11280', '11281', '15582', '15657', '22416', '25300', '26863', '37685', '48656', '48657', '703', '8631', '8632', '8633', '11289', '11290', '26839', '26884', '48675', '48676', '5221', '6800', '8992', '9829', '9830', '27001', '27002', '48571', '48572', '8676', '8724', '8725', '11267', '11268', '11269', '27441', '48689', '48690', '48691', '6785', '6787', '9866', '9867', '27005', '48578', '48579');

add this to `spell_script_names` table (include new script):
> INSERT INTO `spell_script_names` (`spell_id`,` ScriptName`) VALUES ('-53', 'spell_backstab_front'), ('-703', 'spell_backstab_front'), ('-5221', 'spell_backstab_front'), ('-8676', 'spell_backstab_front'), ('-6785', 'spell_backstab_front');

and comment out those spells in SpellMgr.cpp like this (disable "must be behind target"-flag - mine are between the lines 3163 and 3216):
> // case 53: // Backstab
> // case 2589:
> // case 2590:
> ...
> // case 48579:
> case 21987: // Lash of Pain

Then Recompile and you're good to go.
[Embed: BackstabFront.cpp - Pastebin.com]
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
https://pastebin.com/Ds9mvLJv

[Embed: custom_script_loader.cpp - Pastebin.com]
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
https://pastebin.com/4njtdH00
rektbyfaith
12-12-2024, 11:08 PM #7

Archived author: skytia.hizashi • Posted: 2024-12-12T23:08:09.405000+00:00
Original source

Working script if anyone wants it too (save as `azerothcore-wotlk/src/server/scripts/Custom/BackstabFront/BackstabFront.cpp` - too lazy to check on how to create a module atm):
https://pastebin.com/Ds9mvLJv
*it's currently at 80% of normal damage if not attacking from the back.*

`azerothcore-wotlk/src/server/scripts/Custom/custom_script_loader.cpp`:
https://pastebin.com/4njtdH00

Don't forget to remove all the entries in `spell_custom_attr` table (remove "need to be behind target"-flag - all class spells that use backstab-mechanic: Backstab, Garrote, Shred, Ambush and Ravage)
> DELETE FROM `spell_custom_attr` WHERE `spell_id` IN ( '53', '2589', '2590', '2591', '7159', '8627', '8721', '11279', '11280', '11281', '15582', '15657', '22416', '25300', '26863', '37685', '48656', '48657', '703', '8631', '8632', '8633', '11289', '11290', '26839', '26884', '48675', '48676', '5221', '6800', '8992', '9829', '9830', '27001', '27002', '48571', '48572', '8676', '8724', '8725', '11267', '11268', '11269', '27441', '48689', '48690', '48691', '6785', '6787', '9866', '9867', '27005', '48578', '48579');

add this to `spell_script_names` table (include new script):
> INSERT INTO `spell_script_names` (`spell_id`,` ScriptName`) VALUES ('-53', 'spell_backstab_front'), ('-703', 'spell_backstab_front'), ('-5221', 'spell_backstab_front'), ('-8676', 'spell_backstab_front'), ('-6785', 'spell_backstab_front');

and comment out those spells in SpellMgr.cpp like this (disable "must be behind target"-flag - mine are between the lines 3163 and 3216):
> // case 53: // Backstab
> // case 2589:
> // case 2590:
> ...
> // case 48579:
> case 21987: // Lash of Pain

Then Recompile and you're good to go.
[Embed: BackstabFront.cpp - Pastebin.com]
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
https://pastebin.com/Ds9mvLJv

[Embed: custom_script_loader.cpp - Pastebin.com]
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
https://pastebin.com/4njtdH00

rektbyfaith
Administrator
0
12-13-2024, 12:16 AM
#8
Archived author: skytia.hizashi • Posted: 2024-12-13T00:16:22.210000+00:00
Original source

[Done] Backstab-Abilities like Retail
rektbyfaith
12-13-2024, 12:16 AM #8

Archived author: skytia.hizashi • Posted: 2024-12-13T00:16:22.210000+00:00
Original source

[Done] Backstab-Abilities like Retail

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