Jump to content
×
×
  • Create New...
  • 0

Weapon costume


Pr0HunT45

Question

Hey guys!

I want to add the weapon costume System to my server. I add it with this description:

https://forum.turkmmo.com/konu/3456478-kostum-silah-sistemi/

I did everything what i have to, but the char_item,cpp doesn't work. This is the funkcion:

// 1) Search: if (item->GetWearFlag() & WEARABLE_UNIQUE)
// 2) After their definition make a new line and paste:
#ifdef __WEAPON_COSTUME_SYSTEM__
#ifdef __NEW_ARROW_SYSTEM__
if (item->GetType() == ITEM_WEAPON && item->GetSubType() != WEAPON_ARROW && item->GetSubType() != WEAPON_UNLIMITED_ARROW)
#else
if (item->GetType() == ITEM_WEAPON && item->GetSubType() != WEAPON_ARROW)
#endif
{
LPITEM pkItem = GetWear(WEAR_COSTUME_WEAPON);
if (pkItem)
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("For can do this unwear the costume weapon."));
return false;
}
}
else if (item->GetType() == ITEM_COSTUME && item->GetSubType() == COSTUME_WEAPON)
{
LPITEM pkItem = GetWear(WEAR_WEAPON);
if (!pkItem)
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't wear a costume weapon without have a weapon weared."));
return false;
}
else if (item->GetValue(3) != pkItem->GetSubType())
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't wear a costume weapon who has different type of your weapon."));
return false;
}
}

if (item->GetType() == ITEM_ROD || item->GetType() == ITEM_PICK)
{
LPITEM pkItem = GetWear(WEAR_COSTUME_WEAPON);
if (pkItem)
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("For can do this unwear the costume weapon."));
return false;
}
}
#endif


// 1) Search: bool CHARACTER::CanUnequipNow(const LPITEM item, const TItemPos& srcCell, const TItemPos& destCell)
// 2) Replace their definition with:
bool CHARACTER::CanUnequipNow(const LPITEM item, const TItemPos& srcCell, const TItemPos& destCell)
{
if (ITEM_BELT == item->GetType())
VERIFY_MSG(CBeltInventoryHelper::IsExistItemInBeltInventory(this), "벨트 인벤토리에 아이템이 존재하면 해제할 수 없습니다.");

// 영원히 해제할 수 없는 아이템
if (IS_SET(item->GetFlag(), ITEM_FLAG_IRREMOVABLE))
return false;

// 아이템 unequip시 인벤토리로 옮길 때 빈 자리가 있는 지 확인
{
int pos = -1;
if (item->IsDragonSoul())
pos = GetEmptyDragonSoulInventory(item);
else
pos = GetEmptyInventory(item->GetSize());

VERIFY_MSG( -1 == pos, "소지품에 빈 공간이 없습니다." );
}

#ifdef __WEAPON_COSTUME_SYSTEM__
#ifdef __NEW_ARROW_SYSTEM__
if (item->GetType() == ITEM_WEAPON && item->GetSubType() != WEAPON_ARROW && item->GetSubType() != WEAPON_UNLIMITED_ARROW)
#else
if (item->GetType() == ITEM_WEAPON && item->GetSubType() != WEAPON_ARROW)
#endif
{
LPITEM pkItem = GetWear(WEAR_COSTUME_WEAPON);
if (pkItem)
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("For can do this unwear the costume weapon."));
return false;
}
}
#endif

return true;
}


// 1) Search: static BYTE abSlot[] = {WEAR_COSTUME_BODY, WEAR_COSTUME_HAIR,};
// 2) Replace with:
static BYTE abSlot[] = {WEAR_COSTUME_BODY, WEAR_COSTUME_HAIR,
#ifdef __WEAPON_COSTUME_SYSTEM__
WEAR_COSTUME_WEAPON,
#endif
};

This is my problem:

compile char_item.cpp
compile mob_manager.cpp
compile monarch.cpp
In file included from char_item.cpp:44:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
In file included from char_item.cpp:47:
belt_inventory_helper.h:108:42: warning: no newline at end of file
compile motion.cpp
monarch.cpp:276:2: warning: no newline at end of file
compile over9refine.cpp
In file included from char_item.cpp:47:
belt_inventory_helper.h: In static member function 'static BYTE CBeltInventoryHelper::GetBeltGradeByRefineLevel(int)':
belt_inventory_helper.h:28: warning: comparison between signed and unsigned integer expressions
char_item.cpp: In member function 'bool CHARACTER::IsEmptyItemGrid(TItemPos, BYTE, int) const':
char_item.cpp:647: warning: comparison is always false due to limited range of data type
char_item.cpp:673: warning: comparison is always false due to limited range of data type
char_item.cpp: In member function 'bool CHARACTER::UseItemEx(CItem*, TItemPos)':
char_item.cpp:2394: warning: format '%d' expects type 'int', but argument 6 has type 'long int'
char_item.cpp:2398: warning: format '%d' expects type 'int', but argument 6 has type 'long int'
char_item.cpp:2410: warning: format '%d' expects type 'int', but argument 5 has type 'long int'
char_item.cpp:2414: warning: format '%d' expects type 'int', but argument 5 has type 'long int'
char_item.cpp:2441: warning: format '%d' expects type 'int', but argument 6 has type 'long int'
char_item.cpp:2449: warning: format '%d' expects type 'int', but argument 5 has type 'long int'
char_item.cpp:5106: warning: comparison between signed and unsigned integer expressions
char_item.cpp: In member function 'bool CHARACTER::UseItem(TItemPos, TItemPos)':
char_item.cpp:5178: warning: unused variable 'wDestCell'
char_item.cpp:5179: warning: unused variable 'bDestInven'
char_item.cpp: In member function 'bool CHARACTER::EquipItem(CItem*, int)':
char_item.cpp:6213: warning: array subscript has type 'char'
char_item.cpp: In member function 'void CHARACTER::BuffOnAttr_AddBuffsFromItem(CItem*)':
char_item.cpp:6277: warning: comparison between signed and unsigned integer expressions
char_item.cpp: In member function 'void CHARACTER::BuffOnAttr_RemoveBuffsFromItem(CItem*)':
char_item.cpp:6289: warning: comparison between signed and unsigned integer expressions
char_item.cpp: In member function 'bool CHARACTER::CanEquipNow(CItem*, const TItemPos&, const TItemPos&)':
char_item.cpp:7475: warning: unused variable 'itemType'
char_item.cpp:7476: warning: unused variable 'itemSubType'
char_item.cpp: At global scope:
char_item.cpp:7580: error: expected unqualified-id before 'if'
gmake: *** [OBJDIR/char_item.o] Error 1
gmake: *** Waiting for unfinished jobs....
[email protected]:/usr/src/mainline/Srcs/Server/game/src #

Thanks for your help!

 

Greetings: Pr0HunT

Link to comment
Share on other sites

  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.