Fix bug Item Swap

Aici poți găsi sisteme complete, verificate și recomandate de echipa 4Metin.
Avatar utilizator
MariusIon
4Metin
4Metin
Mesaje: 63
Membru din: Lun Ian 16, 2023 3:41 pm
Status: Activ
Multumiri acordate: 1
Contact:

Fix bug Item Swap

Mesaj de MariusIon »

Cauta in char_item.cpp

Cod: Selectaţi tot

		if (item1->EquipTo(this, bEquipCell))
			item2->AddToCharacter(this, TItemPos(INVENTORY, bInvenCell));
		else
			sys_err("SwapItem cannot equip %s! item1 %s", item2->GetName(), item1->GetName());
Modifica cu :

Cod: Selectaţi tot

		if (item1->EquipTo(this, bEquipCell)) 
		{
			item2->AddToCharacter(this, TItemPos(INVENTORY, bInvenCell));
			item2->ModifyPoints(false); //item_swap fix 
			ComputePoints();			// item_swap fix
		} 
		else
		{
			sys_err("SwapItem cannot equip %s! item1 %s", item2->GetName(), item1->GetName());
		}
Avatar utilizator
RazVan
Administrator
Administrator
Mesaje: 695
Membru din: Mie Oct 19, 2022 5:25 pm
Localitate: München
Status: Activ
Multumiri acordate: 12
Multumiri primite: 18
Contact:

Re: Fix bug Item Swap

Mesaj de RazVan »

MariusIon scrie: Vin Oct 11, 2024 6:40 pm Cauta in char_item.cpp

Cod: Selectaţi tot

		if (item1->EquipTo(this, bEquipCell))
			item2->AddToCharacter(this, TItemPos(INVENTORY, bInvenCell));
		else
			sys_err("SwapItem cannot equip %s! item1 %s", item2->GetName(), item1->GetName());
Modifica cu :

Cod: Selectaţi tot

		if (item1->EquipTo(this, bEquipCell)) 
		{
			item2->AddToCharacter(this, TItemPos(INVENTORY, bInvenCell));
			item2->ModifyPoints(false); //item_swap fix 
			ComputePoints();			// item_swap fix
		} 
		else
		{
			sys_err("SwapItem cannot equip %s! item1 %s", item2->GetName(), item1->GetName());
		}
Explica l te rog mai pe larg sa stie toti !
Imagine
Avatar utilizator
MariusIon
4Metin
4Metin
Mesaje: 63
Membru din: Lun Ian 16, 2023 3:41 pm
Status: Activ
Multumiri acordate: 1
Contact:

Re: Fix bug Item Swap

Mesaj de MariusIon »

Iti rezolva problema cu statusul pe - si vizual la atac in general se gaseste la martysama cand folosesti tarnacopul sau undita
Scrie răspuns