Hercules icon indicating copy to clipboard operation
Hercules copied to clipboard

Correct item type 11 to be Restricted usable item type.

Open hemagx opened this issue 9 years ago • 23 comments

Now this type gonna make the usable item not usable on sit/mount and not delayed consumer anymore. to make an item delayed consumer you have to use KeepAfterUse option.

Current Tasks to be done before merge :

  • [x] Source Edit
  • [x] Check all items in database to make sure all items that should be delayed updated
  • [ ] Update Wiki And inform community

Correct issue #888

hemagx avatar Dec 14 '15 19:12 hemagx

wait wait wait ... you mean you really gonna change the type 11 behavior so all our customs has to add KeepAfterUse flag ?

AnnieRuru avatar Dec 14 '15 19:12 AnnieRuru

yes.

hemagx avatar Dec 14 '15 19:12 hemagx

then you have to fix *itemskill and *pet script command as well I just tested firebolt scroll (690) not working after this patch

EDIT: yup it fixed ... what a force commit push ...

AnnieRuru avatar Dec 14 '15 20:12 AnnieRuru

@MishimaHaruna

at pc.c ( pc_useitem )

    if (sd->inventory_data[n]->flag.keepafteruse)
        clif->useitemack(sd,n,amount,true);
    else {
        if (sd->status.inventory[n].expire_time == 0) {
            clif->useitemack(sd, n, amount - 1, true);
            removeItem = true;
        } else {
            clif->useitemack(sd, n, 0, false);
        }
    }

would not be better for customize to only keep items with flag (keepafteruse) ? you can still assign it to rental item

@AnnieRuru Fixed

hemagx avatar Dec 14 '15 20:12 hemagx

Current Commit should be last one for source hopefully.

hemagx avatar Dec 15 '15 14:12 hemagx

@AnnieRuru @Jedzkie Please help me in check items as i have no knowledge about it

hemagx avatar Dec 15 '15 15:12 hemagx

if you wanna change the name, there are a few places left https://github.com/HerculesWS/Hercules/blob/master/conf/battle/party.conf#L28 https://github.com/HerculesWS/Hercules/blob/master/src/plugins/db2sql.c#L76

check items ? example ? most item type 11 that not using *itemskill or *pet need to add KeepAfterUse flag, that is ...

AnnieRuru avatar Dec 16 '15 00:12 AnnieRuru

pet taming are not even type 11, tho it should be type 11. for itemskill, well it's custom change to those items.

hemagx avatar Dec 16 '15 00:12 hemagx

@hemagx Upon double clicking the scroll it already consumes 1 scroll and upon clicking it to the target another 1 is consumed. Im not just sure maybe there is something wrong when i applied the code?

kyeme avatar Dec 16 '15 05:12 kyeme

nope I don't get that error ... how did you apply the code ? manually ?

http://stackoverflow.com/questions/6188591/download-github-pull-request-as-unified-diff always download the pull request patch by adding .diff on it like this pull request is https://github.com/HerculesWS/Hercules/pull/953 add .diff at the end https://github.com/HerculesWS/Hercules/pull/953.diff

AnnieRuru avatar Dec 16 '15 05:12 AnnieRuru

@AnnieRuru I will apply again, thanks for the tip.

kyeme avatar Dec 16 '15 05:12 kyeme

the source seem to had enough testing, however i can't inform community and edit wiki myself cause i suck in this. @MishimaHaruna @Mysteries @dastgir @4144

hemagx avatar Dec 20 '15 16:12 hemagx

~Up~

kyeme avatar Dec 23 '15 15:12 kyeme

Boarding halter <- rental.

kyeme avatar Dec 23 '15 15:12 kyeme

Yep, rental, but if you have it not rental on Aegis it never gone :) so i believe it's hard coded ^^

hemagx avatar Dec 23 '15 18:12 hemagx

The db2sql plugin will no longer compile after this.

StrBuf->Printf(&buf, "'%u',", it->flag.delay_consume?IT_DELAYCONSUME:it->type);

I think we can change it to just this?

StrBuf->Printf(&buf, "'%u',", it->type);

MishimaHaruna avatar Jan 05 '16 12:01 MishimaHaruna

i believe so haruka

hemagx avatar Jan 05 '16 13:01 hemagx

~ Up ~

kyeme avatar Jan 21 '16 03:01 kyeme

Is this ready to merge (except for the edit suggested above)?

MishimaHaruna avatar Feb 21 '16 19:02 MishimaHaruna

@MishimaHaruna exporting list from Aegis

hemagx avatar Feb 21 '16 20:02 hemagx

@hemagx what's left?

dastgirp avatar Mar 19 '16 06:03 dastgirp

This change is Reviewable

HerculesWSAPI avatar Mar 20 '18 22:03 HerculesWSAPI

Requesting for rebase thanks~

MrKeiKun avatar Jul 30 '21 03:07 MrKeiKun