Modcraft - The community dedicated to quality WoW modding!
Wrath of the Lich King Modding => Serverside Modding => Topic started by: Big Bad Bot on June 02, 2016, 08:45:09 pm
-
Well, I want to put ranged weapons out of the ranged slot, but creating one as a ranged-two handed weapon I can't use the "shoot" spell or the other ranged weapons ones. Before start to mess with spellvisualkit.dbc and the visual of the related spells...
Someone knows wich fields of the shoot spell I must change to use an specific kind of weapon (or, in this case, weapon slot)?
-
This is possibly partially hardcoded in client, I would not be not so sure this is even possible. In general toying with item classes, subclasses, inventory types... Thats quite likely not pure DBC/core work. Maybe schlumpf will correct me though.
-
I think I have an idea...wich field in the Spell.dbc says "You need a dagger to cast this" or "you need a melee weapon"?
-
https://wowdev.wiki/DB/Spell (https://wowdev.wiki/DB/Spell" onclick="window.open(this.href);return false;):
(zero-based:)
int32 EquippedItemClass; // 68 m_equippedItemClass (value)
int32 EquippedItemSubClassMask; // 69 m_equippedItemSubclass (mask)
int32 EquippedItemInventoryTypeMask; // 70 m_equippedItemInvTypes (mask)
I am not sure if this is all, but its first thing I found and is used by a lot of spells. For instance by meelee abilitties, Backstab, weapon specialization talents/racials...
-
Yeah, I was dealing with that, but "70 m_equippedItemInvTypes " show no use in my experience. Attributes had a more protagonic role than I though...
The basic "shoot" spell have:
SPELL_ATTR0_REQ_AMMO = 0x00000002
SPELL_ATTR0_ABILITY = 0x00000010
SPELL_ATTR0_CAST_TRACK_TARGET = 0x00400000
wich, combined as a bitmask, looks like this: 0x400012
So, i remove the first one (0x2) (because that was using the ammo sheet and forcing to loot at the ranged weapon slot) and I have this one:
SPELL_ATTR0_DONT_AFFECT_SHEATH_STATE = 0x00040000
Now the spell looks good, but it's still a little buggy: if you doesn't have the weapon in your hands, your character will do the shoot animation without it.
So I try to add this:
SPELL_ATTR0_ON_NEXT_SWING_2 = 0x00000400
Works pretty well with the bow animation, but the swing interrupts it in the bow and crossbow, so I made a dummy spell with this only attribute in solitary, go to spell_linked_spell in World's SQL folder and associate the dummy spell with the new shoot.
Now the only issues are:
- There's not auto attack
- The proyectile of the shoot borns from a almost random place than from the tip of the gun.
- Some combinations of gender/race have more visual issues than others.
PS: Of course, I merge all double handed weapons (mace, axe, sword) as a single subtype and I use the other two as Shoot Weapon (crossbow/rifle) and Bow.
PS2:
Bitmask for bow (with 0x400): 0x440410
Bitmask for crossbow and rifle (without 0x400): 0x440010