Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CF: bombs can grow experience of any skills



On May 13, 10:01pm, Brian Thomas wrote:
> Subject: Re: CF: bombs can grow experience of any skills
> > From: KAWAMOTO Yosihisa writes:
> >
> > In Crossfire JP mailing list, it is a well-known fact that bombs
> > can grow experience of any skills.  Is this a bug?
> >
> 	yeah. this is a bug. And it seems to fall in line with
> 	other spell-casting bug that wont give exp. I have been
> 	trying to track this down (on and off between work) and
> 	I have to admit Im frustrated. Has anyone recently hacked
> 	on the spell code besides me?
>
> 	The patch that you give for create bomb--its correct, but
> 	it should already be taken care of by set_owner. Why
> 	set_owner is not working is the problem. Is it possible
> 	that a bomb can be created and get_owner returns an owner?
> 	(before set_owner has a chance to do so..) Odd that it is
> 	programed that way.. but perhaps I need to look closer.
>
> 	In the next few days, Im planning to take a look at all
> 	of the places that set_owner is used by the spell code--
> 	cast_cone, fire_arch, create_bomb, fire_bolt, etc. Some
> 	place is goofed up perhaps. Or maybe set_owner needs a
> 	further (*sigh*) revamp. I hope not. But this problem with
> 	intermittant experience awards for spell casting (and
> 	xp going to the wrong skills!) is a serious one.
>
> 						-b.t.
>-- End of excerpt from Brian Thomas

 My immediate thought on the problem is that set_owner could be setting the
owner to the wrong thing.  I am not sure what it is  supposed to be set to now
for spell casting, but maybe it is being set to the player object or an
incorrect experience object.  I am not sure how it works out with the pseudo
player object that is also used for casting spells (that is a pretty bad hack
right there - a better idea would be to pass any relevant data values to the
function that needs them, but that requires more work.)

 Since crossfire is single thread, there should never be an issue of things not
being called out of order.  There could be an issue of a function calling
something and you weren't expecting that to be called.

 I have a feeling that either tracking through with a debugger or just adding a
few LOG lines when it is adding experience on what it is adding it to could be
useful in trying to figure out the problem.

 I still need to find some time to apply the bundle of patches I have already
received before I can look into adding/tracking down other bugs.



-- 
 --Mark