da es mich interessiert hat wie man Waffenkostümen Boni geben kann wenn sie droppen (so wie bei Rüstungskostümen mit +), habe ich die Funktion im Source etwas ergänzt.
Falls sich jemand nichts darunter vorstellen kann hier ein Bild.
Wir müssen dazu nur eine Funktion ändern/ersetzen.
game/item_attribute.cpp
Sucht nach:
Code:
int CItem::GetAttributeSetIndex()
Ohne Lykaner:
Code:
int CItem::GetAttributeSetIndex() { if (GetType() == ITEM_WEAPON || GetType() == ITEM_COSTUME) //Added: || GetType() == ITEM_COSTUME { if (GetSubType() == WEAPON_ARROW) return -1; switch (GetSubType()) //new switch { case COSTUME_WEAPON_SWORD: case COSTUME_WEAPON_DAGGER: case COSTUME_WEAPON_BOW: case COSTUME_WEAPON_TWO_HANDED: case COSTUME_WEAPON_BELL: case COSTUME_WEAPON_FAN: case WEAPON_SWORD: case WEAPON_DAGGER: case WEAPON_BOW: case WEAPON_TWO_HANDED: case WEAPON_BELL: case WEAPON_FAN: case WEAPON_MOUNT_SPEAR: return ATTRIBUTE_SET_WEAPON; } } if (GetType() == ITEM_ARMOR || GetType() == ITEM_COSTUME) { switch (GetSubType()) { case ARMOR_BODY: // case COSTUME_BODY: // 코스츔 갑옷은 일반 갑옷과 동일한 Attribute Set을 이용하여 랜덤속성 붙음 (ARMOR_BODY == COSTUME_BODY) return ATTRIBUTE_SET_BODY; case ARMOR_WRIST: return ATTRIBUTE_SET_WRIST; case ARMOR_FOOTS: return ATTRIBUTE_SET_FOOTS; case ARMOR_NECK: return ATTRIBUTE_SET_NECK; case ARMOR_HEAD: // case COSTUME_HAIR: // 코스츔 헤어는 일반 투구 아이템과 동일한 Attribute Set을 이용하여 랜덤속성 붙음 (ARMOR_HEAD == COSTUME_HAIR) return ATTRIBUTE_SET_HEAD; case ARMOR_SHIELD: return ATTRIBUTE_SET_SHIELD; case ARMOR_EAR: return ATTRIBUTE_SET_EAR; } } return -1; }
Code:
int CItem::GetAttributeSetIndex() { if (GetType() == ITEM_WEAPON || GetType() == ITEM_COSTUME) //Added: || GetType() == ITEM_COSTUME { if (GetSubType() == WEAPON_ARROW) return -1; switch (GetSubType()) //new switch { case COSTUME_WEAPON_SWORD: case COSTUME_WEAPON_DAGGER: case COSTUME_WEAPON_BOW: case COSTUME_WEAPON_TWO_HANDED: case COSTUME_WEAPON_BELL: case COSTUME_WEAPON_FAN: case COSTUME_WEAPON_CLAW: case WEAPON_SWORD: case WEAPON_DAGGER: case WEAPON_BOW: case WEAPON_TWO_HANDED: case WEAPON_BELL: case WEAPON_FAN: case WEAPON_MOUNT_SPEAR: return ATTRIBUTE_SET_WEAPON; } } if (GetType() == ITEM_ARMOR || GetType() == ITEM_COSTUME) { switch (GetSubType()) { case ARMOR_BODY: // case COSTUME_BODY: // 코스츔 갑옷은 일반 갑옷과 동일한 Attribute Set을 이용하여 랜덤속성 붙음 (ARMOR_BODY == COSTUME_BODY) return ATTRIBUTE_SET_BODY; case ARMOR_WRIST: return ATTRIBUTE_SET_WRIST; case ARMOR_FOOTS: return ATTRIBUTE_SET_FOOTS; case ARMOR_NECK: return ATTRIBUTE_SET_NECK; case ARMOR_HEAD: // case COSTUME_HAIR: // 코스츔 헤어는 일반 투구 아이템과 동일한 Attribute Set을 이용하여 랜덤속성 붙음 (ARMOR_HEAD == COSTUME_HAIR) return ATTRIBUTE_SET_HEAD; case ARMOR_SHIELD: return ATTRIBUTE_SET_SHIELD; case ARMOR_EAR: return ATTRIBUTE_SET_EAR; } } return -1; }
Ich hoffe das kann jemand gebrauchen.
Falls ihr Fragen/Probleme habt könnt ihr mir gerne hier im Forum eine PN oder unter diesen Thread scheiben.
Viele Grüße,
Sogma