Nicolas Weeger wrote: > 'lo everyone. > > I checked code related to bug #1082534 ( > https://sourceforge.net/tracker/index.php?func=detail&aid=1082534&group_id=13833&atid=113833 > ), about monks able to wear weapons. > > The issue is pretty simple: when becoming monk, code sees the classname > is 'monk' and clears the 'use_weapons' flag. > Then, when praying over an altar, the code updates that flag with the > god's one - thus setting it (not Gaea's case !). > > For dragons, isn't an issue as they don't have arms in the first place > and thus can't wear weapons. But other players can use weapons again. > > I see 2 ways to fix that: > * use the 'body' [precisely arm counts] fields for the player to remove > weapon use - ie change the player's body according to class, setting > arms to 0 for monks. > * inserting a force in player's inventory to keep track of that fact, or > the class. I'd be most inclined to do something like #2 - insert a copy of the appropriate class force object into the player, so we can know what attributes come from class vs other attributes. Because that is the real cause of the problem now - the can_use_weapons is a simple flag, so when you change from a god that doesn't allow weapons to one that does, there is no way for the source to really know if you should be allowed to use weapons (was the prohibition god, or god + class/something else). > > Both hae drawbacks - 1st may be weird, and cause issues if we ever > decide to let players change class. > 2nd may be expanded to something else (rings, girdles, ...) but requires > a few more checks. I can't see any real problems with it. Note that the can_use_weapons is 'special' in the sense you can't use weapons, but can use other equipment that requires ones arms (eg, shields, possible other things). _______________________________________________ crossfire-devel mailing list crossfire-devel at lists.real-time.com https://mailman.real-time.com/mailman/listinfo/crossfire-devel