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: [QUESTION] [WotLk] Ranged Weapons as two hand weapons?  (Read 1133 times)

Big Bad Bot

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 75
    • View Profile
[QUESTION] [WotLk] Ranged Weapons as two hand weapons?
« 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)?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Amaroth

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1219
    • View Profile
    • Amaroth's Tools
Re: [QUESTION] [WotLk] Ranged Weapons as two hand weapons?
« Reply #1 on: June 02, 2016, 10:37:44 pm »
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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

Want to support me for my releases and/or tutorials? You can send donation via Paypal to:
jantoms@seznam.cz

Big Bad Bot

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 75
    • View Profile
Re: [QUESTION] [WotLk] Ranged Weapons as two hand weapons?
« Reply #2 on: June 03, 2016, 12:19:07 am »
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"?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Amaroth

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1219
    • View Profile
    • Amaroth's Tools
Re: [QUESTION] [WotLk] Ranged Weapons as two hand weapons?
« Reply #3 on: June 03, 2016, 10:35:00 am »
https://wowdev.wiki/DB/Spell:
(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...
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

Want to support me for my releases and/or tutorials? You can send donation via Paypal to:
jantoms@seznam.cz

Big Bad Bot

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 75
    • View Profile
Re: [QUESTION] [WotLk] Ranged Weapons as two hand weapons?
« Reply #4 on: June 03, 2016, 08:14:25 pm »
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
« Last Edit: January 01, 1970, 01:00:00 am by Admin »