Jump to content
  • 0

Charms System


Lelouch vi Britannia

Question


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  715
  • Reputation:   83
  • Joined:  01/05/12
  • Last Seen:  

I have this charms system working again from here but theres a lil problem on its effects everytime i create an item that has charms system on it the effects are stacking maybe you can help me fix this...

ex. If i have 5 of that item it will not read 5 effects but only 1 effect only.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   45
  • Joined:  08/14/12
  • Last Seen:  

No, you're supposed to remove IT_CHARM from the list.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.04
  • Content Count:  789
  • Reputation:   50
  • Joined:  04/16/12
  • Last Seen:  

I have this charms system working again from here but theres a lil problem on its effects everytime i create an item that has charms system on it the effects are stacking maybe you can help me fix this...

ex. If i have 5 of that item it will not read 5 effects but only 1 effect only.

The author answered it if you dont do this code below it will solved your problem

example

SS1: item#15000 gives 100 str

SS2: see in my etc i have 500pcs of it still i have only 100 str

/*==========================================

* Alternate version of itemdb_isstackable

*------------------------------------------*/

int itemdb_isstackable2(struct item_data *data)

{

nullpo_retr(0, data);

switch(data->type) {

     case IT_WEAPON:

     case IT_ARMOR:

     case IT_PETEGG:

     case IT_PETARMOR:

+ case IT_CHARM:

         return 0;

 

post-3976-0-16830300-1471485131_thumb.jpg

post-3976-0-57809800-1471485144_thumb.jpg

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  715
  • Reputation:   83
  • Joined:  01/05/12
  • Last Seen:  

I already did that..

/** Checks if item is stackable or not
* @param id Item data
* @return True if item is stackable, false otherwise
*/
bool itemdb_isstackable2(struct item_data *id)
{
	nullpo_ret(id);
	switch(id->type) {
		case IT_WEAPON:
		case IT_ARMOR:
		case IT_PETEGG:
		case IT_PETARMOR:
		case IT_SHADOWGEAR:
		case IT_CHARM:
			return false;
		default:
			return true;
	}
}

But as you can see in the pic below its not working...


2d17nh5.jpg

 

Edited by Lelouch vi Britannia
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  715
  • Reputation:   83
  • Joined:  01/05/12
  • Last Seen:  

No, you're supposed to remove IT_CHARM from the list.

Yea it works thanks :D

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.04
  • Content Count:  789
  • Reputation:   50
  • Joined:  04/16/12
  • Last Seen:  

 

No, you're supposed to remove IT_CHARM from the list.

Yea it works thanks :D

 

 

yah i said if he do the code i've given he will encountered his issue lol

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...