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] ItemSubMenu - Custom Weapon Types  (Read 1172 times)

Recycle

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 10
    • View Profile
[QUESTION] [WotLk] ItemSubMenu - Custom Weapon Types
« on: April 11, 2016, 03:16:39 pm »
Hi!

I've been working on adding "Lances" as a custom weapon type on my server. I can get as far as get the weaponskill to show, item sub type to show on weapons but they all appear as "Unusable" aka red text. See here:
http://i.imgur.com/PeVqV1G.jpg

Issue is, I haven't been able to link the Lances skill to the weapons Subtype although I've set hopefully everything correct.

I've modified ItemSubClass.dbc, SkillLineAbility and SkillLine but it still won't show up properly. I've also added the subtype in core edits and created a spellID for Lances.

Am I really missing something?

ItemSubClass.dbc: http://i.imgur.com/tj5DKDI.png
SkillLineAbility.dbc: http://i.imgur.com/Ii5G9ZW.png
SkillRaceClassInfo.dbc: http://i.imgur.com/icgDoGn.png

Thanks!
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [QUESTION] [WotLk] ItemSubMenu - Custom Weapon Types
« Reply #1 on: April 11, 2016, 03:24:25 pm »
Did you change your core accordingly ?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Recycle

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 10
    • View Profile
Re: [QUESTION] [WotLk] ItemSubMenu - Custom Weapon Types
« Reply #2 on: April 11, 2016, 05:53:22 pm »
Quote from: "Ascathos"
Did you change your core accordingly ?
As much as I knew what to change.

I added the required entry into ItemPrototype.h to that there's a new item subtype with the ID of 21. I tried to search all files related to weapons (ie. Daggers or Swords) to define if there was anything else that I need to tell it that there's a new subtype.

I added;
Code: [Select]
ITEM_SUBCLASS_WEAPON_FISHING_POLE           = 20,
ITEM_SUBCLASS_WEAPON_LANCE = 21
to enum ItemSubclassWeapon and changed MAX_ITEM_SUBCLASS_WEAPON +1.

Am I supposed to do changes to other things? Because I can't figure this out ;s

Edit: Sigh, I forgot SharedDefines entirely. Last time I searched for DAGGERS or THROWN it didn't bring this up. I guess I need to be more careful.

Either way, is that all I need to change, or am I still missing something?

Edit2: So I added into SharedDefines as well, but the weapontype is still red - but it's equippable. By anyone.

I really am so lost right now <_> assigned all the id's new again to reflect the skillid from SharedDefines too.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [QUESTION] [WotLk] ItemSubMenu - Custom Weapon Types
« Reply #3 on: April 12, 2016, 03:30:37 pm »
Quote from: "Recycle"
Quote from: "Ascathos"
Did you change your core accordingly ?
As much as I knew what to change.

I added the required entry into ItemPrototype.h to that there's a new item subtype with the ID of 21. I tried to search all files related to weapons (ie. Daggers or Swords) to define if there was anything else that I need to tell it that there's a new subtype.

I added;
Code: [Select]
ITEM_SUBCLASS_WEAPON_FISHING_POLE           = 20,
ITEM_SUBCLASS_WEAPON_LANCE = 21
to enum ItemSubclassWeapon and changed MAX_ITEM_SUBCLASS_WEAPON +1.

Am I supposed to do changes to other things? Because I can't figure this out ;s

Edit: Sigh, I forgot SharedDefines entirely. Last time I searched for DAGGERS or THROWN it didn't bring this up. I guess I need to be more careful.

Either way, is that all I need to change, or am I still missing something?

Edit2: So I added into SharedDefines as well, but the weapontype is still red - but it's equippable. By anyone.

I really am so lost right now <_> assigned all the id's new again to reflect the skillid from SharedDefines too.
Referenced from TC 6.2.4.21355


struct ItemSpecStats ObjectMgr.cpp Ln 2527

enum ItemSpecStat DBCEnums.h Ln 552

static float const weaponMultipliers[MAX_ITEM_SUBCLASS_WEAPON] ObjectMgr.cpp Ln 2446



Those are a few I also found. Make sure you added all the files to your local server application.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

pallam

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 20
    • View Profile
Re: [QUESTION] [WotLk] ItemSubMenu - Custom Weapon Types
« Reply #4 on: April 19, 2016, 08:09:49 pm »
If u need help yet..

Need to set in ur weapon spell itemmask.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »