Sphereserver / Source-X

Ultima Online server emulator
Apache License 2.0
53 stars 41 forks source link

wrong message on lack of reagent #690

Open GitMadKing opened 3 years ago

GitMadKing commented 3 years ago

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

Jhobean commented 2 years ago

I'm not able to reproduce

image

a1exp commented 2 years ago

@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

Jhobean commented 2 years ago

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 commented 1 year ago

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!!!

drk84 commented 1 year ago

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

Jhobean commented 1 year ago

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

drk84 commented 1 year ago

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