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: [SOLVED] Spell attributes  (Read 1235 times)

Chase

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 116
    • View Profile
[SOLVED] Spell attributes
« on: June 18, 2014, 06:57:02 pm »
So I'm trying to understand spell attributes in the spell.dbc

One spell has the first attribute column as 0x800100
That seems to be. CASTABLE_WHILE_DEAD which is 0x800000

But whats the 100 part at the end?
« Last Edit: June 18, 2014, 08:50:16 pm by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: [QUESTION] Spell attributes
« Reply #1 on: June 18, 2014, 07:08:05 pm »
Flags can be combined. Each attribute has 31 unique values that can all be used at once. E.g, to combine the first two flags you would use the value 3 because 1 + 2 = 3. The 3rd unique flag is 4.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] Spell attributes
« Reply #2 on: June 18, 2014, 08:08:07 pm »
To further explain how this works, look at numbers in binary: in harrys example, he had 1 = 0b01 and 2 = 0b10 which combined is 3 = 0b11. Your value 0x800100 is 0b100000000000000100000000, thus 0b100000000000000000000000 and 0b100000000 (= 0x100) which is SPELL_ATTR0_HIDE_IN_COMBAT_LOG and SPELL_ATTR0_CASTABLE_WHILE_DEAD.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Chase

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 116
    • View Profile
Re: [QUESTION] Spell attributes
« Reply #3 on: June 18, 2014, 08:49:50 pm »
Thank you, makes sense!

EDIT: Cant seem to get the spell working in-game though.
Here are my DBC's, (These are cataclysm DBCs, sorry if they are quite different, Ill tell you what links to where though.)

Spell.dbc
Quote
97000, 0x800000, 0x0, 0x0, 0x100000, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 1, 21, 0, 1, 0, 21000, 0, 5400, 0, Tuskarr Backpack, , , , 0x1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, , 0, 0, 0, 0, 0, 0, 0, 0, 0
21000 links to SpellVisual, 5400 links to SpellIcon

SpellIcon.dbc
Quote
5400, InterfaceIconsINV_Misc_TuskarrBackpack
SpellVisual.dbc
Quote
21000, 0, 0, 0, 19700, 0, 0, 0, 0, 0x0, 1, 0, 0, 0x0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
19700 links to SpellVisualKit

SpellVisualKit.dbc
Quote
19700, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, , 0, 0, 0, 0, 0, 0, 0, , 0, 0, , 0, 0
SpellVisualKitModelAttach.dbc
Quote
8300, 19700, 8800, 16, 0.0500000007, 0, -0.6000000238, 0, -1.5707960129, 0, 0, -1, -1, -1
8800 is linked to SpellVisualEffectName

SpellVisualEffectName.dbc
Quote
8800, Tuskarr Backpack, SpellsTuskarr_Backpack.mdx, 1, 1, 0.0099999998, 100

(Didn't know of any other way to show you these.)

All I get in-game is my spell with the correct Icon, I cannot cast it though. (Or its just not doing anything.)
Nothing in the combat log either.

This was a mostly Direct copy of Rocket Pack, (Even having a 100% copy, and only changing ID's did not work)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: [SOLVED] Spell attributes
« Reply #4 on: June 19, 2014, 06:38:17 pm »
It is possible the spell ID is hardcoded in the emulator.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »