Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: reidospalas on October 03, 2018, 08:50:43 pm

Title: Custom Stances
Post by: reidospalas on October 03, 2018, 08:50:43 pm
Hey guys, i'm doin' some own jobs and i didn't know how to solve this issue, i want make some spells requires custom stances spells that i made.
Exemple > Priest Shadowform, to use some custom spells requires player be on shadowform to cast it.
Thats work in same way but using custom Stances, i tried adding new stances on SpellAuraEffects.cpp, then added Shapesshifts masks values for each new Form case, but didn't worked too,
(https://cdn.discordapp.com/attachments/409179931982037003/459595055221702659/BAL4jMTMQhGwRHoWeovADA.png)

Someone know how to make it possible?

Thats what exactly what i was trying to make
I've trying adding the mask values for it, but it was requering all the stances forms and didn't worked while in new form_stance
(https://media.discordapp.net/attachments/409179931982037003/459585001290334208/unknown.png?width=1490&height=838)

[COLOR="silver"]- - - Updated - - -[/COLOR]

If someone know how to make it possible i'll pay for this job

Official post: http://www.ac-web.org/forums/showthread.php?234446-(PAID)-Custom-Stances-requires
Title: Re: Custom Stances
Post by: schlumpf on October 03, 2018, 11:50:31 pm
note that masks are limited in bit width. the fact you added 0x21 = 33 implies that the mask variable is more than 32 bits. It likely is not. Thus rather than requiring your new bit, it requires crap.

You can try putting your new value somewhere in between. Based on that screenshot, 5 and x17, x18 are unused. If they are, you can reuse those ids.
Title: Re: Custom Stances
Post by: reidospalas on October 04, 2018, 12:23:47 am
The problem wasn't with masks, but the flags won't work ingame, i tried using my custom one and it just attach all forms like on screenshot
Title: Re: Custom Stances
Post by: reidospalas on October 09, 2018, 08:37:09 pm
BUMP!!
Title: Re: Custom Stances
Post by: Grymskvll on October 10, 2018, 09:53:21 am
Did you try what Schlumpf suggested and just use one of the unused shapeshift IDs? I just tried it and it seemed to work fine.

How did you even set the Stances mask for Void missile to such a high value (assuming you did it right)? I tried setting a spell to use a 33rd shapeshift ID, but all the editors/converter I tried refused the value because of the reason Schlumpf mentions.

Are you setting the mask properly? For example, to use the 5th shapeshift ID, you set the Stances mask to:
Code: [Select]
Stances = 1 << (5-1)
Result:
dec 16
hex 0x10
bin 0001 0000 i.e. the 5th bit

Or for multiple forms:
Code: [Select]
Stances = (1<<(5 - 1)) | (1<<(32 - 1))
Result:
dec 2147483664
hex 0x80000010
bin 10000000000000000000000000010000 i.e. the 5th and 32nd bits

Bit calculation: https://www.wolframalpha.com (https://www.wolframalpha.com)
Dec to hex (for inputting in Spell.dbc): https://www.binaryhexconverter.com/decimal-to-hex-converter (https://www.binaryhexconverter.com/decimal-to-hex-converter)
Dec to bin (if you want to verify): https://www.binaryhexconverter.com/decimal-to-binary-converter (https://www.binaryhexconverter.com/decimal-to-binary-converter)