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

Costume weapon effect bug


TrueLev

Question

Hi,

When i equip a costume weapon, the sword +7 / +8 / +9 effect not disappear. 

If i ride a mount or relog, the effect disappear.

Can somebody give me a fix to the effect disappear immediately when i equip a costume weapon?

 

Edit: Figured out and solved UserInterface/InstanceBase.cpp

 

void CInstanceBase::RefreshState(DWORD dwMotIndex, bool isLoop)
{
	DWORD dwPartItemID = m_GraphicThingInstance.GetPartItemID(CRaceData::PART_WEAPON);

	BYTE byItemType = 0xff;
	BYTE bySubType = 0xff;

	CItemManager & rkItemMgr = CItemManager::Instance();
	CItemData * pItemData;
	
	if (rkItemMgr.GetItemDataPointer(dwPartItemID, &pItemData))
	{
		byItemType = pItemData->GetType();
		bySubType = pItemData->GetWeaponType();
	}

	if (IsPoly())
	{
		SetMotionMode(CRaceMotionData::MODE_GENERAL);
	}
	else if (IsWearingDress())
	{
		SetMotionMode(CRaceMotionData::MODE_WEDDING_DRESS);
	}
	else if (IsHoldingPickAxe())
	{
		if (m_kHorse.IsMounting())
		{
			SetMotionMode(CRaceMotionData::MODE_HORSE);
		}
		else
		{
			SetMotionMode(CRaceMotionData::MODE_GENERAL);
		}
	}
	else if (CItemData::ITEM_TYPE_ROD == byItemType)
	{
		if (m_kHorse.IsMounting())
		{
			SetMotionMode(CRaceMotionData::MODE_HORSE);
		}
		else
		{
			SetMotionMode(CRaceMotionData::MODE_FISHING);
		}
	}
	else if (m_kHorse.IsMounting())
	{
		switch (bySubType)
		{
			case CItemData::COSTUME_WEAPON_SWORD:
				__ClearWeaponRefineEffect();
			case CItemData::WEAPON_SWORD:
				SetMotionMode(CRaceMotionData::MODE_HORSE_ONEHAND_SWORD);
				break;

			case CItemData::COSTUME_WEAPON_TWO_HANDED:
				__ClearWeaponRefineEffect();
			case CItemData::WEAPON_TWO_HANDED:
				SetMotionMode(CRaceMotionData::MODE_HORSE_TWOHAND_SWORD); // Only Warrior
				break;

			case CItemData::COSTUME_WEAPON_DAGGER:
				__ClearWeaponRefineEffect();
			case CItemData::WEAPON_DAGGER:
				SetMotionMode(CRaceMotionData::MODE_HORSE_DUALHAND_SWORD); // Only Assassin
				break;

			case CItemData::COSTUME_WEAPON_FAN:
				__ClearWeaponRefineEffect();
			case CItemData::WEAPON_FAN:
				SetMotionMode(CRaceMotionData::MODE_HORSE_FAN); // Only Shaman
				break;

			case CItemData::COSTUME_WEAPON_BELL:
				__ClearWeaponRefineEffect();
			case CItemData::WEAPON_BELL:
				SetMotionMode(CRaceMotionData::MODE_HORSE_BELL); // Only Shaman
				break;

			case CItemData::COSTUME_WEAPON_BOW:
				__ClearWeaponRefineEffect();
			case CItemData::WEAPON_BOW:
				SetMotionMode(CRaceMotionData::MODE_HORSE_BOW); // Only Shaman
				break;

			default:
				SetMotionMode(CRaceMotionData::MODE_HORSE);
				break;
		}
	}
	else
	{
		switch (bySubType)
		{
			case CItemData::COSTUME_WEAPON_SWORD:
			__ClearWeaponRefineEffect();
			case CItemData::WEAPON_SWORD:
				SetMotionMode(CRaceMotionData::MODE_ONEHAND_SWORD);
				break;

			case CItemData::COSTUME_WEAPON_TWO_HANDED:
			__ClearWeaponRefineEffect();
			case CItemData::WEAPON_TWO_HANDED:
				SetMotionMode(CRaceMotionData::MODE_TWOHAND_SWORD); // Only Warrior
				break;

			case CItemData::COSTUME_WEAPON_DAGGER:
			__ClearWeaponRefineEffect();
			case CItemData::WEAPON_DAGGER:
				SetMotionMode(CRaceMotionData::MODE_DUALHAND_SWORD); // Only Assassin
				break;

			case CItemData::COSTUME_WEAPON_BOW:
			__ClearWeaponRefineEffect();
			case CItemData::WEAPON_BOW:
				SetMotionMode(CRaceMotionData::MODE_BOW); // Only Assassin
				break;

			case CItemData::COSTUME_WEAPON_FAN:
			__ClearWeaponRefineEffect();
			case CItemData::WEAPON_FAN:
				SetMotionMode(CRaceMotionData::MODE_FAN); // Only Shaman
				break;

			case CItemData::COSTUME_WEAPON_BELL:
			__ClearWeaponRefineEffect();
			case CItemData::WEAPON_BELL:
				SetMotionMode(CRaceMotionData::MODE_BELL); // Only Shaman
				break;

			case CItemData::WEAPON_ARROW:
			default:
				SetMotionMode(CRaceMotionData::MODE_GENERAL);
				break;
		}
	}

	if (isLoop)
		m_GraphicThingInstance.InterceptLoopMotion(dwMotIndex);
	else
		m_GraphicThingInstance.InterceptOnceMotion(dwMotIndex);

	RefreshActorInstance();
}

 

  • Love 1
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

 

Hi! It doesn't even disappear because you don't have to look there :)

bool CInstanceBase::SetWeapon(DWORD eWeapon)
{
    if (IsPoly())
        return false;

    if (__IsShapeAnimalWear())
        return false;

    if (__IsChangableWeapon(eWeapon) == false)
        eWeapon = 0;

    m_GraphicThingInstance.AttachWeapon(eWeapon);
    m_awPart[CRaceData::PART_WEAPON] = eWeapon;

    //Weapon Effect
    CItemData * pItemData;
    if (CItemManager::Instance().GetItemDataPointer(eWeapon, &pItemData))
        __GetRefinedEffect(pItemData);
    else
        __ClearWeaponRefineEffect();
    // Weapon Sword Effect
#ifdef ENABLE_COSTUME_WEAPON_SYSTEM
    if (pItemData->GetType() == CItemData::ITEM_TYPE_COSTUME)
        __ClearWeaponRefineEffect();
#endif

    return true;
}

BTW 

 
 
look good and it will go :)

Killer

Link to comment
Share on other sites

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.


  • Activity

    1. 3

      Back to the Dungeon System 7, 8, 9th Floor Problem

    2. 3

      Back to the Dungeon System 7, 8, 9th Floor Problem

    3. 3

      Back to the Dungeon System 7, 8, 9th Floor Problem

    4. 0

      Some mobs dont drop items

    5. 3

      Back to the Dungeon System 7, 8, 9th Floor Problem

    6. 691

      [Group] Daily Music - Share your favorite!

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.