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] [QUESTION] Attributes  (Read 1531 times)

XxXGenesisXxX

  • Contributors
  • Model Change Addict
  • *****
  • Posts: 204
    • View Profile
[SOLVED] [QUESTION] Attributes
« on: October 11, 2012, 06:26:44 am »
When doing the attributes you edit the enumerations, if you want 2 out of the same column for example:

Code: [Select]
SPELL_ATTR0_ABILITY                          = 0x10, //  4
+
SPELL_ATTR0_PASSIVE                          = 0x40, //  6

You would add them together for 0x50. But what if it needs to carry on? For example:

Code: [Select]
SPELL_ATTR0_PASSIVE                          = 0x40, //  6
+
SPELL_ATTR0_HIDDEN_CLIENTSIDE                = 0x80, //  7

This would equal 0x120... That's the exact same as:

Code: [Select]
SPELL_ATTR0_HIDE_IN_COMBAT_LOG               = 0x100, //  8
+
SPELL_ATTR0_TRADESPELL                       = 0x20, //  5

So how would I get the 0x40 and the 0x80 together? Is that when letters get involved?
« Last Edit: October 11, 2012, 11:27:15 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] Attributes
« Reply #1 on: October 11, 2012, 10:41:39 am »
First of all, you don't add them, second of all, you're adding them wrong and third, these are hexadecimal numbers, which should be taught at school in year five.

You're supposed to bitwise-or-ing them.

Code: [Select]
0x40 == 0100 0000 |
0x80 == 1000 0000 =
1100 0000 == 0xC0
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

XxXGenesisXxX

  • Contributors
  • Model Change Addict
  • *****
  • Posts: 204
    • View Profile
Re: [SOLVED] [QUESTION] Attributes
« Reply #2 on: October 11, 2012, 11:27:43 am »
Ahhk, Thank schlumpf.

Marked as solved.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »