Antiflags are pretty annoying to work with (for some people) because they don't know how they work.
Antiflags aren't randomly generated numbers they are generated through bit shifting.
Bit shifting can be equated with a multiplication by 2^shift_argument
-->
Code:
bit_argument << shift_argument
1 <<
0 // equals 1. because: 1*2^
0 = 1
1 <<
1 // equals 2. because: 1*2^
1 = 2
1 <<
2 // equals 4. because: 1*2^
2 = 4
Now you prob. ask: "What do I have to do if i want to remove a antiflag?"
Well thats pretty easy to answer!
You subtract the antiflag you want to remove from the current antiflag value.
e.g.:
Let's say we have an item with antiflag 248.
That means the item can't be equipped by ninja,sura and shaman. You also can't trade or drop it but you want to make the item dropable.
So what do you do?
You take the drop antiflag (128) and subtract that value from your current antiflag (248)
--> 248-128 = 120
BINGO! After reloading your database you will be able to drop the modified item again.
tl;dr: If you want to remove an antiflag: current_antiflag - antiflag_you_wanna_remove = new_antiflag
If you want to add an antiflag: current_antiflag + antiflag_you_wanna_add = new_antiflag
All antiflags you need:
Code:
enum EItemAntiFlag
{
ITEM_ANTIFLAG_FEMALE = (1 << 0), // ¿©¼º »ç¿ë ºÒ°¡
ITEM_ANTIFLAG_MALE = (1 << 1), // ³²¼º »ç¿ë ºÒ°¡
ITEM_ANTIFLAG_WARRIOR = (1 << 2), // ¹«»ç »ç¿ë ºÒ°¡
ITEM_ANTIFLAG_ASSASSIN = (1 << 3), // ÀÚ°´ »ç¿ë ºÒ°¡
ITEM_ANTIFLAG_SURA = (1 << 4), // ¼ö¶ó »ç¿ë ºÒ°¡
ITEM_ANTIFLAG_SHAMAN = (1 << 5), // ¹«´ç »ç¿ë ºÒ°¡
ITEM_ANTIFLAG_GET = (1 << 6), // ÁýÀ» ¼ö ¾øÀ½
ITEM_ANTIFLAG_DROP = (1 << 7), // ¹ö¸± ¼ö ¾øÀ½
ITEM_ANTIFLAG_SELL = (1 << 8), // ÆÈ ¼ö ¾øÀ½
ITEM_ANTIFLAG_EMPIRE_A = (1 << 9), // A Á¦±¹ »ç¿ë ºÒ°¡
ITEM_ANTIFLAG_EMPIRE_B = (1 << 10), // B Á¦±¹ »ç¿ë ºÒ°¡
ITEM_ANTIFLAG_EMPIRE_R = (1 << 11), // C Á¦±¹ »ç¿ë ºÒ°¡
ITEM_ANTIFLAG_SAVE = (1 << 12), // ÀúÀåµÇÁö ¾ÊÀ½
ITEM_ANTIFLAG_GIVE = (1 << 13), // °Å·¡ ºÒ°¡
ITEM_ANTIFLAG_PKDROP = (1 << 14), // PK½Ã ¶³¾îÁöÁö ¾ÊÀ½
ITEM_ANTIFLAG_STACK = (1 << 15), // ÇÕÄ¥ ¼ö ¾øÀ½
ITEM_ANTIFLAG_MYSHOP = (1 << 16), // °³ÀÎ »óÁ¡¿¡ ¿Ã¸± ¼ö ¾øÀ½
};
If you still got any problems don't hesitate to contact me!
edit: You have to subtract your current_antiflag - 320.
- Crysis