Moin, mir gerade aufgefallen erst als gerade bissel aufräumte warum Ymir ein extra flag (wearflag gemacht hat?
Wenn man das sowieso per itemtype und subtype regeln kann?
So hat es Ymir:
Code
- else if (GetType() == ITEM_RING)
- {
- if (ch->GetWear(WEAR_RING1))
- return WEAR_RING2;
- else
- return WEAR_RING1;
- }
- else if (GetType() == ITEM_BELT)
- return WEAR_BELT;
- else if (GetWearFlag() & WEARABLE_BODY)
- return WEAR_BODY;
- else if (GetWearFlag() & WEARABLE_HEAD)
- return WEAR_HEAD;
- else if (GetWearFlag() & WEARABLE_FOOTS)
- return WEAR_FOOTS;
- else if (GetWearFlag() & WEARABLE_WRIST)
- return WEAR_WRIST;
- else if (GetWearFlag() & WEARABLE_WEAPON)
- return WEAR_WEAPON;
- else if (GetWearFlag() & WEARABLE_SHIELD)
- return WEAR_SHIELD;
- else if (GetWearFlag() & WEARABLE_NECK)
- return WEAR_NECK;
- else if (GetWearFlag() & WEARABLE_EAR)
- return WEAR_EAR;
- else if (GetWearFlag() & WEARABLE_ARROW)
- return WEAR_ARROW;
- else if (GetWearFlag() & WEARABLE_UNIQUE)
- {
- if (ch->GetWear(WEAR_UNIQUE1))
- return WEAR_UNIQUE2;
- else
- return WEAR_UNIQUE1;
- }
Viele also meisten haben also Das Kostüm, Mount usw nun so gemacht:
Code
- else if (GetType() == ITEM_COSTUME)
- {
- //ch->ChatPacket(CHAT_TYPE_INFO,"FindEquipCell ITEM_COSTUME ->");
- if (GetSubType() == COSTUME_BODY)
- return WEAR_COSTUME_BODY;
- else if (GetSubType() == COSTUME_HAIR)
- return WEAR_COSTUME_HAIR;
- else if (GetSubType() == COSTUME_MOUNT)
- return WEAR_COSTUME_MOUNT;
- #ifdef __SASH_SYSTEM__
- else if (GetSubType() == COSTUME_SASH)
- return WEAR_COSTUME_SASH;
- #endif
- #ifdef __WEAPON_COSTUME_SYSTEM__
- else if (GetSubType() == COSTUME_WEAPON)
- return WEAR_COSTUME_WEAPON;
- #endif
Theoretisch ginge doch auch (alte ymir methode also ihre umschreiben in):
Tut ja den selben effekt.
Was Meint ihr dazu? Hoffe ihr könnt mir folgen..