Daegaladh Posted August 21, 2024 Posted August 21, 2024 View File @hidepet / @hidepetall commands @hidepet allows to hide all pets except the player's, whereas @hidepetall hides all pets, including the player's. This mod also allows to set a default parameter in battle_conf, just add hide_pet: 1 To set all pets hidden except the player's, or 2 for all pets period. Submitter Daegaladh Submitted 08/21/24 Category Source Modifications Video https://youtu.be/VUCVy5i3M64 Content Author Daegaladh 2 1 1 Quote
Poring King Posted August 22, 2024 Posted August 22, 2024 I hope this will add to rA Master . This is really cool idea Quote
Ice Bear Posted August 26, 2024 Posted August 26, 2024 (edited) Is this safe @Daegaladh ? Edited August 26, 2024 by Ice Bear Quote
Daegaladh Posted August 26, 2024 Author Posted August 26, 2024 5 hours ago, Ice Bear said: Is this safe @Daegaladh ? I made this for the lastest rAthena, so just update your rAthena, or use sd->fd instead Quote
Ice Bear Posted August 26, 2024 Posted August 26, 2024 (edited) @Daegaladh thanks manage to solve it. anyone who experience the same error can dm me for the changes thanks again Edited August 26, 2024 by Ice Bear Quote
Ice Bear Posted August 26, 2024 Posted August 26, 2024 Thanks ill check the latest one for this part ill try Quote
Daegaladh Posted September 11, 2024 Author Posted September 11, 2024 I've improved it a bit and added a version compatible with the old clif_clearunit_single for older rAthena versions. Quote
studying Posted September 13, 2024 Posted September 13, 2024 very useful features command for player love it works fine thanks Quote
drigoguille Posted September 18, 2024 Posted September 18, 2024 (edited) Hello! this warning appeared on the console like this even using the old_clearunit version In file included from ../common/cbasetypes.hpp:338:0, from atcommand.hpp:7, from atcommand.cpp:4: ../custom/atcommand.inc: In function ‘int atcommand_hidepet_sub(block_list*, __va_list_tag*)’: ../custom/atcommand.inc:449:18: warning: ‘bool’ is promoted to ‘int’ when passed through ‘...’ if (!va_arg(ap, bool) && sd->pd != nullptr && sd->pd->bl.id == bl->id) { ^ ../custom/atcommand.inc:449:18: note: (so you should pass ‘int’ not ‘bool’ to ‘va_arg’) ../custom/atcommand.inc:449:18: note: if this code is reached, the program will abort ../custom/atcommand.inc:450:17: warning: ‘uint8 {aka unsigned char}’ is promoted to ‘int’ when passed through ‘...’ if(va_arg(ap, uint8) == 2) ^ ../custom/atcommand.inc:450:17: note: if this code is reached, the program will abort @edit Solvet change bool and unit8 to int. "If this will break I don't know but it worked" + if (!va_arg(ap, bool) && sd->pd != nullptr && sd->pd->bl.id == bl->id) { + if(va_arg(ap, uint8) == 2) + clif_spawn(&sd->pd->bl, true); + return 0; + } + TO + if (!va_arg(ap, int) && sd->pd != nullptr && sd->pd->bl.id == bl->id) { + if(va_arg(ap, int) == 2) + clif_spawn(&sd->pd->bl, true); + return 0; + } + Edited September 18, 2024 by drigoguille 1 Quote
Daegaladh Posted September 25, 2024 Author Posted September 25, 2024 (edited) On 9/18/2024 at 2:40 PM, drigoguille said: Hello! this warning appeared on the console like this even using the old_clearunit version In file included from ../common/cbasetypes.hpp:338:0, from atcommand.hpp:7, from atcommand.cpp:4: ../custom/atcommand.inc: In function ‘int atcommand_hidepet_sub(block_list*, __va_list_tag*)’: ../custom/atcommand.inc:449:18: warning: ‘bool’ is promoted to ‘int’ when passed through ‘...’ if (!va_arg(ap, bool) && sd->pd != nullptr && sd->pd->bl.id == bl->id) { ^ ../custom/atcommand.inc:449:18: note: (so you should pass ‘int’ not ‘bool’ to ‘va_arg’) ../custom/atcommand.inc:449:18: note: if this code is reached, the program will abort ../custom/atcommand.inc:450:17: warning: ‘uint8 {aka unsigned char}’ is promoted to ‘int’ when passed through ‘...’ if(va_arg(ap, uint8) == 2) ^ ../custom/atcommand.inc:450:17: note: if this code is reached, the program will abort @edit Solvet change bool and unit8 to int. "If this will break I don't know but it worked" + if (!va_arg(ap, bool) && sd->pd != nullptr && sd->pd->bl.id == bl->id) { + if(va_arg(ap, uint8) == 2) + clif_spawn(&sd->pd->bl, true); + return 0; + } + TO + if (!va_arg(ap, int) && sd->pd != nullptr && sd->pd->bl.id == bl->id) { + if(va_arg(ap, int) == 2) + clif_spawn(&sd->pd->bl, true); + return 0; + } + When is your rAthena from? I used one from January 1st 2024 as a base for the old clif_clearunit_single version. Not sure why you get that warning, since all and prev_state are defined as bool and uint8 respectively. It seems to be an issue with the compiler, I'll fix it on the next version Edited September 25, 2024 by Daegaladh Quote
louigui0224 Posted October 2, 2024 Posted October 2, 2024 How to fix this? clif_clearunit_single(bl->id, CLR_OUTSIGHT, *sd); Quote
Daegaladh Posted October 3, 2024 Author Posted October 3, 2024 15 hours ago, louigui0224 said: How to fix this? clif_clearunit_single(bl->id, CLR_OUTSIGHT, *sd); Just use the old clif_clearunit_single version or update your rAthena Quote
EAJ_BASEMASK Posted October 4, 2024 Posted October 4, 2024 clif_clearunit_single(bl->id, CLR_OUTSIGHT, fd); Quote
Daegaladh Posted October 4, 2024 Author Posted October 4, 2024 10 hours ago, EAJ_BASEMASK said: clif_clearunit_single(bl->id, CLR_OUTSIGHT, fd); That's incorrect, there's no direct access to fd on that function. Plus I already provided a fix for that specific version. Quote
EAJ_BASEMASK Posted October 4, 2024 Posted October 4, 2024 6 hours ago, Daegaladh said: That's incorrect, there's no direct access to fd on that function. Plus I already provided a fix for that specific version. i just realized it was changed, the headers changes as well in this commit: https://github.com/rathena/rathena/commit/5df7de2b15959b234d0b1a73c534b1720e3acc21 Quote
Daegaladh Posted October 5, 2024 Author Posted October 5, 2024 That's why I released 2 versions of the patch, for before and after clif_clearunit_single changes. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.