Source-X icon indicating copy to clipboard operation
Source-X copied to clipboard

wrong message on lack of reagent

Open GitMadKing opened this issue 4 years ago • 7 comments

when casting spell, without reagent

you get the defname of missing reagent in the sysmessage

if override in messagges

spell_try_noregs "You lack %s for this spell"

you see correctly the name of reagent

GitMadKing avatar May 25 '21 15:05 GitMadKing

I'm not able to reproduce

image

Jhobean avatar Oct 05 '21 11:10 Jhobean

@Jhobean hm.. it's reproducible on my side with the default SphereX script pack.

Trying to cast Recall with no reags image same for blood moss.

But then black pearl is displayed correctly (also casting Recall but added mandrake root and blood moss reags before).

image

a1exp avatar Oct 09 '21 22:10 a1exp

Fucking weird it's ok for me.. But i'm sure at 100% I already saw this wrong message too. It's seem to be an intermitent bug... I can't fix if I can't reprodure :-(

Jhobean avatar Oct 10 '21 00:10 Jhobean

Ok I know How reproduce. If you have a new char on gm account .add i_spellbook .xmore1 0fffff

Witch GM turn OFF and ini setting you need regs. .cast 10 You will get the message with the defname! .add i_reag_nightshade and make it appear on the ground next to you. Now you will see the name instead of defname (magicaly it's fixed!)

Same patern for each reag .cast 11 for i_reag_ginseng image

Now come the Fucking weird part! With the nightshade next to you again, save the shard and reboot server Login again and .cast 10 You will get the message with the name because the item is near your character

Delete the item on ground Save the shard and reboot server .cast 10 You will get the message with the defname AGAIN!!!

Jhobean avatar Nov 30 '22 01:11 Jhobean

I did some tests and looks like: If no istance of the reagent object is on the world the following method immagine will call the base method that return the item defname . immagine

Instead if there is at least one istance of the reagent in the world the method above will call the object getname method immagine

drk84 avatar Nov 30 '22 12:11 drk84

Why server check on the save if item is there? That make no sense... Probably faster check the name on the script.

Jhobean avatar Nov 30 '22 12:11 Jhobean

When a save is loaded all the objects are stored in memory

drk84 avatar Nov 30 '22 12:11 drk84