[DiscordArchive] Hi there
[DiscordArchive] Hi there
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)?
Archived author: skytia.hizashi • Posted: 2024-12-12T10:21:53.392000+00:00
Original source
Backstab-like like Retail
Archived author: skytia.hizashi • Posted: 2024-12-12T10:22:05.240000+00:00
Original source
Backstab-Abilities like Retail
![[Image: image.png?ex=690c76f6&is=690b2576&hm=647...01ac09e1a&]](https://cdn.discordapp.com/attachments/1316706896241229864/1316711844005543977/image.png?ex=690c76f6&is=690b2576&hm=647662ff6e1d68e6daee3b997a820cd1237705ec3bb4bb8a48c834f01ac09e1a&)
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&]](https://cdn.discordapp.com/attachments/1316706896241229864/1316711844005543977/image.png?ex=690c76f6&is=690b2576&hm=647662ff6e1d68e6daee3b997a820cd1237705ec3bb4bb8a48c834f01ac09e1a&)
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
Archived author: Aleist3r • Posted: 2024-12-12T11:35:01.275000+00:00
Original source
or, `isInFront`, doesn't really matter i think
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
Archived author: skytia.hizashi • Posted: 2024-12-13T00:16:22.210000+00:00
Original source
[Done] Backstab-Abilities like Retail