milk 8 Posted January 30, 2015 Hello, Hercules community! I have a little trouble with renaming homunculus. Why client says that it is possible to rename already renamed homunculus? In my conf/battle/homunc.conf // Can you name a homunculus more then once? (Note 1)hom_rename: no I am using 2014-02-15bRagexe. As I remember - in older clients there was no problems with it. Fix me if I'm wrong c: Is it client issue? Is there possible to fix it? Thanks! Quote Share this post Link to post Share on other sites
0 Garr 117 Posted February 13, 2015 (edited) void clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag) {... // Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true) WBUFB(buf,26)=(battle_config.hom_rename && hd->homunculus.rename_flag ? 0x1 : 0x0) | (hd->homunculus.vaporize == HOM_ST_REST ? 0x2 : 0) | (hd->homunculus.hp > 0 ? 0x4 : 0); WBUFW(buf,27)=hd->homunculus.level;... } The one on 26th offset; When battle_config.hom_rename is false, first expression is always false, so it always thinks that homun is NOT YET RENAMED. I'd replaced it with (battle_config.hom_rename?0:hd->homunculus.rename_flag) And now it works fine. Edited February 13, 2015 by Garr 2 Lilystar and milk reacted to this Quote Share this post Link to post Share on other sites
0 Lilystar 42 Posted February 13, 2015 (edited) I tried it. Hercules I tried again. Other emulator Hercules (commits 13,832)2013-12-23bRagexe (To confirm it in all emulators) Edited February 13, 2015 by Lilystar Quote Share this post Link to post Share on other sites
0 Lilystar 42 Posted February 14, 2015 void clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag) {... // Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true) WBUFB(buf,26)=(battle_config.hom_rename && hd->homunculus.rename_flag ? 0x1 : 0x0) | (hd->homunculus.vaporize == HOM_ST_REST ? 0x2 : 0) | (hd->homunculus.hp > 0 ? 0x4 : 0); WBUFW(buf,27)=hd->homunculus.level;... } The one on 26th offset; When battle_config.hom_rename is false, first expression is always false, so it always thinks that homun is NOT YET RENAMED. I'd replaced it with (battle_config.hom_rename?0:hd->homunculus.rename_flag) And now it works fine. I was able to check the operation. Quote Share this post Link to post Share on other sites
0 milk 8 Posted February 15, 2015 void clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag) {... // Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true) WBUFB(buf,26)=(battle_config.hom_rename && hd->homunculus.rename_flag ? 0x1 : 0x0) | (hd->homunculus.vaporize == HOM_ST_REST ? 0x2 : 0) | (hd->homunculus.hp > 0 ? 0x4 : 0); WBUFW(buf,27)=hd->homunculus.level;... } The one on 26th offset; When battle_config.hom_rename is false, first expression is always false, so it always thinks that homun is NOT YET RENAMED. I'd replaced it with (battle_config.hom_rename?0:hd->homunculus.rename_flag) And now it works fine. It works like a charm. Thanks for help! Quote Share this post Link to post Share on other sites
0 evilpuncker 503 Posted February 15, 2015 void clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag) {... // Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true) WBUFB(buf,26)=(battle_config.hom_rename && hd->homunculus.rename_flag ? 0x1 : 0x0) | (hd->homunculus.vaporize == HOM_ST_REST ? 0x2 : 0) | (hd->homunculus.hp > 0 ? 0x4 : 0); WBUFW(buf,27)=hd->homunculus.level;... } The one on 26th offset; When battle_config.hom_rename is false, first expression is always false, so it always thinks that homun is NOT YET RENAMED. I'd replaced it with (battle_config.hom_rename?0:hd->homunculus.rename_flag) And now it works fine. seems like we got a bug to report to the dev team here? xD Quote Share this post Link to post Share on other sites
0 Garr 117 Posted February 15, 2015 I'd pull the fix, but my experience with github is very... limited at best >.> For the alternative, (!battle_config.hom_rename && hd->homunculus.rename_flag ? 0x1 : 0x0) Should work too, as if it's false the outcome will rely on rename flag, if it's true it should always be false anyways Quote Share this post Link to post Share on other sites
Hello, Hercules community!
I have a little trouble with renaming homunculus.
Why client says that it is possible to rename already renamed homunculus?
In my conf/battle/homunc.conf
I am using 2014-02-15bRagexe.
As I remember - in older clients there was no problems with it. Fix me if I'm wrong c:
Is it client issue? Is there possible to fix it?
Thanks!
Share this post
Link to post
Share on other sites