Jump to content

[BUG] Costume Weapon -> Rod, Pickaxe


Recommended Posts

Hi devs,

I have a little problem with rod and pickaxe

 

here is my code from char_item.cpp:

if (item->GetType() == ITEM_WEAPON && item->GetSubType() != WEAPON_ARROW || 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;
		}
	}
	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() || item->GetType() == ITEM_ROD || item->GetType() == ITEM_PICK)
		{
			ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't wear a costume weapon who has different type of your weapon."));
			return false;
		}
	}

And what is my problem? All works fine but.. I have problem with costume weapon SWORD.. Just I can use weapon costume (sword) on rod and pickaxe.. (other costumes are blocked //daggers, bow, twohand, bell, fan) Can anyone help me? It is not hard but I dont have so much knowledge (c++ amateur)

Thanks.

Link to comment
Share on other sites

34 minutes ago, Cunoo said:

Hi devs,

I have a little problem with rod and pickaxe

 

here is my code from char_item.cpp:


if (item->GetType() == ITEM_WEAPON && item->GetSubType() != WEAPON_ARROW || 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;
		}
	}
	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() || item->GetType() == ITEM_ROD || item->GetType() == ITEM_PICK)
		{
			ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't wear a costume weapon who has different type of your weapon."));
			return false;
		}
	}

And what is my problem? All works fine but.. I have problem with costume weapon SWORD.. Just I can use weapon costume (sword) on rod and pickaxe.. (other costumes are blocked //daggers, bow, twohand, bell, fan) Can anyone help me? It is not hard but I dont have so much knowledge (c++ amateur)

Thanks.

Edit: Fixed by yourself just idiot:)  code == -> != :)

  • Good 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 3

      Feeding game source to LLM

    2. 113

      Ulthar SF V2 (TMP4 Base)

    3. 3

      Feeding game source to LLM

    4. 0

      Target Information System

    5. 3

      Feeding game source to LLM

    6. 2

      anti exp explanation pls

    7. 3

      Feeding game source to LLM

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

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.