Jump to content
  • We need you!

    You must register to discover all the features of our community!

  • 0

[Problem] ITEM_RING doesn't give bonuses


takbardzo

Question

Posted (edited)

 

1. Description of the problem / Question :

When an item with type 33 (ITEM_RING) is equipped, character doesn't receive any bonuses. It equips just fine and the item equip effect goes off, but there are no stats added. Also when I changed the ITEM_RING condition in char_item.cpp to just show me some kind of a message when I equip it, it worked, so it's probably a little too deeper for me.

 

 

2. SysErr ( Client / Server ) / SysLog ( Server )

nussink

 

3. How to reproduce it ?

So I've changed the magic lollipop type to 33 - nZuZHVK.png this one xD and it doesn't give any bonuses. And it did when it was still an ITEM_UNIQUE

 

4. Screenshots ?

Nothing to show here tbh...

 

 

 

 

 

Edited by takbardzo (see edit history)
Link to post

7 answers to this question

Recommended Posts

  • 0
  • VIP
Posted (edited)
item.cpp:

int CItem::FindEquipCell(LPCHARACTER ch, int iCandidateCell)
{
	[...]
	if (GetType() == ITEM_DS || GetType() == ITEM_SPECIAL_DS)
	{
		[...]
	}
	else if (GetType() == ITEM_COSTUME)
	{
		[...]
	}
	// look if you have this
	else if (GetType() == ITEM_RING)
	{
		if (ch->GetWear(WEAR_RING1))
			return WEAR_RING2;
		else
			return WEAR_RING1;
	}
	// look if you have this
	else if (GetType() == ITEM_BELT)
		return WEAR_BELT;
	else if (GetWearFlag() & WEARABLE_BODY)
		return WEAR_BODY;
	[...]
}

Tbh i don't think it's there since that's for you to equip, but I remember that before I had that disabled and the bonuses didn't work for me either. But you lose nothing by trying.

Edited by WLsj24 (see edit history)
Link to post
  • 0
1 hour ago, igorvhonra said:

Did you add the bonuses into the special item group?

 

I don't think I do, gonna look into it.

 

 

31 minutes ago, WLsj24 said:

-snip-

 

Yeah I did have this in place, thanks tho.

Link to post
  • 0
  • VIP
11 minutes ago, takbardzo said:

 

I don't think I do, gonna look into it.

 

 

 

Yeah I did have this in place, thanks tho.

But, you are sure it not giving bonus? Or just not showing them?. Can you equip the ring and put:
/state

?

Link to post
  • 0
Posted (edited)
5 minutes ago, WLsj24 said:

--

 

Thanks for replying, just did the /state test. It's supposed to award +1k HP. Lower one is after putting it on but there's no change anyway. Craap.

 

spacer.png

Edited by takbardzo (see edit history)
  • Sad 1
Link to post
  • 0

Maybe i'm offing maybe not but i just gave the rings item_proto bonus and that will work, also you can show them to players with uitooltip.py, so either better.

Link to post
  • 0
On 7/3/2020 at 12:25 PM, TMP4 said:

Maybe i'm offing maybe not but i just gave the rings item_proto bonus and that will work, also you can show them to players with uitooltip.py, so either better.

 

Yup! It did work. Seems like item_ring reads bonuses from item_proto just like weapons, armors etc, or whatever. Thank you! It works flawlessly now.

Link to post

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


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