[Tutorial] Arme 3D cu efect

Ghiduri şi tutoriale despre cum să vă îmbunătăţiţi serverul/clientul dv. de metin2.
Neconectat
Avatar utilizator
Zeox
Mister Just4Metin

Mister Just4Metin
Mesaje: 10
Membru din: 30 Dec 2017, 08:47
Status: Sunt bine mersi
Mulţumiri acordate: 1  
Mulţumiri primite: 0

[Tutorial] Arme 3D cu efect

Mesaj de Zeox » 11 Ian 2021, 02:34

Aceasta am facuto pentru o persoana de aici din grup care avea probleme , e test de mine codu-l pentru ca il folosesc :

Source Client :
Deschide Locale_inc.cpp
Adauga undeva asta :
#define ENABLE_ARME_EFFECT_FULGER

Dupa deschide instancebase.cpp
Cauta :
UINT CInstanceBase::__GetRefinedEffect(CItemData* pItem)
Dupa ce gasestii functia asta , sus la asta :
		if (m_swordRefineEffectRight)
			m_swordRefineEffectRight = __AttachEffect(m_swordRefineEffectRight);
		if (m_swordRefineEffectLeft)
			m_swordRefineEffectLeft = __AttachEffect(m_swordRefineEffectLeft);
		break;
Pui aceasta functie :
#ifdef ENABLE_ARME_EFFECT_FULGER
		if (pItem->GetSubType() == CItemData::WEAPON_SWORD) //// SABIE ////
		{
			DWORD vnum = pItem->GetIndex();
			if (vnum >= ID && vnum <= ID) // Schimba  "ID" pe  ID (vnum) al armei tale
			{
				__ClearWeaponRefineEffect(); // Clear the previous effect
////Aici schimbi numele la setu-l  care il pui/////
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_NEW1; //  NEW EFFECT ////Aici schimbi numele la setu-l  care il pui/////
			}
		}
		if (pItem->GetSubType() == CItemData::WEAPON_SWORD)
		{
			DWORD vnum = pItem->GetIndex();
			if (vnum >= ID && vnum <= ID) // Schimba  "ID" pe  ID (vnum) al armei tale
			{
				__ClearWeaponRefineEffect(); // Clear the previous effect
////Aici schimbi numele la setu-l  care il pui/////
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_NEW2; //  NEW EFFECT ////Aici schimbi numele la setu-l  care il pui/////
			}
		}
		if (pItem->GetSubType() == CItemData::WEAPON_TWO_HANDED) // DOUA MAINI //
		{
			DWORD vnum = pItem->GetIndex();
			if (vnum >= ID && vnum <= ID) // Cambiar "ID" por el ID (vnum) de tu arma
			{
				__ClearWeaponRefineEffect(); // Clear the previous effect
////Aici schimbi numele la setu-l  care il pui/////
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_NEW3; //  NEW EFFECT ////Aici schimbi numele la setu-l  care il pui/////
			}
		}
		if (pItem->GetSubType() == CItemData::WEAPON_BOW) // ARC //
		{
			DWORD vnum = pItem->GetIndex();
			if (vnum >= ID && vnum <= ID) // Schimba  "ID" pe  ID (vnum) al armei tale
			{
				__ClearWeaponRefineEffect();
////Aici schimbi numele la setu-l  care il pui/////
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_NEW4; //  NEW EFFECT ////Aici schimbi numele la setu-l  care il pui/////
			}
		}
		if (pItem->GetSubType() == CItemData::WEAPON_FAN) // CEPTRU //
		{
			DWORD vnum = pItem->GetIndex();
			if (vnum >= ID && vnum <= ID) // Schimba  "ID" pe  ID (vnum) al armei tale
			{
				__ClearWeaponRefineEffect(); // Clear the previous effect
////Aici schimbi numele la setu-l  care il pui/////
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_NEW5; //  NEW EFFECT ////Aici schimbi numele la setu-l  care il pui/////
			}
		}
		if (pItem->GetSubType() == CItemData::WEAPON_BELL) // FAN// 
		{
			DWORD vnum = pItem->GetIndex();
			if (vnum >= ID && vnum <= ID) //  Schimba  "ID" pe  ID (vnum) al armei tale
			{
				__ClearWeaponRefineEffect(); // Clear the previous effect
////Aici schimbi numele la setu-l  care il pui/////
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_NEW6; //  NEW EFFECT ////Aici schimbi numele la setu-l  care il pui/////
			}
		}
		if (pItem->GetSubType() == CItemData::WEAPON_DAGGER) // DAGA //
		{
			DWORD vnum = pItem->GetIndex();
			if (vnum >= ID && vnum <= ID) // Schimba  "ID" pe  ID (vnum) al armei tale
			{
				__ClearWeaponRefineEffect(); // Clear the previous effect
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED_NEW7; //  NEW EFFECT ////Aici schimbi numele la setu-l  care il pui/////
				m_swordRefineEffectLeft = EFFECT_REFINED + EFFECT_SWORD_REFINED_NEW_LEFT7; // NEW EFFECT 
////Aici schimbi numele la setu-l  care il pui/////
			}
		}
#endif

Dupa deschizii InstanceBase.h

Cauti :

EFFECT_REFINED_NUM,
si cand il gasesti deasuprea lui pui asta :
#ifdef ENABLE_ARME_EFFECT_FULGER
			EFFECT_SWORD_REFINED_NEW1,
			EFFECT_SWORD_REFINED_NEW2,
			EFFECT_SWORD_REFINED_NEW3,
			EFFECT_SWORD_REFINED_NEW4,
			EFFECT_SWORD_REFINED_NEW5,
			EFFECT_SWORD_REFINED_NEW6,
			EFFECT_SWORD_REFINED_NEW7,
			EFFECT_SWORD_REFINED_NEW_LEFT7,
#endif
Acum deschidem playersettingmodule.py :

Cautam :
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+20, "Bip01", "D:/ymir work/pc/common/effect/armor/armor-4-2-2.mse")
Jos de asta , facem codu-l la arma , asta e un exemplu:
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+21, "PART_WEAPON", "D:/ymir work/item/weapon/fms.mse")
Pentru , toate armele inafara de Arc si Pumnal , se foloseste PART_WEAPON , in cazul Arcului se foloseste functia asta
PART_WEAPON_LEFT
Si pentru pumnal se foloseste asta :
	chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+52, "PART_WEAPON", "D:/ymir work/item/weapon/ela.mse")
	chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+53, "PART_WEAPON_LEFT", "D:/ymir work/item/weapon/ela.mse")
Ai grija cu taburile , sper sa iti fie de folos.

Scrie răspuns

Înapoi la “Ghiduri şi Tutoriale”