Jump to content

Weapon effect binary Source


Go to solution Solved by WeedHex,

Recommended Posts

Hello my friends.
My problem is that : 
Gyazo

The weapons are not visible, just the sword.
could someone help where the error?

Instancebase.cpp

case CItemData::ITEM_TYPE_WEAPON:
		__ClearWeaponRefineEffect();

		if (refine < 6)	//ÇöÀç Á¦·Ãµµ 7 ÀÌ»ó¸¸ ÀÌÆåÆ®°¡ ÀÖ½À´Ï´Ù.
			return 0;
		switch (pItem->GetSubType())
		{
		case CItemData::WEAPON_DAGGER:
			m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SMALLSWORD_REFINED7 + refine - 9;
			m_swordRefineEffectLeft = EFFECT_REFINED + EFFECT_SMALLSWORD_REFINED7_LEFT + refine - 9;
			break;
		case CItemData::WEAPON_FAN:
			m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_FANBELL_REFINED7 + refine - 9;
			break;
		case CItemData::WEAPON_ARROW:
		case CItemData::WEAPON_BELL:
			m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SMALLSWORD_REFINED7 + refine - 9;
			break;
		case CItemData::WEAPON_BOW:
			m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_BOW_REFINED7 + refine - 9;
			break;
		default:
			m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 9;
		}

		if (pItem->GetSubType() == CItemData::WEAPON_SWORD)
		{
			//NEW WEAPON - [New Effect] - NEW WEAPON
			DWORD vnum = pItem->GetIndex();

			if (vnum == 27749) // Change "ID" to your Weapon ID
			{
				__ClearWeaponRefineEffect(); // Clear the previous effect
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL1; // effect 24 NEW EFFECT
			}
			if (pItem->GetSubType() == CItemData::WEAPON_BELL) // For swords
			{
				DWORD vnum = pItem->GetIndex();

			if (vnum == 45319)				// ID = Your Weapon ID ~ 1 Single ID
			{
					__ClearWeaponRefineEffect();
					m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SMALLSWORD_REFINED7 + refine - 9;
					m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL8;
				}
			//End NEW WEAPON - [New Effect] - NEW WEAPON
		}
	}


		if (m_swordRefineEffectRight)
			m_swordRefineEffectRight = __AttachEffect(m_swordRefineEffectRight);
		if (m_swordRefineEffectLeft)
			m_swordRefineEffectLeft = __AttachEffect(m_swordRefineEffectLeft);
		break;
	case CItemData::ITEM_TYPE_ARMOR:
		__ClearArmorRefineEffect();

Instancebase.h
 

enum	//ľĆ·ˇ ąřČŁ°ˇ ąŮ˛î¸é registerEffect Âʵµ ąŮ˛Ůľî Áŕľß ÇŃ´Ů.
		{
			EFFECT_REFINED_NONE,

			EFFECT_SWORD_REFINED6,
			EFFECT_SWORD_REFINED7,
			EFFECT_SWORD_REFINED8,
			EFFECT_SWORD_REFINED9,

			EFFECT_BOW_REFINED6,
			EFFECT_BOW_REFINED7,
			EFFECT_BOW_REFINED8,
			EFFECT_BOW_REFINED9,

			EFFECT_FANBELL_REFINED6,
			EFFECT_FANBELL_REFINED7,
			EFFECT_FANBELL_REFINED8,
			EFFECT_FANBELL_REFINED9,

			EFFECT_SMALLSWORD_REFINED6,
			EFFECT_SMALLSWORD_REFINED7,
			EFFECT_SMALLSWORD_REFINED8,
			EFFECT_SMALLSWORD_REFINED9,

			EFFECT_SMALLSWORD_REFINED6_LEFT,
			EFFECT_SMALLSWORD_REFINED7_LEFT,
			EFFECT_SMALLSWORD_REFINED8_LEFT,
			EFFECT_SMALLSWORD_REFINED9_LEFT,

			EFFECT_BODYARMOR_REFINED7,
			EFFECT_BODYARMOR_REFINED8,
			EFFECT_BODYARMOR_REFINED9,

			EFFECT_BODYARMOR_SPECIAL,
			EFFECT_BODYARMOR_SPECIAL2,

			EFFECT_SWORD_REFINED_SPECIAL1,	// NEW_WEAPON_EFFECT_24 sword
			EFFECT_SWORD_REFINED_SPECIAL2,	// NEW_WEAPON_EFFECT_25 sword
			EFFECT_SWORD_REFINED_SPECIAL3,	// NEW_WEAPON_EFFECT_26 sword
			EFFECT_SWORD_REFINED_SPECIAL4,	// NEW_WEAPON_EFFECT_27 sword
			EFFECT_SWORD_REFINED_SPECIAL5,	// NEW_WEAPON_EFFECT_28 sword

			EFFECT_SWORD_REFINED_SPECIAL6,  //Weapon shining dagger29
			EFFECT_SWORD_REFINED_SPECIAL7,  //Weapon shining dagger30
			EFFECT_SWORD_REFINED_SPECIAL8,  //Weapon shining dagger31
			EFFECT_SWORD_REFINED_SPECIAL9,  //Weapon shining dagger32
			EFFECT_SWORD_REFINED_SPECIAL10,  //Weapon shining dagger33

			EFFECT_SWORD_REFINED_SPECIAL11,  //Weapon shining fan34
			EFFECT_SWORD_REFINED_SPECIAL12,  //Weapon shining fan35
			EFFECT_SWORD_REFINED_SPECIAL13,  //Weapon shining fan36
			EFFECT_SWORD_REFINED_SPECIAL14,  //Weapon shining fan37
			EFFECT_SWORD_REFINED_SPECIAL15,  //Weapon shining fan38

			EFFECT_SWORD_REFINED_SPECIAL16,  //Weapon shining bell39
			EFFECT_SWORD_REFINED_SPECIAL17,  //Weapon shining bell40
			EFFECT_SWORD_REFINED_SPECIAL18,  //Weapon shining bell41
			EFFECT_SWORD_REFINED_SPECIAL19,  //Weapon shining bell42
			EFFECT_SWORD_REFINED_SPECIAL20,  //Weapon shining bell43

			EFFECT_SWORD_REFINED_SPECIAL21,  //Weapon shining bow44
			EFFECT_SWORD_REFINED_SPECIAL22,  //Weapon shining bow45
			EFFECT_SWORD_REFINED_SPECIAL23,  //Weapon shining bow46
			EFFECT_SWORD_REFINED_SPECIAL24,  //Weapon shining bow47
			EFFECT_SWORD_REFINED_SPECIAL25,  //Weapon shining bow48


playersettingmodule.py
 

	chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+26, "PART_WEAPON", "D:/ymir work/item/weapon/sura_spada142.mse")
	chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+27, "PART_WEAPON", "D:/ymir work/item/weapon/fms.mse")	## Effect for sword
	chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+28, "PART_WEAPON_LEFT", "D:/ymir work/item/weapon/dagger_2k18.mse")
	chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+29, "PART_WEAPON_LEFT", "D:/ymir work/item/weapon//dagger_2k18.mse")	## Effect for dagger
	chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+30, "PART_WEAPON", "D:/ymir work/item/weapon/campana142.mse")
	chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+31, "PART_WEAPON", "D:/ymir work/item/weapon/BLUE/campana142.mse")	## Effect for fan
	chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+32, "PART_WEAPON", "D:/ymir work/item/weapon/antyk.mse")
	chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+33, "PART_WEAPON", "D:/ymir work/item/weapon/antyk.mse")	## Effect for bell
	chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+34, "PART_WEAPON_LEFT", "D:/ymir work/item/weapon/arco142.mse")
	chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+35, "PART_WEAPON_LEFT", "D:/ymir work/item/weapon/BLUE/arco142.mse")
	chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+36, "PART_WEAPON_LEFT", "D:/ymir work/item/weapon/durlindana.mse")
	chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+37, "PART_WEAPON_LEFT", "D:/ymir work/item/weapon/BLUE/durlindana.mse")	## Effect for bow





I found this, but I don't know how to add the other… dagger, fan, bell, bow,,two handed..




 

UINT CInstanceBase::__GetRefinedEffect(CItemData* pItem)
{
	DWORD refine = max(pItem->GetRefine() + pItem->GetSocketCount(),CItemData::ITEM_SOCKET_MAX_NUM) - CItemData::ITEM_SOCKET_MAX_NUM;
	switch (pItem->GetType())
	{
	case CItemData::ITEM_TYPE_WEAPON:
		__ClearWeaponRefineEffect();		

		if (refine < 7)	//ÇöÀç Á¦·Ãµµ 7 ÀÌ»ó¸¸ ÀÌÆåÆ®°¡ ÀÖ½À´Ï´Ù.
			return 0;
		switch(pItem->GetSubType())
		{
		case CItemData::WEAPON_DAGGER:
			m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_SMALLSWORD_REFINED7+refine-7;
			m_swordRefineEffectLeft = EFFECT_REFINED+EFFECT_SMALLSWORD_REFINED7_LEFT+refine-7;
			break;
		case CItemData::WEAPON_FAN:
			m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_FANBELL_REFINED7+refine-7;
			break;
		case CItemData::WEAPON_ARROW:
		case CItemData::WEAPON_BELL:
			m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_SMALLSWORD_REFINED7+refine-7;
			break;
		case CItemData::WEAPON_BOW:
			m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_BOW_REFINED7+refine-7;
			break;
		default:
			m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_SWORD_REFINED7+refine-7;
		}

		if (pItem->GetSubType() == CItemData::WEAPON_SWORD)
		{
			//NEW WEAPON - [New Effect] - NEW WEAPON
			DWORD vnum = pItem->GetIndex();

			if (vnum == ID) // Change "ID" to your Weapon ID
			{
				__ClearWeaponRefineEffect(); // Clear the previous effect
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7; // Normal Weapon Refine-effect
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL1; // effect 24 NEW EFFECT
			}
			//End NEW WEAPON - [New Effect] - NEW WEAPON
		}

		if (m_swordRefineEffectRight)
			m_swordRefineEffectRight = __AttachEffect(m_swordRefineEffectRight);
		if (m_swordRefineEffectLeft)
			m_swordRefineEffectLeft = __AttachEffect(m_swordRefineEffectLeft);
		break;


Thanks for the help

Edited by Metin2 Dev
Core X - External 2 Internal
  • Think 1
  • Good 1
Link to comment
Share on other sites

This way:
 

		else if (pItem->GetSubType() == CItemData::WEAPON_TWO_HANDED)
		{
			if (vnum == 9619)
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_RIB_MDE;
			else if (vnum == 9679)
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_HARAG_MDE;
			else if (vnum == 9739)
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SARGASARKANY_MDE;
		}
		else if (pItem->GetSubType() == CItemData::WEAPON_DAGGER)
		{
			if (vnum == 9629)
			{
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_FLT_MDE;
				m_swordRefineEffectLeft = EFFECT_REFINED + EFFECT_FLT_2_MDE;
			}
			else if (vnum == 9689)
			{
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_DWC_MDE;
				m_swordRefineEffectLeft = EFFECT_REFINED + EFFECT_DWC_2_MDE;
			}
			else if (vnum == 9749)
			{ 
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_LELEKTELEN_MDE;
				m_swordRefineEffectLeft = EFFECT_REFINED + EFFECT_LELEKTELEN_2_MDE;
			}
		}

 

  • Love 1
Link to comment
Share on other sites

now it looks like this
 

if (pItem->GetSubType() == CItemData::WEAPON_SWORD)
		{
			//NEW WEAPON - [New Effect] - NEW WEAPON
			DWORD vnum = pItem->GetIndex();

			if (vnum == 27749) // Change "ID" to your Weapon ID
			{
				__ClearWeaponRefineEffect(); // Clear the previous effect
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL1; // effect 24 NEW EFFECT
			}
			else if (pItem->GetSubType() == CItemData::WEAPON_DAGGER)
			{
			if (vnum == 27769)
			{
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL2;
				m_swordRefineEffectLeft = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL2_1;
			}
			else if (pItem->GetSubType() == CItemData::WEAPON_FAN)
			{
			if (vnum == 27789)
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL3;
			}

		}	//End NEW WEAPON - [New Effect] - NEW WEAPON
	}
Quote

			EFFECT_SWORD_REFINED_SPECIAL1,	// NEW_WEAPON_EFFECT_24 sword
			EFFECT_SWORD_REFINED_SPECIAL2,
			EFFECT_SWORD_REFINED_SPECIAL2_1, // NEW_WEAPON_EFFECT_25 dagger
			EFFECT_SWORD_REFINED_SPECIAL3,	// NEW_WEAPON_EFFECT_26 fan
			EFFECT_SWORD_REFINED_SPECIAL4,	// NEW_WEAPON_EFFECT_27 bell
			EFFECT_SWORD_REFINED_SPECIAL5,	// NEW_WEAPON_EFFECT_28 bow

 




only that weapon is visible, which is "+ 24" in playersettingsmodule.py
 

chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+24, "PART_WEAPON", "D:/ymir work/item/weapon/sura_spada142.mse")	## Effect for sword
	chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+25, "PART_WEAPON_LEFT", "D:/ymir work/item/weapon/dagger_2k18.mse")	## Effect for dagger
	chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+26, "PART_WEAPON", "D:/ymir work/item/weapon/campana142.mse")	## Effect for fan


if I overwrite this: 
    chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+24, "PART_WEAPON", "D:/ymir work/item/weapon/campana142.mse")    ## Effect for fan
 

then only the fan..

ITEMPROTO:
 

Quote

27749	SWORD	ITEM_WEAPON	WEAPON_SWORD	2	ANTI_MUDANG	ITEM_TUNABLE	WEAR_WEAPON		15000	0	291	352	15	LEVEL	30	LIMIT_NONE	0	APPLY_ATT_SPEED	15	APPLY_MAX_HP	500	APPLY_NONE	0	0	62	88	57	73	0	0	3	-1

27769	DAGGER	ITEM_WEAPON	WEAPON_DAGGER	2	ANTI_MUSA | ANTI_SURA | ANTI_MUDANG | ANTI_SELL	ITEM_TUNABLE	WEAR_WEAPON		10000	10000	0	0	5	LEVEL	99	LIMIT_NONE	0	APPLY_PENETRATE_PCT	100	APPLY_ATTBONUS_HUMAN	60	APPLY_NORMAL_HIT_DAMAGE_BONUS	65	0	3900	4000	4600	4650	0	100	3	0
27789	FAN	ITEM_WEAPON	WEAPON_FAN	1	ANTI_MUSA | ANTI_ASSASSIN | ANTI_SURA	ITEM_TUNABLE	WEAR_WEAPON		20000	33000	7162	353	15	LEVEL	30	LIMIT_NONE	0	APPLY_ATT_SPEED	15	APPLY_MAX_HP	1500	APPLY_NONE	0	0	45	76	43	55	6	0	3	-1

 

 

Link to comment
Share on other sites

		DWORD vnum = pItem->GetIndex();
		if (pItem->GetSubType() == CItemData::WEAPON_SWORD) {
			//NEW WEAPON - [New Effect] - NEW WEAPON
			if (vnum == 27749) { // Change "ID" to your Weapon ID 
				__ClearWeaponRefineEffect(); // Clear the previous effect
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL1; // effect 24 NEW EFFECT
			}
		}
		else if (pItem->GetSubType() == CItemData::WEAPON_DAGGER) {
			if (vnum == 27769) {
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL2;
				m_swordRefineEffectLeft = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL2_1;
			}
		}
		else if (pItem->GetSubType() == CItemData::WEAPON_FAN) {
			if (vnum == 27789){
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL3;
			}
		}

no more to say

  • Love 1
Link to comment
Share on other sites

30 minutes ago, LordZiege said:

		DWORD vnum = pItem->GetIndex();
		if (pItem->GetSubType() == CItemData::WEAPON_SWORD) {
			//NEW WEAPON - [New Effect] - NEW WEAPON
			if (vnum == 27749) { // Change "ID" to your Weapon ID 
				__ClearWeaponRefineEffect(); // Clear the previous effect
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL1; // effect 24 NEW EFFECT
			}
		}
		else if (pItem->GetSubType() == CItemData::WEAPON_DAGGER) {
			if (vnum == 27769) {
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL2;
				m_swordRefineEffectLeft = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL2_1;
			}
		}
		else if (pItem->GetSubType() == CItemData::WEAPON_FAN) {
			if (vnum == 27789){
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL3;
			}
		}

no more to say



2 error…
 

UINT CInstanceBase::__GetRefinedEffect(CItemData* pItem)
{
	DWORD refine = max(pItem->GetRefine() + pItem->GetSocketCount(), CItemData::ITEM_SOCKET_MAX_NUM) - CItemData::ITEM_SOCKET_MAX_NUM;
	switch (pItem->GetType())
	{
	case CItemData::ITEM_TYPE_WEAPON:
		__ClearWeaponRefineEffect();

		if (refine < 6)	//ÇöÀç Á¦·Ãµµ 7 ÀÌ»ó¸¸ ÀÌÆåÆ®°¡ ÀÖ½À´Ï´Ù.
			return 0;
		switch (pItem->GetSubType())
		{
		case CItemData::WEAPON_DAGGER:
			m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SMALLSWORD_REFINED7 + refine - 9;
			m_swordRefineEffectLeft = EFFECT_REFINED + EFFECT_SMALLSWORD_REFINED7_LEFT + refine - 9;
			break;
		case CItemData::WEAPON_FAN:
			m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_FANBELL_REFINED7 + refine - 9;
			break;
		case CItemData::WEAPON_ARROW:
		case CItemData::WEAPON_BELL:
			m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SMALLSWORD_REFINED7 + refine - 9;
			break;
		case CItemData::WEAPON_BOW:
			m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_BOW_REFINED7 + refine - 9;
			break;
		default:
			m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 9;
		}

		DWORD vnum = pItem->GetIndex();
		if (pItem->GetSubType() == CItemData::WEAPON_SWORD) {
			//NEW WEAPON - [New Effect] - NEW WEAPON
			if (vnum == 27749) { // Change "ID" to your Weapon ID 
				__ClearWeaponRefineEffect(); // Clear the previous effect
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL1; // effect 24 NEW EFFECT
			}
		}
		else if (pItem->GetSubType() == CItemData::WEAPON_DAGGER) {
			if (vnum == 27769) {
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL2;
				m_swordRefineEffectLeft = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL2_1;
			}
		}
		else if (pItem->GetSubType() == CItemData::WEAPON_FAN) {
			if (vnum == 27789){
			m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL3;

			}
				//End NEW WEAPON - [New Effect] - NEW WEAPON
	}
		
		if (m_swordRefineEffectRight)
			m_swordRefineEffectRight = __AttachEffect(m_swordRefineEffectRight);
		if (m_swordRefineEffectLeft)
			m_swordRefineEffectLeft = __AttachEffect(m_swordRefineEffectLeft);
		break;
	case CItemData::ITEM_TYPE_ARMOR:
		__ClearArmorRefineEffect();

		// 갑옷 특화 이펙트
		if (pItem->GetSubType() == CItemData::ARMOR_BODY)
		{
			DWORD vnum = pItem->GetIndex();

			if (12010 <= vnum && vnum <= 12049)
			{
				__AttachEffect(EFFECT_REFINED + EFFECT_BODYARMOR_SPECIAL);
				__AttachEffect(EFFECT_REFINED + EFFECT_BODYARMOR_SPECIAL2);
			}

			if (!shiningdata.empty())
			{
				for (shiningit = shiningdata.begin(); shiningit != shiningdata.end(); shiningit++)
				if (shiningit->first == vnum)
				{
					std::string substr(shiningit->second);
					std::vector<string> chars;
					boost::split(chars, substr, boost::is_any_of("#"));
					for (std::vector<string>::size_type i = 0; i != chars.size(); i++)
					{
						__AttachEffectToArmours(chars[i]);
					}
				}
			}

		}

		if (refine < 7)	//현재 제련도 7 이상만 이펙트가 있습니다.
			return 0;

		if (pItem->GetSubType() == CItemData::ARMOR_BODY)
		{
			m_armorRefineEffect = EFFECT_REFINED + EFFECT_BODYARMOR_REFINED7 + refine - 7;
			__AttachEffect(m_armorRefineEffect);
		}
		break;
	case CItemData::ITEM_TYPE_COSTUME:
		__ClearArmorRefineEffect();

		// 갑옷 특화 이펙트
		if (pItem->GetSubType() == CItemData::COSTUME_BODY)
		{
			DWORD vnum = pItem->GetIndex();
			if (!shiningdata.empty())
			{
				for (shiningit = shiningdata.begin(); shiningit != shiningdata.end(); shiningit++)
				if (shiningit->first == vnum)
				{
					std::string substr(shiningit->second);
					std::vector<string> chars;
					boost::split(chars, substr, boost::is_any_of("#"));
					for (std::vector<string>::size_type i = 0; i != chars.size(); i++)
					{
						__AttachEffectToArmours(chars[i]);
					}
				}
			}

		}
		break;

	}
	return 0;
}



video

"Error    52    error C2360: initialization of 'vnum' is skipped by 'case' label   "    begin "case CItemData::ITEM_TYPE_ARMOR:"
"Error    53    error C2360: initialization of 'vnum' is skipped by 'case' label   "   begin "     case CItemData::ITEM_TYPE_COSTUME:"

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Premium
  • Solution
Spoiler

UINT CInstanceBase::__GetRefinedEffect(CItemData* pItem)
{
    DWORD refine = max(pItem->GetRefine() + pItem->GetSocketCount(), CItemData::ITEM_SOCKET_MAX_NUM) - CItemData::ITEM_SOCKET_MAX_NUM;
    const DWORD dwVnum = pItem->GetIndex();
    const DWORD dwType = pItem->GetType();
    const DWORD dwSubType = pItem->GetSubType();

    if (!dwVnum)
        return 0;

    switch (dwType)
    {
        case CItemData::ITEM_TYPE_WEAPON:
        {
            __ClearWeaponRefineEffect();

            if (refine < 6)
                return 0;

            switch (dwSubType)
            {
                case CItemData::WEAPON_DAGGER:
                    m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SMALLSWORD_REFINED7 + refine - 9;
                    m_swordRefineEffectLeft = EFFECT_REFINED + EFFECT_SMALLSWORD_REFINED7_LEFT + refine - 9;
                    break;
                case CItemData::WEAPON_FAN:
                    m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_FANBELL_REFINED7 + refine - 9;
                    break;
                case CItemData::WEAPON_ARROW:
                case CItemData::WEAPON_BELL:
                    m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SMALLSWORD_REFINED7 + refine - 9;
                    break;
                case CItemData::WEAPON_BOW:
                    m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_BOW_REFINED7 + refine - 9;
                    break;
                default:
                    m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 9;
            }

            if (dwSubType == CItemData::WEAPON_SWORD)
            {
                if (dwVnum == 27749)
                {
                    __ClearWeaponRefineEffect();
                    m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL1; // effect 24 NEW EFFECT
                }
            }
            else if (dwSubType == CItemData::WEAPON_DAGGER)
            {
                if (dwVnum == 27769) 
                {
                    m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL2;
                    m_swordRefineEffectLeft = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL2_1;
                }
            }
            else if (dwSubType == CItemData::WEAPON_FAN)
            {
                if (dwVnum == 27789)
                {
                    m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL3;
                }
            }

            if (m_swordRefineEffectRight)
                m_swordRefineEffectRight = __AttachEffect(m_swordRefineEffectRight);

            if (m_swordRefineEffectLeft)
                m_swordRefineEffectLeft = __AttachEffect(m_swordRefineEffectLeft);
        }
        break;

        case CItemData::ITEM_TYPE_ARMOR:
        {
            __ClearArmorRefineEffect();

            if (dwSubType == CItemData::ARMOR_BODY)
            {

                if (12010 <= dwVnum && dwVnum <= 12049)
                {
                    __AttachEffect(EFFECT_REFINED + EFFECT_BODYARMOR_SPECIAL);
                    __AttachEffect(EFFECT_REFINED + EFFECT_BODYARMOR_SPECIAL2);
                }

                if (!shiningdata.empty())
                {
                    for (shiningit = shiningdata.begin(); shiningit != shiningdata.end(); shiningit++){
                        if (shiningit->first == dwVnum)
                        {
                            std::string substr(shiningit->second);
                            std::vector<string> chars;
                            boost::split(chars, substr, boost::is_any_of("#"));
                            for (std::vector<string>::size_type i = 0; i != chars.size(); i++)
                            {
                                __AttachEffectToArmours(chars);
                            }
                        }
                    }
                }
            }

            if (refine < 7)
                return 0;

            if (dwSubType == CItemData::ARMOR_BODY)
            {
                m_armorRefineEffect = EFFECT_REFINED + EFFECT_BODYARMOR_REFINED7 + refine - 7;
                __AttachEffect(m_armorRefineEffect);
            }
        }
        break;

        case CItemData::ITEM_TYPE_COSTUME:
        {
            __ClearArmorRefineEffect();

            if (dwSubType == CItemData::COSTUME_BODY)
            {
                if (!shiningdata.empty())
                {
                    for (shiningit = shiningdata.begin(); shiningit != shiningdata.end(); shiningit++){
                        if (shiningit->first == dwVnum)
                        {
                            std::string substr(shiningit->second);
                            std::vector<string> chars;
                            boost::split(chars, substr, boost::is_any_of("#"));
                            for (std::vector<string>::size_type i = 0; i != chars.size(); i++)
                            {
                                __AttachEffectToArmours(chars);
                            }
                        }
                    }
                }
            }
        }
        break;
    }

    return 0;
}

 

Work on this remake, you was fucking the indentation.

  • Love 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



×
×
  • 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.