This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: Creating a Raise Dead spell  (Read 1007 times)

TheMetalCarrots

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 113
    • View Profile
Creating a Raise Dead spell
« on: June 26, 2019, 01:56:00 pm »
Was wondering if anyone knew, or at least sort of knew, how to create a 'Raise Dead' spell? What I mean is something similar to the Death Knight's one, where it targets a humanoid corpse and creates a minion from it. However, I'd want to be able to create more than one minion, and maybe (if possible) cause the used-up corpses to disappear (so I wouldn't be able to just keep spamming the spell on one corpse and make an army out of literally one dead dude).

My research into this topic yielded fruitless results - I straight up copied and edited the flags of the original 'Raise Dead', but I was only able to create one minion out of the spell before it permanently blacked out, even though there were no flags telling it to only create one minion. I tried making a weird amalgamation of a basic summoning spell and the Raise Dead spell, making the summoning spell target a corpse before being used, but it didn't work either and just straight up summoned my minion. Help would be realllly appreciated!!!

Grymskvll

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 65
    • View Profile
Re: Creating a Raise Dead spell
« Reply #1 on: June 27, 2019, 12:04:50 pm »
Players can only have 1 pet you have direct control over (with a pet bar). You can have multiple Guardians (see the DK spell Army of the Dead for example).

To make corpses only usable once, you could alternatively turn it into gibs like Corpse Explosion does. I think this is where TC checks whether the target has been exploded (I guess you would have to change the DisplayID when you raise a minion from the corpse):
https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/scripts/Spells/spell_dk.cpp#L625

Be sure to check out relevant/similar spell scripts.

TheMetalCarrots

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 113
    • View Profile
Re: Creating a Raise Dead spell
« Reply #2 on: June 27, 2019, 12:58:29 pm »
Would I be able to change the flags of the 'Raise Dead' minion to a guardian, so that I can summon multiple, do you think? Also, thankyou for the heads up with Corpse Explosion, I will start looking into that now!

Grymskvll

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 65
    • View Profile
Re: Creating a Raise Dead spell
« Reply #3 on: June 27, 2019, 02:04:26 pm »
Woops I forgot by default ghouls are summoned as guardians (see https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/scripts/Spells/spell_dk.cpp#L2053)
Also Raise Dead (46584) doesn't start cooling down until the ghoul dies (see https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/scripts/Spells/spell_dk.cpp#L2069)

Army of the Dead starts cooling down immediately. Maybe try to copy and modify the spell triggered by Army of the Dead (think it was 42651), otherwise you'll have to change it in the client (flags I guess) and server (linked above)

TheMetalCarrots

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 113
    • View Profile
Re: Creating a Raise Dead spell
« Reply #4 on: June 28, 2019, 01:48:49 pm »
Actually makes a lot more sense as to why my Raise Dead minion would only start the cooldown after the creature's death if there was scripting behind it. I thought I could just change the flags in the server and client's DBC files, which also contribute to certain summoning conditions. Now I know there's an extra reason behind this, it'll be a lot easier to do! Will look into everything suggested, including the scripts, and see if I can cobble something together that reasonably resembles what I had in mind. Thankyou so much for your help!